/* VYRE — Harbor Mist */
:root {
  --accent: #18B5AA;
  --accent-soft: rgba(15, 143, 134, 0.14);
  --accent-mid: rgba(15, 143, 134, 0.28);
  --blue-dark: #0C1220;
  --blue-mid: #1A3A3A;
  --ink: #142033;
  --glass: rgba(255, 255, 255, 0.74);
  --glass-border: rgba(12, 18, 32, 0.09);
  --text: #142033;
  --text-muted: #5A6B7D;
  --bg: linear-gradient(165deg, #F4F8FB 0%, #E7EEF4 48%, #D5E0EA 100%);
  --card: rgba(255, 255, 255, 0.92);
  --bubble-other: #ffffff;
  --bubble-mine: #0F8F86;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --surface: rgba(255, 255, 255, 0.88);
  --danger: #E11D48;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-ui: 'Manrope', 'Segoe UI', sans-serif;
  --font-brand: 'Fraunces', Georgia, serif;
  --shadow-soft: 0 8px 28px rgba(12, 18, 32, 0.07);
  --shadow-dock: 0 10px 28px rgba(12, 18, 32, 0.1);
}

body.theme-dark {
  --accent: #2DD4C8;
  --accent-soft: rgba(45, 212, 200, 0.12);
  --accent-mid: rgba(45, 212, 200, 0.22);
  --glass: rgba(12, 22, 34, 0.94);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text: #F4F8FC;
  --text-muted: #8BA0B5;
  --bg: linear-gradient(170deg, #0C1220 0%, #12202C 55%, #0A141C 100%);
  --card: rgba(14, 28, 40, 0.96);
  --bubble-other: #152636;
  --bubble-mine: #0F7A72;
  --nav-bg: rgba(10, 18, 28, 0.96);
  --surface: rgba(16, 30, 42, 0.9);
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.28);
  --shadow-dock: 0 10px 28px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  transition: background 0.3s ease, color 0.25s ease;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none !important; opacity: 0.35; }
.app { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100vh; max-width: 1240px; margin: 0 auto; }
html.vyre-desktop .app,
body.vyre-desktop .app { max-width: none; width: 100%; }

/* Native app WebView shell (Android / future iOS) */
html.vyre-app,
body.vyre-app {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
html.vyre-app .open-in-browser,
html.vyre-app [data-web-only],
html.vyre-app .browser-only,
body.vyre-app .open-in-browser,
body.vyre-app [data-web-only],
body.vyre-app .browser-only { display: none !important; }
html.vyre-app .app {
  max-width: none;
  width: 100%;
  height: 100dvh;
}

.auth-downloads {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.auth-downloads-title {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  text-align: center;
}
.auth-downloads-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}
.auth-downloads-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.auth-download-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
}
.auth-download-btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}
.download-apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.download-app-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface, #fff));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  text-decoration: none;
  color: inherit;
}
.download-app-card.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.download-app-ico { font-size: 22px; }
.download-app-card strong { font-size: 15px; }
.download-app-card span { font-size: 12px; color: var(--text-muted); }
@media (max-width: 560px) {
  .download-apps-grid { grid-template-columns: 1fr; }
}

/* —— Auth —— */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: max(20px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
}
.auth-screen.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden;
}
.auth-screen::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(46, 196, 255, 0.12), transparent 70%);
  pointer-events: none;
}
.auth-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  margin: auto 0;
  padding: 36px 32px 32px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  animation: authEnter 0.4s ease;
  flex-shrink: 0;
}
.glass-panel {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-soft);
  animation: fadeInUp 0.35s ease;
}
.brand-mark {
  font-family: var(--font-brand);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--blue-dark);
}
body.theme-dark .brand-mark { color: var(--accent); }
.auth-brand {
  font-size: clamp(3.2rem, 10vw, 4.25rem);
  text-align: center;
  margin-bottom: 8px;
}
.auth-tagline {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 450;
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}
.auth-title { font-family: var(--font-brand); font-size: 32px; font-weight: 800; color: var(--blue-dark); text-align: center; }
body.theme-dark .auth-title { color: var(--accent); }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.form-group input, .form-group select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn-primary {
  width: 100%; padding: 13px 16px;
  background: var(--accent); color: var(--blue-dark);
  border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: transform 0.15s ease, filter 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: transparent; border: 1px solid var(--accent-mid);
  color: var(--blue-mid); padding: 9px 16px; border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 600; font-family: inherit; font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}
body.theme-dark .btn-secondary { color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-danger {
  background: rgba(225, 29, 72, 0.1); border: 1px solid rgba(225, 29, 72, 0.35);
  color: #E11D48; padding: 9px 16px; border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 700; font-family: inherit; font-size: 13px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn-danger:hover { background: rgba(225, 29, 72, 0.18); border-color: #E11D48; }
.btn-soft {
  background: var(--surface); border: 1px solid var(--glass-border);
  color: var(--text); padding: 8px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 600; font-family: inherit; font-size: 12px;
  transition: background 0.15s, border-color 0.15s;
}
.btn-soft:hover { border-color: var(--accent-mid); background: var(--accent-soft); }
.btn-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 34px; padding: 6px 11px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: var(--surface);
  color: var(--text); font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.btn-action:hover { border-color: var(--accent-mid); background: var(--accent-soft); transform: translateY(-1px); }
.btn-action:active { transform: translateY(0); }
.btn-action .btn-ico { font-size: 13px; line-height: 1; }
.btn-action-primary { border-color: var(--accent-mid); color: var(--blue-mid); }
body.theme-dark .btn-action-primary { color: var(--accent); }
.btn-action-warn { border-color: rgba(245, 158, 11, 0.4); color: #B45309; background: rgba(245, 158, 11, 0.08); }
body.theme-dark .btn-action-warn { color: #FBBF24; }
.btn-action-danger { border-color: rgba(225, 29, 72, 0.35); color: #E11D48; background: rgba(225, 29, 72, 0.08); }
.btn-action-danger:hover { background: rgba(225, 29, 72, 0.16); border-color: #E11D48; }
.btn-action-success { border-color: rgba(22, 163, 74, 0.35); color: #15803D; background: rgba(22, 163, 74, 0.08); }
.btn-action-success:hover { background: rgba(22, 163, 74, 0.16); border-color: #16A34A; }
.list-item .actions { flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 58%; }
.contact-card { align-items: flex-start; }
.contact-card-meta { flex: 1; min-width: 0; }
.btn-dialog.hidden { display: none; }

@media (max-width: 640px) {
  .list-item .actions { max-width: 100%; width: 100%; justify-content: flex-start; margin-top: 4px; margin-left: 0; }
  .contact-card { flex-wrap: wrap; }
}

.app-dialog { z-index: 1100; }
.app-dialog-box {
  width: min(420px, 100%);
  text-align: center;
  padding: 28px 24px 22px !important;
  animation: dialogIn 0.22s ease;
}
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.app-dialog-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 16px; display: grid; place-items: center;
  font-size: 24px; background: var(--accent-soft); border: 1px solid var(--accent-mid);
}
.app-dialog-box.tone-danger .app-dialog-icon {
  background: rgba(225, 29, 72, 0.12); border-color: rgba(225, 29, 72, 0.3);
}
.app-dialog-box.tone-warn .app-dialog-icon {
  background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.3);
}
.app-dialog-box.tone-success .app-dialog-icon {
  background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.3);
}
.app-dialog-box h2 {
  font-family: var(--font-brand); font-size: 20px; letter-spacing: -0.03em;
  margin: 0 0 8px; font-weight: 700;
}
.app-dialog-text {
  margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--text-muted);
  white-space: pre-wrap;
}
.app-dialog-field { text-align: left; margin-bottom: 16px; }
.app-dialog-field.hidden { display: none; }
.app-dialog-field label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px;
}
.app-dialog-actions { display: flex; gap: 10px; }
.btn-dialog {
  flex: 1; min-height: 44px; border-radius: 12px; border: none;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform 0.12s, filter 0.15s, background 0.15s;
}
.btn-dialog:hover { transform: translateY(-1px); }
.btn-dialog:active { transform: translateY(0); }
.btn-dialog-ghost {
  background: var(--surface); border: 1px solid var(--glass-border); color: var(--text);
}
.btn-dialog-ghost:hover { background: var(--card); }
.btn-dialog-primary { background: var(--accent); color: var(--blue-dark); }
.btn-dialog-primary:hover { filter: brightness(1.05); }
.btn-dialog-danger { background: #E11D48; color: #fff; }
.btn-dialog-danger:hover { filter: brightness(1.06); }
.btn-dialog-warn { background: #F59E0B; color: #1C1917; }

.error-msg { color: var(--danger); font-size: 13px; margin: 8px 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; font-size: 13px; line-height: 1.45; }
.checkbox-row input { margin-top: 3px; flex-shrink: 0; }
.checkbox-row label a, .term-link { color: var(--accent); text-decoration: underline; cursor: pointer; }
.terms-block {
  margin: 12px 0; padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
}
.register-heading { display: none; }
.register-actions { margin-top: 4px; }
.register-steps {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 0 6px;
}
.register-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--glass-border);
  color: var(--text-muted);
}
.register-step-dot.active {
  background: var(--accent); border-color: var(--accent); color: var(--blue-dark);
}
.register-step-line {
  width: 36px; height: 2px; border-radius: 2px;
  background: var(--glass-border);
}
.register-step-caption {
  text-align: center; font-size: 13px; color: var(--text-muted);
  margin: 0 0 16px; font-weight: 600;
}
.register-step-panel.hidden { display: none !important; }
.register-avatar-row {
  display: flex; align-items: center; gap: 14px; margin-top: 4px;
}
.register-avatar-preview {
  width: 64px; height: 64px; font-size: 22px;
  border: 2px solid var(--accent-mid);
}
.register-avatar-preview img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}
.register-avatar-btn { cursor: pointer; margin: 0; }
.register-avatar-hint { font-size: 12px; margin-top: 6px; }
.link-btn {
  background: none; border: none; padding: 0;
  color: var(--accent); font-weight: 600; font-size: 14px;
  cursor: pointer; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }
#register-form .register-heading { display: block; }
.auth-panel:has(#register-form:not(.hidden)) .auth-brand,
.auth-panel:has(#register-form:not(.hidden)) .auth-tagline {
  display: none;
}
.auth-switch {
  text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-muted);
}
.auth-switch a { font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-forgot-disabled {
  opacity: 0.75;
  cursor: default;
  user-select: none;
  font-size: 13px;
  line-height: 1.4;
}

.terms-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.terms-modal.hidden { display: none; }
.terms-modal-backdrop { position: absolute; inset: 0; background: rgba(7, 21, 37, 0.5); }
.terms-modal-box {
  position: relative; max-width: 520px; width: 100%; max-height: 85vh;
  display: flex; flex-direction: column; padding: 26px; margin: 0;
}
.terms-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.terms-modal-header h2 { font-size: 18px; font-weight: 700; font-family: var(--font-brand); letter-spacing: -0.02em; }
.terms-modal-body { flex: 1; overflow-y: auto; font-size: 14px; line-height: 1.6; white-space: pre-wrap; color: var(--text); margin-bottom: 16px; padding-right: 4px; }

/* —— Main shell —— */
.main-screen {
  display: none; flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  position: relative; z-index: 1;
}
.main-screen.active { display: flex; }
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top, 0px)) 22px 12px;
  background: transparent;
  position: relative; z-index: 20;
  flex-shrink: 0;
}
.header h1, .header .brand-mark {
  font-family: var(--font-brand);
  font-size: 1.55rem; font-weight: 800; letter-spacing: -0.04em;
}
.header-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 14px; border: 1px solid var(--glass-border);
  background: var(--card); cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.icon-btn:hover { background: var(--accent-soft); border-color: var(--accent-mid); transform: translateY(-1px); }
