/* ============================================
   FoxiChat 1.0 - Chat-Design
   ROT als Primärfarbe + Darkmode (wie FoxiCloud V8)
   ============================================ */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #f87171;
    --primary-rgb: 220, 38, 38;
    --accent-rgb: 249, 115, 22;
    --secondary: #b91c1c;
    --accent: #f97316;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --bg-gradient-start: #7f1d1d;
    --bg-gradient-end: #1c1917;
    --app-bg: #f5f5f4;
    --card-bg: #ffffff;
    --sidebar-bg: #fafaf9;
    --text-primary: #1c1917;
    --text-secondary: #44403c;
    --text-muted: #78716c;
    --border-color: #e7e5e4;
    --input-bg: #ffffff;
    --input-border: #e7e5e4;
    --hover-bg: #f5f5f4;
    --active-bg: rgba(var(--primary-rgb), 0.09);
    --mention-bg: rgba(var(--accent-rgb), 0.10);
    --mention-border: #f97316;
    --code-bg: #f5f5f4;
    --shadow-color: rgba(0, 0, 0, 0.12);
    --radius: 14px;
    --sidebar-w: 280px;
    --members-w: 260px;
}

[data-theme="dark"] {
    --bg-gradient-start: #450a0a;
    --bg-gradient-end: #0c0a09;
    --app-bg: #0f0d0c;
    --card-bg: #1c1917;
    --sidebar-bg: #161413;
    --text-primary: #fafaf9;
    --text-secondary: #e7e5e4;
    --text-muted: #a8a29e;
    --border-color: #292524;
    --input-bg: #292524;
    --input-border: #44403c;
    --hover-bg: #23201e;
    --active-bg: rgba(248, 113, 113, 0.14);
    --mention-bg: rgba(var(--accent-rgb), 0.13);
    --code-bg: #292524;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--text-primary); }
.me-1 { margin-right: .25rem; }

/* ============================================
   BUTTONS & FORMULARE
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 50px; padding: 11px 22px; font-weight: 700; cursor: pointer;
    text-decoration: none; transition: all .2s ease; font-size: .92rem; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 8px 22px rgba(var(--primary-rgb), .3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(var(--primary-rgb), .45); color: #fff; }
.btn-secondary { background: var(--hover-bg); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.field { margin-bottom: 14px; }
.field > label, .auth-form > label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--text-secondary); }
.field small, .auth-form small { color: var(--text-muted); font-weight: 400; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field input[type=search], .field input[type=datetime-local], .field select, .field textarea {
    width: 100%; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--input-border);
    background: var(--input-bg); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input[type=file] { width: 100%; padding: 10px; border-radius: 12px; border: 2px dashed var(--input-border); background: var(--input-bg); cursor: pointer; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .13); }
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; margin: 6px 0 12px; color: var(--text-secondary); }
.check input { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.hint { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.color-swatches button.sel { border-color: var(--text-primary); }

.alert { padding: 12px 14px; border-radius: 12px; font-size: .9rem; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; text-align: left; }
.alert-error { background: rgba(239,68,68,.1); color: #b91c1c; border: 1px solid rgba(239,68,68,.25); }
.alert-success { background: rgba(16,185,129,.1); color: #047857; border: 1px solid rgba(16,185,129,.25); }
.alert-info { background: rgba(59,130,246,.1); color: #1d4ed8; border: 1px solid rgba(59,130,246,.25); }
[data-theme="dark"] .alert-error { color: #fca5a5; }
[data-theme="dark"] .alert-success { color: #6ee7b7; }
[data-theme="dark"] .alert-info { color: #93c5fd; }

.icon-btn {
    width: 38px; height: 38px; border-radius: 10px; border: none; background: transparent; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted);
    transition: background .15s, color .15s; position: relative; text-decoration: none; flex-shrink: 0;
}
.icon-btn:hover { background: var(--hover-bg); color: var(--primary); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; font-size: .8rem; }
.icon-btn.active { color: var(--primary); background: var(--active-bg); }

/* ============================================
   ANMELDUNG / WARTUNG
   ============================================ */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}
