/* MAYUMA CHAT Web-Client – Stile der Ansichten von B2 (Onboarding, Chat, Dateien, Kontakte, Einstellungen). */

/* ---------- Gemeinsam ---------- */
.list-tools { flex: none; padding: var(--space-2) 0 var(--space-1); background: var(--surface); border-bottom: 1px solid var(--divider); }
.chips { display: flex; gap: var(--space-2); padding: 0 var(--space-4) var(--space-2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 2.25rem; padding: 0 var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: var(--fs-s); font-weight: var(--fw-medium); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--text-on-primary); font-weight: var(--fw-bold); }
.chip-count { display: inline-flex; min-width: 1.25rem; height: 1.25rem; align-items: center; justify-content: center; padding: 0 .3rem; border-radius: var(--radius-pill); background: color-mix(in srgb, currentColor 16%, transparent); font-size: var(--fs-xs); }
.row-flag { display: inline-flex; vertical-align: middle; margin-inline-start: var(--space-1); color: var(--text-3); }
.view-pad.tight { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.view-foot { flex: none; padding: var(--space-3) var(--space-4); background: var(--surface); border-top: 1px solid var(--divider); }
.tabs { flex: none; display: flex; gap: var(--space-1); padding: 0 var(--space-3); border-bottom: 1px solid var(--divider); background: var(--surface); overflow-x: auto; }
.tab { position: relative; min-height: var(--touch); display: inline-flex; align-items: center; gap: var(--space-1); padding: 0 var(--space-3); border: 0; background: transparent; color: var(--text-2); font-size: var(--fs-s); font-weight: var(--fw-medium); white-space: nowrap; }
.tab.active { color: var(--primary); font-weight: var(--fw-bold); }
html[data-theme="dark"] .tab.active { color: var(--primary-hover); }
.tab.active::after { content: ""; position: absolute; inset-inline-start: var(--space-2); inset-inline-end: var(--space-2); bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: currentColor; }
.segmented { display: flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: calc(var(--radius-m) + 3px); border: 1px solid var(--divider); flex-wrap: wrap; }
.segmented > button { flex: 1 1 8rem; min-height: calc(var(--touch) - 6px); border: 0; background: transparent; color: var(--text-2); border-radius: var(--radius-m); font-size: var(--fs-s); font-weight: var(--fw-medium); padding: 0 var(--space-3); }
.segmented > button.active { background: var(--surface); color: var(--text); font-weight: var(--fw-bold); box-shadow: var(--shadow-1); }
.bullet-list, .plain-list { margin: 0; padding-inline-start: 1.25rem; display: flex; flex-direction: column; gap: var(--space-2); }
.danger-link { color: var(--danger) !important; align-self: center; }
.danger-text { color: var(--danger) !important; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
.details dt { color: var(--text-2); font-size: var(--fs-s); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.progress { height: .625rem; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress-bar { display: block; height: 100%; width: 0; background: var(--primary); transition: width var(--dur) linear; }
.checkbox { width: 1.375rem; height: 1.375rem; accent-color: var(--primary); flex: none; margin: 0; }
label.list-row { cursor: pointer; }
.view-chats { position: relative; }
.text-preview { padding: var(--space-3); border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--border); }

/* ---------- Onboarding (DOC-07-ONB) ---------- */
.onb { background: var(--bg); }
.onb.view-deco { background: linear-gradient(var(--onb-sky), var(--bg) 9rem) no-repeat, var(--bg); }
.onb-top { flex: none; display: flex; justify-content: space-between; align-items: center; padding: var(--space-2); position: relative; z-index: 2; }
.onb-chip { min-width: 3.5rem; min-height: 3.5rem; display: inline-flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-4); border: 0; border-radius: 1.75rem; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--text); font-size: 1.125rem; font-weight: 600; }
.onb-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.onb-content { flex: 1 0 auto; width: 100%; max-width: 32rem; margin: 0 auto; padding: 0 var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.onb-foot { position: sticky; bottom: 0; z-index: 2; width: 100%; max-width: 32rem; margin: 0 auto; padding: var(--space-3) var(--space-5) max(env(safe-area-inset-bottom), var(--space-4)); background: linear-gradient(transparent, var(--bg) 1rem); display: flex; flex-direction: column; gap: var(--space-2); }
.onb-logo { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); color: var(--primary); }
.onb-logo-text { font-weight: 800; letter-spacing: .06em; color: var(--heading); font-size: 1.25rem; }
.onb-h1 { text-align: center; font-size: clamp(1.75rem, 9vw, 2.5rem); font-weight: 800; line-height: 1.15; hyphens: auto; overflow-wrap: anywhere; }
.onb-h1.small { font-size: clamp(1.5rem, 7vw, 1.875rem); }
.onb-steps { text-align: center; font-weight: 600; color: var(--text-2); font-size: 1.0625rem; }
.onb-sub { align-self: center; text-align: center; background: var(--onb-sub); border-radius: 1.375rem; padding: var(--space-3) var(--space-5); font-size: 1.1875rem; line-height: 1.35; }
.onb-lead { font-size: 1.1875rem; line-height: 1.45; }
.onb-card { background: var(--onb-card); border-radius: 1.5rem; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); box-shadow: 0 2px 10px rgba(20,43,69,.06); border: 1px solid var(--border); }
.onb-card h2, .onb-label { font-size: 1.375rem; font-weight: 700; overflow-wrap: anywhere; }
.onb-num { display: flex; align-items: center; gap: var(--space-3); background: var(--onb-soft); border-radius: 1.125rem; padding: var(--space-3) var(--space-4); min-height: 4.5rem; font-size: 1.25rem; font-weight: 600; }
.onb-num svg { color: var(--success); flex: none; }
.onb-num output { font-size: 1.5rem; font-weight: 700; letter-spacing: .02em; }
.nw { white-space: nowrap; }
.onb-hint { display: flex; gap: var(--space-3); align-items: center; background: var(--onb-hint); border-radius: .875rem; padding: var(--space-3); font-size: 1.125rem; line-height: 1.35; }
.onb-hint svg { color: var(--success); flex: none; }
.onb-help { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 1.1875rem; line-height: 1.4; color: var(--text-2); }
.onb-help svg { flex: none; margin-top: 2px; }
.onb-alt, .onb-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-4); }
.onb .link-btn { font-size: 1.125rem; }
.onb-country { display: flex; align-items: center; gap: var(--space-3); min-height: 3.75rem; width: 100%; border: 2px solid var(--border-strong); border-radius: 1rem; background: var(--surface); padding: var(--space-2) var(--space-4); font-size: 1.25rem; text-align: start; color: var(--text); }
.onb-country .chev { margin-inline-start: auto; color: var(--text-3); }
.onb-field { display: flex; align-items: center; gap: var(--space-3); min-height: 4.5rem; border: 3px solid var(--primary); border-radius: 1rem; background: var(--surface); padding: var(--space-2) var(--space-4); }
.onb-field:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 35%, transparent); }
.onb-prefix { font-size: 1.5rem; font-weight: 700; color: var(--text-2); }
.onb-input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.75rem; font-weight: 700; letter-spacing: .03em; color: var(--text); padding: 0; }
.onb-input:focus-visible { outline: none; }
.onb-input::placeholder { color: var(--text-3); font-weight: 500; }
.onb .btn-l { min-height: 4.5rem; font-size: 1.5rem; border-radius: 2.25rem; }
.onb-wait { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; font-size: 1.25rem; line-height: 1.4; }
.onb-envelope { width: 7.5rem; height: 6rem; display: grid; place-items: center; border-radius: 1.5rem; background: var(--onb-sky); color: var(--primary); }
.onb-big { font-size: 1.5rem; }
.onb-busy { text-align: center; font-weight: 600; }
.onb-done-icon { align-self: center; width: 7rem; height: 7rem; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.onb-later { align-self: center; }
.onb-msg-slot:empty { display: none; }
.onb-helptext p { font-size: 1.1875rem; line-height: 1.45; }
.cc { display: inline-block; min-width: 3.5rem; font-weight: 700; color: var(--text-2); }
.action-item[aria-pressed="true"] { background: var(--primary-soft); font-weight: var(--fw-bold); }
/* Code-Eingabe: echtes Eingabefeld über sichtbaren Kästchen */
.otp-wrap { position: relative; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-2); }
.otp-box { min-height: 4.25rem; display: flex; align-items: center; justify-content: center; border: 3px solid var(--border-strong); border-radius: .875rem; background: var(--surface); font-size: 2rem; font-weight: 800; }
.otp-box.cur { border-color: var(--primary); }
.otp-box.filled { border-color: var(--success); background: var(--success-soft); }
.otp-box.err { border-color: var(--danger); background: var(--danger-soft); }
.onb-code-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 2rem; letter-spacing: 2em; caret-color: transparent; border: 0; background: transparent; color: transparent; }
.otp-wrap:focus-within .otp-boxes { outline: 3px solid var(--focus-ring); outline-offset: 4px; border-radius: 1rem; }
.onb-code-root { display: flex; flex-direction: column; gap: var(--space-4); }
.onb-code-actions:empty { display: none; }
.auth-content .field .input { min-height: 3.5rem; font-size: 1.125rem; }