.content {
  flex: 1; overflow: hidden; display: flex;
  margin: 0 12px 8px; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  min-height: 0;
}
.tab-panel { display: none; flex: 1; overflow: hidden; animation: fadeInUp 0.3s ease; min-width: 0; }
.tab-panel.active { display: flex; }
#tab-profile { flex-direction: column; min-height: 0; }

/* —— Chats —— */
.chats-layout { display: flex; width: 100%; height: 100%; min-height: 0; }
.typing-indicator { padding: 4px 18px; font-size: 12px; color: var(--accent); font-weight: 500; }
.typing-indicator.hidden { display: none; }
.chat-subtitle.typing { color: var(--accent); font-weight: 600; }
.pinned-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin: 0; cursor: pointer;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-bottom: 1px solid var(--glass-border);
}
.pinned-bar.hidden { display: none; }
.pinned-bar-ico { flex-shrink: 0; }
.pinned-bar-body { flex: 1; min-width: 0; }
.pinned-bar-label { font-size: 11px; font-weight: 700; color: var(--accent); }
.pinned-bar-text {
  font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}
.pinned-bar-next { width: 32px; height: 32px; flex-shrink: 0; }
.msg.pinned-msg { box-shadow: inset 2px 0 0 var(--accent); }
.msg-pin-mark { font-size: 10px; margin-right: 4px; opacity: 0.85; }
.msg-read-group { font-size: 10px; letter-spacing: 0; white-space: nowrap; }
.self-destruct-label { font-size: 11px; display: flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--text-muted); cursor: pointer; }
.msg-self-destruct { font-size: 10px; opacity: 0.75; margin-left: 4px; }
.msg-video video { max-width: 280px; max-height: 200px; border-radius: 12px; }
.msg-gif img { max-width: 200px; border-radius: 10px; }
.msg-gift {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), var(--accent-soft));
  font-size: 15px;
}
.ticket-reply { padding: 10px 12px; border-radius: 12px; margin-bottom: 8px; font-size: 13px; }
.ticket-reply.staff { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.ticket-reply.user { background: var(--surface); }
.ticket-item { cursor: pointer; transition: background 0.15s; }
.ticket-item:hover { background: var(--accent-soft); }
.ticket-status-open { color: var(--accent); }
.ticket-status-closed { color: var(--text-muted); }
.contact-online { color: #16A34A; font-size: 11px; font-weight: 600; }
.contact-offline { color: var(--text-muted); font-size: 11px; }
.gift-btn.gift-locked { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.6); }
.chat-item.pinned .title::before { content: '· '; color: var(--accent); font-weight: 800; }
.chat-readonly-bar {
  padding: 10px 16px; text-align: center; font-size: 12px; color: var(--text-muted);
  background: var(--accent-soft); border-top: 1px solid var(--glass-border);
}
.chat-readonly-bar.hidden { display: none; }
.chat-item.announcements .title { color: var(--blue-mid); }
body.theme-dark .chat-item.announcements .title { color: var(--accent); }

.global-search-input {
  width: min(220px, 42vw); padding: 9px 14px;
  border-radius: 999px; border: 1px solid var(--glass-border);
  background: var(--card); color: var(--text); font-size: 13px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.global-search-input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.global-search-results {
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  width: min(420px, calc(100% - 24px)); max-height: 320px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  z-index: 80; box-shadow: var(--shadow-soft);
}
.global-search-results.hidden { display: none; }
.global-search-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--glass-border); font-size: 13px; }
.global-search-item:hover { background: var(--accent-soft); }
.global-search-item.muted { color: var(--text-muted); cursor: default; }
.global-search-chat { font-weight: 600; font-size: 12px; }
.global-search-preview { color: var(--text-muted); margin-top: 2px; }
.global-search-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; opacity: 0.8; }
.sticker-panel {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px;
  background: var(--card); border-radius: var(--radius-sm); margin-bottom: 4px; max-width: 280px;
  border: 1px solid var(--glass-border);
}
.sticker-panel.hidden { display: none; }
.sticker-send-btn { font-size: 24px; border: none; background: none; cursor: pointer; padding: 4px; border-radius: 8px; }
.sticker-send-btn:hover { background: var(--accent-soft); transform: scale(1.08); }
.gif-thumb img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.msg-sticker { font-size: 48px; line-height: 1.2; }
.msg-read { font-size: 10px; opacity: 0.7; margin-left: 4px; }