.auth-body::before {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background: radial-gradient(circle at 15% 25%, rgba(248,113,113,.18) 0%, transparent 35%), radial-gradient(circle at 85% 75%, rgba(var(--accent-rgb), .12) 0%, transparent 35%);
}
.auth-box {
    position: relative; z-index: 1; background: var(--card-bg); border-radius: 26px; padding: 42px 38px; max-width: 440px; width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,.35); border: 1px solid var(--border-color); text-align: center; overflow: hidden;
}
.auth-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light)); }
.auth-logo {
    width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 22px; color: #fff; font-size: 2.1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 16px 36px rgba(var(--primary-rgb), .35);
}
.auth-logo.spin i { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-brand { font-weight: 900; text-transform: uppercase; letter-spacing: 2px; font-size: .75rem; color: var(--text-muted); }
.auth-title { font-size: 1.7rem; font-weight: 900; letter-spacing: -.8px; margin: 4px 0 6px; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-text { color: var(--text-secondary); margin-bottom: 22px; }
.auth-muted { color: var(--text-muted); font-size: .9rem; }
.auth-form { text-align: left; }
.input-icon { position: relative; margin-bottom: 14px; }
.input-icon i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; }
.input-icon input { width: 100%; padding: 12px 14px 12px 42px; border-radius: 12px; border: 2px solid var(--input-border); background: var(--input-bg); outline: none; transition: border-color .2s, box-shadow .2s; }
.input-icon input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .13); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-switch { margin-top: 18px; font-size: .9rem; color: var(--text-secondary); }
.auth-switch a, .auth-link { font-weight: 700; text-decoration: none; }
.auth-link { display: inline-block; margin-top: 20px; font-size: .85rem; color: var(--text-muted); }
.auth-footer { margin-top: 22px; font-size: .75rem; color: var(--text-muted); }
.theme-fab { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--card-bg); cursor: pointer; z-index: 2; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.mt-countdown { display: flex; justify-content: center; gap: 10px; margin: 20px 0 12px; }
.mt-countdown div { background: var(--hover-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 10px 6px; min-width: 66px; }
.mt-countdown b { display: block; font-size: 1.7rem; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; line-height: 1.1; }
.mt-countdown span { font-size: .65rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; }
.mt-progress { height: 6px; border-radius: 6px; background: var(--border-color); overflow: hidden; margin: 18px 0; }
.mt-progress span { display: block; height: 100%; width: 40%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--accent)); animation: mtBar 1.8s ease-in-out infinite; }
@keyframes mtBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ============================================
   APP-LAYOUT
   ============================================ */
.app-body { overflow: hidden; background: var(--app-bg); }
.app { display: flex; height: 100vh; height: 100dvh; width: 100%; }

.sidebar {
    width: var(--sidebar-w); flex-shrink: 0; background: var(--sidebar-bg); border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; z-index: 40;
}
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 12px 18px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(var(--primary-rgb), .35); flex-shrink: 0; }
.brand-text { font-weight: 900; font-size: 1.05rem; letter-spacing: -.3px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { display: block; font-size: .68rem; font-weight: 600; color: var(--text-muted); letter-spacing: 1px; }
.sb-close { display: none; }
.sb-maint { margin: 0 14px 10px; padding: 8px 12px; border-radius: 10px; background: rgba(245,158,11,.14); color: #b45309; font-size: .8rem; font-weight: 700; }
.sb-search { position: relative; padding: 0 14px 10px; }
.sb-search i { position: absolute; left: 27px; top: 11px; font-size: .78rem; color: var(--text-muted); }
.sb-search input { width: 100%; padding: 8px 12px 8px 33px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--input-bg); outline: none; font-size: .85rem; }
.sb-search input:focus { border-color: var(--primary); }
.sb-scroll { flex: 1; overflow-y: auto; padding: 0 8px 12px; scrollbar-width: thin; }
.sb-section { margin-top: 6px; }
.sb-section-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .9px; color: var(--text-muted); }
.sb-section-actions { display: flex; gap: 2px; }
.room-list { list-style: none; }
.room-item {
    display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; color: var(--text-secondary);
    transition: background .12s; user-select: none; position: relative;
}
.room-item:hover { background: var(--hover-bg); }
.room-item.active { background: var(--active-bg); color: var(--primary); font-weight: 700; }
.room-item.unread { color: var(--text-primary); font-weight: 700; }
.room-item.notify-none { opacity: .6; }
.ri-icon { width: 22px; text-align: center; color: var(--text-muted); font-size: .9rem; flex-shrink: 0; }
.room-item.active .ri-icon { color: var(--primary); }
.ri-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.ri-badge { background: var(--text-muted); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 10px; padding: 1px 7px; min-width: 20px; text-align: center; }
.ri-badge.mention { background: var(--primary); }
.room-item .avatar { --size: 24px; }
.sb-empty { padding: 6px 12px; font-size: .82rem; color: var(--text-muted); }