/* ---------- Theme-Karten (UI-31, IDN-37) ---------- */
.theme-grid { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: var(--space-3); }
.theme-card { position: relative; display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border: 2px solid var(--border); border-radius: var(--radius-l); background: var(--surface); cursor: pointer; }
.theme-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.theme-card:has(input:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.theme-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.theme-name { font-weight: var(--fw-bold); font-size: var(--fs-l); }
.theme-desc { font-size: var(--fs-s); color: var(--text-2); }
.theme-dots { display: flex; gap: 6px; margin-top: var(--space-1); }
.theme-dots .dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.theme-check { display: none; position: absolute; top: var(--space-2); inset-inline-end: var(--space-3); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--primary); }
.theme-card:has(input:checked) .theme-check { display: block; }
.theme-preview { flex: none; width: 4.5rem; height: 5.25rem; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; border: 1px solid rgba(0,0,0,.12); }
.theme-preview span { display: block; border-radius: 4px; height: 8px; }
.tp-bar { width: 70%; } .tp-in { width: 75%; height: 12px !important; border-radius: 8px !important; } .tp-out { width: 70%; height: 12px !important; align-self: flex-end; border-radius: 8px !important; } .tp-btn { margin-top: auto; height: 12px !important; border-radius: 8px !important; }
.tp-blue { background: #F4F7FC; } .tp-blue .tp-bar { background: #0F1B33; } .tp-blue .tp-in { background: #FFFFFF; border: 1px solid #E1E7F0; } .tp-blue .tp-out, .tp-blue .tp-btn { background: #0A66E0; }
.tp-rose { background: #FFF4F8; } .tp-rose .tp-bar { background: #3A1027; } .tp-rose .tp-in { background: #FFFFFF; border: 1px solid #F6D3E2; } .tp-rose .tp-out, .tp-rose .tp-btn { background: #C8175D; }
.tp-dark { background: #15151C; } .tp-dark .tp-bar { background: #F2F1F8; } .tp-dark .tp-in { background: #262632; } .tp-dark .tp-out, .tp-dark .tp-btn { background: #5B47E0; }
.tp-senior { background: #F1F8EC; } .tp-senior .tp-bar { background: #142B45; } .tp-senior .tp-in { background: #FFFFFF; border: 1px solid #CFE0C8; } .tp-senior .tp-out { background: #DDE9D5; } .tp-senior .tp-btn { background: #1E7A34; }

/* ---------- Profil ---------- */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-6) var(--space-4) var(--space-4); text-align: center; background: var(--surface); border-bottom: 1px solid var(--divider); background-image: var(--deco-band); background-repeat: no-repeat; background-position: bottom center; background-size: 100% auto; }
.profile-head .banner { text-align: start; max-width: 32rem; width: 100%; }
.profile-name { font-size: var(--fs-xxl); font-weight: var(--title-weight); color: var(--heading); overflow-wrap: anywhere; }
.profile-status { color: var(--text-2); font-style: italic; }
.profile-head .muted { display: inline-flex; align-items: center; gap: 4px; }
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-avatar-edit { align-self: center; }

/* ---------- Chat ---------- */
.view-chat { background: var(--bg); }
.view-chat.drop { outline: 3px dashed var(--primary); outline-offset: -8px; }
.chat-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: 2px; background-image: var(--deco-band); background-repeat: no-repeat; background-position: bottom center; background-size: 100% auto; background-attachment: local; }
.chat-log:focus-visible { outline-offset: -3px; }
.chat-intro { display: flex; justify-content: center; padding: var(--space-2) 0 var(--space-3); }
.chat-intro .protection-note { background: var(--surface); border: 1px solid var(--border); padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); }
.chat-empty { text-align: center; color: var(--text-2); padding: var(--space-6) var(--space-4); }
.load-older { display: flex; justify-content: center; padding-bottom: var(--space-2); }
.day-sep { display: flex; justify-content: center; margin: var(--space-3) 0 var(--space-2); }
.day-sep span { padding: 2px var(--space-3); border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.msg-row { display: flex; align-items: flex-end; gap: var(--space-1); flex-wrap: wrap; }
.msg-row.out { flex-direction: row-reverse; }
.msg-row + .msg-row.in, .msg-row + .msg-row.out { margin-top: 2px; }
.msg-row.in + .msg-row.out, .msg-row.out + .msg-row.in { margin-top: var(--space-2); }
.bubble { position: relative; max-width: min(78%, 36rem); padding: var(--space-2) var(--space-3); border-radius: var(--bubble-radius); line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.in { background: var(--bubble-in); color: var(--bubble-in-text); border: 1px solid var(--bubble-in-border); border-end-start-radius: 6px; box-shadow: var(--shadow-1); }
.bubble.out { background: var(--bubble-out); color: var(--bubble-out-text); border-end-end-radius: 6px; }
.bubble.out a { color: inherit; text-decoration: underline; }
.bubble.pending { opacity: .75; }
.bubble.failed { box-shadow: 0 0 0 2px var(--danger); }
.bubble.deleted { background: transparent; color: var(--text-2); border: 1px dashed var(--border-strong); box-shadow: none; font-style: italic; }
.bubble.highlight { box-shadow: 0 0 0 3px var(--focus-ring); }
.bubble:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.bubble-text { display: block; }
.bubble-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; font-size: var(--fs-xs); white-space: nowrap; opacity: .85; }
.bubble.in .bubble-meta { color: var(--text-2); opacity: 1; }
.ticks { display: inline-flex; }
.bubble.out .ticks.read { color: var(--ticks-read-out); }
.edited { font-style: italic; }
.deleted-text { display: inline-flex; align-items: center; gap: 4px; }
.reply-quote { display: flex; flex-direction: column; gap: 1px; padding: var(--space-1) var(--space-2); margin-bottom: var(--space-1); border-inline-start: 3px solid currentColor; border-radius: 6px; background: color-mix(in srgb, currentColor 10%, transparent); font-size: var(--fs-s); white-space: normal; }
.reply-name { font-weight: var(--fw-bold); }
.reply-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30ch; }
.msg-more { flex: none; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
.msg-row:hover .msg-more, .msg-row:focus-within .msg-more, .msg-more:focus-visible { opacity: 1; }
@media (pointer: coarse) { .msg-more { opacity: .7; } }
.msg-failed { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--space-2); font-size: var(--fs-s); color: var(--danger); font-weight: var(--fw-medium); }
.msg-failed .link-btn { min-height: 2.5rem; }
.typing { flex: none; min-height: 1.25rem; padding: 0 var(--space-4); font-size: var(--fs-xs); color: var(--text-2); font-style: italic; }
.composer { flex: none; display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2) var(--space-3) max(env(safe-area-inset-bottom), var(--space-2)); background: var(--surface); border-top: 1px solid var(--divider); }
.composer-row { display: flex; align-items: flex-end; gap: var(--space-1); }
.composer-field { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-end; gap: var(--space-1); padding: 2px 2px 2px var(--space-3); border: 1px solid var(--border-strong); border-radius: 1.5rem; background: var(--surface-2); }
.composer-field:focus-within { border-color: var(--focus-ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 25%, transparent); }
.composer-input { flex: 1 1 auto; min-width: 0; min-height: 2.75rem; max-height: 12.5rem; padding: .625rem 0; border: 0; background: transparent; color: var(--text); resize: none; line-height: 1.4; font-size: var(--fs-m); }
.composer-input:focus-visible { outline: none; }
.send-btn { flex: none; width: var(--touch); height: var(--touch); border: 0; border-radius: 50%; background: var(--btn-primary-bg); background-color: var(--primary); color: var(--text-on-primary); display: inline-flex; align-items: center; justify-content: center; }
.send-btn:disabled { opacity: .45; }
.composer-mode { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-2); border-inline-start: 3px solid var(--primary); background: var(--primary-soft); border-radius: var(--radius-s); }
.mode-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: var(--fs-s); }
.mode-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.char-counter { font-size: var(--fs-xs); color: var(--text-2); text-align: end; }
.char-counter:empty { display: none; }
.char-counter.over { color: var(--danger); font-weight: var(--fw-bold); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr)); gap: var(--space-1); }
.emoji-btn { min-height: 3rem; border: 0; border-radius: var(--radius-m); background: transparent; font-size: 1.625rem; }
.emoji-btn:hover { background: var(--surface-2); }
.appbar .avatar { margin-inline-end: var(--space-1); }