.chat-list-panel {
  width: 320px; border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column; background: var(--surface); min-width: 0;
}
.chat-list-search {
  margin: 14px 14px 8px; padding: 11px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: var(--card); color: var(--text); font-size: 13px; font-family: inherit;
}
.chat-list-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.chat-back-btn { display: none; }
.emoji-bar {
  display: flex; gap: 4px; padding: 8px 16px; overflow-x: auto;
  border-top: 1px solid var(--glass-border); background: transparent;
}
.emoji-btn { border: none; background: none; font-size: 20px; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.emoji-btn:hover { background: var(--accent-soft); }
.emoji-picker {
  position: fixed; z-index: 2001; display: flex; gap: 4px; padding: 10px;
  background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.emoji-picker.hidden { display: none; }
.emoji-picker button { border: none; background: none; font-size: 22px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.emoji-picker button:hover { background: var(--accent-soft); transform: scale(1.12); }
.poll-box { margin-top: 4px; }
.poll-q { font-weight: 700; margin-bottom: 8px; }
.poll-opt {
  display: flex; justify-content: space-between; width: 100%; margin: 4px 0;
  padding: 9px 12px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: var(--surface); cursor: pointer; font-size: 13px; color: inherit; text-align: left;
}
.poll-opt.voted { border-color: var(--accent); background: var(--accent-soft); }
.poll-pct { font-size: 11px; opacity: 0.75; }
.poll-meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.chat-item {
  position: relative; padding: 10px 12px; cursor: pointer; margin-bottom: 4px;
  border-radius: 14px; border: 1px solid transparent;
  display: flex; align-items: center; gap: 12px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.chat-item:hover { background: var(--accent-soft); }
.chat-item.active {
  background: var(--accent-soft);
  border-color: var(--accent-mid);
}
.chat-item.active::before {
  content: '';
  position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}
.chat-item-body { flex: 1; min-width: 0; }
.chat-item .title { font-weight: 650; font-size: 14px; letter-spacing: -0.01em; }
.chat-item .preview {
  font-size: 12.5px; color: var(--text-muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-item .chat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-item .unread-badge {
  background: var(--accent); color: var(--blue-dark);
  font-size: 11px; font-weight: 700; min-width: 20px; height: 20px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 6px; flex-shrink: 0;
}
.chat-item.muted .title { opacity: 0.72; }
.chat-list-avatar {
  width: 44px; height: 44px; margin: 0; flex-shrink: 0;
  font-size: 15px; border-radius: 14px;
  box-shadow: 0 4px 12px rgba(12, 18, 32, 0.08);
}
.chat-list-avatar img { border-radius: 14px; }
.chat-list-avatar-group {
  background: linear-gradient(145deg, rgba(15,143,134,0.22), rgba(196,165,116,0.18));
  color: var(--ink);
}
.sub-plan {
  padding: 14px; border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  margin-bottom: 10px; background: var(--surface);
}
.sub-plan h4 { margin-bottom: 6px; font-family: var(--font-brand); }
.sub-plan ul { font-size: 12px; color: var(--text-muted); margin: 6px 0 10px 16px; }

.chat-area {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: transparent;
}
.chat-header-row {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  border-bottom: 1px solid var(--glass-border); background: var(--surface);
}
body.theme-dark .chat-header-row { background: var(--surface); }
.chat-header-person {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  border: none; background: transparent; cursor: pointer; text-align: left;
  padding: 4px 6px; border-radius: 12px; color: inherit; font: inherit;
}
.chat-header-person:hover:not(:disabled) { background: var(--accent-soft); }
.chat-header-person:disabled { cursor: default; }
.chat-header-avatar {
  width: 40px; height: 40px; margin: 0; font-size: 14px; border-radius: 12px; flex-shrink: 0;
}
.chat-header-avatar img { border-radius: 12px; }
.chat-header { font-weight: 700; padding: 0; font-size: 15px; letter-spacing: -0.02em; line-height: 1.2; }
.chat-header-meta { flex: 1; min-width: 0; padding: 2px 0; }
.chat-subtitle {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px;
}
.chat-subtitle.online { color: #16A34A; font-weight: 600; }
.chat-online-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #16A34A; margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 0 2px color-mix(in srgb, #16A34A 25%, transparent);
}
.chat-search-input {
  flex: 1; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: var(--card); color: var(--text); font-size: 13px; font-family: inherit;
}
.chat-search-input.hidden { display: none; }
.reply-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--accent-soft); border-top: 1px solid var(--glass-border); font-size: 13px;
}
.reply-bar.hidden { display: none; }
.reply-bar span { flex: 1; color: var(--text-muted); }
.msg-reply-quote {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 12px;
  opacity: 0.9;
  border: none;
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 8px;
  margin-bottom: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}
.msg-react-btn, .msg-react-more {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  opacity: 0.55;
  margin-left: 4px;
  padding: 0;
}
.msg-react-btn:hover, .msg-react-more:hover { opacity: 1; }
.msg-voice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}
.msg-voice audio { width: 180px; max-width: 100%; height: 32px; }
.msg-voice-dur { font-size: 11px; opacity: 0.7; }
.voice-record-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  font-size: 13px;
}
.voice-record-bar.hidden { display: none; }
.voice-record-bar.cancel { background: rgba(100,100,100,0.12); color: var(--text-muted); }
.voice-record-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #dc2626;
  animation: voicePulse 1s infinite;
}
.voice-draft-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-top: 1px solid var(--glass-border);
  font-size: 13px;
}
.voice-draft-bar.hidden { display: none; }
.voice-draft-label { flex: 1; color: var(--text-muted); }
.voice-draft-bar .btn-secondary { padding: 6px 12px; font-size: 12px; }
.call-history-item { align-items: center; }
.call-history-meta { flex: 1; min-width: 0; }
.call-history-actions { display: flex; gap: 6px; flex-shrink: 0; }
.call-redial-btn { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.call-local-video.beauty-on {
  filter: brightness(1.08) contrast(0.92) saturate(1.12) blur(0.35px);
}
@keyframes voicePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.voice-btn { touch-action: none; user-select: none; }
.chat-input-bar .send-btn.hidden,
.chat-input-bar .voice-btn.hidden { display: none !important; }
.moderation-feed-head { margin-bottom: 12px; }
.moderation-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 12px; font-weight: 700; margin-left: 8px;
}
.moderation-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.moderation-content { font-weight: 600; margin-bottom: 4px; }
.moderation-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.moderation-actions .btn-secondary { font-size: 12px; padding: 6px 10px; }
.msg-edited { font-size: 10px; opacity: 0.7; margin-left: 4px; }
.msg-media img { max-width: 240px; max-height: 200px; border-radius: 12px; margin-top: 4px; display: block; }
.msg-media a { color: inherit; text-decoration: underline; }
.msg-menu {
  position: fixed; z-index: 2000; background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-soft); min-width: 168px; overflow: hidden;
}
.msg-menu.hidden { display: none; }
.msg-menu button {
  display: block; width: 100%; text-align: left; padding: 11px 14px; border: none;
  background: none; cursor: pointer; font-size: 13px; color: var(--text); font-family: inherit;
}
.msg-menu button:hover { background: var(--accent-soft); }
.exam-modal-box { max-width: 640px; }
.exam-timer { font-size: 13px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.exam-question { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--glass-border); }
.exam-question p { font-weight: 600; margin-bottom: 8px; }
.exam-option { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; cursor: pointer; }
.exam-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--glass-border);
}
.exam-card:last-child { border-bottom: none; }

.messages {
  flex: 1; overflow-y: auto; padding: 18px 18px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.messages-empty {
  margin: auto; text-align: center; padding: 36px 24px;
  color: var(--text-muted); max-width: 280px;
}
.messages-empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.8; }
.messages-empty p { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text); font-family: var(--font-brand); letter-spacing: -0.02em; }
.messages-empty span { font-size: 13px; line-height: 1.45; }