.sb-me { border-top: 1px solid var(--border-color); padding: 10px; display: flex; align-items: center; gap: 4px; }
.me-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: none; background: transparent; padding: 6px 8px; border-radius: 10px; cursor: pointer; text-align: left; }
.me-btn:hover { background: var(--hover-bg); }
.me-btn .me-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-btn .me-status { font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-btn > div { min-width: 0; }
.me-actions { display: flex; }
.me-actions .icon-btn { width: 32px; height: 32px; }

.sb-backdrop { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--card-bg); position: relative; }
.room-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border-color); min-height: 62px; }
.rh-info { flex: 1; min-width: 0; cursor: pointer; }
.rh-title { font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.rh-title i { color: var(--text-muted); font-size: .9rem; }
.rh-title span { overflow: hidden; text-overflow: ellipsis; }
.rh-title .tag { font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--hover-bg); color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.rh-topic { font-size: .82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-actions { display: flex; gap: 2px; }
.mobile-only { display: none; }
.mobile-badge { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); display: none; }
.mobile-badge.show { display: block; }

/* ============================================
   NACHRICHTEN
   ============================================ */
.messages-wrap { flex: 1; position: relative; min-height: 0; }
.messages { position: absolute; inset: 0; overflow-y: auto; padding: 12px 0 8px; scrollbar-width: thin; overscroll-behavior: contain; }
.msg-loading, .msg-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.msg-empty .big { font-size: 2.6rem; display: block; margin-bottom: 6px; }
.msg-empty h3 { color: var(--text-primary); font-weight: 800; margin-bottom: 4px; }
.load-more { text-align: center; padding: 8px; }

.day-sep { display: flex; align-items: center; gap: 12px; margin: 14px 18px 6px; font-size: .75rem; font-weight: 700; color: var(--text-muted); }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }
.unread-sep { display: flex; align-items: center; gap: 10px; margin: 6px 18px; font-size: .7rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .8px; }
.unread-sep::after { content: ''; flex: 1; height: 1px; background: var(--primary); }