/* ---------- Dateien ---------- */
.file-card { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); min-width: min(16rem, 100%); max-width: 100%; padding: var(--space-2); margin: 2px 0 var(--space-1); border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: calc(var(--bubble-radius) - 6px); background: color-mix(in srgb, currentColor 6%, transparent); color: inherit; text-align: start; white-space: normal; }
.file-icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-s); display: grid; place-items: center; background: color-mix(in srgb, currentColor 12%, transparent); }
.file-info { flex: 1 1 8rem; min-width: 0; display: flex; flex-direction: column; }
.file-name { font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.file-size { font-size: var(--fs-xs); opacity: .85; }
.file-risk { color: var(--warning); }
.bubble.out .file-risk { color: inherit; }
.file-thumb { flex-basis: 100%; display: block; }
.file-thumb img { width: 100%; max-height: 16rem; object-fit: cover; border-radius: var(--radius-s); }
.upload-preview { max-width: 100%; max-height: 50vh; object-fit: contain; border-radius: var(--radius-l); align-self: center; background: var(--surface-2); }
.upload-file { align-self: center; width: 7rem; height: 7rem; border-radius: var(--radius-l); display: grid; place-items: center; background: var(--surface-2); color: var(--primary); }
.upload-name { font-weight: var(--fw-bold); font-size: var(--fs-l); overflow-wrap: anywhere; }
.file-preview { display: flex; justify-content: center; }
.file-preview img { max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--radius-m); }
.view-viewer { background: #0B1220; color: #FFFFFF; }
.view-viewer .appbar { background: #111F39; color: #FFFFFF; border-bottom-color: #26344C; }
.view-viewer .appbar-title { color: #FFFFFF; }
.view-viewer .appbar-sub { color: #C3CBD8; }
.view-viewer .icon-btn { color: #FFFFFF; }
.view-viewer .icon-btn:hover { background: rgba(255,255,255,.12); }
.view-viewer .muted { color: #C3CBD8; }
.viewer-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-nav { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); flex-wrap: wrap; }
.media-grid { list-style: none; margin: 0; padding: var(--space-2); display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: var(--space-2); }
.media-tile { display: block; aspect-ratio: 1; border-radius: var(--radius-m); overflow: hidden; background: var(--surface-2); }
.media-thumb { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-3); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-theme="senior"]):not([data-reduce-motion="true"]) .msg-row:last-child .bubble { animation: mc-in var(--dur) var(--ease); }
}
@keyframes mc-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Ergänzungen Rev. 6/7 (20 Seiten) ---------- */
.onb-steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); counter-reset: st; }
.onb-steps-list li { display: flex; align-items: center; gap: var(--space-3); font-size: 1.1875rem; font-weight: 600; counter-increment: st; }
.onb-steps-list li::before { content: counter(st); flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--text-on-primary); font-weight: 800; }
.onb-steps-list li svg { flex: none; color: var(--primary); }
html[data-theme="dark"] .onb-steps-list li svg { color: var(--primary-hover); }
.onb-alt { flex-direction: column; align-items: center; gap: 0; }
.res-btn { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; align-self: flex-start; color: var(--text); font-weight: 600; }
.res-change { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
html[data-theme="dark"] .res-change { color: var(--primary-hover); }
.onb-age:empty { display: none; }
.friendly { text-align: center; align-items: center; }
.onb-done-icon.soft { width: 5rem; height: 5rem; background: var(--onb-sky); color: var(--primary); }
.perm-icons { display: flex; justify-content: center; gap: var(--space-4); color: var(--primary); padding: var(--space-2); }
.btn-success { background: var(--success); color: #FFFFFF; }
html[data-theme="dark"] .btn-success { color: #0B1F17; }
.section-title.flush { padding-inline-start: 0; padding-inline-end: 0; }
.break { overflow-wrap: anywhere; word-break: break-all; }
.ok-text { color: var(--success); font-weight: var(--fw-bold); }
.error-text { color: var(--danger); font-weight: var(--fw-bold); }
.profile-head.flat { background: none; border: 0; padding: var(--space-2) 0; }
.disclosure { border: 1px solid var(--border); border-radius: var(--radius-m); padding: var(--space-2) var(--space-3); background: var(--surface); }
.disclosure summary { min-height: var(--touch); display: flex; align-items: center; font-weight: var(--fw-bold); cursor: pointer; }
.panel-results { display: flex; flex-direction: column; gap: var(--space-2); }
.search-field.flush { margin: 0; }
.composer-note { margin: 0; padding: var(--space-2); text-align: center; color: var(--text-2); font-size: var(--fs-s); }
.bubble-sender { display: block; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--accent); margin-bottom: 2px; }
html[data-theme="dark"] .bubble-sender { color: var(--primary-hover); }
.fwd-note { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); opacity: .85; font-style: italic; }
.bubble.post { max-width: min(92%, 40rem); }
.row-flag.lead { margin: 0 var(--space-1) 0 0; color: var(--primary); }
html[data-theme="dark"] .row-flag.lead { color: var(--primary-hover); }

/* Anruf-Knopf (groß, beschriftet) */
.call-pill { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch); padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: var(--success); color: #FFFFFF; font-weight: var(--fw-bold); font-size: var(--fs-m); }
html[data-theme="dark"] .call-pill { color: #0B1F17; }
.call-pill:hover { filter: brightness(1.08); }
@media (max-width: 559.98px) { .appbar .call-pill .call-pill-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .appbar .call-pill { padding: 0; width: var(--touch); justify-content: center; } }
.appbar-titlelink, .appbar-titles { min-width: 4rem; }
.appbar-title { word-break: normal; overflow-wrap: break-word; }

/* Panel (rechts) und Vollbild-Overlay */
.scrim-panel { justify-content: flex-end; align-items: stretch; padding: 0; }
.dialog-panel { width: min(28rem, 100%); max-height: none; height: 100dvh; border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
@media (max-width: 719.98px) { .dialog-panel { width: 100%; border-radius: 0; } }
.scrim-fullscreen, .scrim-viewer { padding: 0; }
.dialog-fullscreen { width: 100%; max-width: none; height: 100dvh; max-height: none; border-radius: 0; justify-content: space-between; text-align: center; background: var(--surface); padding: var(--space-8) var(--space-5) max(env(safe-area-inset-bottom), var(--space-8)); }
.dialog-fullscreen .dialog-title { font-size: var(--fs-xl); }
.dialog-fullscreen .dialog-body { flex: 1; justify-content: center; }
.dialog-fullscreen .dialog-actions { justify-content: center; gap: var(--space-6); }
.dialog-fullscreen .dialog-actions .btn { min-height: 5rem; min-width: 9rem; border-radius: 2.5rem; font-size: var(--fs-l); }
.call-incoming { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.call-incoming .avatar { width: 8rem; height: 8rem; font-size: 2.5rem; }
.call-incoming-name { font-size: var(--fs-xxl); font-weight: var(--title-weight); color: var(--heading); }
.dialog-viewer { width: 100%; max-width: none; height: 100dvh; max-height: none; border-radius: 0; background: #0B1220; color: #FFFFFF; }
.dialog-viewer .dialog-title { color: #FFFFFF; }
.dialog-viewer .icon-btn { color: #FFFFFF; }
.dialog-viewer .viewer-stage { flex: 1; min-height: 50vh; }

/* Anrufbildschirm und Meeting */
.view-call { background: #0B1220; color: #FFFFFF; justify-content: space-between; }
.view-call .muted, .view-call .small { color: #C3CBD8; }
.call-status { text-align: center; padding: var(--space-6) var(--space-4) 0; font-size: var(--fs-l); font-weight: var(--fw-bold); color: #FFFFFF; }
.call-stage { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-4); padding: var(--space-4); position: relative; min-height: 0; }
.call-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); flex: 1 1 16rem; max-width: 40rem; }
.call-tile .avatar { width: 7rem; height: 7rem; font-size: 2rem; }
.call-name { font-size: var(--fs-l); font-weight: var(--fw-bold); }
.call-tile .remote-video { width: 100%; max-height: 60vh; border-radius: var(--radius-l); background: #000; object-fit: cover; }
.call-tile:has(.remote-video) .avatar { display: none; }
.remote-audio { display: none; }
.call-self { position: absolute; inset-inline-end: var(--space-4); bottom: var(--space-4); width: 7rem; border-radius: var(--radius-m); border: 2px solid #FFFFFF; }
.call-controls { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); padding: var(--space-4) var(--space-4) max(env(safe-area-inset-bottom), var(--space-6)); }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); min-width: 5rem; padding: var(--space-3); border: 0; border-radius: var(--radius-l); background: #2A3242; color: #FFFFFF; font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.call-btn[aria-pressed="true"] { background: #F1F4F8; color: #0B0F17; }
.call-btn.end { background: #D92D20; }
.call-btn:focus-visible { outline-color: #FFFFFF; }
.view-call .btn-primary { align-self: center; }
.meeting-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-4); flex-wrap: wrap; }
.meeting-title { font-weight: var(--fw-bold); font-size: var(--fs-l); }
.meeting-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); padding: var(--space-4); min-height: 0; }
.meeting-lobby { width: min(32rem, 100%); }
.meeting-lobby .card { background: #151B26; border-color: #26344C; color: #FFFFFF; }
.meeting-preview, .meeting-screen { width: 100%; max-width: 56rem; aspect-ratio: 16 / 9; border-radius: var(--radius-l); background: #151B26; object-fit: contain; }
.meeting-screen.ph, .meeting-preview.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); color: #C3CBD8; }
.meeting-chat { display: flex; flex-direction: column; gap: var(--space-2); max-height: 60vh; overflow: auto; }

/* Kalender */
.cal-nav { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.cal-month { flex: 1; text-align: center; font-size: var(--fs-l); text-transform: capitalize; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-1); }
.cal-monthgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wh { text-align: center; font-size: var(--fs-xs); color: var(--text-2); font-weight: var(--fw-bold); padding: var(--space-1) 0; }
.cal-day { position: relative; min-height: var(--touch); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: var(--space-1); border: 1px solid transparent; border-radius: var(--radius-m); background: var(--surface); color: var(--text); }
.cal-day.other { color: var(--text-3); background: transparent; }
.cal-day.today { border-color: var(--primary); }
.cal-day.sel { background: var(--primary); color: var(--text-on-primary); }
.cal-wd { font-size: var(--fs-xs); text-transform: uppercase; }
.cal-dn { font-weight: var(--fw-bold); font-size: var(--fs-m); }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.cal-day:not(.sel) .cal-dot { background: var(--primary); }
.cal-agenda { display: flex; flex-direction: column; gap: var(--space-2); }
.cal-time-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: var(--space-3); }

/* Dateitransfer */
.transfer-list { flex: none; display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--space-4) var(--space-2); max-height: 40vh; overflow: auto; }
.transfer-card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.transfer-head { display: flex; gap: var(--space-3); align-items: center; }
.transfer-info { display: flex; flex-direction: column; min-width: 0; }
.transfer-stats { margin: 0; }
.transfer-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.transfer-card.st-waiting { border-style: dashed; }

/* Eingehender Anruf (Vollbild): Hinweise oben einblenden, damit Annehmen/Ablehnen nie verdeckt sind */
body:has(.scrim-fullscreen) .toast-region { bottom: auto; top: max(env(safe-area-inset-top), var(--space-4)); }

/* Sprachnachrichten (DEC-55) */
.voice-rec { display: flex; align-items: center; justify-content: center; gap: var(--space-3); padding-block: var(--space-4); }
.voice-clock { font-size: var(--fs-xxl); font-weight: var(--title-weight); font-variant-numeric: tabular-nums; margin: 0; color: var(--heading); }
.rec-dot { width: 1rem; height: 1rem; border-radius: 50%; background: var(--danger, #c62828); }
html:not([data-reduce-motion="true"]):not([data-theme="senior"]) .rec-dot { animation: mc-pulse 1.2s ease-in-out infinite; }
.voice-card audio { width: 100%; min-width: 14rem; margin-block-start: var(--space-2); }
.voice-card .file-info { flex: 1; min-width: 0; }

/* Wohnsitzland als Auswahlfeld (Owner 12.11.): Flagge | Landesname | Pfeil nach unten */
.onb-residence { display: flex; align-items: center; gap: var(--space-3, 12px); width: 100%; min-height: 52px; padding: 10px 14px; margin-top: 4px;
  background: var(--surface, #fff); color: var(--text); border: 1px solid var(--border, #c5ccd8); border-radius: var(--radius-m, 12px); font: inherit; text-align: left; cursor: pointer; }
.onb-residence:hover { border-color: var(--brand, #0b63e5); }
.onb-residence:focus-visible { outline: 3px solid var(--focus, #0b63e5); outline-offset: 2px; }
.onb-residence.needs { border-color: var(--warn, #b45309); }
.onb-residence .res-flag { font-size: 1.5em; line-height: 1; width: 1.6em; text-align: center; flex: none; }
.onb-residence .res-value { flex: 1; font-weight: 600; }
.onb-residence .chev { flex: none; transform: rotate(90deg); display: inline-flex; color: var(--text-muted, #5b6575); }

/* Jahresansicht Kalender */
.cal-yeargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-3, 12px); }
.cal-ymonth { background: var(--surface); border-radius: var(--radius-m); padding: 8px; }
.cal-ymname { display: block; width: 100%; text-align: left; font: inherit; font-weight: 700; background: none; border: 0; color: var(--text); padding: 4px 4px 6px; cursor: pointer; }
.cal-ymname:hover { color: var(--primary); }
.cal-ygrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.cal-ywh { font-size: 0.7rem; color: var(--text-3); text-align: center; }
.cal-yd { position: relative; min-height: 26px; font-size: 0.78rem; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--text); padding: 0; cursor: pointer; }
.cal-yd.empty { cursor: default; }
.cal-yd.has::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--primary); }
.cal-yd.today { border-color: var(--primary); }
.cal-yd.sel { background: var(--primary); color: var(--text-on-primary); }
.cal-yd.sel.has::after { background: var(--text-on-primary); }

.email-code-input { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; }

/* Sprachauswahl auf dem Willkommensbildschirm */
.onb-lang-row { display: flex; justify-content: center; margin: 4px 0 8px; }
.onb-lang { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--border, #c5ccd8); border-radius: 999px; background: var(--surface, #fff); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.onb-lang:hover { border-color: var(--primary); }
.onb-lang:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.onb-lang .chev { display: inline-flex; transform: rotate(90deg); color: var(--text-3); }
/* RTL: Pfeile spiegeln, Telefonnummern bleiben links-nach-rechts */
[dir="rtl"] .onb-residence .chev, [dir="rtl"] .onb-lang .chev { transform: rotate(-90deg); }
[dir="rtl"] .numpad { direction: ltr; } /* Telefon-Tastenfeld bleibt 1-2-3 */
[dir="rtl"] .cc, [dir="rtl"] input[type="tel"], [dir="rtl"] .onb-field, [dir="rtl"] .nw, [dir="rtl"] .mono, [dir="rtl"] input[type="email"], [dir="rtl"] .email-code-input { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .onb-field { text-align: left; }

.onb-install { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.install-steps { padding-inline-start: 1.4em; display: grid; gap: 8px; }

/* Rückwärts-SMS: Nummer und Text groß, gut abzutippen */
.rsms-box { display: grid; gap: 4px; padding: 12px 14px; margin: 8px 0; background: var(--surface); border: 1px solid var(--border, #c5ccd8); border-radius: var(--radius-m); }
.rsms-value { font-size: 1.5rem; letter-spacing: 0.04em; user-select: all; }

.pk-login { margin-bottom: 8px; }
.onb-or { text-align: center; color: var(--text-3); margin: 4px 0 0; }