.calls-banner {
  margin: 12px 16px 8px; padding: 16px 18px; border-radius: var(--radius-md);
  background: var(--accent-soft); border: 1px solid var(--accent-mid);
}
.calls-banner-title { font-weight: 700; margin-bottom: 6px; font-family: var(--font-brand); }
.calls-banner p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.calls-start {
  margin: 8px 16px 16px; padding: 14px 16px;
  border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid var(--glass-border);
}
.calls-start .settings-field { margin-bottom: 12px; }
.calls-start-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.call-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 14, 22, 0.72);
  backdrop-filter: blur(10px);
  padding: 20px;
}
.call-overlay.hidden { display: none; }
.call-stage {
  position: relative;
  width: min(920px, 100%);
  height: min(620px, 86vh);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, #0C1220 0%, #12323A 55%, #0A141C 100%);
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}
.call-remote-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; background: #0C1220;
}
.call-local-video {
  position: absolute; right: 16px; top: 16px;
  width: min(160px, 28vw); aspect-ratio: 3/4;
  object-fit: cover; border-radius: 14px;
  background: #152636; border: 1px solid rgba(255,255,255,0.15);
  z-index: 2;
}
.call-stage.is-audio .call-remote-video,
.call-stage.is-audio .call-local-video { opacity: 0; pointer-events: none; }
.call-stage.is-audio .call-btn-cam { display: none; }
.call-stage.is-sharing .call-remote-video,
.call-stage.is-sharing .call-local-video {
  opacity: 1 !important; pointer-events: auto;
}
.call-stage.is-sharing .call-remote-video { object-fit: contain; background: #05080d; }
.call-stage.is-sharing .call-meta { top: 12px; text-shadow: 0 2px 12px rgba(0,0,0,0.55); }
.call-share-badge {
  display: none; position: absolute; left: 16px; bottom: 100px; z-index: 5;
  padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(15, 143, 134, 0.92); color: #fff;
}
.call-stage.is-sharing .call-share-badge { display: inline-flex; align-items: center; gap: 6px; }
.call-btn.is-sharing-on { background: rgba(15, 143, 134, 0.85); }

.profile-gifts-block { margin-top: 14px; }
.profile-gifts-label {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.02em; margin-bottom: 8px; text-transform: uppercase;
}
.profile-gifts-showcase {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 34px;
}
.profile-gift-chip {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px;
  background: var(--accent-soft); border: 1px solid var(--accent-mid);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.profile-gift-more, .profile-gift-empty {
  font-size: 12px; color: var(--text-muted); font-weight: 600;
}
.peer-sheet-gifts {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin-top: 12px; min-height: 0;
}
.peer-sheet-gifts[hidden] { display: none !important; }
.peer-sheet-gifts .profile-gift-chip { width: 36px; height: 36px; font-size: 18px; }
.gifts-collection-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 8px;
}
.gift-collection-item {
  padding: 12px 10px; border-radius: 14px; text-align: center;
  background: var(--surface); border: 1px solid var(--glass-border);
}
.gift-collection-emoji { display: block; font-size: 28px; margin-bottom: 4px; }
.gift-collection-name { display: block; font-size: 12px; font-weight: 700; color: var(--text); }
.gift-collection-from { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.call-meta {
  position: absolute; left: 0; right: 0; top: 18%;
  text-align: center; z-index: 3; color: #F4F8FC;
  pointer-events: none;
}
.call-peer {
  font-family: var(--font-brand); font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.03em; margin-bottom: 8px;
}
.call-status { font-size: 15px; color: rgba(244,248,252,0.72); }
.call-timer {
  margin-top: 10px; font-size: 14px; font-weight: 700;
  letter-spacing: 0.06em; opacity: 0.85;
}
.call-actions {
  position: absolute; left: 0; right: 0; bottom: 28px;
  display: flex; justify-content: center; gap: 14px; z-index: 4;
}
.call-actions.hidden { display: none; }
.call-btn {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.14); color: #fff;
  font-size: 22px; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.call-btn:hover { transform: scale(1.05); background: rgba(255,255,255,0.22); }
.call-btn.is-off { background: rgba(255,255,255,0.08); opacity: 0.7; }
.call-btn-hangup, .call-btn-reject { background: #E11D48; }
.call-btn-hangup:hover, .call-btn-reject:hover { background: #be123c; }
.call-btn-accept { background: #0F8F86; width: 64px; height: 64px; }
.call-btn-accept:hover { background: #0d7a73; }
.call-stage.self-hidden .call-local-video { opacity: 0; pointer-events: none; transform: scale(0.8); }
.call-mini-bar {
  position: fixed; z-index: 1210;
  left: 50%; bottom: 88px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 18px;
  background: rgba(12, 18, 32, 0.92); color: #F4F8FC;
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
  font-size: 13px; font-weight: 600;
  max-width: calc(100vw - 24px);
  width: min(420px, calc(100vw - 24px));
}
.call-mini-bar.hidden { display: none; }
.call-mini-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.2);
  animation: callPulse 1.4s ease-in-out infinite;
}
@keyframes callPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.call-mini-btn {
  border: none; background: rgba(255,255,255,0.12); color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
}
.call-mini-hangup { background: #E11D48; }
#call-mini-timer { opacity: 0.8; font-variant-numeric: tabular-nums; }

.msg-link { color: var(--accent); text-decoration: underline; word-break: break-all; }
.settings-check-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 12px 0 8px; font-size: 14px; cursor: pointer; color: var(--text);
}
.settings-check-row input { margin-top: 3px; accent-color: var(--accent); }

.msg {
  max-width: min(78%, 560px); padding: 10px 14px;
  border-radius: 18px; font-size: 14.5px; line-height: 1.45;
  animation: msgSpring 0.25s ease;
  border: 1px solid transparent;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.msg.has-avatar {
  display: flex; align-items: flex-end; gap: 8px; align-self: flex-start;
  background: transparent; border: none; padding: 0; max-width: min(86%, 620px);
}
.msg.has-avatar .msg-col {
  background: var(--bubble-other);
  border: 1px solid var(--glass-border);
  border-radius: 18px; border-bottom-left-radius: 6px;
  padding: 10px 14px; min-width: 0;
}
.msg.mine {
  align-self: flex-end; background: var(--bubble-mine); color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 8px 20px rgba(15, 143, 134, 0.18);
}
.msg.other:not(.has-avatar) {
  align-self: flex-start; background: var(--bubble-other);
  border-bottom-left-radius: 6px; border-color: var(--glass-border);
}
.msg-avatar {
  width: 32px; height: 32px; margin: 0; font-size: 12px; flex-shrink: 0;
  cursor: pointer; border-radius: 10px;
}
.msg-avatar img { border-radius: 10px; }
.peer-name-btn {
  border: none; background: none; padding: 0; margin: 0 0 4px;
  font-size: 11px; font-weight: 700; color: var(--accent); cursor: pointer;
  font-family: inherit;
}
.peer-name-btn:hover { text-decoration: underline; }
.msg .sender { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 3px; }
.msg.mine .sender { color: rgba(255,255,255,0.85); }
.msg .time { font-size: 10px; color: var(--text-muted); margin-top: 5px; }
.msg.mine .time { color: rgba(255,255,255,0.72); }

.contact-avatar, .avatar.contact-avatar {
  width: 42px; height: 42px; margin: 0; font-size: 14px; border-radius: 12px; flex-shrink: 0;
}
.contact-avatar img { border-radius: 12px; }
.contact-avatar-btn, .peer-open-meta {
  border: none; background: none; padding: 0; cursor: pointer; text-align: left; color: inherit; font: inherit;
}
.peer-sheet-box { max-width: 400px; position: relative; padding-top: 28px; }
.peer-sheet-close { position: absolute; top: 12px; right: 12px; }
.peer-sheet-hero { text-align: center; margin-bottom: 18px; }
.peer-sheet-avatar {
  width: 88px; height: 88px; margin: 0 auto 14px; font-size: 28px;
  border-radius: 28px; box-shadow: 0 12px 32px rgba(12,18,32,0.12);
}
.peer-sheet-avatar img { border-radius: 28px; }
.peer-sheet-hero h2 {
  margin: 0; font-family: var(--font-brand); font-size: 26px; letter-spacing: -0.03em;
}
.peer-sheet-user { margin: 6px 0 0; color: var(--text-muted); font-size: 14px; }
.peer-sheet-seen { margin: 8px 0 0; font-size: 13px; color: var(--accent); font-weight: 600; }
.peer-sheet-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.peer-sheet-actions .btn-action { justify-content: center; }

.chat-input-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 14px 14px; border-top: 1px solid var(--glass-border);
  background: var(--surface);
}
body.theme-dark .chat-input-bar { background: var(--surface); }
.chat-input-bar input {
  flex: 1; padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--card); color: var(--text);
  font-family: inherit; font-size: 14px;
}
.chat-input-bar input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.send-btn {
  width: 44px; height: 44px; border-radius: 16px; background: var(--accent);
  border: none; cursor: pointer; font-size: 17px; color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, filter 0.15s;
}
.send-btn:hover { transform: scale(1.04); filter: brightness(1.05); }

/* —— Bottom dock —— */
.bottom-nav {
  display: flex; gap: 4px;
  margin: 0 14px max(14px, env(safe-area-inset-bottom, 0px));
  padding: 6px;
  background: var(--nav-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--shadow-dock);
  position: relative; z-index: 30;
  flex-shrink: 0;
}
.nav-btn {
  flex: 1; padding: 10px 6px 9px; border: none; background: none; cursor: pointer;
  color: var(--text-muted); font-size: 10px; font-weight: 600; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border-radius: 16px; transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}
.nav-btn:hover { color: var(--text); background: var(--accent-soft); }
.nav-btn.active {
  color: var(--blue-dark); background: var(--accent-soft);
}
body.theme-dark .nav-btn.active { color: var(--accent); }
.nav-btn.active .icon { transform: translateY(-1px); }
.nav-btn .icon { font-size: 20px; transition: transform 0.2s; line-height: 1; }

/* —— Settings —— */
.profile-grid { padding: 20px; overflow-y: auto; width: 100%; }
.profile-card {
  background: var(--card); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px;
  border: 1px solid var(--glass-border); animation: fadeInUp 0.3s ease;
}

.settings-shell {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; width: 100%;
  background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 200px);
}
.settings-hero {
  display: flex; align-items: center; gap: 18px; padding: 22px 22px 14px; flex-shrink: 0;
}
.settings-avatar-wrap { position: relative; margin-bottom: 0; flex-shrink: 0; }
.settings-avatar {
  width: 76px; height: 76px; font-size: 26px; margin-bottom: 0;
  border: 2px solid var(--accent-mid);
}
.settings-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.settings-hero-info { min-width: 0; }
.settings-hero-info h2 {
  margin: 0 0 4px; font-size: 1.4rem; font-family: var(--font-brand);
  letter-spacing: -0.03em;
}
.settings-username { color: var(--text-muted); margin: 0 0 10px; font-size: 14px; }
.settings-stats { margin: 0; }
.settings-mobile-list { display: none; }

.settings-nav {
  display: flex; gap: 8px; padding: 6px 16px 14px; overflow-x: auto;
  flex-shrink: 0; scrollbar-width: thin;
}
.settings-nav-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 999px; border: 1px solid var(--glass-border); background: var(--card);
  color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0; font-family: inherit;
}
.settings-nav-item:hover { border-color: var(--accent-mid); background: var(--accent-soft); }
.settings-nav-item.active {
  background: var(--accent); border-color: var(--accent); color: var(--blue-dark);
}
.settings-nav-icon { font-size: 15px; line-height: 1; }

.settings-panels { flex: 1; overflow-y: auto; padding: 8px 20px 12px; }
.settings-mobile-detail-header { display: none; }
.settings-panel {
  display: none !important; animation: panelIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 12px;
}
.settings-panel.active { display: block !important; }
.settings-panel-title {
  margin: 0 0 6px; font-size: 1.2rem; font-family: var(--font-brand); letter-spacing: -0.02em;
}
.settings-panel-desc { margin: 0 0 18px; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.settings-subtitle { margin: 20px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.settings-muted { color: var(--text-muted); font-size: 13px; }

.settings-field { margin-bottom: 14px; }
.settings-field label {
  display: block; font-size: 11px; font-weight: 650; margin-bottom: 6px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.settings-input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border); background: var(--surface);
  color: var(--text); font-size: 14px; box-sizing: border-box; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.settings-textarea { resize: vertical; min-height: 88px; }
.settings-action-btn { width: 100%; margin-top: 8px; }
.settings-info-box {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); font-size: 13px; border: 1px solid var(--accent-mid);
}
.settings-bonus-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.settings-bonus-row.row { flex-direction: row; align-items: flex-end; gap: 12px; }
input.settings-input[type="time"] {
  color-scheme: dark light;
  min-height: 44px;
}

.settings-toggle {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--glass-border); cursor: pointer; font-size: 14px;
}
.settings-toggle:last-of-type { border-bottom: none; }
.settings-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.settings-toggle-ui {
  width: 44px; height: 26px; border-radius: 999px; background: rgba(128,128,128,0.3);
  position: relative; flex-shrink: 0; transition: background 0.2s;
}
.settings-toggle-ui::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform 0.2s;
}
.settings-toggle input:checked + .settings-toggle-ui { background: var(--accent); }
.settings-toggle input:checked + .settings-toggle-ui::after { transform: translateX(18px); }