.msg { display: flex; gap: 12px; padding: 5px 18px 3px; position: relative; transition: background .2s; }
.msg:hover { background: var(--hover-bg); }
.msg.grouped { padding-top: 1px; }
.msg.grouped .msg-avatar { visibility: hidden; height: 0; }
.msg.grouped .msg-head { display: none; }
.msg-gutter { width: 38px; flex-shrink: 0; }
.msg.grouped .msg-gutter .gtime { display: block; }
.gtime { display: none; font-size: .64rem; color: var(--text-muted); text-align: right; padding-top: 4px; opacity: 0; }
.msg.grouped:hover .gtime { opacity: 1; }
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-author { font-weight: 700; cursor: pointer; font-size: .93rem; }
.msg-author:hover { text-decoration: underline; }
.msg-time { font-size: .72rem; color: var(--text-muted); }
.role-badge { font-size: .62rem; font-weight: 800; padding: 1px 6px; border-radius: 5px; text-transform: uppercase; letter-spacing: .4px; color: #fff; background: var(--primary); align-self: center; }
.role-badge.moderator, .role-badge.mod { background: var(--info); }
.role-badge.owner { background: var(--warning); }
.msg-text { word-wrap: break-word; overflow-wrap: anywhere; color: var(--text-secondary); font-size: .95rem; }
.msg-text a { word-break: break-all; }
.msg-edited { font-size: .7rem; color: var(--text-muted); margin-left: 4px; }
.msg.action .msg-text { font-style: italic; color: var(--text-primary); }
.msg.mention { background: var(--mention-bg); box-shadow: inset 3px 0 0 var(--mention-border); }
.msg.pinned .msg-head::after { content: '\f08d'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .68rem; color: var(--warning); }
.msg.highlight { animation: hl 2.2s ease; }
@keyframes hl { 0%, 40% { background: rgba(var(--accent-rgb), .25); } 100% { background: transparent; } }
.msg.deleted .msg-text { font-style: italic; color: var(--text-muted); font-size: .85rem; }
.msg.blocked .msg-text { color: var(--text-muted); font-size: .85rem; font-style: italic; cursor: pointer; }
.msg.pending { opacity: .55; }
.msg.failed .msg-text { color: var(--danger); }
.msg.system { padding: 3px 18px; }
.system-line { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--text-muted); padding-left: 50px; }
.system-line i { font-size: .7rem; }
.emoji-only { font-size: 2.2rem; line-height: 1.25; }
.mention { background: rgba(var(--primary-rgb), .12); color: var(--primary); border-radius: 5px; padding: 0 3px; font-weight: 600; cursor: pointer; }
.mention.mention-me { background: rgba(var(--accent-rgb), .22); color: #c2410c; }
[data-theme="dark"] .mention.mention-me { color: #fdba74; }
.msg-code { background: var(--code-bg); border: 1px solid var(--border-color); border-radius: 6px; padding: 1px 5px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; }
.msg-pre { background: var(--code-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 12px; margin: 4px 0; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .84rem; white-space: pre; }
.msg-quote { border-left: 3px solid var(--border-color); padding: 2px 10px; margin: 3px 0; color: var(--text-muted); }

.msg-reply { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-muted); margin-bottom: 2px; cursor: pointer; min-width: 0; }
.msg-reply::before { content: ''; width: 22px; height: 10px; border-left: 2px solid var(--border-color); border-top: 2px solid var(--border-color); border-top-left-radius: 6px; margin-left: -28px; margin-top: 8px; flex-shrink: 0; }
.msg-reply b { color: var(--text-secondary); white-space: nowrap; }
.msg-reply span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-reply:hover span { color: var(--text-primary); }

.att-img { display: inline-block; margin-top: 6px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); cursor: zoom-in; max-width: min(420px, 100%); background: var(--hover-bg); }
.att-img img { display: block; max-width: 100%; max-height: 320px; object-fit: contain; }
.att-file { display: inline-flex; align-items: center; gap: 12px; margin-top: 6px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--sidebar-bg); max-width: 100%; text-decoration: none; color: var(--text-primary); }
.att-file:hover { border-color: var(--primary); }
.att-file i { font-size: 1.6rem; color: var(--primary); }
.att-file b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.att-file small { color: var(--text-muted); font-size: .75rem; }
.att-media { margin-top: 6px; max-width: min(420px, 100%); border-radius: 12px; }

.msg-reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 20px; border: 1px solid var(--border-color); background: var(--card-bg); cursor: pointer; font-size: .85rem; transition: all .12s; }
.react b { font-size: .75rem; color: var(--text-muted); font-weight: 700; }
.react:hover { border-color: var(--primary); }
.react.mine { background: var(--active-bg); border-color: var(--primary-light); }
.react.mine b { color: var(--primary); }
.react-add { opacity: 0; }
.msg:hover .react-add { opacity: 1; }

.msg-actions {
    position: absolute; right: 16px; top: -14px; display: none; gap: 1px; background: var(--card-bg);
    border: 1px solid var(--border-color); border-radius: 10px; padding: 2px; box-shadow: 0 6px 18px var(--shadow-color); z-index: 3;
}
.msg:hover .msg-actions, .msg.menu-open .msg-actions { display: flex; }
.msg-actions button { width: 30px; height: 30px; border: none; background: transparent; border-radius: 8px; cursor: pointer; color: var(--text-muted); font-size: .82rem; }
.msg-actions button:hover { background: var(--hover-bg); color: var(--primary); }
.msg-actions .qr { font-size: .95rem; }
.compact .msg { padding-top: 1px; padding-bottom: 1px; }
.compact .msg-avatar .avatar { --size: 24px; }
.compact .msg-gutter { width: 24px; }

.jump-btn {
    position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
    border: none; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; border-radius: 30px; padding: 8px 16px;
    font-weight: 700; font-size: .82rem; cursor: pointer; box-shadow: 0 8px 22px rgba(var(--primary-rgb), .4); transition: all .2s; z-index: 4;
}
.jump-btn.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.jump-btn span { display: none; }
.jump-btn.has-new span { display: inline; }

