:root {
  /* Röseren-Farben (roeseren.ch): Tanne, Sonne, Wiese, Papier */
  --bg: #F6F5F0;
  --panel: #ffffff;
  --rail: #00463B;
  --rail-fg: #cfe1da;
  --ink: #3C3C3B;
  --muted: #6F6F6C;
  --line: #E4E3DB;
  --soft: #F0EFE8;
  --accent: #00463B;
  --accent-ink: #ffffff;
  --accent-soft: #E1ECE8;
  --sonne: #FAB600;
  --sonne-soft: #FEF1CC;
  --sonne-ink: #7A5700;
  --wiese: #78BE20;
  --danger: #B42318;
  --warn: #7A5700;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 54, 45, .06), 0 8px 24px rgba(0, 54, 45, .08);
  font-family: "Franz Sans", "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons & Inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel);
  padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.icon { padding: 6px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.input:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label.field { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
label.field > span { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.role-badge { color: #fff; }
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 10% -10%, #E7EFD9 0, transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.login-card h1 { margin: 12px 0 4px; font-size: 22px; }
.logo { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; }
.logo svg { width: 22px; height: 22px; }
.demo-users { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.demo-users button { display: flex; width: 100%; justify-content: space-between; border: 0; background: none; padding: 6px 4px;
  border-radius: 6px; cursor: pointer; text-align: left; }
.demo-users button:hover { background: var(--soft); }
.error { color: var(--danger); font-size: 13px; }

/* Shell */
.shell { display: grid; grid-template-columns: 76px 1fr; height: 100vh; }
.rail { background: var(--rail); color: var(--rail-fg); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; }
.rail .org-btn { width: 48px; height: 48px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 700; color: #fff;
  font-size: 15px; margin-bottom: 10px; position: relative; }
.rail .org-btn::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--rail) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfe3df' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/10px no-repeat; }
.rail .nav { width: 64px; padding: 8px 0 6px; border: 0; background: transparent; color: var(--rail-fg); border-radius: 10px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; position: relative; }
.rail .nav svg { width: 22px; height: 22px; }
.rail .nav:hover { background: rgba(255,255,255,.07); }
.rail .nav.active { background: rgba(255,255,255,.14); color: #fff; }
.rail .nav .count { position: absolute; top: 2px; right: 8px; background: #f97316; }
.rail .spacer { flex: 1; }
.rail .me { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); cursor: pointer; padding: 0; }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; }
.page { flex: 1; overflow: auto; padding: 24px 32px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 20px; }

/* Popover menu */
.menu { position: fixed; z-index: 50; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line);
  min-width: 240px; padding: 6px; }
.menu .item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; text-align: left; }
.menu .item:hover { background: var(--soft); }
.menu .item.active { background: var(--accent-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .label { padding: 6px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Avatar */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600;
  font-size: 12px; flex-shrink: 0; position: relative; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: #9ca3af; }
.avatar .dot.on { background: #16a34a; }

/* Modal */
.backdrop { position: fixed; inset: 0; background: rgba(16, 24, 22, .4); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal.wide { max-width: 860px; }
.modal header { padding: 18px 20px 0; font-size: 17px; font-weight: 600; display: flex; align-items: center; }
.modal .body { padding: 16px 20px; overflow: auto; }
.modal footer { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }

/* Toast */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 400; }
.toast { background: #1c2321; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 360px; animation: pop .15s ease-out; }
.toast.error { background: var(--danger); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

/* Two-column module layout (Chat) */
.side { width: 260px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-head { padding: 16px 16px 8px; }
.side-head .org-name { font-weight: 700; font-size: 16px; }
.side-scroll { overflow: auto; flex: 1; padding: 0 8px 16px; }
.side-section { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.side-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: var(--ink); text-decoration: none; }
.side-item:hover { background: var(--soft); }
.side-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-item.unread { font-weight: 700; }
.side-item svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.side-section .presence-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; margin-right: 6px; vertical-align: 1px; }
.side-section .presence-dot.on { background: #16a34a; }
.side-toggle { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.side-toggle:hover { color: var(--ink); }
.side-toggle .chev { display: inline-block; font-size: 15px; line-height: 1; transition: transform .15s; }
.side-toggle .chev.open { transform: rotate(90deg); }
.side-item.offline { color: var(--muted); }
.side-item.offline .avatar { opacity: .6; }
.side-item.offline.unread, .side-item.offline.active { color: var(--ink); }
.side-item.offline.active { color: var(--accent); }
.side-more { padding: 2px 8px 6px; }
body.reloading { cursor: progress; opacity: .7; transition: opacity .2s; }

.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--panel); }
.chat-head { padding: 12px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-head .title { font-weight: 700; font-size: 16px; }
.messages { flex: 1; overflow: auto; padding: 12px 20px; }
.day { text-align: center; margin: 16px 0 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.day::before, .day::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.msg { display: flex; gap: 10px; padding: 4px 8px; margin: 0 -8px; border-radius: 8px; position: relative; }
.msg:hover { background: #fafbfa; }
.msg .meta { display: flex; align-items: baseline; gap: 8px; }
.msg .name { font-weight: 700; }
.msg .time { font-size: 11px; color: var(--muted); }
.msg .text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.msg.cont { padding-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg.offline > .avatar { opacity: .6; }
.msg .avatar { transition: opacity .3s; }
.msg .tools { position: absolute; right: 8px; top: 2px; display: none; }
.msg:hover .tools { display: block; }
.msg .deleted { color: var(--muted); font-style: italic; }
.attach { margin-top: 6px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; text-decoration: none; color: var(--ink); max-width: 360px; }
.attach:hover { background: var(--soft); }
.attach-img { margin-top: 6px; display: block; max-width: 360px; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
.typing { height: 20px; padding: 0 20px; font-size: 12px; color: var(--muted); }
.composer { padding: 0 20px 16px; }
.composer-box { border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: flex-end; gap: 6px; padding: 6px; }
.composer-box:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; border: 0; resize: none; outline: none; padding: 6px; max-height: 160px; min-height: 22px; background: transparent; }
.readonly-note { padding: 12px 20px 16px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.empty { padding: 48px; text-align: center; color: var(--muted); }

/* Tabelle (Ablage, Admin) */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfa; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #fafbfa; }
.file-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--soft); color: var(--muted); flex-shrink: 0; }
.file-ico.folder { background: #fdf3d7; color: #b7791f; }
.file-ico.folder.personal { background: #e2f0e6; color: #24704f; }
.file-ico svg { width: 18px; height: 18px; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 600; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; cursor: pointer; }
.crumbs a:hover { color: var(--ink); }
.dropzone { position: fixed; inset: 0; background: rgba(0, 70, 59, .12); border: 3px dashed var(--accent); z-index: 90; display: grid; place-items: center; font-size: 18px; font-weight: 600; color: var(--accent); pointer-events: none; }
.preview-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; }
.preview-text { white-space: pre-wrap; background: #fafbfa; border: 1px solid var(--line); padding: 12px; border-radius: 8px; max-height: 70vh; overflow: auto; font-family: ui-monospace, monospace; font-size: 13px; }
.progress { height: 4px; background: var(--soft); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress > div { height: 100%; background: #9CCB6A; width: 0; transition: width .2s; }

/* Karten (Video, Übersicht) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { margin: 0; font-size: 16px; }
.stat { font-size: 26px; font-weight: 700; }

/* Video */
.call { flex: 1; display: flex; flex-direction: column; background: #0d1715; color: #fff; min-height: 0; }
.call-head { padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.tiles { flex: 1; display: grid; gap: 10px; padding: 10px 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-content: center; overflow: auto; }
.tile { position: relative; background: #1d2b28; border-radius: 12px; aspect-ratio: 16/9; overflow: hidden; display: grid; place-items: center; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Safari: ohne absolute Position nimmt das Video in der Kachel seine eigene Höhe an und zeigt nur den oberen Bildteil */
.tile video.portrait { object-fit: contain; background: #0d1715; }
.tile .who { position: absolute; left: 10px; bottom: 8px; background: rgba(0,0,0,.5); padding: 3px 8px; border-radius: 6px; font-size: 12px; }
.tile .placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.call-bar { display: flex; justify-content: center; gap: 12px; padding: 16px; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #2b3b37; color: #fff; display: grid; place-items: center; cursor: pointer; }
.round svg { width: 22px; height: 22px; }
.round.off { background: #fff; color: #0d1715; }
.round.leave { background: #dc2626; }
.jitsi { flex: 1; border: 0; width: 100%; }

/* Rechte-Matrix */
.matrix { border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.matrix th, .matrix td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.matrix thead th { position: sticky; top: 0; background: #fafbfa; z-index: 1; font-size: 12px; text-align: center; }
.matrix td.c { text-align: center; }
.matrix tr.group td { background: #f4f6f4; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.matrix code { font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab { padding: 10px 14px; border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; }
.tab.active { color: var(--accent); border-color: var(--accent); }
.audit-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mono { font-family: ui-monospace, monospace; font-size: 12px; }
.secret { font-family: ui-monospace, monospace; font-size: 16px; background: var(--soft); padding: 10px; border-radius: 8px; text-align: center; letter-spacing: .05em; user-select: all; }

.back-mobile { display: none !important; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr 64px; }
  .rail { order: 2; flex-direction: row; justify-content: space-around; padding: 4px 8px; }
  .rail .org-btn { width: 40px; height: 40px; margin: 0; }
  .rail .spacer { display: none; }
  .side { width: 100%; }
  .view.has-active .side { display: none; }
  .view:not(.has-active) .chat { display: none; }
  .page { padding: 16px; }
  .back-mobile { display: inline-flex !important; }
}

/* Zweisprachigkeit */
.lang-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; background: var(--soft); color: var(--muted); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.lang-switch button { border: 0; background: transparent; padding: 5px 9px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); }
.lang-switch button.on { background: var(--accent); color: #fff; }
.rail .lang-switch.rail-lang { border-color: rgba(255,255,255,.2); margin-bottom: 10px; }
.rail .lang-switch.rail-lang button { color: var(--rail-fg); padding: 4px 7px; font-size: 11px; }
.rail .lang-switch.rail-lang button.on { background: #fff; color: var(--rail); }
.rail .org-btn.long { font-size: 12px; letter-spacing: -.02em; }
.bi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bi-col { display: flex; align-items: center; gap: 6px; }
.bi-col .lang-tag { flex-shrink: 0; }
.msg .translation { margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--accent-soft); background: #f7faf9; border-radius: 0 8px 8px 0; color: #34403c; white-space: pre-wrap; }
.msg .tr-link { border: 0; background: none; padding: 0; margin-top: 2px; font-size: 12px; color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.msg .tr-link:hover { text-decoration: underline; }
.affil { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .rail .lang-switch.rail-lang { margin: 0; }
  .bi { grid-template-columns: 1fr; }
}

/* Logo des Verbands */
.brand-slot { display: inline-flex; align-items: center; }
.login-logo { height: 46px; width: auto; display: block; margin-bottom: 4px; }
.topbar { height: 48px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.top-logo { height: 26px; width: auto; display: block; }
.top-sep { width: 1px; height: 22px; background: var(--line); }
.top-title { font-size: 13px; color: var(--muted); }
.view-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view-host > .view { flex: 1; min-height: 0; }
@media (max-width: 760px) { .top-sep, .top-title { display: none; } .topbar { height: 44px; padding: 0 14px; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { overflow-x: auto; gap: 2px; }
  .rail .nav { width: auto; min-width: 58px; padding: 6px 6px; font-size: 10px; }
  .rail .lang-switch.rail-lang { display: none; } /* Sprache auf dem Handy über das Profilmenü */
  .rail .me { flex-shrink: 0; }
}
.login { grid-template-rows: 1fr auto; }
.login-card { align-self: center; justify-self: center; }
.login-sub { margin-top: 10px; }
.login-foot { justify-self: center; padding: 16px 0 4px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }

/* Emoji-Auswahl */
.composer-box { position: relative; }
.emoji-btn { font-size: 18px; line-height: 1; width: 32px; height: 32px; justify-content: center; filter: grayscale(.3); }
.emoji-btn:hover { filter: none; }
.emoji-pop { position: absolute; bottom: calc(100% + 8px); right: 44px; width: min(340px, calc(100vw - 32px)); background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; display: flex; flex-direction: column; }
.emoji-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); }
.emoji-tabs button { border: 0; background: none; font-size: 18px; border-radius: 6px; padding: 4px 6px; cursor: pointer; }
.emoji-tabs button:hover { background: var(--soft); }
.emoji-scroll { max-height: 260px; overflow-y: auto; padding: 4px 8px 8px; }
.emoji-cat { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 2px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); }
.emoji-grid button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 5px 0; border-radius: 6px; cursor: pointer; }
.emoji-grid button:hover { background: var(--soft); transform: scale(1.15); }
@media (max-width: 760px) { .emoji-pop { right: 0; } }

/* Aufzeichnung */
.round.rec { color: #f87171; }
.t-glyph { font: 700 19px/1 Georgia, 'Times New Roman', serif; }
.file-ico.t-glyph { display: grid; place-items: center; font-size: 20px; }
.round.rec-text { color: #93c5fd; }
.round:disabled { opacity: .4; cursor: not-allowed; }
.round.rec.recording { background: #dc2626; color: #fff; animation: recpulse 1.6s infinite; }
.round:disabled { opacity: .45; cursor: default; }
@keyframes recpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.6); } 50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); } }
.rec-banner { display: inline-flex; align-items: center; gap: 8px; background: rgba(220,38,38,.18); border: 1px solid rgba(248,113,113,.6);
  color: #fecaca; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.rec-option { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.rec-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rec-note { display: flex; gap: 8px; align-items: flex-start; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.rec-note svg { flex-shrink: 0; margin-top: 2px; }
.rec-player { width: 100%; max-height: 46vh; background: #000; border-radius: 10px; margin-bottom: 14px; }
.rec-audio { width: 100%; margin-bottom: 14px; }
.badge.status-done { background: #dcfce7; color: #00463B; }
.badge.status-error { background: #fee2e2; color: #991b1b; }
.badge.status-recording { background: #fee2e2; color: #b91c1c; }
.badge.status-transcribing, .badge.status-summarizing { background: #E1ECE8; color: #0A5246; }
.spin { width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.md h3 { font-size: 15px; margin: 14px 0 6px; }
.md h4 { font-size: 14px; margin: 14px 0 4px; color: var(--accent); }
.md p { margin: 4px 0; line-height: 1.5; }
.md ul { margin: 4px 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; line-height: 1.45; }
.rec-detail .tabs { margin-top: 4px; }
a.btn { text-decoration: none; color: inherit; }
.folder-link { color: var(--accent); text-decoration: none; gap: 6px; }
.folder-link:hover { text-decoration: underline; }
.folder-link svg, .card .small.row svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Einstellungen für Kamera und Ton (Videokonferenz) */
.tile video.mirror, .av-video.mirror { transform: scaleX(-1); }
.av-settings .tabs { margin-bottom: 16px; }
.av-preview { position: relative; background: #0d1715; border-radius: 10px; aspect-ratio: 16/9; overflow: hidden; }
.av-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-note { position: absolute; inset: 0; display: grid; place-items: center; color: #cfe1da; font-size: 13px; text-align: center; padding: 12px; }
.av-meter { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin: 2px 0 6px; }
.av-meter-bar { height: 100%; width: 0; background: var(--accent); transition: width .08s linear; }
.av-hint { display: block; font-weight: 400; }
.check > span { display: flex; flex-direction: column; }
.tile.failed { outline: 2px solid #f87171; }
.tile.failed::after { content: '⚠'; position: absolute; top: 8px; right: 10px; color: #fca5a5; font-size: 18px; }

/* ---------- Meeting wie Zoom/Teams: Teilnehmende, Warteraum, Hand, Reaktionen ---------- */
.call-main { flex: 1; display: flex; min-height: 0; }
.stage { flex: 1; position: relative; display: flex; min-width: 0; }
.stage .tiles { flex: 1; }
.meeting-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: rgba(255,255,255,.12); padding: 2px 8px; border-radius: 999px; }
.meeting-flag svg { width: 13px; height: 13px; }
.call-bar .round.active { background: #f5f7f6; color: #0d1715; }
.call-bar .round.locked { background: #7f1d1d; color: #fecaca; }
.round .emoji { font-size: 20px; line-height: 1; }
.people-btn { position: relative; }
.count-badge { position: absolute; top: -4px; right: -6px; background: #334155; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; min-width: 18px; }
.people-btn.attention .count-badge { background: #f59e0b; color: #1c1917; animation: recpulse 1.6s infinite; }
.in-lobby .meeting-only { display: none; }
.in-lobby .tiles { display: none; }

.tile-hand { position: absolute; top: 8px; left: 10px; background: #fbbf24; color: #1c1917; font-weight: 700; font-size: 14px; padding: 3px 9px; border-radius: 999px; z-index: 2; }
.tile .who { display: inline-flex; align-items: center; gap: 4px; }
.mic-ind svg { width: 13px; height: 13px; color: #fca5a5; }
.reaction-float { position: absolute; left: 50%; bottom: 40px; font-size: 44px; transform: translateX(-50%); animation: reactfloat 2.6s ease-out forwards; pointer-events: none; z-index: 3; }
@keyframes reactfloat { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -120px) scale(1); } }
.react-pop { position: fixed; z-index: 60; display: flex; gap: 2px; background: #1f2d2a; border: 1px solid #2f413c; padding: 6px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.react-btn { background: none; border: 0; font-size: 26px; padding: 4px 6px; border-radius: 10px; cursor: pointer; }
.react-btn:hover { background: rgba(255,255,255,.12); }
.react-hand { border-left: 1px solid #2f413c; border-radius: 0 10px 10px 0; margin-left: 4px; padding-left: 10px; }
.react-hand.active { background: #fbbf24; }

.people-panel { width: 340px; flex-shrink: 0; background: #ffffff; color: var(--ink); border-left: 1px solid #22322e; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pp-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.small-btn { padding: 5px 10px; font-size: 13px; min-height: 0; }
.btn.icon.small-btn { padding: 5px; }
.pp-section { display: flex; flex-direction: column; gap: 2px; }
.pp-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted, #64748b); padding: 6px 0; }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; }
.pp-row:hover { background: var(--soft, #f1f5f4); }
.pp-name { min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.pp-role { font-size: 11px; color: var(--accent, #00463B); font-weight: 600; }
.pp-hand { background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.pp-ico { display: inline-flex; color: var(--muted, #64748b); }
.pp-ico svg { width: 16px; height: 16px; }
.pp-ico.off { color: #dc2626; }

.lobby { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; }
.lobby-card { width: min(520px, 100%); background: #13211e; border: 1px solid #22322e; border-radius: 16px; padding: 24px; text-align: center; }
.lobby-card h2 { margin: 14px 0 2px; }
.lobby-room { opacity: .7; margin-bottom: 8px; }
.lobby-card p { margin: 6px 0 12px; line-height: 1.5; }
.lobby-preview { position: relative; aspect-ratio: 16/9; background: #0d1715; border-radius: 12px; overflow: hidden; }
.lobby-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lobby-preview video.mirror { transform: scaleX(-1); }
.lobby-avatar { position: absolute; inset: 0; display: grid; place-items: center; transform: scale(2); }
.lobby-hint { opacity: .65; margin-top: 10px; }
.lobby-dots { display: flex; justify-content: center; gap: 6px; }
.lobby-dots span { width: 8px; height: 8px; border-radius: 50%; background: #9CCB6A; animation: blink 1.2s infinite; }
.lobby-dots span:nth-child(2) { animation-delay: .2s; } .lobby-dots span:nth-child(3) { animation-delay: .4s; }

.call-alerts { position: absolute; top: 10px; right: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 5; max-width: 420px; }
.call-alert { display: flex; align-items: center; gap: 8px; background: #fff; color: #1c2b28; padding: 10px 12px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 14px; }

@media (max-width: 760px) {
  .people-panel { position: absolute; inset: 0; width: auto; z-index: 20; border-left: 0; }
  .call-main { position: relative; }
  .call-bar { flex-wrap: wrap; gap: 8px; padding: 10px; }
}

/* ---------- Kalender (angelehnt an Teams/Outlook) ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: inherit; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; }
.seg button svg { width: 15px; height: 15px; }
.seg.rsvp button.on.rsvp-maybe { background: #d97706; }
.seg.rsvp button.on.rsvp-no { background: #b91c1c; }
.cal-page { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.cal-head { flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.cal-nav { gap: 4px; }
.cal-title { margin-left: 8px; font-size: 16px; }
.cal-ev { border: 0; text-align: left; font: inherit; cursor: pointer; background: #edf2ec; color: #26332b; border-left: 3px solid #8aa592; border-radius: 6px; }
.cal-ev.online { background: var(--accent-soft, #E1ECE8); border-left-color: var(--accent, #00463B); color: #0A5246; }
.cal-ev.pending { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.55) 6px 12px); outline: 1px dashed currentColor; outline-offset: -1px; }
.cal-ev.maybe { opacity: .85; border-left-style: dashed; }
.cal-ev.declined { opacity: .55; text-decoration: line-through; }
.cal-ev:hover { filter: brightness(.96); }

.cal-week { display: flex; flex-direction: column; flex: 1; min-height: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cal-week-head, .cal-allday, .cal-grid { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.cal-week-head { border-bottom: 1px solid var(--line); }
.cal-dayhead { padding: 6px 8px; display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: var(--muted); }
.cal-dayhead strong { font-size: 18px; color: var(--ink); }
.cal-dayhead.today strong { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 8px; }
.cal-allday { border-bottom: 1px solid var(--line); }
.cal-allday > div { padding: 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-gutter { font-size: 11px; color: var(--muted); }
.cal-scroll { flex: 1; overflow: auto; min-height: 260px; }
.cal-hour { height: 48px; text-align: right; padding-right: 6px; transform: translateY(-7px); }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.cal-col.today { background: #f7fbf7; }
.cal-slot { height: 48px; border-top: 1px solid #eef2f1; pointer-events: none; }
.cal-block { position: absolute; padding: 3px 6px; display: flex; flex-direction: column; overflow: hidden; font-size: 12px; line-height: 1.3; cursor: pointer; }
.cal-block strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ico { position: absolute; right: 4px; top: 3px; }
.cal-ico svg { width: 13px; height: 13px; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: #dc2626; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; }
.cal-chip { display: block; width: 100%; font-size: 12px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-time { font-weight: 600; margin-right: 4px; }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(96px, 1fr); flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.cal-mhead { padding: 6px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); text-transform: capitalize; min-height: 0; }
.cal-mcell { border-right: 1px solid #eef2f1; border-bottom: 1px solid #eef2f1; padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-mcell.other { background: #fafbfb; color: #94a3b8; }
.cal-mday { align-self: flex-start; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 6px; border-radius: 999px; color: inherit; }
.cal-mcell.today .cal-mday { background: var(--accent); color: #fff; }
.cal-more { border: 0; background: none; font-size: 12px; color: var(--muted); text-align: left; cursor: pointer; padding: 0 6px; }

.cal-list { display: flex; flex-direction: column; gap: 14px; }
.cal-ldate { font-weight: 700; text-transform: capitalize; margin-bottom: 6px; }
.cal-ldate.today { color: var(--accent); }
.cal-lrow { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; margin-bottom: 6px; }
.cal-lrow .grow { display: flex; flex-direction: column; min-width: 0; }
.cal-ltime { width: 100px; flex-shrink: 0; font-size: 13px; font-weight: 600; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.rsvp-yes { background: #dcfce7; color: #00463B; }
.badge.rsvp-maybe { background: #fef3c7; color: #92400e; }
.badge.rsvp-no { background: #fee2e2; color: #991b1b; }

.cal-detail { gap: 12px; }
.cal-dline { display: flex; gap: 10px; align-items: flex-start; }
.cal-dline > svg { flex-shrink: 0; margin-top: 2px; color: var(--muted); }
.cal-desc { white-space: pre-wrap; background: var(--soft, #f4f7f6); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.chip-person { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; background: var(--soft, #f4f7f6); border-radius: 999px; padding: 2px 8px 2px 2px; }
.cal-responses summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.cal-times { gap: 6px; flex-wrap: wrap; }
.cal-times .input { width: auto; }
.cal-opts { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: #fafcfb; }
.cal-people { max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }

.cal-reminders { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.cal-reminder { width: 300px; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.25); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--accent); }

.upcoming { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.upcoming h3 { margin: 0 0 8px; font-size: 15px; }
.upcoming-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-top: 1px solid #eef2f1; }
.upcoming-row:first-of-type { border-top: 0; }
.upcoming-row.live .up-when strong { color: var(--accent); }
.up-when { width: 120px; flex-shrink: 0; display: flex; flex-direction: column; font-size: 13px; }

@media (max-width: 760px) {
  .cal-head .seg { order: 5; }
  .cal-ltime { width: 74px; }
  .upcoming-row { flex-wrap: wrap; }
  .up-when { width: auto; }
}

.check > span.cal-person { flex-direction: row; align-items: center; gap: 8px; }

/* ---------- KI-Assistent «Roboter» ---------- */
.bot-dock { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.bot-dock > * { pointer-events: auto; }
.bot { position: relative; width: 66px; height: 66px; border: 0; padding: 0; background: none; cursor: grab; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); touch-action: none; }
.bot:active { cursor: grabbing; }
.bot-figure { display: inline-flex; }
.bot .bot-svg { transition: transform .2s; }
.bot:hover .bot-svg { transform: translateY(-2px) rotate(-3deg); }
.bot-eye { transform-box: fill-box; transform-origin: center; animation: botblink 4.2s infinite; }
/* Blinzeln wie beim SLH-Roboter: kurz zu, ab und zu doppelt */
@keyframes botblink { 0%, 44%, 50%, 90%, 94%, 97%, 100% { transform: scaleY(1); } 47%, 92%, 95.5% { transform: scaleY(.08); } }
.bot.wave .bot-svg { transform-origin: 50% 85%; animation: botwave .45s ease-in-out 4 alternate; }
@keyframes botwave { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.bot.thinking .bot-dot { animation: botlight .7s steps(2) infinite; }
.bot.thinking .bot-eyes { animation: botlook 1.4s ease-in-out infinite; }
@keyframes botlook { 0%, 100% { transform: translateX(-2.5px); } 50% { transform: translateX(2.5px); } }
.bot.thinking .bot-light { animation: botlight .7s steps(2) infinite; }
@keyframes botlight { 50% { fill: #fff; } }
.bot-badge { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.bot-bubble { max-width: 240px; background: #fff; color: var(--ink); border-radius: 14px 14px 4px 14px; padding: 9px 12px; font-size: 13px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer; animation: botpop .25s ease-out; }
@keyframes botpop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
.bot-dock.win-open .bot { opacity: .0; pointer-events: none; }

.bot-win { position: fixed; z-index: 75; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.bot-win.drop { outline: 3px dashed var(--accent); outline-offset: -6px; }
.bot-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; background: linear-gradient(135deg, #00362D, #00463B); color: #fff; cursor: move; user-select: none; }
.bot-head strong { display: block; font-size: 14px; }
.bot-sub { font-size: 11px; opacity: .8; }
.bot-hbtn { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 8px; padding: 5px 8px; cursor: pointer; font: inherit; font-size: 12px; display: inline-flex; align-items: center; }
.bot-hbtn:hover { background: rgba(255,255,255,.22); }
.bot-hbtn svg { width: 15px; height: 15px; }
.bot-list { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #f7faf9; }
.bot-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.bot-u { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.bot-a { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bot-a .md p { margin: 0 0 6px; } .bot-a .md p:last-child { margin-bottom: 0; }
.bot-a .md h4 { margin: 8px 0 4px; font-size: 14px; }
.bot-a .md ul, .bot-a .md ol { margin: 2px 0 6px; padding-left: 20px; }
.bot-a .md code { background: var(--soft); padding: 1px 4px; border-radius: 4px; font-size: 12px; }
.bot-a .btn { margin-top: 8px; }
.bot-err { align-self: flex-start; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.bot-ufiles { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.bot-ufiles span { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; background: rgba(255,255,255,.2); border-radius: 6px; padding: 1px 6px; }
.bot-ufiles svg { width: 12px; height: 12px; }
.thinking.bot-msg { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
.bot-hello p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.bot-sugg { display: flex; flex-direction: column; gap: 6px; }
.bot-sugg button { text-align: left; border: 1px solid #bbf7d0; background: #f0fdf4; color: #00362D; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.bot-sugg button:hover { background: #dcfce7; }
.bot-sugg svg { width: 14px; height: 14px; }
.bot-note { display: flex; gap: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.bot-note .btn { margin-top: 8px; }
.bot-prop { align-self: stretch; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.bot-prop.done { background: #f8fafc; border-color: var(--line); opacity: .85; }
.bot-prop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bot-prop-head svg { width: 16px; height: 16px; color: #a16207; }
.bot-prop-intro { margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.bot-prop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0 0 8px; }
.bot-prop dt { color: var(--muted); }
.bot-prop dd { margin: 0; white-space: pre-wrap; }
.bot-preview { background: #fff; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; margin-bottom: 8px; }
.bot-preview.md { white-space: normal; max-height: 260px; overflow: auto; font-size: 13px; }
.bot-preview.md h1, .bot-preview.md h2, .bot-preview.md h3 { font-size: 14px; margin: 8px 0 4px; }
.bot-preview.md ul, .bot-preview.md ol { margin: 4px 0; padding-left: 20px; }
.bot-prop dd { white-space: pre-line; }
.bot-prop-actions { display: flex; justify-content: flex-end; gap: 6px; }
.btn.bot-apply { background: #facc15; border-color: #eab308; color: #422006; font-weight: 600; }
.btn.bot-apply:hover { background: #fde047; }
.bot-foot { border-top: 1px solid var(--line); padding: 8px; background: #fff; }
.bot-files { display: flex; flex-wrap: wrap; gap: 4px; }
.bot-files:not(:empty) { margin-bottom: 6px; }
.bot-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 8px; padding: 3px 6px 3px 8px; font-size: 12px; max-width: 100%; }
.bot-chip svg { width: 13px; height: 13px; }
.bot-chip button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--muted); }
.bot-row { display: flex; align-items: flex-end; gap: 6px; }
.bot-input { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; font: inherit; font-size: 14px; max-height: 140px; outline: none; }
.bot-input:focus { border-color: var(--accent); }
.bot-ibtn { border: 0; background: var(--soft); border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--ink); flex-shrink: 0; }
.bot-ibtn:disabled { opacity: .45; cursor: default; }
.bot-send { background: var(--accent); color: #fff; }
.bot-resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, #cbd5e1 50%, #cbd5e1 58%, transparent 58%, transparent 70%, #cbd5e1 70%, #cbd5e1 78%, transparent 78%); }
.bot-orbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafcfb; }
.rec-option.disabled { opacity: .5; }

@media (max-width: 760px) {
  .bot-dock { right: 12px; bottom: 76px; }
  .bot { width: 56px; height: 56px; }
  .bot .bot-svg { width: 54px; height: 54px; }
  .bot-win { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto !important; height: 62vh !important; border-radius: 16px 16px 0 0; }
  .bot-head { cursor: default; }
  .bot-resize { display: none; }
}

.av-help { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 420px; line-height: 1.45; }
.av-help .btn { margin-top: 2px; }

/* Handy: Navigation fest unten angedockt; die Seite selbst scrollt nicht, nur die Inhalte.
   100dvh = sichtbare Höhe (ohne ein- und ausfahrende Adresszeile des Browsers).
   --nav-lift: Safari ab iOS 26 legt seine schwebende Adressleiste über den unteren Rand, ohne das der Seite zu melden –
   dann hebt pwa.js die Leiste um diesen Wert an (in der installierten App und anderswo bleibt er 0). */
:root { --nav-lift: 0px; --bottom-inset: calc(env(safe-area-inset-bottom, 0px) + var(--nav-lift)); }
.shell { height: 100vh; height: 100dvh; }
@media (max-width: 760px) {
  html, body { overflow: hidden; overscroll-behavior: none; }
  .shell { grid-template-rows: minmax(0, 1fr); padding-bottom: calc(64px + var(--bottom-inset)); box-sizing: border-box; }
  .rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(64px + var(--bottom-inset));
    padding-bottom: calc(4px + var(--bottom-inset)); box-sizing: border-box; }
  .main { overflow: hidden; }
  .bot-dock { bottom: calc(76px + var(--bottom-inset)); }
  .bot-win { bottom: var(--nav-lift) !important; }
  .page { overflow-x: hidden; }
  /* Reiter (z.B. Verwaltung) in einer Zeile, seitlich wischbar statt umbrochen und abgeschnitten */
  .tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex-shrink: 0; padding: 10px 12px; }
}
.menu { max-height: calc(100dvh - 90px); overflow-y: auto; }
/* Roboter nicht über das Eingabefeld im Chat legen (solange er nicht von Hand verschoben wurde) */
body:has(.chat .composer) .bot-dock { bottom: 104px; }
@media (max-width: 760px) {
  body:has(.view.has-active .chat .composer) .bot-dock { bottom: calc(140px + var(--bottom-inset)); }
}

/* Automatisches Abmelden */
.idle-warn { position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.35); display: grid; place-items: center; padding: 16px; }
.idle-card { background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 18px 20px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; max-width: 560px; }
.idle-card > svg { width: 28px; height: 28px; color: var(--accent); flex-shrink: 0; }
.idle-card .grow { min-width: 220px; }
.idle-count { font-variant-numeric: tabular-nums; }
.login-notice { display: flex; gap: 8px; align-items: flex-start; background: #f0fdf4; border: 1px solid #bbf7d0; color: #00362D; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.login-notice svg { flex-shrink: 0; margin-top: 2px; }
.login-remember { margin-top: -4px; }

/* Ruhiges Farbbild: Personen-Kreise in Grüntönen, leicht plastisch wie ein Blatt im Licht */
.avatar { background-image: radial-gradient(circle at 30% 22%, rgba(255,255,255,.30), rgba(255,255,255,0) 58%), linear-gradient(160deg, rgba(255,255,255,0) 40%, rgba(0,0,0,.14));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 1px 2px rgba(20,48,31,.18); text-shadow: 0 1px 1px rgba(0,0,0,.18); letter-spacing: .02em; }
.role-badge { box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }

/* ---------- Web-App: Installieren & Mitteilungen ---------- */
.pwa-head { gap: 12px; }
.pwa-icon { width: 52px; height: 52px; border-radius: 13px; border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(20,48,31,.12); }
.pwa-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.pwa-push { gap: 14px; }
.pwa-dev { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.pwa-dev-state { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pwa-dev-state::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; flex-shrink: 0; }
.pwa-dev-state.ok::before { background: #16a34a; }
.pwa-dev-state.warn { font-weight: 500; color: #92400e; }
.pwa-dev-state.warn::before { background: #f59e0b; }
.pwa-sec { display: flex; flex-direction: column; gap: 6px; }
.pwa-opt { align-items: flex-start; }
.pwa-opt input { margin-top: 3px; }
.pwa-devrow { gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.pwa-devrow svg { width: 15px; height: 15px; color: var(--muted); }
.pwa-hint { position: fixed; left: 16px; bottom: 16px; z-index: 85; display: flex; align-items: center; gap: 12px; max-width: 460px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 36px rgba(0,0,0,.18); animation: botpop .25s ease-out; }
.pwa-hint img { width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; border: 1px solid var(--line); }
.pwa-hint .small { color: var(--muted); margin-top: 2px; line-height: 1.35; }
.pwa-hint-btns { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 760px) {
  .pwa-hint { left: 10px; right: 10px; max-width: none; bottom: calc(74px + var(--bottom-inset)); flex-wrap: wrap; }
  .pwa-hint .grow { flex: 1 1 60%; }
  .pwa-hint-btns { width: 100%; justify-content: flex-end; }
}
/* Als App gestartet: oben Platz für die Statusleiste (iPhone) */
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top, 0px); height: calc(48px + env(safe-area-inset-top, 0px)); }
}

/* ---------- Grosse Runden über den Videoverteiler ---------- */
.tiles.many { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); grid-auto-rows: minmax(110px, auto); }
.tile { transition: box-shadow .15s ease; }
/* Aktiver Sprecher: Ring in Röseren-Gelb (Sonne) */
.tiles .tile.speaking { box-shadow: 0 0 0 3px var(--sonne, #FAB600), 0 0 16px rgba(250, 182, 0, .5); }
.tiles.many .tile.spotlight { grid-column: span 2; grid-row: span 2; }
@media (max-width: 760px) { .tiles.many { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } .tiles.many .tile.spotlight { grid-column: 1 / -1; } }
.call-bar .round.disabled { opacity: .4; }
.pp-stage-row { display: flex; align-items: center; gap: 6px; }
.pp-stage-row > .pp-row { flex: 1; min-width: 0; }

/* Live-Untertitel */
.captions-holder { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; pointer-events: none; z-index: 6; }
.captions { max-width: min(92%, 860px); background: rgba(8, 20, 13, .82); color: #fff; border-radius: 10px; padding: 8px 14px;
  font-size: 18px; line-height: 1.4; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.cap-line + .cap-line { margin-top: 2px; }
.cap-line strong { color: #9fe0b8; font-weight: 600; }
.cap-line.pending { opacity: .7; font-style: italic; }
.cc { display: inline-block; font-weight: 800; font-size: 11px; line-height: 14px; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 3px; letter-spacing: .5px; }
.call-bar .round.cc-btn.on { background: var(--accent); color: #fff; }
.cap-badge.fremd { background: rgba(120,120,120,.2); border-color: rgba(190,190,190,.45); }
.cap-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,70,59,.25); border: 1px solid rgba(110,200,150,.6);
  color: #cdeedb; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
@media (max-width: 760px) {
  .captions { font-size: 15px; padding: 6px 10px; max-width: 100%; }
  .captions-holder { bottom: 8px; padding: 0 68px 0 8px; }   /* rechts Platz für den Roboter */
  .cap-badge { font-size: 12px; padding: 3px 8px; white-space: nowrap; }
  .cap-line:not(:nth-last-child(-n+2)) { display: none; }   /* Handy: nur die letzten zwei Zeilen */
}
/* Während eines Calls keinen Installationshinweis über den Anruf-Knöpfen */
body:has(.call) .pwa-hint { display: none; }


/* ---------- Röseren ---------- */
.count { background: var(--sonne); color: #00362D; }
.rail .nav.active { box-shadow: inset 3px 0 0 var(--sonne); }
.login { background: radial-gradient(1100px 560px at 8% -12%, #E7EFD9 0, transparent 60%), radial-gradient(700px 420px at 105% 110%, #FEF1CC 0, transparent 60%), var(--bg); }
.login-logo { height: 40px; }
.login-card h1, .page h1 { color: var(--accent); }
.top-logo { height: 22px; }
.btn.primary:focus-visible, .input:focus-visible { outline: 2px solid var(--sonne); outline-offset: 2px; }

/* ===================== Schule ===================== */
.schule .sch-tabs { overflow-x: auto; scrollbar-width: none; }
.schule .sch-tabs::-webkit-scrollbar { display: none; }
.schule .tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.schule .tab svg { width: 16px; height: 16px; }
.sch-sj { background: var(--sonne-soft); color: var(--sonne-ink); }
.sch-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.sch-toolbar .input { width: auto; }
.sch-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.sch-crumbs a { color: var(--accent); cursor: pointer; font-weight: 600; }
.sch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.sch-grid-2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.sch-h3 { margin: 24px 0 12px; font-size: 16px; }
.sch-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sch-form { max-width: 640px; }
.card.click { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.card.click:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,70,59,.08); }
.sch-list { display: flex; flex-direction: column; }
.sch-list-item { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; width: 100%; }
button.sch-list-item { cursor: pointer; border-radius: 8px; }
button.sch-list-item:hover { background: var(--soft); }
.sch-list-item:last-child { border-bottom: 0; }
.sch-list-item svg { width: 16px; height: 16px; color: var(--accent); }
.sch-date { font-weight: 700; color: var(--accent); min-width: 48px; font-variant-numeric: tabular-nums; }
.sch-compact td, .sch-compact th { padding: 7px 10px; }
.table td.right, .table th.right, .right { text-align: right; }
.nowrap { white-space: nowrap; }
.sch-filter { margin-bottom: 16px; padding: 14px 16px; }
.sch-filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.sch-filter-row .field { min-width: 150px; flex: 1; margin: 0; }
.sch-filter-btns { flex: 0 0 auto; }
.sch-ganz { align-self: center; }
.sch-hinweis { background: var(--sonne-soft); color: var(--sonne-ink); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.sch-entsch { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; }
.sch-entsch-kurz { display: flex; align-items: center; gap: 4px; color: var(--accent); }
.sch-entsch-kurz svg { width: 14px; height: 14px; }
.sch-sammel { background: var(--accent-soft); padding: 8px 12px; border-radius: 10px; margin-bottom: 10px; }
.sch-mini-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 16px; }
.sch-kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 5px 16px 5px 0; vertical-align: top; white-space: nowrap; font-size: 14px; }
.sch-kv td { padding: 5px 0; }
.sch-willkommen { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.sch-willkommen h3 { margin: 0; font-size: 18px; }

/* Noten */
.note-ungen { color: var(--danger) !important; font-weight: 700; }
.note-gut { color: var(--accent); }
.sch-raster-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--line); max-height: calc(100vh - 260px); background: var(--panel); }
.sch-raster { border: 0; border-radius: 0; min-width: max-content; }
.sch-raster th, .sch-raster td { padding: 6px 8px; border-right: 1px solid var(--line); }
.sch-raster thead th { position: sticky; top: 0; z-index: 2; background: #FAFAF6; vertical-align: bottom; }
.sch-raster .sch-name { position: sticky; left: 0; z-index: 1; background: var(--panel); min-width: 170px; white-space: nowrap; }
.sch-raster thead .sch-name { z-index: 3; background: #FAFAF6; }
.sch-raster .sch-name a { cursor: pointer; color: inherit; }
.sch-raster .sch-name a:hover { color: var(--accent); text-decoration: underline; }
.sch-pruef { min-width: 92px; max-width: 130px; }
.sch-pruef.zukunft { background: var(--sonne-soft) !important; }
.sch-pruef-btn { border: 0; background: none; font: inherit; text-align: left; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: inherit; width: 100%; }
.sch-pruef-btn:disabled { cursor: default; }
.sch-pruef-btn:not(:disabled):hover .sch-pruef-titel { color: var(--accent); text-decoration: underline; }
.sch-pruef-titel { font-weight: 600; color: var(--ink); white-space: normal; line-height: 1.25; }
.sch-pruef-btn svg { width: 11px; height: 11px; vertical-align: -1px; }
.sch-note { text-align: center; font-variant-numeric: tabular-nums; }
.sch-input { width: 64px; text-align: center; border: 1px solid transparent; border-radius: 8px; padding: 6px 4px; font: inherit; font-variant-numeric: tabular-nums; background: var(--soft); }
.sch-input:hover { border-color: var(--line); }
.sch-input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.sch-input.falsch { border-color: var(--danger); background: #FEF3F2; }
.sch-input.speichert { opacity: .6; }
.sch-input.gespeichert { border-color: var(--wiese); background: #F1F8E8; }
.sch-schnitt-h { background: var(--accent-soft) !important; text-align: center; }
.sch-schnitt { text-align: center; background: #F7FAF9; white-space: nowrap; }
.sch-gerundet { font-weight: 700; }
.sch-exakt { font-size: 11px; color: var(--muted); margin-left: 4px; }
.sch-fuss td { background: #FAFAF6; font-size: 13px; position: sticky; bottom: 0; }
.sch-matrix td.sch-note { min-width: 48px; font-weight: 600; }
.sch-fach summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.sch-fach summary::-webkit-details-marker { display: none; }
.sch-fach[open] summary { margin-bottom: 4px; }
.sch-noten-liste { display: flex; flex-direction: column; gap: 10px; }
.sch-noten-liste .card { padding: 14px 16px; }
.sch-schnitt-pill, .sch-note-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.sch-note-pill { min-width: 44px; }
tr.sch-neu td { background: var(--sonne-soft); }

/* Präsenz */
.sch-praesenz-list { display: flex; flex-direction: column; }
.sch-praesenz-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sch-praesenz-row:last-child { border-bottom: 0; }
.sch-praesenz button { min-width: 78px; justify-content: center; }
.sch-praesenz button.on[data-art="Absenz"] { background: var(--danger); }
.sch-praesenz button.on[data-art="Verspätung"] { background: var(--sonne); color: #3C3C3B; }

/* Stundenplan */
.sch-sp { border: 0; border-radius: 0; table-layout: fixed; min-width: 640px; }
.sch-sp th, .sch-sp td { border-right: 1px solid var(--line); text-align: center; }
.sch-sp th.heute { color: var(--accent); box-shadow: inset 0 -3px 0 var(--sonne); }
.sch-sp-zeit { width: 84px; text-align: left !important; white-space: nowrap; }
.sch-sp-zelle { height: 58px; padding: 6px !important; vertical-align: middle; line-height: 1.25; }
.sch-sp-zelle.belegt { background: var(--accent-soft); }
.sch-sp-zelle.belegt strong { color: var(--accent); }
.sch-sp-zelle.heute:not(.belegt) { background: #FBFBF7; }
.sch-sp-zelle:hover[style] { outline: 2px solid var(--accent); outline-offset: -2px; }
.sch-kurz { display: none; }

/* Journal */
.sch-journal { display: flex; flex-direction: column; gap: 10px; }
.sch-journal-item { gap: 6px; }
.sch-journal-text { white-space: pre-wrap; line-height: 1.5; }

/* Notenausweis */
.sch-zeugnisse { display: flex; flex-direction: column; gap: 24px; align-items: center; }
.sch-zeugnis { background: #fff; width: 100%; max-width: 760px; padding: 40px 48px; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 18px; }
.sch-zeugnis header { display: flex; align-items: flex-start; }
.sch-zeugnis-logo { height: 34px; }
.sch-zeugnis h2 { margin: 6px 0 0; font-size: 24px; color: var(--accent); }
.sch-zeugnis-noten { border: 0; }
.sch-zeugnis-noten td, .sch-zeugnis-noten th { padding: 7px 4px; }
.sch-zeugnis-noten tfoot td { font-weight: 700; border-top: 2px solid var(--ink); }
.sch-unterschriften { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; font-size: 13px; color: var(--muted); }
.sch-unterschriften .linie { border-bottom: 1px solid var(--ink); height: 36px; margin-bottom: 4px; }

@media (max-width: 760px) {
  .schule.page { padding: 16px 12px; }
  .sch-2col { grid-template-columns: 1fr; }
  .sch-grid, .sch-grid-2 { grid-template-columns: 1fr; }
  .sch-lang { display: none; } .sch-kurz { display: inline; }
  .sch-sp { min-width: 0; } .sch-sp-zeit { width: 54px; } .sch-sp-zelle { font-size: 12px; padding: 4px 2px !important; }
  .sch-sp-zeit .small { display: none; }
  .sch-raster .sch-name { min-width: 120px; }
  .sch-praesenz button { min-width: 0; padding: 7px 9px; }
  .sch-zeugnis { padding: 22px 18px; }
  .sch-filter-row .field { min-width: 120px; }
}
@media print {
  .rail, .topbar, .side, .no-print, .sch-toolbar, .bot-dock, .pwa-hint, #toasts { display: none !important; }
  html, body, .shell, .main, .page, .view { height: auto !important; overflow: visible !important; background: #fff !important; display: block !important; }
  .page { padding: 0 !important; }
  .sch-zeugnisse { display: block; }
  .sch-zeugnis { border: 0; box-shadow: none; max-width: none; padding: 0; break-after: page; page-break-after: always; }
  .sch-exakt { display: none; }
  .sch-raster-wrap { max-height: none; overflow: visible; border: 0; }
}
@media (max-width: 760px) {
  .schule .tab { padding: 10px 9px; }
  .schule .sch-opt { display: none; }
  .schule table.table:not(.sch-raster):not(.sch-sp):not(.sch-zeugnis-noten) { display: block; overflow-x: auto; }
  .schule .sch-noten-liste .card { padding: 12px; }
}

/* ===================== Ende-zu-Ende ===================== */
.e2e-code { font: 700 clamp(14px, 4.6vw, 22px)/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; white-space: nowrap; overflow-x: auto; text-align: center; padding: 16px; background: var(--sonne-soft); color: #3C3C3B; border: 1px dashed var(--sonne); border-radius: 12px; user-select: all; }
.e2e-badge { background: var(--accent-soft); color: var(--accent); }
.e2e-badge svg { width: 13px; height: 13px; }
.e2e-check { align-items: flex-start; gap: 10px; padding: 12px; background: var(--soft); border-radius: 10px; }
.e2e-check input { margin-top: 3px; }
.e2e-locked { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.e2e-locked > svg { width: 40px; height: 40px; color: var(--accent); }
.e2e-hinweis { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--sonne-soft); color: var(--sonne-ink); }
.e2e-hinweis svg { width: 14px; height: 14px; flex: none; }
.e2e-fehlt { display: flex; align-items: center; gap: 6px; }
.e2e-fehlt svg { width: 14px; height: 14px; }
.e2e-hinweis.warn { background: #FEF3F2; color: var(--danger); }
.e2e-bild { display: flex; justify-content: center; }
.e2e-bild img { max-width: 100%; max-height: 70vh; border-radius: 8px; }
.sch-freigabe { border-radius: 10px; margin-bottom: 12px; padding: 10px 14px; }
/* Tabellen in Assistent-Antworten und Vorschauen */
.md-table { overflow-x: auto; margin: 6px 0 8px; }
.md-table table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.md-table th, .md-table td { border: 1px solid #d4e3d9; padding: 3px 6px; text-align: left; vertical-align: top; white-space: normal; }
.md-table th { background: #e2f0e6; color: #1f3a2b; font-weight: 600; }
.md li.sub { margin-left: 16px; list-style-type: circle; }
/* Funktionswünsche (Verwaltung) */
.wish { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wish:last-child { border-bottom: none; }
.wish .wish-main { flex: 1; min-width: 0; }
.wish .wish-text { font-weight: 600; margin-bottom: 2px; }
.wish .wish-req { font-size: 13px; color: var(--muted); font-style: italic; margin: 2px 0 4px; }
.wish .wish-note { font-size: 13px; margin-top: 4px; padding: 6px 8px; background: var(--soft); border-radius: 8px; }
.wish-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.wish-status.neu { background: #fdf3d7; color: #8a5a12; }
.wish-status.geplant { background: #e2f0e6; color: #24704f; }
.wish-status.umgesetzt { background: #24704f; color: #fff; }
.wish-status.abgelehnt { background: #eceeed; color: #5f6b63; }
/* Ablage: Auswahl und Zielordner-Wahl */
.file-check { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin: -6px 0 10px; background: #e2f0e6; border-radius: 10px; }
.selbar.quiet { background: transparent; padding: 0 4px; margin: -8px 0 6px; }
.selbar .check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.picker-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.picker-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 8px 4px; }
.picker-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; }
.picker-item:hover { background: var(--soft); }
.picker-item.active { background: #e2f0e6; outline: 2px solid #24704f; }
.picker-item .file-ico { width: 28px; height: 28px; }
.picker-path { font-weight: 500; }

/* Breite Tabellen scrollen in sich, nicht die ganze Seite (sonst verschiebt sich auf Handy und Tablet alles seitlich) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table-wrap > .table { min-width: 100%; }
/* Handy quer und andere niedrige Bildschirme mit Seitenleiste: Leiste kompakt (nur Symbole) und notfalls scrollbar */
@media (min-width: 761px) and (max-height: 560px) {
  .rail { overflow-y: auto; padding: 6px 0; gap: 2px; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail .nav { font-size: 0; padding: 7px 0; }
  .rail .nav .count { font-size: 10px; }
  .rail .me { width: 36px; height: 36px; flex-shrink: 0; }
}

/* Handy: keine seitlich scrollenden Tabellen – jede Zeile wird eine Karte (erste Spalte oben, der Rest darunter in einer Zeile) */
@media (max-width: 760px) {
  .table-wrap { overflow-x: visible; }
  .table-wrap > .table { min-width: 0; }
  .table, .table tbody { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: block; border: 0 !important; padding: 0 !important; min-width: 0; overflow-wrap: anywhere; font-size: 13px; color: var(--muted); }
  .table td:first-child { flex: 1 1 100%; font-size: 14px; color: inherit; }
  .table td:empty { display: none; }
  .table td:last-child:not(:first-child) { margin-left: auto; }
  .table td .ellipsis { white-space: normal; }
  .table td select.input { width: auto; max-width: 100%; }
  /* iPhone zoomt beim Tippen in Felder mit weniger als 16 px Schrift hinein – danach ist die Ansicht zu breit */
  input, select, textarea, .input, .bot-input, .composer textarea { font-size: 16px !important; }
}
@media (max-width: 760px) {
  .roles-bar { flex-wrap: wrap; }
  .roles-bar > .grow { flex: 1 1 100%; }
  .role-group { padding: 8px 12px; margin-bottom: 10px; }
  .role-group-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 0 6px; }
  .role-perm { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .role-perm input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
  .role-perm.off { color: var(--muted); }
  /* Ablage-Kopf: Pfad eigene Zeile, Suche volle Breite */
  .page-head { flex-wrap: wrap; }
  .page-head .crumbs { flex: 1 1 100%; }
  .page-head > input.input { flex: 1 1 100%; width: 100% !important; }
}
/* «Aus der Ablage senden» im Messenger */
.ab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: min(52vh, 440px); overflow-y: auto; padding: 2px; }
.ab-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel, #fff); cursor: pointer; text-align: left; font: inherit; color: inherit; min-width: 0; }
.ab-tile:hover { border-color: var(--accent); }
.ab-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.ab-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 6px; background: var(--bg, #f4f4f2); overflow: hidden; color: var(--muted); }
.ab-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ab-tile.folder .ab-thumb { color: #b7791f; background: #fdf3dc; }
.ab-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.9); border: 1px solid var(--line); color: #fff; }
.ab-tile.on .ab-check { background: var(--accent); border-color: var(--accent); }
.ab-tile.folder .ab-check { display: none; }
@media (max-width: 760px) { .ab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 50vh; } }
.toast a { color: #a8e6c9; text-decoration: underline; cursor: pointer; }
.top-home { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; cursor: pointer; border-radius: 6px; }
.top-home:hover .top-logo { opacity: .85; }
.top-home:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Chat im Videomeeting */
.meet-chat { overflow: hidden; gap: 8px; }
.mc-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 4px; }
.mc-empty { padding: 16px 4px; text-align: center; }
.mc-msg { background: var(--soft, #f1f5f4); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.mc-msg.mine { background: #e6f2ec; }
.mc-msg.private { background: #fff4e0; box-shadow: inset 3px 0 0 #d97706; }
.mc-meta { display: flex; gap: 2px; font-size: 12px; color: var(--muted, #64748b); margin-bottom: 2px; min-width: 0; }
.mc-meta strong { color: var(--ink, #1c2321); }
.mc-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-tr { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted, #475569); white-space: pre-wrap; }
.mc-acts { display: flex; gap: 12px; margin-top: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 12px; }
.link-btn:hover { text-decoration: underline; }
.mc-compose { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.mc-torow, .mc-moderow { display: flex; align-items: center; gap: 8px; }
.mc-torow .input, .mc-moderow .input { flex: 1; min-width: 0; padding: 6px 8px; }
.mc-torow.private .input { border-color: #d97706; background: #fffaf0; }
.mc-inrow { display: flex; gap: 6px; align-items: flex-end; }
.mc-input { flex: 1; min-width: 0; resize: none; max-height: 120px; overflow-y: hidden; line-height: 1.4; }
.mc-hint { font-size: 11px; }
.mc-toast { cursor: pointer; }
.chat-btn.attention .count-badge { background: #f59e0b; color: #1c1917; }
.as-btn { border: 0; cursor: pointer; font: inherit; }
button.pp-ico.as-btn { background: none; padding: 2px; border-radius: 6px; }
button.pp-ico.as-btn:hover { background: #e2e8e5; color: var(--ink); }
button.pp-hand.as-btn:hover { background: #fde68a; }
.tile-hand.as-btn { cursor: pointer; pointer-events: auto; }
.tile-mod { position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: .85; }
.tile-mod:hover { opacity: 1; background: rgba(0,0,0,.75); }
.tile-mod svg { width: 18px; height: 18px; }
@media (hover: hover) { .tile .tile-mod { opacity: 0; } .tile:hover .tile-mod, .tile-mod:focus-visible { opacity: .9; } }
/* Seitenleiste im Meeting offen: Assistent nicht über Chat/Teilnehmende legen */
@media (min-width: 761px) { body:has(.call-main > .people-panel:not(.hidden)) .bot-dock { right: 362px; } }
@media (max-width: 760px) { body:has(.call-main > .people-panel:not(.hidden)) .bot-dock { display: none; } }
.call-tools { display: flex; gap: 8px; padding: 0 20px 4px; }
.call-tools .round { width: 38px; height: 38px; }
.call-tools .round svg { width: 18px; height: 18px; }
.call-tools .t-glyph { font-size: 17px; }
.in-lobby .call-tools { display: none; }
@media (max-width: 760px) { .call-tools { padding: 0 12px 4px; } }
/* Bildansicht in der App */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(8, 12, 11, .94); display: flex; flex-direction: column; color: #fff;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); animation: pop .12s ease-out; }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; min-height: 56px; }
.lb-title { font-size: 14px; opacity: .9; min-width: 0; }
.lb-count { font-size: 13px; opacity: .7; }
.lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 8px 16px 24px; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.26); }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
@media (max-width: 760px) { .lb-nav { width: 40px; height: 40px; font-size: 26px; } .lb-nav.prev { left: 6px; } .lb-nav.next { right: 6px; } .lb-stage { padding: 4px 4px 16px; } }
.lb-extra { display: contents; }
.lb-btn.lb-wide { width: auto; padding: 0 16px 0 12px; border-radius: 22px; gap: 8px; display: inline-flex; align-items: center; font: inherit; font-size: 14px; }
.lb-btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) { .lb-btn.lb-wide span { display: none; } .lb-btn.lb-wide { width: 44px; padding: 0; justify-content: center; } }
/* Virtueller Hintergrund: Auswahl */
.bg-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.bg-item { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; font: inherit; color: inherit; text-align: center; }
.bg-item:hover { background: var(--soft, #f1f5f4); }
.bg-item.active { border-color: var(--accent); }
.bg-thumb { width: 100%; aspect-ratio: 16/9; border-radius: 6px; object-fit: cover; display: grid; place-items: center; background: #e7ece9; color: var(--muted); border: 1px solid var(--line); }
.bg-thumb svg { width: 20px; height: 20px; }
.bg-thumb.blur { background: radial-gradient(circle at 30% 40%, #b9c9c0, #6f8a7c 70%); color: #fff; filter: saturate(.8); }
.bg-thumb.blur.strong { background: radial-gradient(circle at 50% 50%, #c9d6cf, #8aa395 60%, #6f8a7c); }
.bg-label { font-size: 11px; line-height: 1.2; color: var(--muted); }
.bg-upload { grid-column: 1 / -1; justify-self: start; }
/* Bildschirm teilen (wie Zoom): Bildschirm gross, Kameras als Leiste */
.tile.screen video { object-fit: contain !important; background: #000; }
.screen-stage { flex: 1; min-width: 0; min-height: 0; display: flex; padding: 10px 0 10px 20px; }
.screen-stage .tile { width: 100%; height: 100%; aspect-ratio: auto; }
.stage.presenting .tiles { flex: 0 0 260px; grid-template-columns: 1fr !important; grid-auto-rows: auto; align-content: start; padding: 10px 20px 10px 10px; }
.stage.presenting .tiles .tile.spotlight { grid-column: auto; grid-row: auto; }
.tile.share-self { display: grid; place-items: center; background: #183229; border: 1px dashed #3f7a5f; }
.share-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 10px; color: #d3e6d8; }
.share-card svg { width: 26px; height: 26px; color: #6ee7b7; }
.share-card .small { opacity: .8; max-width: 220px; }
@media (max-width: 760px) {
  .stage.presenting { flex-direction: column; }
  .screen-stage { padding: 8px 10px 4px; }
  .stage.presenting .tiles { flex: 0 0 auto; display: flex; overflow-x: auto; padding: 4px 10px 8px; }
  .stage.presenting .tiles .tile { flex: 0 0 140px; }
  .tile.share-self .share-card .small { display: none; }
}

/* ---------- Angedocktes Meeting (weiter zuhören in anderen Bereichen) ---------- */
.call-dock { position: fixed; right: 18px; bottom: 96px; /* über dem Assistenten-Roboter */ z-index: 950; width: 360px; background: #14130f; border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .35); color: #fff; }
.call-dock-stage { position: relative; width: 360px; height: 203px; overflow: hidden; cursor: pointer; }
.call-dock-stage > .view.mini { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform: scale(.28125); transform-origin: 0 0; pointer-events: none; }
.call-dock-stage > .view.mini .call-bar, .call-dock-stage > .view.mini .call-tools { visibility: hidden; }
.call-dock-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #1f1d19; }
.call-dock-bar .round { width: 34px; height: 34px; }
.call-dock-bar .round.off { background: #b4321f; }
.call-dock-name { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.call-dock-name .rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; flex-shrink: 0; }
@media (max-width: 700px) {
  .call-dock { width: 240px; right: 10px; bottom: 76px; }
  .call-dock-stage { width: 240px; height: 135px; }
  .call-dock-stage > .view.mini { transform: scale(.1875); }
}

/* Mini-Meeting verschiebbar (11.11.2026) */
.call-dock { touch-action: none; }
.call-dock-bar { cursor: grab; }
.call-dock.zieht, .call-dock.zieht * { cursor: grabbing !important; user-select: none; }
.call-dock.zieht { box-shadow: 0 14px 40px rgba(0,0,0,.45); }

/* Assistent im Meeting ausgeblendet (Alexander, 11.11.2026) – im verkleinerten Meeting (Dock) ist er wieder da */
body:has(#app .call) .bot-dock { display: none; }

/* Meeting-Ansichten wie Zoom (11.11.2026): Sprecher gross, die anderen als Leiste; eigenes Bild ausblenden; angeheftet */
.tiles > .tile.selbst-aus { display: none !important; }
.tiles.ansicht-sprecher { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; gap: 8px; padding: 10px 20px; }
.tiles.ansicht-sprecher > .tile { flex: 0 0 168px; width: 168px; height: 95px; aspect-ratio: auto; grid-column: auto; grid-row: auto; }
.tiles.ansicht-sprecher > .tile.haupt { order: -1; flex: 1 1 100%; width: 100%; height: calc(100% - 103px); min-height: 180px; }
.tiles.ansicht-sprecher.allein > .tile.haupt { height: 100%; }
.tiles.ansicht-sprecher > .tile:not(.haupt) .placeholder > div { transform: scale(1) !important; }
.tiles.ansicht-sprecher > .tile:not(.haupt) .who { font-size: 11px; }
.tiles.ansicht-sprecher > .tile.haupt video { object-fit: contain; background: #000; }
.tile.angeheftet::before { content: '📌'; position: absolute; top: 8px; right: 10px; z-index: 3; font-size: 15px; }
.stage.presenting .tiles.ansicht-sprecher { display: grid; }
.stage.presenting .tiles.ansicht-sprecher > .tile { width: auto; height: auto; aspect-ratio: 16/9; order: 0; flex: none; }
@media (max-width: 760px) {
  .tiles.ansicht-sprecher { padding: 6px 8px; }
  .tiles.ansicht-sprecher > .tile { flex-basis: 110px; width: 110px; height: 62px; }
  .tiles.ansicht-sprecher > .tile.haupt { height: calc(100% - 70px); }
}

/* Meeting-Uhr (11.11.2026) */
.meet-uhr { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 13px; font-variant-numeric: tabular-nums; color: inherit; }
.meet-uhr svg { width: 14px; height: 14px; opacity: .75; }
.meet-uhr .mu-trenn { opacity: .5; }
.meet-uhr .mu-dauer { font-weight: 600; }
@media (max-width: 760px) { .meet-uhr { margin-left: 6px; padding: 2px 8px; font-size: 12px; } }

/* Meeting-Chat: Zwischenablage, Bilder (11.11.2026, aus Finestead) */
.mc-anhang { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 6px; }
.mc-anhang img { max-height: 90px; max-width: 70%; border-radius: 6px; border: 1px solid var(--line); }
.mc-bild { display: block; max-width: 100%; max-height: 220px; margin-top: 4px; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--line); }

/* Videos und Tonaufnahmen im Chat: erst auf Tipp laden, dann gleich abspielen */
.attach-media { margin-top: 6px; max-width: min(440px, 100%); }
.attach-play, .attach-loading { cursor: pointer; }
.attach-play-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--accent, #ec7a1c); color: #fff; display: grid; place-items: center; flex: none; }
.attach-play-ico svg { width: 18px; height: 18px; margin-left: 2px; }
.attach-dl { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.attach-dl:hover { background: var(--soft, #eef1f6); }
.attach-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line, #d7dce3); border-top-color: var(--accent, #ec7a1c); animation: attachspin .8s linear infinite; flex: none; margin: 4px; }
@keyframes attachspin { to { transform: rotate(360deg); } }
.attach-video { display: block; width: 100%; max-height: 62vh; border-radius: 12px; background: #000; }
.attach-audio { display: block; width: 100%; }
.attach-media-bar { display: flex; align-items: center; gap: 8px; padding: 4px 2px 0; }
.attach-dl-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; white-space: nowrap; }
.attach-dl-link svg { width: 15px; height: 15px; }

/* Antworten: Zitat in der Nachricht und Leiste über dem Eingabefeld */
.quote { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: fit-content; max-width: min(100%, 60ch); margin: 2px 0 4px; padding: 5px 10px;
  border: 0; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--soft); color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.quote strong { color: var(--accent-text, var(--accent)); font-size: 12px; }
.quote-text { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg.mine .grow > .quote { align-self: flex-end; }
.reply-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 6px 8px 6px 12px; border-left: 3px solid var(--accent); border-radius: 10px; background: var(--soft); font-size: 13px; }
.reply-bar > span svg, .reply-bar > svg { width: 16px; height: 16px; color: var(--accent-text, var(--accent)); }
.reply-bar-text { min-width: 0; }
.reply-bar-text strong { color: var(--accent-text, var(--accent)); font-size: 12px; }
.reply-bar-text .ellipsis { color: var(--muted); }
.msg.flash { animation: msgflash 1.4s ease-out; }
@keyframes msgflash { 0%, 30% { background: rgba(255, 201, 60, .45); } 100% { background: transparent; } }
/* Nach rechts wischen = antworten: Pfeil erscheint links, ab genug Weg farbig */
@media (hover: none) { .messages { touch-action: pan-y; overflow-x: hidden; } }
.msg.swiping::before { content: ''; position: absolute; left: -38px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  background: rgba(0,0,0,.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314213d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17 4 12l5-5'/%3E%3Cpath d='M20 18v-2a4 4 0 0 0-4-4H4'/%3E%3C/svg%3E") center/16px no-repeat;
  opacity: .5; transition: opacity .12s, transform .12s; }
.msg.swipe-ready::before { opacity: 1; background-color: var(--accent, #ec7a1c); transform: scale(1.12); }
@media (hover: none) { .msg.show-tools .tools { display: flex; } }
.msg .tools { gap: 2px; }

/* Nach unten ziehen = neu laden */
.ptr { position: fixed; left: 50%; top: calc(var(--top-inset, 0px) + 64px); z-index: 9500; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #14213d; border: 2px solid #14213d; box-shadow: 0 4px 14px rgba(0,0,0,.18); display: grid; place-items: center;
  transform: translate(-50%, -46px); opacity: 0; pointer-events: none; }
.ptr svg { width: 20px; height: 20px; }
.ptr.ready { background: var(--accent, #ec7a1c); color: #fff; }
.ptr.spin svg { animation: ptrspin .7s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }
/* Zurück-Knopf oben links (überall) */
.top-back { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: -8px; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; flex-shrink: 0; }
.top-back:hover { background: var(--hover, rgba(0,0,0,.06)); }
.top-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.top-back svg { width: 22px; height: 22px; }
.top-back.hidden { display: none; }

/* Handy: Dialoge (z.B. Termin-Details) nie breiter als der Bildschirm */
@media (max-width: 760px) {
  .backdrop { padding: 10px; }
  .modal { min-width: 0; max-width: calc(100vw - 20px) !important; }
  .modal .body { overflow-x: hidden; min-width: 0; }
  .modal .body * { min-width: 0; }
  .modal footer { flex-wrap: wrap; padding-left: 16px; padding-right: 16px; }
  .modal footer .btn { flex: 1 1 auto; justify-content: center; white-space: normal; }
  .cal-dline .grow, .cal-detail .small { overflow-wrap: anywhere; }
  .seg.rsvp { display: flex; width: 100%; }
  .seg.rsvp button { flex: 1 1 0; justify-content: center; padding-left: 6px; padding-right: 6px; }
}

/* Terminart «Information»: dezent gestreift, Abzeichen «Info», Hinweis in den Details */
.cal-ev.info { background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(255,255,255,.4) 10px 13px); }
.cal-ev.info strong::before { content: 'ℹ️ '; font-weight: 400; }
.badge.badge-info { background: #e3ecfb; color: #1d3d6b; }
.cal-infonote { background: #eef4ff; color: #1d3d6b; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.seg.cal-kind { width: fit-content; }