.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-picker-btn {
  padding: 16px; border-radius: var(--radius-md); border: 1.5px solid var(--glass-border);
  background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 600;
  font-family: inherit; transition: border-color 0.2s, background 0.2s; color: var(--text);
}
.theme-picker-btn.active { border-color: var(--accent); background: var(--accent-soft); }

/* Personal appearance */
.appear-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.appear-card {
  padding: 12px 10px; border-radius: 14px; border: 1px solid var(--glass-border);
  background: var(--card); color: var(--text); font: inherit; font-size: 13px;
  cursor: pointer; text-align: left;
}
.appear-card.active, .appear-chip.active {
  border-color: var(--accent); background: var(--accent-soft); font-weight: 700;
}
.appear-row { display: flex; flex-wrap: wrap; gap: 8px; }
.appear-chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: var(--card); color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.appear-accents { display: flex; flex-wrap: wrap; gap: 8px; }
.appear-swatch {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--glass-border);
  cursor: pointer; padding: 0; background: var(--card); color: var(--text-muted); font-size: 12px;
}
.appear-swatch.active { outline: 2px solid var(--accent); outline-offset: 2px; }
.appear-swatch-default { display: grid; place-items: center; }
.appear-walls .appear-card { min-height: 52px; background-size: cover; background-position: center; }
.appear-walls .wall-mist { background-image: linear-gradient(135deg, #dbeafe, #e2e8f0); }
.appear-walls .wall-dusk { background-image: linear-gradient(135deg, #fdba74, #fb7185 60%, #312e81); color: #fff; }
.appear-walls .wall-aurora { background-image: linear-gradient(135deg, #34d399, #22d3ee, #a78bfa); }
.appear-walls .wall-paper { background-image: linear-gradient(#f8fafc, #e2e8f0); }
.appear-walls .wall-grid {
  background-color: #f1f5f9;
  background-image: linear-gradient(rgba(15,23,42,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.08) 1px, transparent 1px);
  background-size: 12px 12px;
}
.appear-walls .wall-dots {
  background-color: #f8fafc;
  background-image: radial-gradient(rgba(15,23,42,.18) 1px, transparent 1px);
  background-size: 10px 10px;
}
.appear-walls .wall-waves {
  background-image: repeating-linear-gradient(-45deg, #e0f2fe, #e0f2fe 8px, #f0f9ff 8px, #f0f9ff 16px);
}

body[data-theme-preset="midnight"] {
  --bg: radial-gradient(1200px 600px at 10% -10%, #1e3a5f 0%, transparent 50%),
    linear-gradient(165deg, #070b14 0%, #0c1220 55%, #111827 100%);
  --card: rgba(17, 24, 39, 0.92);
  --surface: rgba(15, 23, 42, 0.9);
  --text: #E5E7EB;
  --text-muted: #94A3B8;
  --glass-border: rgba(148, 163, 184, 0.16);
  --bubble-other: #1f2937;
  --nav-bg: rgba(8, 12, 22, 0.94);
}
body[data-theme-preset="sand"] {
  --accent: #C2783B;
  --accent-soft: rgba(194, 120, 59, 0.16);
  --accent-mid: rgba(194, 120, 59, 0.28);
  --bubble-mine: #C2783B;
  --bg: linear-gradient(165deg, #F7F1E8 0%, #EADDC8 50%, #DCC9A8 100%);
  --text: #3F2E1E;
  --text-muted: #7A6550;
}
body[data-theme-preset="ocean"] {
  --accent: #0EA5E9;
  --accent-soft: rgba(14, 165, 233, 0.14);
  --accent-mid: rgba(14, 165, 233, 0.28);
  --bubble-mine: #0284C7;
  --bg: linear-gradient(165deg, #E0F2FE 0%, #BAE6FD 45%, #7DD3FC 100%);
  --text: #0C4A6E;
  --text-muted: #0369A1;
}
body[data-theme-preset="rose"] {
  --accent: #E11D48;
  --accent-soft: rgba(225, 29, 72, 0.12);
  --accent-mid: rgba(225, 29, 72, 0.24);
  --bubble-mine: #E11D48;
  --bg: linear-gradient(165deg, #FFF1F2 0%, #FFE4E6 50%, #FECDD3 100%);
  --text: #4C0519;
  --text-muted: #9F1239;
}
body[data-theme-preset="forest"] {
  --accent: #16A34A;
  --accent-soft: rgba(22, 163, 74, 0.14);
  --accent-mid: rgba(22, 163, 74, 0.28);
  --bubble-mine: #15803D;
  --bg: linear-gradient(165deg, #ECFDF5 0%, #D1FAE5 48%, #A7F3D0 100%);
  --text: #14532D;
  --text-muted: #166534;
}

#messages {
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
}
#messages::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.55;
}
#messages > * { position: relative; z-index: 1; }
body[data-wallpaper="mist"] #messages::before {
  background: linear-gradient(160deg, rgba(219,234,254,.7), rgba(226,232,240,.55));
}
body[data-wallpaper="dusk"] #messages::before {
  background: linear-gradient(160deg, rgba(251,146,60,.35), rgba(244,63,94,.28), rgba(49,46,129,.25));
}
body[data-wallpaper="aurora"] #messages::before {
  background: linear-gradient(135deg, rgba(52,211,153,.28), rgba(34,211,238,.22), rgba(167,139,250,.28));
}
body[data-wallpaper="paper"] #messages::before {
  background: linear-gradient(#f8fafc, #e2e8f0);
  opacity: 0.7;
}
body[data-wallpaper="grid"] #messages::before {
  background-color: rgba(241,245,249,.55);
  background-image: linear-gradient(rgba(15,23,42,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.06) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 1;
}
body[data-wallpaper="dots"] #messages::before {
  background-color: rgba(248,250,252,.5);
  background-image: radial-gradient(rgba(15,23,42,.14) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  opacity: 1;
}
body[data-wallpaper="waves"] #messages::before {
  background: repeating-linear-gradient(-45deg, rgba(224,242,254,.55), rgba(224,242,254,.55) 10px, rgba(240,249,255,.45) 10px, rgba(240,249,255,.45) 20px);
  opacity: 1;
}
body[data-wallpaper="custom"] #messages {
  background-image: var(--chat-wallpaper);
}
body[data-wallpaper="custom"] #messages::before {
  background: rgba(12, 18, 32, 0.18);
  opacity: 1;
}
body.theme-dark[data-wallpaper="custom"] #messages::before {
  background: rgba(12, 18, 32, 0.42);
}

body[data-bubble="round"] .msg.mine,
body[data-bubble="round"] .msg.other:not(.has-avatar),
body[data-bubble="round"] .msg.has-avatar .msg-col {
  border-radius: 22px !important;
}
body[data-bubble="sharp"] .msg.mine,
body[data-bubble="sharp"] .msg.other:not(.has-avatar),
body[data-bubble="sharp"] .msg.has-avatar .msg-col {
  border-radius: 8px !important;
}

body[data-font-size="sm"] { --appear-font-scale: 0.92; }
body[data-font-size="md"] { --appear-font-scale: 1; }
body[data-font-size="lg"] { --appear-font-scale: 1.08; }
body[data-font-size="xl"] { --appear-font-scale: 1.16; }
body[data-font-size] .msg,
body[data-font-size] .chat-item .preview,
body[data-font-size] #msg-input {
  font-size: calc(14px * var(--appear-font-scale, 1));
}
body[data-font-size] .chat-item .title {
  font-size: calc(14px * var(--appear-font-scale, 1));
}

body[data-density="compact"] .chat-item { padding-top: 8px; padding-bottom: 8px; }
body[data-density="compact"] .messages { gap: 6px; padding-top: 12px; }
body[data-density="compact"] .folder-chip { padding: 4px 10px; }

body.ui-no-blur .glass-panel,
body.ui-no-blur .nav-bar,
body.ui-no-blur .chat-header-row,
body.ui-no-blur .chat-input-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.status-chip {
  padding: 12px 10px; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: var(--surface); cursor: pointer; font-size: 13px; text-align: left;
  font-family: inherit; color: var(--text); transition: border-color 0.2s, background 0.2s;
}
.status-chip:hover { border-color: var(--accent-mid); }
.status-chip.active { border-color: var(--accent); background: var(--accent-soft); font-weight: 650; }

.settings-link-list { display: flex; flex-direction: column; gap: 8px; }
.settings-link-btn {
  text-align: left; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border); background: var(--surface);
  color: var(--blue-mid); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
body.theme-dark .settings-link-btn { color: var(--accent); }
.settings-link-btn:hover { background: var(--accent-soft); }

.settings-footer {
  flex-shrink: 0; padding: 16px 20px 20px; border-top: 1px solid var(--glass-border);
  background: var(--surface);
}
.btn-settings-logout {
  width: 100%; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: transparent; color: var(--text); font-size: 15px; font-weight: 600;
  cursor: pointer; margin-bottom: 10px; font-family: inherit; transition: background 0.2s;
}
.btn-settings-logout:hover { background: var(--accent-soft); }
.btn-settings-danger {
  width: 100%; padding: 14px; border-radius: var(--radius-sm); border: 1px solid rgba(225, 29, 72, 0.35);
  background: rgba(225, 29, 72, 0.08); color: var(--danger); font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background 0.2s;
}
body.theme-dark .btn-settings-danger { color: #FB7185; }
.btn-settings-danger:hover { background: rgba(225, 29, 72, 0.16); }
.settings-footer-note { text-align: center; font-size: 11px; color: var(--text-muted); margin: 10px 0 0; }
.settings-nav::-webkit-scrollbar { height: 4px; }
.settings-nav::-webkit-scrollbar-thumb { background: var(--accent-mid); border-radius: 4px; }

.avatar-wrap { position: relative; display: inline-block; }
.avatar-upload-btn {
  position: absolute; bottom: 0; right: 0; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent); display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 13px; border: 2px solid var(--card);
  color: var(--blue-dark);
}
.avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  font-weight: 700; color: var(--blue-dark); margin-bottom: 12px;
  font-family: var(--font-brand);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.stat {
  background: var(--accent-soft); padding: 7px 12px; border-radius: 10px;
  font-size: 12.5px; font-weight: 650; border: 1px solid var(--accent-mid);
}
.gifts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 12px; }
.gift-btn {
  padding: 12px 8px; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: var(--surface); cursor: pointer; text-align: center; font-size: 24px;
  transition: transform 0.15s, border-color 0.15s;
}
.gift-btn:hover { transform: translateY(-2px); border-color: var(--accent-mid); }

/* —— Admin —— */
.admin-layout { display: flex; width: 100%; height: 100%; min-height: 0; }
.admin-sidebar {
  width: 220px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--glass-border); overflow-y: auto; padding: 12px;
}
.admin-item {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  color: inherit; font-family: inherit;
  padding: 10px 12px; border-radius: 12px; cursor: pointer; font-size: 13px;
  margin-bottom: 4px; font-weight: 550; transition: background 0.15s;
}
.admin-item:hover, .admin-item.active { background: var(--accent-soft); color: var(--blue-mid); }
body.theme-dark .admin-item:hover, body.theme-dark .admin-item.active { color: var(--accent); }
.admin-content { flex: 1; padding: 22px; overflow-y: auto; min-width: 0; }
.admin-content h2 { font-family: var(--font-brand); letter-spacing: -0.02em; margin-bottom: 12px; }
.admin-chats-panel { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.admin-chats-head h2 { margin-bottom: 4px; }
.admin-chats-unread {
  display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px;
}
.admin-chats-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-bottom: 12px; }
.admin-chat-item {
  text-align: left; width: 100%; cursor: pointer;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border); background: var(--surface); color: var(--text);
  font-family: inherit; transition: border-color 0.15s, background 0.15s;
}
.admin-chat-item:hover { border-color: var(--accent-mid); background: var(--card); }
.admin-chat-item.active { border-color: var(--accent); background: var(--accent-soft); }
.admin-chat-item.admin-only { border-left: 3px solid var(--accent); }
.admin-chat-item-top { display: flex; align-items: center; gap: 8px; }
.admin-chat-item-title { flex: 1; font-weight: 700; font-size: 14px; }
.admin-chat-item-preview {
  margin-top: 4px; font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-chat-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 12px 8px; padding: 8px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--accent-mid);
  background: var(--accent-soft); font-size: 12px; font-weight: 600; color: var(--text);
}
.admin-chat-banner.hidden { display: none; }
.admin-chat-banner .btn-secondary { font-size: 11px; padding: 6px 10px; }
.forward-chat-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }

/* —— Lists —— */
.list-panel { width: 100%; padding: 16px; overflow-y: auto; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: var(--surface); border-radius: var(--radius-sm); margin-bottom: 8px;
  border: 1px solid var(--glass-border);
  transition: border-color 0.15s, background 0.15s;
}
.list-item:hover { border-color: var(--accent-mid); background: var(--card); }
.list-item .actions { margin-left: auto; display: flex; gap: 6px; }
.status-row { flex-wrap: wrap; }
.status-row .btn-secondary { font-size: 12px; padding: 8px 10px; }
.msg-reactions { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.msg-react-chip {
  border: 1px solid var(--glass-border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 2px 8px; font-size: 12px; cursor: pointer; line-height: 1.4;
}
.msg-react-chip span { margin-left: 3px; opacity: 0.75; font-size: 11px; }
.msg-react-chip.mine { border-color: var(--accent); background: var(--accent-soft); }
.msg-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
  margin-left: 4px;
  color: inherit;
}
.msg-more-btn:hover { opacity: 1; }
.msg.search-hit {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.msg.deleted { opacity: 0.55; font-style: italic; }
.messages-load-older {
  text-align: center; font-size: 12px; color: var(--text-muted);
  padding: 8px 0 12px; opacity: 0.8;
}
.msg-destruct-cd { margin-left: 2px; font-variant-numeric: tabular-nums; }
.media-lightbox {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(7, 21, 37, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.media-lightbox.hidden { display: none; }
.media-lightbox img {
  max-width: min(96vw, 1100px); max-height: 90vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.media-lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.35);
  color: #fff; font-size: 18px; cursor: pointer;
}
.msg-media img, .msg-gif img { cursor: zoom-in; }
.chat-list-toolbar {
  display: flex; gap: 8px; padding: 0 0 10px;
}
.chat-list-toolbar .btn-action { flex: 1; }
.group-members-list {
  max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
}
.group-member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: var(--surface);
  cursor: pointer; font-size: 13px;
}
.group-member-row:hover { border-color: var(--accent-mid); }
.group-member-row small { color: var(--text-muted); margin-left: 4px; }
.group-member-row input { accent-color: var(--accent); }
.group-members-sheet-list {
  max-height: min(60vh, 420px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
}
.group-members-sheet-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.group-members-sheet-row:hover { border-color: var(--accent-mid); }
.group-members-sheet-row .avatar {
  width: 40px; height: 40px; border-radius: 14px; flex-shrink: 0;
  font-size: 14px;
}
.group-members-sheet-meta { min-width: 0; flex: 1; }
.group-members-sheet-meta strong {
  display: block; font-size: 14px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.group-members-sheet-meta span {
  display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.group-members-sheet-row .me-tag {
  flex-shrink: 0; font-size: 11px; color: var(--accent); font-weight: 650;
}

.group-member-remove {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--danger);
  margin-left: 8px;
  opacity: 0.95;
  pointer-events: auto;
}
.group-member-remove:hover {
  opacity: 1;
}
.contact-search-bar input {
  flex: 1; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border); background: var(--surface); color: var(--text);
  font-family: inherit;
}
.contact-search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

#toasts { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--card); border: 1px solid var(--glass-border);
  padding: 14px 18px; border-radius: var(--radius-sm); min-width: 240px;
  animation: toastIn 0.3s ease; box-shadow: var(--shadow-soft);
}
.toast .title { font-weight: 700; font-size: 14px; }
.toast .body { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.popup-float {
  position: fixed; pointer-events: none; z-index: 9998;
  font-size: 24px; font-weight: 800; animation: floatUp 1.5s ease forwards;
}
#confetti-canvas { position: fixed; inset: 0; pointer-events: none !important; z-index: 9997; }
#theme-overlay {
  position: fixed; inset: 0; background: #071525; opacity: 0;
  pointer-events: none !important; z-index: 9996;
  transition: opacity 0.2s; visibility: hidden;
}
#theme-overlay.active { opacity: 1; visibility: visible; pointer-events: none !important; }

.team-map { padding: 20px; width: 100%; overflow: auto; }
.team-node {
  display: inline-block; padding: 12px 18px; margin: 8px; background: var(--card);
  border-radius: var(--radius-sm); border: 1px solid var(--glass-border); cursor: pointer;
  animation: fadeInUp 0.4s ease; font-weight: 600;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panelIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes authEnter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes msgSpring { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes floatUp { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-60px); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.pulse { animation: pulse 0.8s ease infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #particles { display: none !important; }
}

.modal-overlay { position: fixed; inset: 0; background: rgba(7,21,37,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal { background: var(--card); border-radius: var(--radius-md); padding: 28px; max-width: 440px; width: 90%; animation: fadeInUp 0.3s ease; }
.hidden { display: none !important; }

@media (max-width: 768px) {
  .content { margin: 0 8px 4px; border-radius: 18px; }
  .bottom-nav { margin: 0 10px max(12px, env(safe-area-inset-bottom, 12px)); }
  .header { padding: max(12px, env(safe-area-inset-top, 0px)) 14px 8px; }
  .chat-list-panel { width: 100%; }
  .chat-list { width: 100%; }
  .chat-area { display: none; }
  .chat-back-btn { display: flex; }
  .chats-layout.chat-open .chat-list-panel { display: none; }
  .chats-layout.chat-open .chat-area { display: flex; }

  /* Открытый чат: полный экран, без глобальной шапки и дока */
  body.mobile-chat-open .header { display: none !important; }
  body.mobile-chat-open .bottom-nav { display: none !important; }
  body.mobile-chat-open .main-screen.active { padding-bottom: 0 !important; }
  body.mobile-chat-open .content {
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: none; border-right: none;
    box-shadow: none;
  }
  body.mobile-chat-open #tab-chats { border-radius: 0; }

  .chat-header-row {
    gap: 4px;
    padding: max(8px, env(safe-area-inset-top, 0px)) 8px 8px;
    position: sticky;
    top: 0;
    z-index: 12;
  }
  .chat-header-person { flex: 1 1 auto; min-width: 0; max-width: none; }
  .chat-header-avatar { width: 36px; height: 36px; }
  .chat-header { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-header-desk { display: none !important; }
  .chat-header-more { display: flex !important; }
  .chat-more-wrap { position: relative; flex-shrink: 0; }
  .chat-header-row > .icon-btn { width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0; }

  .emoji-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    padding: 4px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .emoji-bar::-webkit-scrollbar { display: none; }
  .chat-input-bar {
    gap: 4px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom, 8px));
  }
  .chat-input-bar .icon-btn { width: 36px; height: 36px; }
  .self-destruct-label { font-size: 11px; padding: 6px 8px; }
  .messages { padding: 12px 10px 10px; gap: 8px; }
  .msg { max-width: 88%; font-size: 15px; }
  .msg.has-avatar { max-width: 92%; }
  body.theme-dark .msg.has-avatar .msg-col,
  body.theme-dark .msg.other:not(.has-avatar) {
    background: #1c3144;
    border-color: rgba(255,255,255,0.12);
  }

  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 8px 10px;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--surface);
  }
  .admin-item {
    flex-shrink: 0;
    margin-bottom: 0;
    white-space: normal;
    text-align: center;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 8px;
    font-size: 11px;
    line-height: 1.15;
    border-radius: 10px;
  }
  .admin-content { padding: 14px; }
  .admin-content table { display: block; overflow-x: auto; }
}

.chat-header-more { display: none; }
.chat-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 180px;
  padding: 6px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-dock);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-more-menu.hidden { display: none !important; }
.chat-more-item {
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.chat-more-item:hover { background: var(--accent-soft); }
.chat-more-item.danger { color: var(--danger); }

@media (max-width: 560px) {
  .admin-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 108px;
    overflow-y: auto;
  }
  .admin-item {
    min-height: 32px;
    padding: 6px 7px;
    font-size: 10.5px;
  }
  .admin-content {
    padding: 12px;
  }
}

@media (max-width: 640px) {
  .settings-hero { padding: 16px 16px 10px; gap: 12px; }
  .settings-nav { padding: 4px 12px 10px; gap: 6px; }
  .settings-nav-item { padding: 8px 12px; font-size: 12px; }
  .settings-panels { padding: 8px 12px 6px; }
  .settings-footer { padding: 14px 14px 16px; }
  .theme-picker { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .auth-screen {
    padding: max(12px, env(safe-area-inset-top)) 14px max(40px, env(safe-area-inset-bottom));
  }
  .auth-panel { padding: 24px 18px 28px; }
  .auth-brand { font-size: clamp(2.5rem, 9vw, 3.4rem); margin-bottom: 4px; }
  .auth-tagline { margin-bottom: 14px; font-size: 14px; }
  #register-form .form-group { margin-bottom: 10px; }
  #register-form .form-group label { font-size: 11px; margin-bottom: 4px; }
  #register-form .form-group input { padding: 10px 12px; font-size: 16px; }
  .terms-block { margin: 10px 0 12px; padding: 12px; }
  .checkbox-row { margin: 6px 0; font-size: 12px; gap: 10px; }
  #register-form .btn-primary { margin-top: 4px; }
  #register-form .auth-switch { margin-top: 12px; }
}

/* Телефон: прокрутка всей страницы + компактная регистрация */
html.is-mobile body.auth-open {
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  height: auto;
  min-height: 100dvh;
  touch-action: pan-y;
}
html.is-mobile body.auth-open .auth-screen {
  position: relative;
  inset: auto;
  display: block;
  min-height: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  touch-action: pan-y;
  padding: max(8px, env(safe-area-inset-top)) 12px max(32px, env(safe-area-inset-bottom));
}
html.is-mobile body.auth-open .auth-panel {
  margin: 0 auto 20px;
  width: 100%;
  max-width: 420px;
  padding: 18px 16px 20px;
}
html.is-mobile.auth-register .auth-brand,
html.is-mobile.auth-register .auth-tagline {
  display: none !important;
}
html.is-mobile.auth-register .register-heading {
  display: block;
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 8px;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
}
body.theme-dark.auth-register .register-heading { color: var(--accent); }
html.is-mobile.auth-register .terms-block {
  margin: 8px 0 10px;
  padding: 10px;
}
html.is-mobile.auth-register .checkbox-row {
  font-size: 11.5px;
  line-height: 1.35;
  margin: 5px 0;
}
html.is-mobile.auth-register .register-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 0%, var(--card) 18%);
  padding: 10px 0 max(8px, env(safe-area-inset-bottom));
  margin-top: 6px;
}
html.is-mobile.auth-register #register-form .form-group {
  margin-bottom: 8px;
}