.typing { height: 22px; padding: 0 22px; font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.typing .dots { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.typing .dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); animation: tdot 1.2s infinite; }
.typing .dots span:nth-child(2) { animation-delay: .15s; }
.typing .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ============================================
   EINGABE
   ============================================ */
.composer { padding: 0 16px 12px; position: relative; }
.composer-bar:empty { display: none; }
.composer-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border-color); border-bottom: none; border-radius: 14px 14px 0 0; background: var(--sidebar-bg); font-size: .82rem; color: var(--text-muted); }
.composer-bar .cb-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-bar b { color: var(--text-primary); }
.composer-bar img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.composer-bar + .mention-pop + .composer-row { border-top-left-radius: 0; border-top-right-radius: 0; }
.composer-row { display: flex; align-items: flex-end; gap: 4px; border: 2px solid var(--input-border); background: var(--input-bg); border-radius: 16px; padding: 5px; transition: border-color .2s, box-shadow .2s; }
.composer-row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .1); }
.composer-input { flex: 1; min-width: 0; }
.composer-input textarea { width: 100%; border: none; outline: none; background: transparent; resize: none; padding: 8px 6px; max-height: 200px; line-height: 1.45; display: block; }
.send-btn { width: 40px; height: 40px; border-radius: 12px; border: none; cursor: pointer; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; flex-shrink: 0; transition: transform .15s, opacity .15s; }
.send-btn:hover { transform: scale(1.06); }
.send-btn:disabled { opacity: .4; transform: none; cursor: default; }
.composer-hint { font-size: .7rem; color: var(--text-muted); padding: 5px 6px 0; }
.composer-hint b { font-weight: 700; }
.composer-locked { display: none; position: absolute; inset: 0 16px 12px; background: var(--sidebar-bg); border: 1px dashed var(--border-color); border-radius: 16px; align-items: center; justify-content: center; gap: 10px; color: var(--text-muted); font-size: .9rem; text-align: center; padding: 10px; z-index: 5; }
.composer-locked.show { display: flex; }
.mention-pop { display: none; position: absolute; left: 16px; right: 16px; bottom: calc(100% - 4px); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 -10px 30px var(--shadow-color); max-height: 260px; overflow-y: auto; z-index: 20; padding: 4px; }
.mention-pop.show { display: block; }
.mp-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: .88rem; }
.mp-item small { color: var(--text-muted); }
.mp-item.sel, .mp-item:hover { background: var(--active-bg); }
.drop-overlay { display: none; position: absolute; inset: 0; background: rgba(var(--primary-rgb), .12); border: 3px dashed var(--primary); z-index: 30; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.drop-overlay.show { display: flex; }
.drop-overlay div { background: var(--card-bg); padding: 26px 36px; border-radius: 18px; text-align: center; font-weight: 800; box-shadow: 0 20px 50px var(--shadow-color); }
.drop-overlay i { display: block; font-size: 2.4rem; color: var(--primary); margin-bottom: 8px; }

/* ============================================
   AVATARE
   ============================================ */
.avatar { --size: 38px; width: var(--size); height: var(--size); border-radius: 30%; position: relative; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: calc(var(--size) * .42); text-transform: uppercase; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: calc(var(--size) * .32); height: calc(var(--size) * .32); min-width: 9px; min-height: 9px; border-radius: 50%; border: 2px solid var(--sidebar-bg); background: #a8a29e; }
.dot.online { background: var(--success) !important; }
.dot.away { background: var(--warning) !important; }
.dot.busy { background: var(--danger) !important; }
.dot.offline, .dot.invisible { background: #a8a29e !important; }
.msg-avatar { cursor: pointer; }
.avatar.lg { --size: 84px; border-radius: 26px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ============================================
   MITGLIEDER
   ============================================ */
.members { width: var(--members-w); flex-shrink: 0; background: var(--sidebar-bg); border-left: 1px solid var(--border-color); display: none; flex-direction: column; }
.members.open { display: flex; }
.members-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 10px 18px; font-weight: 800; }
.members-list { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.member-group { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .9px; color: var(--text-muted); padding: 12px 10px 4px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.member-item:hover { background: var(--hover-bg); }
.member-item .mi-name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-item .mi-sub { font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-item > div { min-width: 0; flex: 1; }
.member-item.offline { opacity: .55; }
.member-item .avatar { --size: 32px; }

/* ============================================
   MODALS, POPOVER, TOASTS
   ============================================ */
.modal-root .modal { position: fixed; inset: 0; background: rgba(12,10,9,.55); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: var(--card-bg); border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.4); border: 1px solid var(--border-color); animation: popIn .2s cubic-bezier(.34,1.56,.64,1); overflow: hidden; }
.modal-card.wide { max-width: 720px; }
@keyframes popIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.modal-head h3 { font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.modal-head h3 i { color: var(--primary); }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; }
.modal-foot { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border-color); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-color); margin: 0 -20px 16px; padding: 0 20px; overflow-x: auto; }
.tabs button { border: none; background: none; padding: 10px 12px; font-weight: 700; font-size: .85rem; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; }
.list-item:hover { background: var(--hover-bg); }
.list-item > div { flex: 1; min-width: 0; }
.list-item b { display: block; font-size: .92rem; }
.list-item small { color: var(--text-muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--active-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.search-hit { padding: 10px; border-radius: 12px; cursor: pointer; border: 1px solid var(--border-color); margin-bottom: 8px; }
.search-hit:hover { border-color: var(--primary); }
.search-hit .sh-meta { font-size: .75rem; color: var(--text-muted); margin-bottom: 3px; }
.search-hit mark { background: rgba(var(--accent-rgb), .3); color: inherit; border-radius: 3px; }
.profile-top { text-align: center; padding: 6px 0 12px; }
.profile-top .avatar { margin-bottom: 10px; }
.profile-top h4 { font-size: 1.25rem; font-weight: 800; }
.profile-top .sub { color: var(--text-muted); font-size: .85rem; }
.profile-bio { background: var(--sidebar-bg); border-radius: 12px; padding: 10px 14px; font-size: .9rem; color: var(--text-secondary); margin: 8px 0; white-space: pre-wrap; }
.profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.profile-facts div { background: var(--sidebar-bg); border-radius: 12px; padding: 8px 12px; font-size: .78rem; color: var(--text-muted); }
.profile-facts b { display: block; color: var(--text-primary); font-size: .9rem; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.icon-grid button { height: 40px; border-radius: 10px; border: 2px solid var(--border-color); background: var(--card-bg); cursor: pointer; color: var(--text-secondary); }
.icon-grid button.sel { border-color: var(--primary); color: var(--primary); background: var(--active-bg); }
.help-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.help-table td { padding: 6px 4px; border-bottom: 1px dashed var(--border-color); vertical-align: top; }
.help-table td:first-child { font-family: ui-monospace, Consolas, monospace; white-space: nowrap; color: var(--primary); padding-right: 14px; }

.popover { position: fixed; z-index: 120; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; box-shadow: 0 18px 50px var(--shadow-color); padding: 6px; display: none; min-width: 200px; max-width: calc(100vw - 16px); }
.popover.show { display: block; animation: fadeIn .1s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; cursor: pointer; font-size: .88rem; border: none; background: none; width: 100%; text-align: left; color: var(--text-primary); }
.menu-item:hover { background: var(--hover-bg); }
.menu-item i { width: 18px; text-align: center; color: var(--text-muted); }
.menu-item.danger, .menu-item.danger i { color: var(--danger); }
.menu-item.checked::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-left: auto; color: var(--primary); font-size: .8rem; }
.menu-sep { height: 1px; background: var(--border-color); margin: 4px 6px; }

.emoji-picker { width: 330px; max-width: calc(100vw - 24px); }
.ep-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-color); padding-bottom: 4px; margin-bottom: 4px; }
.ep-tabs button { flex: 1; border: none; background: none; padding: 6px 0; border-radius: 8px; cursor: pointer; font-size: 1.05rem; opacity: .6; }
.ep-tabs button.active { opacity: 1; background: var(--active-bg); }
.ep-search { width: 100%; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--border-color); background: var(--input-bg); outline: none; margin-bottom: 4px; font-size: .85rem; }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 230px; overflow-y: auto; }
.ep-grid button { border: none; background: none; font-size: 1.35rem; padding: 4px 0; border-radius: 8px; cursor: pointer; line-height: 1.2; }
.ep-grid button:hover { background: var(--hover-bg); transform: scale(1.15); }
.quick-react { display: flex; gap: 2px; padding: 2px; }
.quick-react button { border: none; background: none; font-size: 1.35rem; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.quick-react button:hover { background: var(--hover-bg); }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 36px); }
.toast { background: var(--card-bg); border: 1px solid var(--border-color); border-left: 4px solid var(--primary); border-radius: 12px; padding: 12px 16px; box-shadow: 0 12px 34px var(--shadow-color); font-size: .88rem; min-width: 240px; max-width: 380px; animation: toastIn .25s ease; cursor: pointer; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast b { display: block; margin-bottom: 2px; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .members.open { position: fixed; right: 0; top: 0; bottom: 0; z-index: 45; box-shadow: -10px 0 40px var(--shadow-color); }
}
@media (max-width: 820px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 10px 0 40px var(--shadow-color); width: min(86vw, 320px); }
    .app.sb-open .sidebar { transform: none; }
    .app.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 39; }
    .sb-close, .mobile-only { display: inline-flex; }
    .composer-hint { display: none; }
    .msg { padding-left: 12px; padding-right: 12px; }
    .msg-actions { right: 8px; }
    .room-head { padding: 8px 10px; }
    .composer { padding: 0 8px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
    .rh-actions .icon-btn[data-action="pinned"], .rh-actions .icon-btn[data-action="room-notify"] { display: none; }
    .members { width: min(86vw, 300px); }
    .field-row { flex-direction: column; gap: 0; }
}
@media (hover: none) {
    .msg-actions { display: none !important; }
    .react-add { opacity: 1; }
}

/* ============================================
   1.1.0 – NEUE ELEMENTE
   ============================================ */
/* Eingabeleiste: Antwort, Aufnahme, Dateien */
.composer-bar { flex-direction: column; align-items: stretch; gap: 6px; }
.cb-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cb-rec { color: var(--danger); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: recPulse 1s infinite; flex-shrink: 0; }
@keyframes recPulse { 50% { opacity: .25; } }
#btnVoice.recording { color: #fff; background: var(--danger); animation: recPulse 1.2s infinite; }
.cb-files { display: flex; gap: 8px; flex-wrap: wrap; }
.cbf { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 4px 5px 5px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--card-bg); max-width: 240px; overflow: hidden; }
.cbf img, .cbf .cbf-ico { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cbf .cbf-ico { display: flex; align-items: center; justify-content: center; background: var(--active-bg); color: var(--primary); }
.cbf-info { min-width: 0; flex: 1; }
.cbf-info b { display: block; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.cbf-info small { font-size: .7rem; color: var(--text-muted); }
.cbf-prog { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .2s; }
.cbf.done { border-color: rgba(16, 185, 129, .45); }

/* Ankündigungen */
.ann-wrap:empty { display: none; }
.ann-wrap { padding: 10px 16px 0; display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; }
.ann { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid; position: relative; text-align: left; font-size: .9rem; animation: slideDown .35s ease; }
@keyframes slideDown { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.ann-icon { font-size: 1.2rem; margin-top: 2px; flex-shrink: 0; }
.ann-body { flex: 1; min-width: 0; color: var(--text-primary); overflow-wrap: anywhere; }
.ann-body b { display: block; margin-bottom: 2px; }
.ann-img { display: block; max-width: 100%; max-height: 110px; border-radius: 10px; margin-top: 8px; cursor: zoom-in; }
.ann-x { position: absolute; top: 6px; right: 6px; }
.ann-info { background: rgba(59, 130, 246, .09); border-color: rgba(59, 130, 246, .3); } .ann-info .ann-icon { color: var(--info); }
.ann-success { background: rgba(16, 185, 129, .09); border-color: rgba(16, 185, 129, .3); } .ann-success .ann-icon { color: var(--success); }
.ann-warning { background: rgba(245, 158, 11, .11); border-color: rgba(245, 158, 11, .35); } .ann-warning .ann-icon { color: var(--warning); }
.ann-danger { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); } .ann-danger .ann-icon { color: var(--danger); }
.ann-event { background: rgba(var(--primary-rgb), .08); border-color: rgba(var(--primary-rgb), .3); } .ann-event .ann-icon { color: var(--primary); }
.ann-party { background: linear-gradient(135deg, rgba(234, 179, 8, .14), rgba(168, 85, 247, .12)); border-color: rgba(234, 179, 8, .4); } .ann-party .ann-icon { color: #ca8a04; }
.ann-christmas { background: linear-gradient(135deg, rgba(21, 128, 61, .12), rgba(200, 30, 30, .1)); border-color: rgba(21, 128, 61, .35); } .ann-christmas .ann-icon { color: #15803d; }
.ann-login { margin-bottom: 14px; }

/* Neue Nachrichtentypen */
.spoiler { background: var(--text-primary); color: transparent; border-radius: 4px; padding: 0 3px; cursor: pointer; transition: background .2s, color .2s; user-select: none; }
.spoiler * { visibility: hidden; }
.spoiler.open { background: var(--hover-bg); color: inherit; user-select: auto; }
.spoiler.open * { visibility: visible; }
.mention.mention-all { background: rgba(var(--accent-rgb), .2); color: var(--accent); }
.emo-custom { height: 1.6em; width: auto; vertical-align: -.4em; margin: 0 1px; }
.emoji-only .emo-custom { height: 2.6em; }
.msg-fwd { font-size: .76rem; color: var(--text-muted); margin: 1px 0 2px; }
.msg-fwd i { margin-right: 3px; }
.msg-bm { color: var(--primary); font-size: .7rem; }
.msg.dice .msg-text { font-style: normal; font-weight: 600; }
.dice-ico { font-size: 1.2rem; }
.seen { display: block; font-size: .7rem; color: var(--text-muted); text-align: right; margin-top: 2px; }
.seen i { color: var(--info); }
.link-btn { border: none; background: none; color: var(--primary); font-weight: 700; cursor: pointer; padding: 0; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }

/* Umfragen */
.poll { border: 1px solid var(--border-color); border-radius: 14px; padding: 12px; margin-top: 4px; max-width: 460px; background: var(--card-bg); }
.poll-q { font-weight: 800; margin-bottom: 8px; color: var(--text-primary); }
.poll-q i { color: var(--primary); }
.poll-opt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; background: var(--sidebar-bg); cursor: pointer; overflow: hidden; color: var(--text-primary); font-size: .9rem; }
.poll-opt:hover:not(:disabled) { border-color: var(--primary); }
.poll-opt:disabled { cursor: default; }
.poll-opt.mine { border-color: var(--primary); }
.po-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(var(--primary-rgb), .14); transition: width .4s ease; }
.poll-opt.mine .po-bar { background: rgba(var(--primary-rgb), .24); }
.po-check, .po-text, .po-pct { position: relative; }
.po-check { color: var(--primary); }
.po-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.po-pct { font-size: .76rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.poll-foot { font-size: .76rem; color: var(--text-muted); }
.poll.closed { opacity: .9; }
.poll-edit-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.poll-edit-row .input { flex: 1; }

/* Sprachnachricht */
.att-voice { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 6px 12px 6px 6px; border-radius: 30px; border: 1px solid var(--border-color); background: var(--sidebar-bg); max-width: 100%; }
.att-voice audio { height: 36px; max-width: 260px; }
.av-ico { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.att-voice small { color: var(--text-muted); font-size: .75rem; font-variant-numeric: tabular-nums; }

/* Medien-Galerie & Lightbox */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.media-item { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--hover-bg); }
.media-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.media-item:hover img { transform: scale(1.05); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; font-size: 1.1rem; }
.lb-nav:hover { background: rgba(255,255,255,.3); }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-bar { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 16px; align-items: center; color: #fff; font-size: .85rem; }
.lb-dl { color: #fff; text-decoration: none; background: rgba(255,255,255,.15); padding: 6px 14px; border-radius: 20px; }

/* Smiley-Auswahl */
.emoji-picker { width: 360px; }
.ep-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ep-tabs button { flex: 0 0 34px; }
.ep-title { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); padding: 4px 4px 2px; }
.ep-grid { grid-template-columns: repeat(9, 1fr); max-height: 260px; }
.ep-grid button img { width: 26px; height: 26px; object-fit: contain; }
.ep-empty { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 20px; }

.ann-login .ann-img { max-height: 180px; }