/* Телефон: нижняя навигация над системными кнопками */
html.is-mobile .main-screen.active {
  padding-bottom: calc(4.75rem + max(12px, env(safe-area-inset-bottom, 12px)));
}
html.is-mobile .bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(8px, env(safe-area-inset-bottom, 8px));
  margin: 0;
  z-index: 100;
}

@media (max-width: 768px) {
  #tab-profile {
    overflow: hidden;
  }
  .settings-shell {
    position: relative;
    overflow-y: auto;
    padding-bottom: 12px;
    background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 160px);
  }
  .settings-hero {
    padding: 16px 16px 10px;
    align-items: flex-start;
  }
  .settings-hero-info h2 {
    font-size: 1.2rem;
  }
  .settings-stats {
    gap: 6px;
  }
  .settings-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 12px 12px;
  }
  .settings-mobile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--card);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font: inherit;
    box-shadow: var(--shadow-soft);
  }
  .settings-mobile-item.danger {
    color: var(--danger);
    border-color: rgba(225, 29, 72, 0.22);
  }
  .settings-mobile-item-icon {
    width: 26px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
  }
  .settings-mobile-item-text {
    flex: 1;
    font-size: 14px;
    font-weight: 650;
  }
  .settings-mobile-item-arrow {
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
  }
  .settings-nav {
    display: none;
  }
  .settings-footer {
    display: none;
  }
  .settings-panels {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(88px, env(safe-area-inset-bottom, 12px));
    overflow-y: auto;
    background: var(--bg);
  }
  .settings-shell.mobile-detail-open .settings-panels {
    display: block;
  }
  .settings-mobile-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 4px 0 12px;
    margin-bottom: 8px;
    background: var(--bg);
  }
  .settings-mobile-back {
    border: 1px solid var(--glass-border);
    background: var(--card);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
  }
  .settings-mobile-detail-title {
    min-width: 0;
    font-family: var(--font-brand);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  .settings-panel {
    margin-bottom: 0;
    border-radius: 18px;
    padding: 18px 16px;
  }
  .settings-shell.mobile-detail-open .settings-panel.active {
    display: block !important;
  }
}

.stories-rail {
  display: flex; gap: 10px; overflow-x: auto; padding: 10px 12px 6px;
  border-bottom: 1px solid var(--glass-border);
  scrollbar-width: thin;
}
.story-bubble {
  border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 58px; color: var(--text); font: inherit; padding: 0;
}
.story-bubble-av {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 2px solid var(--glass-border);
  overflow: hidden; font-weight: 700;
}
.story-bubble-av img { width: 100%; height: 100%; object-fit: cover; }
.story-bubble.unseen .story-bubble-av {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}
.story-bubble-name {
  font-size: 11px; max-width: 58px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text-muted);
}
.story-add .story-bubble-av { border-style: dashed; color: var(--accent); }
.stories-viewer {
  position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.stories-viewer.hidden { display: none; }
.stories-viewer-inner { width: min(420px, 100%); color: #fff; position: relative; }
.stories-viewer-close {
  position: absolute; top: -8px; right: -8px; border: none; background: rgba(255,255,255,0.15);
  color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
}
.stories-viewer-meta { font-size: 13px; margin-bottom: 10px; opacity: 0.85; }
.stories-viewer-body img {
  width: 100%; border-radius: 16px; display: block; max-height: 70vh;
  object-fit: contain; background: #111;
}
.story-text-slide {
  min-height: 280px; border-radius: 16px; padding: 28px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 1.35rem; font-weight: 700; line-height: 1.35;
  background: linear-gradient(145deg, #0f766e, #134e4a);
}
.msg-video-note {
  width: 180px; height: 180px; border-radius: 50%; overflow: hidden;
  margin-top: 4px; position: relative; background: #111;
}
.msg-video-note video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.msg-system {
  align-self: center; max-width: 90%; margin: 8px auto;
  background: transparent !important; box-shadow: none !important; border: none !important;
  text-align: center;
}
.msg-call-event {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 12px; color: var(--text-muted);
}
.msg-gift-anim { animation: giftPop 0.55s ease; font-size: 1.05em; }
@keyframes giftPop {
  0% { transform: scale(0.6); opacity: 0.2; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.report-reasons { display: flex; flex-direction: column; gap: 8px; }
.report-reason-btn {
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: var(--card); color: var(--text);
  cursor: pointer; font: inherit;
}
.report-reason-btn:hover { background: var(--accent-soft); }
.referral-share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.referral-share-row .settings-input { flex: 1; min-width: 160px; }
.gifts-showcase-banner {
  padding: 14px 16px; border-radius: 14px; margin-bottom: 12px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  font-weight: 700;
}
.gifts-grid-shop {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px;
}
.gift-shop-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border-radius: 14px; border: 1px solid var(--glass-border);
  background: var(--card); cursor: pointer; font: inherit; color: var(--text);
}
.gift-shop-emoji { font-size: 1.8rem; }
.gift-shop-name { font-size: 12px; font-weight: 600; text-align: center; }
.gift-shop-price { font-size: 11px; color: var(--text-muted); }
.gift-locked { opacity: 0.55; cursor: not-allowed; }
.chat-list-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.emoji-premium-hint { opacity: 0.7; font-size: 12px !important; }
.chat-input-bar .voice-btn.hidden { display: none !important; }

/* Extra features pack */
.chat-folder-rail {
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chat-folder-rail::-webkit-scrollbar { display: none; }
.folder-chip {
  flex-shrink: 0; border: 1px solid var(--glass-border); background: var(--card);
  color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12px;
  cursor: pointer; white-space: nowrap;
}
.folder-chip.active, .folder-chip:hover { background: var(--accent-soft); border-color: transparent; }
.folder-add { opacity: 0.75; min-width: 36px; padding-inline: 10px; }
.mention-badge {
  background: color-mix(in srgb, var(--accent) 85%, #000); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 8px; padding: 2px 6px; margin-left: 6px;
}
.msg-mention { color: var(--accent); font-weight: 700; }
.msg-album {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  border-radius: 12px; overflow: hidden; max-width: 280px;
}
.msg-album img { width: 100%; height: 120px; object-fit: cover; display: block; cursor: pointer; }
.msg-album img:only-child { grid-column: 1 / -1; height: 200px; }
.album-preview {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--accent-soft); font-size: 13px;
}
.album-preview.hidden { display: none; }
.call-note-input {
  flex: 1; min-width: 0; border: none; background: transparent; color: inherit;
  font: inherit; font-size: 12px; padding: 4px 8px;
}
.story-actions {
  display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap;
}
.story-actions button {
  border: none; background: rgba(0,0,0,.35); color: #fff; border-radius: 999px;
  width: 42px; height: 42px; font-size: 18px; cursor: pointer;
}
.story-poll {
  margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-width: 280px; margin-inline: auto;
}
.story-poll-q { color: #fff; font-weight: 700; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.story-poll-opt {
  border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color: #fff;
  border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; text-align: left;
}
.story-poll-opt.voted { background: rgba(255,255,255,.25); font-weight: 700; }
.message { transition: transform .12s ease; }

.settings-action-list { display: flex; flex-direction: column; gap: 8px; }
.settings-action-row {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--glass-border);
  background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.settings-action-row:hover { background: var(--accent-soft); border-color: var(--accent-mid); }
.settings-action-ico { font-size: 20px; line-height: 1.2; width: 28px; text-align: center; flex-shrink: 0; }
.settings-action-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-action-text strong { font-size: 14px; }
.settings-action-text small { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.chat-info-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.chat-info-actions .btn-action { flex: 1 1 40%; justify-content: center; }
.chat-shared-body { max-height: min(70vh, 520px); overflow: auto; }
.chat-media-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
}
.chat-media-cell {
  aspect-ratio: 1; border: none; padding: 0; border-radius: 10px; overflow: hidden;
  background: var(--card); cursor: pointer;
}
.chat-media-cell img, .chat-media-cell video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.chat-media-file { display: grid; place-items: center; font-size: 28px; }
.chat-links-list { display: flex; flex-direction: column; gap: 8px; }
.chat-link-row {
  display: flex; flex-direction: column; gap: 4px; padding: 12px;
  border-radius: 12px; border: 1px solid var(--glass-border); background: var(--card);
  color: inherit; text-decoration: none;
}
.chat-link-row:hover { background: var(--accent-soft); }
.chat-link-row strong {
  font-size: 13px; word-break: break-all; color: var(--accent);
}
.chat-link-row span, .chat-link-row small {
  font-size: 11px; color: var(--text-muted);
}

/* Onboarding + reply templates */
.onboarding-actions { display: flex; gap: 10px; margin-top: 16px; align-items: stretch; }
.onboarding-step h3 { font-weight: 650; }
.template-pick { font-size: 13px; }
.group-role-select { max-width: 100%; }
