@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #edf3fb;
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #fff;
  --surface-soft: #f4f7fb;
  --panel: #fff;
  --text: #13233a;
  --muted: #718096;
  --line: rgba(21, 51, 90, .1);
  --blue: #1672f3;
  --blue-dark: #085ecf;
  --blue-soft: #e9f2ff;
  --danger: #ff4962;
  --shadow: 0 24px 80px rgba(31, 65, 110, .14);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .4; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(22, 114, 243, .28);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  background:
    radial-gradient(circle at 80% 0, rgba(22, 114, 243, .12), transparent 35%),
    linear-gradient(145deg, var(--bg), #f8fbff);
}
.mobile-nav {
  position: fixed;
  left: 22px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  width: 286px;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(31,65,110,.12);
  backdrop-filter: blur(24px);
}
.mobile-back-button { display: none; }
.mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 13px; color: var(--muted); background: transparent; font-size: 8px; font-weight: 600; }
.mobile-nav button span { font-size: 18px; line-height: 1; }
.mobile-nav button.active { color: var(--blue); background: var(--blue-soft); }
.sidebar footer { margin-bottom: 72px; }
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 30px 20px 22px;
  border-right: 1px solid var(--line);
  background: rgba(249, 252, 255, .8);
  backdrop-filter: blur(28px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 24px; }
.brand-mark, .dialog-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #48a0ff, #0864dc);
  box-shadow: 0 12px 28px rgba(22, 114, 243, .28), inset 0 1px 0 #ffffff66;
  font-size: 23px;
  font-weight: 800;
}
.brand h1 { margin: 0; font-size: 26px; letter-spacing: -.8px; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.profile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(31, 65, 110, .07);
}
.profile > span, .person-avatar, .chat-target-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 700;
}
.profile strong, .profile small, .person strong, .person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile strong { font-size: 13px; }
.profile small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.icon-button { padding: 7px; border-radius: 10px; color: var(--muted); background: transparent; font-size: 18px; }
.icon-button:hover { background: var(--surface-soft); }
.people-section { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 10px; }
.section-heading h2 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.section-heading span { min-width: 26px; padding: 3px 8px; border-radius: 20px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 700; text-align: center; }
.chat-list-heading { position: relative; }
.chat-list-heading h2 { letter-spacing: -1px; }
.chat-list-actions { display: flex; align-items: center; gap: 2px; }
.chat-list-actions button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; color: var(--text); background: transparent; transition: background .16s, color .16s, transform .16s; }
.chat-list-actions button:hover { color: var(--blue); background: var(--blue-soft); }
.chat-list-actions button:active { transform: scale(.92); }
.chat-list-actions svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.chat-list-options-menu {
  position: absolute;
  z-index: 50;
  top: 9px;
  right: 7px;
  left: auto;
  width: 224px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 22px 58px rgba(16,42,76,.2), inset 0 1px 0 #fff;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  animation: menu-in .15s ease-out;
}
.people-section > .chat-list-heading,
.people-section > .chat-filters {
  flex-shrink: 0;
}
.chat-list-options-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 12px; color: var(--text); background: transparent; font-size: 11px; text-align: left; }
.chat-list-options-menu button span { min-width: 20px; color: var(--blue); font-size: 14px; text-align: center; }
.chat-list-options-menu button:hover { background: rgba(22,114,243,.09); }
.select-mode .person, .select-mode .general-chat-button { outline: 2px solid transparent; }
.select-mode .person:focus, .select-mode .person:hover, .select-mode .general-chat-button:hover { outline-color: var(--blue); }
.people-list { overflow-y: auto; padding: 4px 0 20px; scrollbar-width: thin; }
.person, .general-chat-button {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 11px;
  padding: 10px;
  margin: 3px 0;
  border-radius: 16px;
  text-align: left;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background .18s, transform .18s;
}
.person { grid-template-columns: 44px minmax(0, 1fr) auto 34px; position: relative; }
.chat-list-meta { display: flex; min-width: 42px; flex-direction: column; align-items: flex-end; align-self: stretch; justify-content: center; gap: 7px; }
.chat-list-time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.chat-list-unread { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 9px; color: #fff; background: var(--blue); font-size: 9px; font-weight: 700; }
.general-chat-button > .call-person { display: none; }
.general-chat-button { grid-template-columns: 44px minmax(0, 1fr) 42px; }
.row-unread, .unread-count { display: none; }
.person:hover, .general-chat-button:hover { background: var(--surface-solid); transform: translateY(-1px); }
.person-avatar { position: relative; border-radius: 50%; }
.person-avatar,
.general-chat-button .person-avatar {
  box-shadow: inset 0 0 0 1px rgba(22,114,243,.06);
}
.person-avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #29c980;
}
.person.offline { opacity: .62; }
.person.offline .person-avatar::after { background: #a6b2c0; }
.person strong, .general-chat-button strong { font-size: 13px; }
.person small, .general-chat-button small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.contact-call {
  width: 33px;
  height: 33px;
  border-radius: 11px;
  color: var(--blue);
  background: var(--blue-soft);
}
.general-chat-button { margin: 0 0 5px; background: var(--blue-soft); }
.general-chat-button .person-avatar::after { display: none; }
.call-person { color: var(--blue); font-size: 21px; }
.empty-state { padding: 32px 18px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.search-box { display: flex; align-items: center; gap: 8px; margin: 0 2px 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--surface-solid); transition: border-color .18s, box-shadow .18s; }
.search-box svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22,114,243,.08); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.chat-filters { display: flex; gap: 5px; margin: 0 0 9px; padding: 4px; border-radius: 12px; background: var(--surface-soft); }
.chat-filters button { flex: 1; padding: 7px 5px; border-radius: 9px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 600; }
.chat-filters button.active { color: var(--blue); background: var(--surface-solid); box-shadow: 0 4px 12px rgba(31,65,110,.08); }
.row-unread { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-size: 9px; font-weight: 700; }
.create-group-button { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-bottom: 9px; padding: 10px; border: 1px dashed #89b7f1; border-radius: 13px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 600; }
.create-group-button span { font-size: 17px; }
.group-avatar::after { display: none; }
.group-person { position: relative; }
.group-person .person-avatar { color: #fff; background: linear-gradient(145deg, #55a8ff, #6d56e8); }
.unread-count { min-width: 20px; padding: 3px 6px; border-radius: 10px; color: #fff; background: var(--blue); font-size: 9px; font-weight: 700; text-align: center; }
.general-chat-button { position: relative; }
.general-chat-button.has-unread::after { content: ""; position: absolute; right: 13px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
footer { padding: 18px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.status-dot, .live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #29c980; box-shadow: 0 0 0 4px rgba(41, 201, 128, .1); }

.workspace { min-width: 0; display: flex; flex-direction: column; padding: 30px 38px 38px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar h2 { margin: 5px 0 0; font-size: clamp(19px, 2vw, 26px); letter-spacing: -.6px; }
.preview-toolbar {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  background: rgba(12, 28, 50, .82);
  box-shadow: 0 18px 50px rgba(5, 20, 40, .28);
  backdrop-filter: blur(24px);
  transform: translateY(-50%);
}
.preview-toolbar-title { color: #a9bdd4; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.preview-toolbar button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #cbd9e9; background: transparent; }
.preview-toolbar button:hover { background: rgba(255,255,255,.09); }
.preview-toolbar button.active { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(22,114,243,.32); }
.preview-toolbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.badge { padding: 7px 11px; border: 1px solid rgba(41, 201, 128, .2); border-radius: 20px; color: #15965b; background: rgba(41, 201, 128, .08); font-size: 10px; }
.stage { position: relative; min-height: 560px; flex: 1; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(24px); }
.idle-screen { min-height: 560px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; text-align: center; }
.hero-icon { width: 122px; height: 122px; display: grid; place-items: center; border: 1px solid rgba(22,114,243,.12); border-radius: 34px; background: linear-gradient(145deg, #fff, #e8f3ff); box-shadow: 0 24px 50px rgba(31, 65, 110, .13), inset 0 1px 0 #fff; transform: rotate(-4deg); }
.hero-icon span { color: var(--blue); font-size: 52px; transform: rotate(4deg); }
.idle-screen h2 { margin: 32px 0 10px; max-width: 650px; font-size: clamp(24px, 3vw, 38px); letter-spacing: -1.3px; }
.idle-screen p { max-width: 500px; margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.primary-button, .reject-button { padding: 12px 22px; border-radius: 13px; color: #fff; background: linear-gradient(180deg, #348dff, #0864dc); box-shadow: 0 8px 20px rgba(22,114,243,.24); font-weight: 700; transition: transform .18s, filter .18s; }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.04); }
.reject-button { color: var(--danger); background: #ffeff2; box-shadow: none; }
.compact-button { padding: 9px 13px; font-size: 11px; }
.header-call-button,
.chat-options-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: var(--blue);
  background: rgba(233,242,255,.78);
  box-shadow: inset 0 1px 0 #fff;
  transition: transform .16s, background .16s, box-shadow .16s;
}
.header-call-button svg,
.chat-options-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-call-button.audio { color: #168f5f; background: rgba(41,201,128,.12); }
.header-call-button.video { color: #126ddf; background: rgba(22,114,243,.1); }
.header-call-button:hover,
.chat-options-button:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(31,65,110,.1), inset 0 1px 0 #fff; }
.header-call-button:active,
.chat-options-button:active { transform: scale(.92); }
.chat-options-button { color: #64758c; background: rgba(255,255,255,.62); }

.chat-screen, .call-screen { position: absolute; inset: 0; }
.feature-screen { position: absolute; inset: 0; overflow-y: auto; padding: 30px; background: linear-gradient(145deg, var(--surface-solid), var(--surface-soft)); }
.feature-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.feature-heading h2 { margin: 6px 0; font-size: 30px; letter-spacing: -1px; }
.feature-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.feature-badge { padding: 8px 12px; border-radius: 20px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 700; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.contact-card { display: flex; flex-direction: column; align-items: center; padding: 25px 18px 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-solid); box-shadow: 0 8px 28px rgba(31,65,110,.05); transition: transform .2s, box-shadow .2s; }
.contact-card:hover { transform: translateY(-3px); box-shadow: 0 14px 35px rgba(31,65,110,.11); }
.contact-card-avatar, .large-avatar { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 15px; border-radius: 22px; color: #fff; background: linear-gradient(145deg, #55a8ff, #0864dc); box-shadow: 0 10px 25px rgba(22,114,243,.2); font-size: 25px; font-weight: 700; }
.contact-card strong { font-size: 14px; text-align: center; }
.contact-card > small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.contact-card > small.online { color: #15965b; }
.contact-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 19px; }
.contact-actions button { min-width: 0; padding: 9px; font-size: 10px; }
.group-card > .primary-button { width: 100%; margin-top: 20px; padding: 9px; font-size: 10px; }
.secondary-button { padding: 10px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.empty-card { grid-column: 1 / -1; padding: 60px 24px; border: 1px dashed #8fb6e5; border-radius: 20px; color: var(--muted); background: var(--surface); text-align: center; font-size: 12px; }
.call-history { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-solid); }
.call-history-row { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.call-history-row:last-child { border-bottom: 0; }
.call-history-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.call-history-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.call-history-icon.outgoing { color: #fff; background: linear-gradient(145deg, #3b93ff, #0a64dc); }
.call-history-icon.incoming { color: #13875a; background: rgba(41,201,128,.14); }
.call-history-row strong, .call-history-row small { display: block; }
.call-history-row strong { font-size: 13px; }
.call-history-row small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.dialer-button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #3b93ff, #0a64dc); box-shadow: 0 8px 20px rgba(22,114,243,.22); }
.calls-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 4px 2px; }
.calls-hero h2 { margin: 3px 0 0; font-size: 30px; letter-spacing: -1px; }
.calls-hero .dialer-button { width: 48px; height: 48px; border-radius: 16px; }
.dialer-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dialer-button .dialer-keypad-icon { display: none; }
.call-search { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 11px 13px; border: 1px solid #dbe7f5; border-radius: 15px; color: #73839a; background: #eef3fa; }
.call-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.call-search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.call-contact-results { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 3px; scrollbar-width: none; }
.call-contact-card { min-width: 112px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 17px; color: var(--text); background: var(--surface-solid); }
.call-contact-card > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.call-contact-card strong { overflow: hidden; max-width: 94px; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.call-contact-card small { color: var(--muted); font-size: 8px; }
.call-contact-card.selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 2px rgba(22,114,243,.08); }
.selected-call-contact { display: grid; grid-template-columns: 48px minmax(0,1fr) 44px 44px; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid #dbe7f5; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(31,65,110,.1); }
.selected-call-contact > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #55a8ff, #0864dc); box-shadow: 0 7px 18px rgba(22,114,243,.2); font-weight: 700; }
.selected-call-contact strong, .selected-call-contact small { display: block; }
.selected-call-contact strong { font-size: 12px; }
.selected-call-contact small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.selected-call-contact button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #43d49a, #19a96d); box-shadow: 0 7px 18px rgba(40,183,122,.22); }
.selected-call-contact button:last-child { background: linear-gradient(145deg, #3b93ff, #0a64dc); box-shadow: 0 7px 18px rgba(22,114,243,.22); }
.selected-call-contact button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dialer-dialog { width: min(92vw, 390px); padding: 0; overflow-y: auto; }
.dialer-shell { padding: 22px; background: var(--surface-solid); }
.dialer-shell > header { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 18px; }
.dialer-shell > header button { position: absolute; left: 0; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); background: var(--surface-soft); }
.dialer-shell > header strong { font-size: 16px; }
#dialerInput { width: 100%; padding: 12px; border: 0; border-bottom: 1px solid var(--line); outline: 0; color: var(--text); background: transparent; text-align: center; font-size: 20px; letter-spacing: .03em; }
.dialer-results { display: flex; gap: 6px; overflow-x: auto; min-height: 48px; margin: 12px 0; }
.dialer-result { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 6px 10px; border-radius: 13px; color: var(--text); background: var(--surface-soft); }
.dialer-result span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); }
.dialer-result strong { font-size: 10px; }
.dial-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dial-pad button { aspect-ratio: 1.25; border: 1px solid rgba(22,114,243,.08); border-radius: 50%; color: var(--text); background: linear-gradient(145deg, #fff, #eef4fb); box-shadow: 0 6px 16px rgba(31,65,110,.08), inset 0 1px 0 #fff; font-size: 24px; font-weight: 600; }
.dial-pad button:active { color: var(--blue); transform: scale(.94); box-shadow: inset 0 3px 8px rgba(31,65,110,.1); }
.dialer-actions { display: flex; justify-content: center; gap: 30px; margin-top: 17px; }
.dialer-actions button { width: 48px; height: 48px; border-radius: 50%; color: var(--muted); background: var(--surface-soft); font-size: 19px; }
.dialer-actions #dialerCallButton { color: #fff; background: #28b77a; box-shadow: 0 8px 22px rgba(40,183,122,.25); }
.dialer-actions #dialerCallButton svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.settings-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-solid); }
.settings-card strong, .settings-card small { display: block; }
.settings-card strong { font-size: 13px; }
.settings-card small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.profile-card { justify-content: flex-start; }
.profile-card .large-avatar { flex-shrink: 0; width: 60px; height: 60px; margin: 0; }
.profile-card .secondary-button { margin-left: auto; }
.planned-settings { display: none; }
.settings-value { padding: 7px 11px; border-radius: 20px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 600; }
.settings-value.secure { color: #15965b; background: rgba(41,201,128,.1); }
.chat-screen { display: flex; flex-direction: column; background: var(--surface-solid); }
.chat-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 15%, rgba(22,114,243,.06), transparent 34%),
    radial-gradient(circle at 85% 75%, rgba(99,102,241,.05), transparent 38%);
}
body.mobile-chat-open .chat-screen,
body.preview-mobile.mobile-chat-open .chat-screen {
  background:
    radial-gradient(circle at 20% 0, rgba(47,128,237,.12), transparent 30%),
    #edf4fc;
}
.chat-header { display: grid; grid-template-columns: 44px minmax(90px, 1fr) 150px 34px 34px 34px; align-items: center; gap: 12px; padding: 17px 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); }
.chat-header strong, .chat-header small { display: block; }
.chat-header {
  position: relative;
  z-index: 2;
  border-bottom-color: rgba(255,255,255,.65);
  background: rgba(255,255,255,.74);
  box-shadow: 0 8px 25px rgba(31,65,110,.06);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
}
.chat-target-avatar {
  box-shadow: 0 8px 22px rgba(22,114,243,.18);
  font-size: 15px;
}
.chat-header > div:nth-child(3) strong {
  letter-spacing: -.25px;
}
.chat-header > div:nth-child(3) small {
  color: #23966b;
  font-weight: 600;
}
.chat-header small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.chat-target-avatar { width: 42px; height: 42px; border-radius: 50%; }
.chat-options-button { width: 34px; height: 34px; border-radius: 11px; color: var(--muted); background: var(--surface-soft); font-size: 19px; font-weight: 700; }
.chat-options-menu { position: absolute; top: 66px; right: 18px; z-index: 25; width: 210px; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-solid); box-shadow: 0 16px 45px rgba(20,45,80,.2); animation: menu-in .14s ease-out; }
.chat-options-menu button { width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--text); background: transparent; font-size: 11px; text-align: left; }
.chat-options-menu button:hover { background: var(--blue-soft); }
.forwarded-label { display: block; margin-bottom: 6px; opacity: .65; font-size: 9px; font-style: italic; }
.message-search { display: flex; align-items: center; gap: 5px; width: 150px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface-soft); }
.message-search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 10px; }
.typing-status { align-items: center; gap: 4px; min-height: 27px; padding: 5px 24px; color: var(--muted); background: var(--surface-solid); font-size: 10px; }
.typing-status:not([hidden]) { display: flex; }
.typing-status > span { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); animation: typing 1s infinite; }
.typing-status > span:nth-child(2) { animation-delay: .15s; }
.typing-status > span:nth-child(3) { animation-delay: .3s; }
.typing-status em { margin-left: 5px; font-style: normal; }
@keyframes typing { 50% { transform: translateY(-4px); opacity: .4; } }
.messages { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 28px; background: linear-gradient(180deg, #f3f8ff, #edf4fc); }
.chat-empty { max-width: 360px; margin: auto; padding: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; }
.message { max-width: min(72%, 540px); align-self: flex-start; }
.message.own { align-self: flex-end; }
.message > small { display: block; margin: 0 5px 5px; color: var(--muted); font-size: 9px; }
.message.own > small { text-align: right; }
.message-bubble { padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px 19px 19px 19px; background: #fff; box-shadow: 0 5px 18px rgba(31,65,110,.05); }
.message.own .message-bubble { border-color: transparent; border-radius: 19px 6px 19px 19px; color: #fff; background: linear-gradient(145deg, #2e8cff, #0864dc); box-shadow: 0 8px 22px rgba(22,114,243,.16); }
.message { animation: message-rise .28s cubic-bezier(.2,.8,.2,1); }
.messages {
  background-image:
    linear-gradient(rgba(255,255,255,.32), rgba(255,255,255,.32)),
    radial-gradient(circle, rgba(70,115,165,.075) 1px, transparent 1px);
  background-size: auto, 24px 24px;
}
.message-bubble {
  box-shadow: 0 8px 24px rgba(30,65,105,.075);
}
.message:not(.own) .message-bubble {
  background: rgba(255,255,255,.94);
  border-color: rgba(217,228,242,.75);
}
.message.own .message-bubble {
  background: linear-gradient(145deg, #3b91ff 0%, #126bdc 58%, #075fcf 100%);
}
.message > small {
  color: #73849a;
  font-weight: 500;
}
@keyframes message-rise {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.message-image { display: block; max-width: 100%; max-height: 300px; margin-top: 8px; border-radius: 12px; }
.message-bubble audio { display: block; width: min(280px, 100%); margin-top: 8px; }
.inline-video { display: block; width: min(320px, 100%); max-height: 420px; margin-top: 8px; border-radius: 15px; background: #05080d; object-fit: cover; }
.voice-recorder { align-items: center; gap: 12px; min-height: 74px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; }
.voice-recorder:not([hidden]) { display: flex; }
.recording-dot { display: inline-block; width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 5px rgba(255,73,98,.1); animation: record-pulse 1s infinite; }
.voice-recorder > button:first-child { width: 34px; height: 34px; border-radius: 50%; color: var(--muted); background: var(--surface-soft); font-size: 20px; }
.voice-recorder > button:last-child { margin-left: auto; padding: 10px 15px; border-radius: 13px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 700; }
.voice-recorder time { color: var(--text); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; }
.voice-wave { height: 26px; flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; overflow: hidden; }
.voice-wave i { width: 3px; height: 25%; border-radius: 3px; background: var(--blue); animation: wave 1s ease-in-out infinite; }
.voice-wave i:nth-child(2n) { animation-delay: -.3s; }
.voice-wave i:nth-child(3n) { animation-delay: -.6s; }
@keyframes wave { 50% { height: 100%; } }
.video-message-dialog { width: min(92vw, 430px); overflow: hidden; }
.video-message-content { padding: 16px; }
.video-message-heading { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; margin-bottom: 14px; }
.video-message-heading strong { font-size: 13px; }
.video-message-heading time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
#videoMessagePreview { display: block; width: 100%; aspect-ratio: 9 / 13; object-fit: cover; border-radius: 20px; background: #07101d; transform: scaleX(-1); }
.video-message-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 14px; }
.file-link { display: block; margin-top: 8px; color: inherit; font-size: 12px; }
.message-reactions { display: flex; gap: 4px; margin-top: 8px; opacity: .25; transition: opacity .18s; }
.message:hover .message-reactions, .message.own .message-reactions { opacity: 1; }
.message-reactions button { padding: 3px 6px; border: 1px solid var(--line); border-radius: 10px; color: inherit; background: rgba(255,255,255,.15); font-size: 10px; }
.message-reactions button:hover, .message-reactions button.selected { border-color: var(--blue); background: var(--blue-soft); }
.active-reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.active-reactions button { padding: 4px 8px; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: rgba(255,255,255,.2); font-size: 11px; }
.active-reactions button.selected { border-color: #75b2ff; box-shadow: inset 0 0 0 1px #75b2ff; }
.message.starred::before { content: "★"; position: absolute; top: 18px; right: -19px; color: #f6b72d; font-size: 12px; }
.message { position: relative; }
.message-status { position: absolute; right: 6px; bottom: -14px; color: #91a0b3; font-size: 10px; font-weight: 700; letter-spacing: -2px; }
.message-status.read { color: #168cff; }
.message-quote { width: 100%; margin-bottom: 8px; padding: 7px 9px; border-left: 3px solid currentColor; border-radius: 8px; color: inherit; background: rgba(255,255,255,.16); text-align: left; opacity: .86; }
.message-quote strong, .message-quote span { display: block; }
.message-quote strong { font-size: 9px; }
.message-quote span { overflow: hidden; margin-top: 2px; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.deleted-message { opacity: .65; font-style: italic; }
.composer { position: relative; z-index: 2; display: grid; grid-template-columns: 40px 1fr 40px 40px 46px; align-items: end; gap: 9px; padding: 13px 16px 15px; border-top: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.78); box-shadow: 0 -8px 28px rgba(31,65,110,.07); backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%); }
.chat-screen .composer {
  margin: 10px 12px 12px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(31,65,110,.13), inset 0 1px 0 #fff;
}
.composer textarea { width: 100%; min-height: 44px; max-height: 120px; resize: none; padding: 12px 14px; border: 1px solid rgba(22,114,243,.08); border-radius: 16px; outline: none; color: var(--text); background: rgba(239,245,252,.78); box-shadow: inset 0 1px 2px rgba(31,65,110,.03); }
.composer textarea:focus { border-color: #6eaeff; background: #fff; box-shadow: 0 0 0 4px rgba(22,114,243,.08); }
.composer-tool, .send-button { width: 38px; height: 44px; border-radius: 13px; color: var(--blue); background: var(--blue-soft); }
.send-button { width: 44px; color: #fff; background: var(--blue); box-shadow: 0 6px 16px rgba(22,114,243,.2); }
.composer-tool,
.send-button {
  display: grid;
  place-items: center;
  padding: 0;
}
body.preview-mobile.mobile-chat-open .chat-header {
  min-height: 72px;
  margin: 0 10px 0;
  padding: 10px 10px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 0 0 22px 22px;
  background: rgba(255,255,255,.76);
}
body.preview-mobile.mobile-chat-open .chat-screen {
  padding-top: 34px;
}
body.preview-mobile.mobile-chat-open .messages {
  padding-top: 18px;
}
body.preview-mobile.mobile-chat-open .composer {
  margin: 8px 10px 14px;
  border-radius: 23px;
}

.composer textarea::placeholder {
  color: #8999ad;
}
.composer-tool,
.send-button {
  isolation: isolate;
}
.composer-tool svg,
.send-button svg {
  position: relative;
  z-index: 1;
}
.header-call-button.audio {
  background: linear-gradient(145deg, rgba(54,216,160,.16), rgba(41,201,128,.08));
}
.header-call-button.video {
  background: linear-gradient(145deg, rgba(79,158,255,.17), rgba(22,114,243,.08));
}
.composer-tool svg,
.send-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.composer-tool.attachment { color: #64758c; background: #f0f4f9; }
.composer-tool.microphone { color: #168f5f; background: rgba(41,201,128,.11); }
.composer-tool.video-message { color: #126ddf; background: rgba(22,114,243,.1); }
.composer-tool,
.send-button {
  position: relative;
  overflow: hidden;
  transition: transform .16s cubic-bezier(.2,.9,.2,1), box-shadow .16s, filter .16s;
}
.composer-tool:hover,
.send-button:hover {
  transform: translateY(-2px) scale(1.03);
  filter: saturate(1.08);
  box-shadow: 0 8px 18px rgba(31,65,110,.12);
}
.composer-tool:active,
.send-button:active { transform: scale(.88); }
.composer-tool::after,
.send-button::after {
  content: "";
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  background: #fff8;
  opacity: 0;
  transition: inset .22s, opacity .22s;
}
.composer-tool:active::after,
.send-button:active::after { inset: 0; opacity: .24; }
.send-button {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(145deg, #489dff, #0864dc);
  box-shadow: 0 9px 22px rgba(22,114,243,.3), inset 0 1px 0 #ffffff55;
}
.composer-tool.recording { color: #fff; background: var(--danger); animation: record-pulse 1s infinite; }
.attachment-menu { position: absolute; left: 18px; bottom: 78px; z-index: 20; display: grid; grid-template-columns: repeat(4, 72px); gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-solid); box-shadow: 0 20px 55px rgba(20,45,80,.22); animation: menu-in .16s ease-out; }
.attachment-menu button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 15px; color: var(--text); background: var(--surface-soft); font-size: 9px; font-weight: 600; }
.attachment-menu button span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; color: #fff; background: var(--blue); font-size: 17px; }
.attachment-menu button span svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avatar-image { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
#profilePhotoButton { margin-left: 0; }

/* Final minimal-white chat theme: clear hierarchy, solid colors, restrained motion. */
.chat-header {
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.messages {
  background: #f7f9fc;
  background-image: none;
}
.message:not(.own) .message-bubble {
  border-color: #e3eaf3;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28,55,90,.055);
}
.message.own .message-bubble {
  background: #0a84ff;
  box-shadow: 0 3px 10px rgba(10,132,255,.16);
}
.chat-screen .composer {
  border-color: #e1e8f1;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(31,65,110,.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.composer textarea {
  border-color: #e2e9f2;
  background: #f7f9fc;
  box-shadow: none;
}
.composer-tool {
  color: #52647b;
  border: 1px solid #e2e9f2;
  background: #fff;
  box-shadow: 0 3px 9px rgba(31,65,110,.06);
}
.composer-tool.attachment,
.composer-tool.microphone,
.composer-tool.video-message { color: #52647b; background: #fff; }
.send-button {
  background: #0a84ff;
  box-shadow: 0 5px 14px rgba(10,132,255,.2);
}
.header-call-button.audio,
.header-call-button.video,
.chat-options-button {
  color: #52647b;
  border: 1px solid #e2e9f2;
  background: #fff;
  box-shadow: 0 3px 9px rgba(31,65,110,.06);
}
.header-call-button svg,
.chat-options-button svg,
.composer-tool svg,
.send-button svg { stroke-width: 2; }
.composer-tool:hover,
.send-button:hover,
.header-call-button:hover { filter: none; box-shadow: 0 6px 15px rgba(31,65,110,.1); }
body.preview-mobile.mobile-chat-open .chat-header {
  border-color: #e2e9f2;
  background: #fff;
  box-shadow: 0 3px 12px rgba(31,65,110,.05);
}
.date-separator { align-self: center; position: sticky; top: 8px; z-index: 2; margin: 3px 0 5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.88); box-shadow: 0 4px 14px rgba(31,65,110,.05); backdrop-filter: blur(14px); font-size: 9px; font-weight: 600; }
@keyframes record-pulse { 50% { opacity: .6; } }

.call-screen { overflow: hidden; background: #031437; }
.stage:has(.call-screen:not([hidden])) .feature-screen { display: none; }
.audio-call #remoteVideo { opacity: 0; }
#remoteVideo { width: 100%; height: 100%; object-fit: cover; }
.remote-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 115% 50%, #0048ef 0, transparent 38%), radial-gradient(ellipse at -15% 100%, #0048ef 0, transparent 40%), #031437; }
.call-placeholder-avatar, .call-avatar { display: block; flex: none; border-radius: 50%; background: #0346ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='23' r='11' fill='%23fff'/%3E%3Cpath d='M10 58c2-13 10-20 22-20s20 7 22 20' fill='%23fff'/%3E%3C/svg%3E") center/76% no-repeat; }
.call-placeholder-avatar { width: 150px; height: 150px; box-shadow: 0 0 0 20px #ffffff0a; }
.call-avatar { width: 52px; height: 52px; }
.call-meta { position: absolute; top: 22px; left: 22px; right: 22px; display: flex; align-items: center; gap: 12px; color: #fff; text-shadow: 0 1px 5px #0009; }
.call-meta > div { min-width: 0; }
.call-meta strong { display: block; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.call-state { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 11px; }
.call-controls { position: absolute; bottom: 24px; left: 50%; display: flex; justify-content: space-around; gap: 12px; width: min(390px, calc(100% - 32px)); padding: 14px; border-radius: 40px; background: #fff; box-shadow: 0 12px 35px #0005; transform: translateX(-50%); }
.control-button { display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; color: #fff; background: #003dff; font-size: 0; }
.control-button::before { content: ""; width: 25px; height: 25px; background: center/contain no-repeat; }
#micButton::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 10a7 7 0 0 0 14 0M12 17v4M8 21h8'/%3E%3C/svg%3E"); }
#micButton.off::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 9v2a3 3 0 0 0 5 2M15 9V5a3 3 0 0 0-5.8-1M5 10a7 7 0 0 0 12 5M19 10a7 7 0 0 1-.7 3M12 17v4M8 21h8M3 3l18 18'/%3E%3C/svg%3E"); }
#cameraButton::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='13' height='14' rx='2'/%3E%3Cpath d='m16 10 5-3v10l-5-3'/%3E%3C/svg%3E"); }
#speakerButton::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4ZM16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12'/%3E%3C/svg%3E"); }
.control-button.off { background: #63779c; }
.end-button { background: #ff203b; }
.end-button::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 14c5-5 13-5 18 0v3l-5 1-1-3a10 10 0 0 0-6 0l-1 3-5-1z'/%3E%3C/svg%3E"); }
.call-state .live-dot { flex: none; margin: 0; background: #75b8ff; box-shadow: none; }

dialog { width: min(92vw, 430px); padding: 0; border: 1px solid rgba(255,255,255,.7); border-radius: 26px; color: var(--text); background: rgba(255,255,255,.94); box-shadow: 0 34px 100px #07182f55; backdrop-filter: blur(30px); }
dialog::backdrop { background: rgba(7, 18, 35, .45); backdrop-filter: blur(8px); }
#joinForm, .incoming-content { padding: 34px; text-align: center; }
.dialog-icon { margin: 0 auto 20px; }
dialog h2 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.6px; }
dialog p { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.75; }
dialog label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; text-align: left; }
dialog input { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 13px; outline: none; color: var(--text); background: var(--surface-soft); }
dialog input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(22,114,243,.08); }
#joinForm .primary-button { width: 100%; margin-top: 18px; }
.incoming-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.group-form { position: relative; padding: 34px; text-align: center; }
.group-form-header, .group-form-field, .group-members-panel { display: contents; }
.group-back-icon, .group-members-hint { display: none; }
.group-category-picker { display: none; }
.group-form-status { margin: 0 0 10px; color: #b42335; font-size: 11px; text-align: left; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); background: var(--surface-soft); font-size: 20px; }
.group-list-label { display: block; margin: 18px 0 8px; font-size: 12px; font-weight: 600; text-align: left; }
.group-members { max-height: 250px; overflow-y: auto; margin-bottom: 18px; padding-right: 3px; }
.member-choice { display: grid; grid-template-columns: 18px 34px 1fr auto; align-items: center; gap: 10px; margin-bottom: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: var(--surface-soft); }
.member-choice input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.member-choice > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.member-choice strong, .member-choice small { text-align: left; }
.member-choice strong { font-size: 11px; }
.member-choice small { color: var(--muted); font-size: 9px; }
.group-form > .primary-button { width: 100%; }
.ringing { animation: ring 1.3s infinite; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid #ffffff33; border-radius: 14px; color: #fff; background: rgba(10,28,51,.88); box-shadow: 0 12px 35px #0003; backdrop-filter: blur(18px); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: .2s; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.message-action-menu { position: fixed; z-index: 80; padding: 9px; border: 1px solid rgba(255,255,255,.6); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 22px 65px #1025413d; backdrop-filter: blur(24px); animation: menu-in .16s ease-out; }
.emoji-reaction-row { display: grid; grid-template-columns: repeat(10, minmax(28px, 1fr)); gap: 3px; max-height: 154px; overflow-y: auto; padding: 4px; scrollbar-width: thin; }
.emoji-reaction-row button { height: 36px; border-radius: 10px; background: transparent; font-size: 20px; transition: transform .14s, background .14s; }
.emoji-reaction-row button:hover, .emoji-reaction-row button:focus-visible { background: var(--blue-soft); transform: scale(1.18) translateY(-2px); }
.message-action-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.message-action-list button { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 9px 6px; border-radius: 11px; color: var(--text); background: var(--surface-soft); font-size: 14px; }
.message-action-list button span { font-size: 10px; font-weight: 600; }
.confirm-content { padding: 34px; text-align: center; }
.forward-form { padding: 32px; text-align: center; }
.forward-targets { max-height: 290px; overflow-y: auto; margin: 20px 0; }
.forward-target { display: grid; grid-template-columns: 18px 34px 1fr; align-items: center; gap: 10px; margin-bottom: 7px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); cursor: pointer; text-align: left; }
.forward-target > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.forward-target strong { font-size: 11px; }
.forward-target input { accent-color: var(--blue); }
.contact-info-dialog { width: min(92vw, 520px); height: min(86vh, 760px); padding: 0; overflow: hidden; }
.new-chat-dialog { width: min(92vw, 440px); height: min(82vh, 650px); padding: 0; overflow: hidden; }
.new-chat-shell { display: flex; height: 100%; flex-direction: column; background: var(--surface-solid); }
.new-chat-shell > header { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.new-chat-shell > header button { width: 34px; height: 34px; border-radius: 11px; color: var(--blue); background: var(--blue-soft); font-size: 24px; }
.new-chat-shell > header strong, .new-chat-shell > header small { display: block; }
.new-chat-shell > header strong { font-size: 15px; }
.new-chat-shell > header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.new-chat-search { display: flex; align-items: center; gap: 8px; margin: 14px 15px 8px; padding: 10px 12px; border-radius: 13px; color: var(--muted); background: var(--surface-soft); }
.new-chat-search svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.new-chat-search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.new-chat-list { min-height: 0; flex: 1; overflow-y: auto; padding: 5px 15px 18px; }
.new-chat-person { width: 100%; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 11px; margin-bottom: 6px; padding: 10px; border-radius: 14px; color: var(--text); background: transparent; text-align: left; }
.new-chat-person:hover { background: var(--blue-soft); }
.new-chat-person > span:first-child { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.new-chat-person strong, .new-chat-person small { display: block; }
.new-chat-person strong { font-size: 12px; }
.new-chat-person small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.contact-info-shell { height: 100%; display: flex; flex-direction: column; background: var(--surface-solid); }
.contact-info-shell > header { display: flex; align-items: center; gap: 15px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.contact-info-shell > header button { width: 34px; height: 34px; border-radius: 11px; color: var(--blue); background: var(--blue-soft); font-size: 24px; }
.contact-info-shell > header strong { font-size: 14px; }
.contact-info-profile { padding: 28px; text-align: center; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.contact-info-profile .large-avatar { width: 86px; height: 86px; margin: 0 auto 14px; border-radius: 50%; font-size: 32px; }
.contact-info-profile h2 { margin: 0; font-size: 22px; }
.contact-info-profile p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.contact-info-content { min-height: 0; display: flex; flex: 1; flex-direction: column; padding: 16px; }
.media-tabs { display: flex; gap: 5px; padding: 4px; border-radius: 13px; background: var(--surface-soft); }
.media-tabs button { flex: 1; padding: 8px; border-radius: 10px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 600; }
.media-tabs button.active { color: #fff; background: var(--blue); }
.shared-media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; overflow-y: auto; padding-top: 14px; }
.shared-media-item { min-width: 0; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: var(--surface-soft); }
.shared-media-item img { width: 100%; height: 100%; object-fit: cover; }
.shared-media-item > span { display: block; margin-bottom: 7px; color: var(--blue); font-size: 22px; }
.shared-media-item strong { display: -webkit-box; overflow: hidden; padding: 0 5px; font-size: 9px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.shared-media-empty { grid-column: 1 / -1; padding: 45px 18px; color: var(--muted); font-size: 11px; text-align: center; }
body[data-chat-theme="sand"] .messages { background: #f2e9d8; }
body[data-chat-theme="midnight"] .messages { background: radial-gradient(circle at 20% 10%, #17365b, #081423 70%); }
body[data-chat-theme="sand"] .message:not(.own) .message-bubble { background: #fffaf2; }
.thread-dialog { width: min(92vw, 520px); height: min(75vh, 650px); }
.thread-shell { display: flex; height: 100%; flex-direction: column; }
.thread-shell > header { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.thread-shell > header button { width: 34px; height: 34px; border-radius: 11px; color: var(--text); background: var(--surface-soft); font-size: 22px; }
.thread-shell strong, .thread-shell small { display: block; }
.thread-shell small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.thread-messages { flex: 1; overflow-y: auto; padding: 18px; background: var(--surface-soft); }
.thread-message { margin-bottom: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-solid); }
.thread-message strong { font-size: 11px; }
.thread-message p { margin: 6px 0; font-size: 12px; line-height: 1.6; }
.thread-message small { color: var(--muted); font-size: 9px; }
@keyframes menu-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes ring { 50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(22,114,243,.12); } }

body.preview-mobile, body.preview-tablet { display: flex; justify-content: center; align-items: flex-start; padding: 18px; min-height: 100vh; overflow: hidden; background: radial-gradient(circle at 50% 20%, #d7e9ff, #93b8e8 85%); }
body.preview-mobile .app-shell, body.preview-tablet .app-shell { position: relative; display: flex; flex: none; flex-direction: column; min-height: 0; height: 844px; overflow: hidden; border: 11px solid #111820; background: var(--bg); box-shadow: 0 35px 100px #142f5480, 0 0 0 2px #8798ad, 0 0 0 5px #303b49; transform: scale(var(--preview-scale, .75)); transform-origin: top center; }
body.preview-mobile .app-shell { width: 390px; border-radius: 56px; }
body.preview-mobile .app-shell::before { content: ""; position: absolute; top: 10px; left: 50%; z-index: 20; width: 112px; height: 31px; border-radius: 18px; background: #030509; transform: translateX(-50%); }
body.preview-mobile .app-shell::after { content: ""; position: absolute; left: 50%; bottom: 8px; z-index: 20; width: 128px; height: 5px; border-radius: 5px; background: #172235; transform: translateX(-50%); }
body.preview-tablet .app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: 820px;
  height: 1080px;
  border: 15px solid #111820;
  border-radius: 38px;
  transform: scale(var(--preview-scale, .62));
}
body.preview-tablet .app-shell::after { content: ""; position: absolute; top: 50%; left: 3px; width: 8px; height: 8px; border-radius: 50%; background: #26394d; transform: translateY(-50%); }
body.preview-mobile .sidebar { max-height: 238px; padding: 42px 16px 10px; border: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }
body.preview-tablet .sidebar {
  width: 280px;
  height: 100%;
  max-height: none;
  padding: 38px 16px 94px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  background: rgba(249,252,255,.92);
}
body.preview-tablet .brand {
  flex: none;
  min-height: 68px;
  padding: 0 8px 16px;
}
body.preview-tablet .profile {
  flex: none;
  min-height: 60px;
  margin: 14px 0 16px;
}
body.preview-tablet .people-section {
  min-height: 0;
  overflow: hidden;
}
body.preview-tablet .chat-list-heading {
  order: 0;
  flex: none;
}
body.preview-tablet .chat-filters {
  order: 1;
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: 10px;
}
body.preview-tablet .create-group-button {
  order: 2;
  flex: none;
  margin-bottom: 9px;
}
body.preview-tablet .search-box {
  order: 3;
  flex: none;
}
body.preview-tablet .general-chat-button {
  order: 4;
  flex: none;
}
body.preview-tablet .people-list {
  order: 5;
  min-height: 0;
  flex: 1;
  padding-bottom: 8px;
}
body.preview-tablet .workspace {
  display: flex;
  min-width: 0;
  padding: 22px 18px;
}
body.preview-tablet .topbar {
  margin-bottom: 16px;
}
body.preview-tablet .mobile-nav {
  left: 140px;
  bottom: 18px;
  width: 280px;
  transform: translateX(-50%);
  padding: 8px;
  border-radius: 24px;
}
body.preview-tablet .mobile-nav button {
  padding-left: 0;
  padding-right: 0;
}
body.preview-tablet .sidebar {
  padding-left: 13px;
  padding-right: 13px;
}
body.preview-tablet .workspace {
  padding: 18px 16px 18px 18px;
}
body.preview-tablet .chat-list-actions button {
  width: 31px;
  height: 31px;
}
body.preview-tablet .chat-list-actions svg {
  width: 18px;
  height: 18px;
}
body.preview-tablet .chat-list-heading h2 {
  font-size: 23px;
}
body.preview-tablet .chat-filters button {
  padding: 8px 1px;
  font-size: 9px;
}
body.preview-tablet .mobile-nav {
  z-index: 45;
  height: 62px;
  align-items: stretch;
}
body.preview-tablet .mobile-nav button {
  min-width: 0;
  min-height: 48px;
  justify-content: center;
}
body.preview-tablet .mobile-nav button svg {
  flex: 0 0 auto;
}
body.preview-tablet .mobile-nav button.active {
  color: #fff;
  background: linear-gradient(145deg, #3b93ff, #0a64dc);
  transform: none;
}
body.preview-tablet .workspace {
  padding-bottom: 18px;
}
body.preview-tablet .feature-screen {
  padding-bottom: 24px;
}
body.preview-tablet .mobile-nav button {
  gap: 2px;
  padding: 7px 2px;
  border-radius: 14px;
  font-size: 9px;
}
body.preview-tablet .mobile-nav button svg {
  width: 22px;
  height: 22px;
}
body.preview-tablet .mobile-nav button span {
  font-size: 9px;
}
body.preview-tablet .mobile-nav button.active {
  color: #fff;
  background: linear-gradient(145deg, #3b93ff, #0a64dc);
  box-shadow: 0 7px 18px rgba(22,114,243,.27);
}
body.preview-tablet .create-group-button {
  display: none;
}
body.preview-tablet .brand,
body.preview-tablet .profile {
  display: none;
}
body.preview-tablet .sidebar {
  padding-top: 42px;
}
body.preview-tablet .chat-list-heading {
  min-height: 48px;
  padding: 2px 4px 12px;
}
body.preview-tablet .chat-list-actions button {
  width: 34px;
  height: 34px;
}
body.preview-tablet .chat-filters {
  gap: 3px;
  margin-bottom: 12px;
}
body.preview-tablet .chat-filters button {
  padding: 10px 2px;
  font-size: 11px;
}
body.preview-tablet .chat-list-heading h2 { font-size: 28px; }
body.preview-tablet .chat-list-actions button { width: 38px; height: 38px; }
body.preview-tablet .search-box { min-height: 46px; }
body.preview-tablet .search-box input { font-size: 12px; }
body.preview-tablet .person,
body.preview-tablet .general-chat-button {
  grid-template-columns: 44px minmax(0, 1fr) 42px;
  min-height: 76px;
  height: auto;
}
body.preview-tablet .person small,
body.preview-tablet .general-chat-button small {
  max-width: 140px;
}
body.preview-tablet .person strong,
body.preview-tablet .general-chat-button strong { font-size: 17px; }
body.preview-tablet .person small,
body.preview-tablet .general-chat-button small { font-size: 13px; line-height: 1.35; }
body.preview-tablet .chat-list-meta {
  align-self: center;
  height: 46px;
  min-height: 46px;
  flex-shrink: 0;
}
body.preview-tablet .chat-list-time { font-size: 11px; }
body.preview-tablet .person > span:nth-child(2),
body.preview-tablet .general-chat-button > span:nth-child(2) { min-width: 0; }
body.preview-tablet .person > .contact-call {
  display: none;
}
body.preview-tablet .people-list {
  padding-bottom: 96px;
  overflow-y: auto;
}
body.preview-tablet .people-list {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
}
body.preview-tablet .person,
body.preview-tablet .general-chat-button {
  min-width: 0;
  width: 100%;
}
body.preview-mobile .workspace, body.preview-tablet .workspace { min-height: 0; padding: 14px; flex: 1; }
body.preview-mobile .brand, body.preview-tablet .brand { padding-bottom: 10px; }
body.preview-mobile .brand-mark, body.preview-tablet .brand-mark { width: 38px; height: 38px; border-radius: 13px; }
body.preview-mobile .profile, body.preview-tablet .profile { margin-bottom: 10px; padding: 8px; }
body.preview-mobile .people-list { display: flex; gap: 7px; overflow: auto hidden; scrollbar-width: none; }
body.preview-tablet .people-list { display: block; gap: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
body.preview-mobile .person { min-width: 190px; }
body.preview-tablet .person { min-width: 0; }
body.preview-mobile footer, body.preview-tablet footer, body.preview-mobile .badge, body.preview-tablet .badge { display: none; }
body.preview-mobile .topbar, body.preview-tablet .topbar { align-items: flex-start; margin-bottom: 12px; }
body.preview-mobile .topbar h2, body.preview-tablet .topbar h2 { font-size: 16px; }
body.preview-mobile .stage, body.preview-tablet .stage, body.preview-mobile .idle-screen, body.preview-tablet .idle-screen { min-height: 0; border-radius: 22px; }
body.preview-mobile .idle-screen, body.preview-tablet .idle-screen { padding: 22px; }
body.preview-mobile .hero-icon { width: 84px; height: 84px; border-radius: 26px; }
body.preview-mobile .idle-screen h2 { margin-top: 22px; font-size: 20px; }
body.preview-mobile .idle-screen p { font-size: 11px; }
body.preview-mobile .chat-header { padding: 10px 12px; }
body.preview-mobile .chat-header { grid-template-columns: 30px 34px minmax(42px, 1fr) 32px 32px 30px; gap: 5px; }
body.preview-mobile .messages { padding: 12px; }
body.preview-mobile .message { max-width: 88%; }
body.preview-mobile .composer { grid-template-columns: 30px 1fr 30px 30px 36px; gap: 5px; padding: 10px; }
body.preview-mobile .composer-tool { width: 32px; }
body.preview-mobile .attachment-menu { left: 10px; bottom: 72px; grid-template-columns: repeat(4, 62px); gap: 4px; padding: 7px; }
body.preview-mobile .attachment-menu button { font-size: 8px; }
body.preview-mobile .inline-video { max-height: 300px; }
body.preview-mobile .message-search { width: 36px; padding: 8px; }
body.preview-mobile .message-search input { display: none; }
body.preview-mobile .feature-screen { padding: 18px 12px 90px; }
body.preview-mobile #callsScreen .feature-heading { align-items: center; margin-bottom: 18px; }
body.preview-mobile #callsScreen .feature-heading h2 { margin: 0; font-size: 25px; }
body.preview-mobile .calls-hero { margin-top: 14px; }
body.preview-mobile .calls-hero h2 { font-size: 27px; }
body.preview-mobile .selected-call-contact { grid-template-columns: 44px minmax(0,1fr) 40px 40px; gap: 7px; padding: 10px; }
body.preview-mobile .selected-call-contact > span { width: 44px; height: 44px; border-radius: 15px; }
body.preview-mobile .selected-call-contact button { width: 40px; height: 40px; border-radius: 14px; }
body.preview-mobile .feature-heading h2 { font-size: 23px; }
body.preview-mobile .feature-heading p { line-height: 1.5; }
body.preview-mobile .contact-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
body.preview-mobile .contact-card { padding: 16px 10px 12px; }
body.preview-mobile .contact-actions { grid-template-columns: 1fr; }
body.preview-mobile .settings-card { align-items: flex-start; padding: 15px; }
body.preview-mobile .profile-card { flex-wrap: wrap; }
body.preview-mobile .profile-card .secondary-button { width: 100%; margin: 0; }

@media (max-width: 760px) {
  .app-shell { position: relative; display: block; width: 100%; height: 100dvh; min-height: 100dvh; overflow: hidden; }
  .sidebar { width: 100%; height: 100dvh; max-height: none; padding: calc(16px + env(safe-area-inset-top)) 16px 94px; border: 0; }
  .brand { padding-bottom: 12px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 13px; font-size: 18px; }
  .brand h1 { font-size: 21px; }
  .profile { margin-bottom: 10px; padding: 8px; }
  .sidebar > .brand, .sidebar > .profile { display: none; }
  .people-section { min-height: 0; flex: 1; padding-bottom: 0; }
  .people-section .section-heading { padding: 4px 4px 14px; }
  .people-section .section-heading h2 { color: var(--text); font-size: 24px; font-weight: 800; letter-spacing: -.7px; }
  .chat-list-actions { gap: 0; }
  .chat-list-actions button { width: 36px; height: 36px; }
  .chat-list-actions svg { width: 21px; height: 21px; }
  .chat-list-options-menu { top: 52px; }
  .people-list { display: block; overflow-y: auto; padding-bottom: 12px; }
  .person { min-width: 0; }
  footer { display: none; }
  .workspace { display: none; }
  .topbar { align-items: flex-start; margin-bottom: 14px; }
  .topbar h2 { font-size: 17px; }
  .preview-toolbar { display: none; }
  .badge { display: none; }
  .stage, .idle-screen { min-height: 0; }
  .stage { border-radius: 0; }
  .idle-screen { padding: 24px; }
  .idle-screen h2 { font-size: 22px; }
  .hero-icon { width: 94px; height: 94px; border-radius: 28px; }
  .messages { gap: 18px; padding: 16px 12px 28px; }
  .message { max-width: min(82%, 310px); }
  .message > small { margin-bottom: 4px; font-size: 8px; }
  .message-bubble { padding: 10px 12px; }
  .message-bubble p { font-size: 13px; line-height: 1.55; }
  .message-bubble audio { display: block; width: 230px; max-width: 100%; min-width: 0; margin-top: 6px; }
  .message-bubble:has(audio) { width: 250px; max-width: 100%; }
  .composer { grid-template-columns: 32px 1fr 32px 32px 40px; padding: 10px; gap: 5px; }
  .composer-tool { width: 34px; }
  .attachment-menu { left: 10px; right: 10px; grid-template-columns: repeat(4, 1fr); }
  .chat-header { grid-template-columns: 34px minmax(45px, 1fr) 34px 34px 30px; gap: 6px; padding: 12px; }
  .message-search { width: 36px; }
  .message-search input { display: none; }
  .send-button { width: 40px; }
  .mobile-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    width: min(354px, calc(100vw - 24px));
    grid-template-columns: repeat(4, 1fr);
    padding: 7px 8px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(235,245,255,.54));
    box-shadow: 0 16px 45px rgba(12,43,82,.2), inset 0 1px 0 rgba(255,255,255,.8);
    backdrop-filter: blur(28px) saturate(165%);
    -webkit-backdrop-filter: blur(28px) saturate(165%);
    transform: translateX(-50%);
  }

  @media (max-width: 760px) {
    body:not(.preview-tablet) .people-section > .chat-list-heading { order: 0; }
    body:not(.preview-tablet) .people-section > .search-box { order: 1; margin-bottom: 10px; }
    body:not(.preview-tablet) .people-section > .chat-filters { order: 2; margin-bottom: 12px; }
    body:not(.preview-tablet) .people-section > .general-chat-button { order: 3; }
    body:not(.preview-tablet) .people-section > .people-list { order: 4; }
  }

  body.preview-mobile .mobile-back-button { display: grid; place-items: center; color: var(--blue); background: transparent; font-size: 28px; }
  .mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 3px; border-radius: 14px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 600; }
  .mobile-nav button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .mobile-nav button span { font-size: 9px; line-height: 1.3; }
  .mobile-nav button.active { color: #fff; background: linear-gradient(145deg, #3b93ff, #0a64dc); box-shadow: 0 7px 18px rgba(22,114,243,.27); }
  .feature-screen { padding: 20px 14px 90px; }
  .contact-info-dialog, .new-chat-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; border-radius: 0; }
  .feature-heading h2 { font-size: 24px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .contact-card { padding: 18px 10px 12px; }
  .contact-actions { grid-template-columns: 1fr; }
  body.mobile-chat-open .sidebar { display: none; }
  body.mobile-chat-open .mobile-nav { display: grid; z-index: 40; }
  body.mobile-section-open .sidebar { display: none; }
  body.mobile-section-open .workspace { position: fixed; inset: 0; z-index: 10; display: flex; height: 100dvh; padding: 0 0 84px; }
  body.mobile-section-open .topbar { display: none; }
  body.mobile-section-open .stage { height: 100%; min-height: 0; border: 0; border-radius: 0; }
  body.mobile-section-open .mobile-nav { display: grid; }
  body.mobile-chat-open .chat-screen:not([hidden]) ~ .mobile-nav { display: none; }
  body.mobile-chat-open .workspace { position: fixed; inset: 0; z-index: 10; display: flex; height: 100dvh; padding: 0; background: var(--surface-solid); }
  body.mobile-chat-open .topbar { display: none; }
  body.mobile-chat-open .stage { height: 100dvh; flex: 1; border: 0; border-radius: 0; box-shadow: none; }
  body.mobile-chat-open .chat-screen { padding-top: env(safe-area-inset-top); }
  body.mobile-chat-open .chat-header { min-height: 68px; grid-template-columns: 30px 38px minmax(40px, 1fr) 34px 34px 30px; gap: 5px; padding: 10px 8px; }
  body.mobile-chat-open .mobile-back-button { display: grid; place-items: center; width: 30px; height: 38px; color: var(--blue); background: transparent; font-size: 30px; }
  body.mobile-chat-open .composer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  body.mobile-chat-open .message-search { width: 34px; }
  body.mobile-chat-open .messages { padding-bottom: 18px; }
  body.mobile-chat-open .feature-screen { position: absolute; inset: 0; padding-bottom: 94px; }
}

body.preview-mobile .sidebar > .brand,
body.preview-mobile .sidebar > .profile { display: none; }
body.preview-mobile .sidebar {
  width: 100%;
  height: 100%;
  max-height: none;
  padding: 48px 14px 88px;
  border: 0;
  background: #f7faff;
}
body.preview-mobile .workspace { display: none; }
body.preview-mobile .people-section { min-height: 0; flex: 1; }
body.preview-mobile .chat-list-heading { padding: 2px 4px 12px; }
body.preview-mobile .chat-list-options-menu { top: 46px; }
body.preview-mobile .people-section .section-heading h2 { color: #102039; font-size: 28px; font-weight: 800; letter-spacing: -1.1px; }
body.preview-mobile .chat-list-actions { gap: 1px; }
body.preview-mobile .chat-list-actions button { width: 35px; height: 35px; color: #172a43; }
body.preview-tablet .chat-list-heading {
  min-height: 42px;
  padding: 0 4px 12px;
}
body.preview-tablet .chat-list-heading h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}
body.preview-tablet .chat-list-actions button {
  width: 36px;
  height: 36px;
}
body.preview-tablet .chat-list-options-menu {
  top: 46px;
  right: 3px;
}
body:not(.preview-mobile):not(.preview-tablet) .chat-list-heading {
  min-height: 52px;
  padding: 6px 8px 12px;
}
body:not(.preview-mobile):not(.preview-tablet) .chat-list-heading h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}
body:not(.preview-mobile):not(.preview-tablet) .chat-list-actions {
  gap: 3px;
}
body:not(.preview-mobile):not(.preview-tablet) .chat-list-actions button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
body:not(.preview-mobile):not(.preview-tablet) .sidebar .people-section {
  min-height: 0;
  overflow: hidden;
}
body:not(.preview-mobile):not(.preview-tablet) .chat-list-heading,
body:not(.preview-mobile):not(.preview-tablet) .chat-filters,
body:not(.preview-mobile):not(.preview-tablet) .create-group-button,
body:not(.preview-mobile):not(.preview-tablet) .search-box,
body:not(.preview-mobile):not(.preview-tablet) .general-chat-button {
  flex: none;
}
body:not(.preview-mobile):not(.preview-tablet) .chat-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
}
body:not(.preview-mobile):not(.preview-tablet) .chat-filters button {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 8px;
}
body:not(.preview-mobile):not(.preview-tablet) .people-list {
  min-height: 0;
  flex: 1;
}
body.preview-mobile .chat-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  margin: 0 0 12px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(215, 228, 244, .95);
  border-radius: 14px;
  background: rgba(236, 242, 250, .76);
  backdrop-filter: blur(18px);
}
body.preview-mobile .search-box { order: 1; }
body.preview-mobile .chat-filters { order: 2; }
body.preview-mobile .general-chat-button { order: 3; }
body.preview-mobile .people-list { order: 4; }
body.preview-mobile .chat-filters button {
  min-width: 0;
  padding: 8px 2px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  color: #63748b;
  background: transparent;
  white-space: nowrap;
  text-overflow: clip;
  font-size: 9px;
  line-height: 1.2;
}
body.preview-mobile .chat-filters button.active {
  color: #fff;
  background: linear-gradient(145deg, #3b93ff, #0b67df);
  box-shadow: 0 5px 13px rgba(22,114,243,.22);
}
body.preview-mobile .create-group-button { display: none; }
body.preview-mobile .search-box { margin: 0 0 12px; padding: 11px 13px; border-color: #dbe7f5; border-radius: 15px; background: #eef3fa; }
body.preview-mobile .search-box input { font-size: 11px; }
body.preview-mobile .people-list { display: block; overflow-y: auto; padding: 0 0 16px; }
body.preview-mobile .person, body.preview-mobile .general-chat-button {
  width: 100%;
  min-width: 0;
  margin: 0 0 7px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(38, 76, 120, .045);
}
body.preview-mobile .person { grid-template-columns: 44px minmax(0, 1fr) 42px; padding-right: 10px; }
body.preview-mobile .person > .contact-call { display: none; }
body.preview-mobile .general-chat-button { grid-template-columns: 44px minmax(0, 1fr) 42px; }
body.preview-mobile .chat-list-meta { min-width: 42px; }
body.preview-mobile .person:hover, body.preview-mobile .general-chat-button:hover { background: #fff; transform: none; }
body.preview-mobile .person strong, body.preview-mobile .general-chat-button strong { color: #13233a; font-size: 13px; }
body.preview-mobile .person small, body.preview-mobile .general-chat-button small { overflow: hidden; max-width: 220px; color: #73839a; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
body.preview-mobile .person > span:nth-child(2),
body.preview-mobile .general-chat-button > span:nth-child(2) { min-width: 0; }
body.preview-mobile .person strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body.preview-mobile .chat-list-time { font-size: 8px; }
body.preview-mobile .empty-state { padding: 38px 20px; border: 1px dashed #d8e5f3; border-radius: 18px; background: #fff; font-size: 11px; }
body.preview-mobile .messages { gap: 18px; padding: 14px 11px 26px; }
body.preview-mobile .messages { gap: 18px; padding: 14px 11px 26px; }
body.preview-mobile .message { max-width: min(84%, 300px); }
body.preview-mobile .message-bubble audio { width: 228px; max-width: 100%; min-width: 0; }

body.preview-mobile .mobile-nav {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 18px;
  display: grid;
  width: 354px;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.68), rgba(226,239,255,.42));
  box-shadow: 0 18px 50px rgba(12,43,82,.22), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(255,255,255,.2);
  backdrop-filter: blur(34px) saturate(180%);
  -webkit-backdrop-filter: blur(34px) saturate(180%);
  transform: translateX(-50%);
}
body.preview-mobile .mobile-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-size: 8px;
}
body.preview-mobile .mobile-nav button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
body.preview-mobile .mobile-nav button span { font-size: 8px; }
body.preview-mobile .mobile-nav button.active { color: #fff; background: linear-gradient(145deg, #3b93ff, #0a64dc); box-shadow: 0 7px 18px rgba(22,114,243,.27); }
body.preview-mobile .workspace { padding-bottom: 84px; }
body.preview-mobile:has(.feature-screen:not([hidden])) .sidebar { display: none; }
body.preview-mobile:has(.feature-screen:not([hidden])) .workspace { display: flex; padding-bottom: 82px; }
body.preview-mobile:has(.feature-screen:not([hidden])) .feature-screen { padding: 18px 12px 90px; }

body.preview-mobile.mobile-chat-open .sidebar { display: none; }
body.preview-mobile.mobile-chat-open .workspace { display: flex; position: absolute; inset: 0; padding: 0; background: var(--surface-solid); }
body.preview-mobile.mobile-chat-open .topbar { display: none; }
body.preview-mobile.mobile-chat-open .stage { width: 100%; height: 100%; flex: 1; border: 0; border-radius: 0; box-shadow: none; }
body.preview-mobile.mobile-chat-open .chat-screen { inset: 0; padding: 44px 0 0; }
body.preview-mobile.mobile-chat-open .chat-header { min-height: 64px; padding: 8px; }
body.preview-mobile.mobile-chat-open .header-call-button,
body.preview-mobile.mobile-chat-open .chat-options-button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}
body.preview-mobile.mobile-chat-open .header-call-button svg,
body.preview-mobile.mobile-chat-open .chat-options-button svg {
  width: 18px;
  height: 18px;
}
body.preview-mobile.mobile-chat-open .chat-header { grid-template-columns: 30px 38px minmax(62px, 1fr) 34px 34px 30px; gap: 5px; }
body.preview-mobile.mobile-chat-open .chat-header .message-search { display: none; }
body.preview-mobile.mobile-chat-open .chat-header > div:not(.chat-target-avatar) { min-width: 0; }
body.preview-mobile.mobile-chat-open .chat-header strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
body.preview-mobile.mobile-chat-open .chat-header small { font-size: 8px; }
body.preview-mobile.mobile-chat-open .chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 290px; margin: auto; padding: 20px 15px; }
.chat-empty-avatar { display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 14px; border-radius: 26px; color: #fff; background: linear-gradient(145deg, #55a8ff, #0864dc); box-shadow: 0 14px 35px rgba(22,114,243,.2); font-size: 30px; font-weight: 800; }
body.preview-mobile.mobile-chat-open .chat-empty strong { color: var(--text); font-size: 14px; }
body.preview-mobile.mobile-chat-open .chat-empty p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
body.preview-mobile.mobile-chat-open .mobile-back-button { display: grid; place-items: center; width: 28px; height: 36px; color: var(--blue); background: transparent; font-size: 29px; }
body.preview-mobile.mobile-chat-open .mobile-nav { display: none; }
body.preview-mobile.mobile-section-open .sidebar { display: none; }
body.preview-mobile.mobile-section-open .workspace {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  padding: 18px 0 84px;
  background: #f7faff;
}
body.preview-mobile.mobile-section-open .topbar { display: none; }
body.preview-mobile.mobile-section-open .stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.preview-mobile.mobile-section-open .mobile-nav {
  display: grid;
  z-index: 30;
}
body.preview-mobile.mobile-chat-open .messages { gap: 16px; padding: 15px 10px 20px; }
body.preview-mobile.mobile-chat-open .message { max-width: 84%; }
body.preview-mobile.mobile-chat-open .message-bubble { padding: 9px 11px; }
body.preview-mobile.mobile-chat-open .message-bubble audio { width: 225px; max-width: 100%; min-width: 0; }
body.preview-mobile.mobile-chat-open .composer { grid-template-columns: 28px minmax(70px,1fr) 28px 28px 34px; gap: 4px; padding: 8px; padding-bottom: 18px; }
body.preview-mobile.mobile-chat-open .composer-tool { width: 28px; height: 38px; }
body.preview-mobile.mobile-chat-open .send-button { width: 34px; height: 38px; }
body.preview-mobile.mobile-chat-open .composer textarea { min-height: 38px; max-height: 76px; padding: 9px 10px; font-size: 12px; }
body.preview-mobile.mobile-chat-open .composer-tool,
body.preview-mobile.mobile-chat-open .send-button {
  width: 36px;
  height: 40px;
  border-radius: 14px;
}
body.preview-mobile.mobile-chat-open .composer {
  grid-template-columns: 36px minmax(70px,1fr) 36px 36px 40px;
  gap: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .message,
  .composer-tool,
  .send-button { animation: none; transition: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #07111f;
    --surface: rgba(15, 31, 53, .84);
    --surface-solid: #0e1d31;
    --surface-soft: #13263f;
    --panel: #0e1d31;
    --text: #f5f8ff;
    --muted: #a8b8cc;
    --line: rgba(190, 215, 247, .12);
    --blue-soft: #122f56;
    --shadow: 0 24px 80px #0005;
  }

  .sidebar,
  body.preview-tablet .sidebar {
    color: #13233a;
    background: #f7faff;
  }
  body:not(.preview-mobile):not(.preview-tablet) .chat-list-heading h2,
  body.preview-tablet .chat-list-heading h2,
  body.preview-mobile .chat-list-heading h2 {
    color: #102039;
  }
  .chat-filters,
  body.preview-tablet .chat-filters,
  body:not(.preview-mobile):not(.preview-tablet) .chat-filters {
    background: #edf3fa;
    border-color: #dbe7f5;
  }
  .chat-filters button,
  body.preview-tablet .chat-filters button,
  body:not(.preview-mobile):not(.preview-tablet) .chat-filters button {
    color: #64768d;
    background: transparent;
  }
  .chat-filters button.active,
  body.preview-tablet .chat-filters button.active,
  body:not(.preview-mobile):not(.preview-tablet) .chat-filters button.active {
    color: #fff;
    background: linear-gradient(145deg, #3b93ff, #0b67df);
  }
  .profile,
  body.preview-tablet .profile,
  .person,
  body.preview-tablet .person,
  .general-chat-button,
  body.preview-tablet .general-chat-button {
    color: #13233a;
    background: #fff;
  }
  .person strong,
  .general-chat-button strong,
  .profile strong {
    color: #13233a;
  }
  .person small,
  .general-chat-button small,
  .profile small {
    color: #73839a;
  }
  .search-box,
  body.preview-tablet .search-box {
    color: #73839a;
    background: #eef3fa;
    border-color: #dbe7f5;
  }
  .search-box input {
    color: #13233a;
  }
  .mobile-nav,
  body.preview-mobile .mobile-nav,
  body.preview-tablet .mobile-nav {
    color: #63748b;
    border-color: rgba(255,255,255,.8);
    background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(229,240,255,.46));
    box-shadow: 0 18px 50px rgba(12,43,82,.2), inset 0 1px 0 #fff;
    backdrop-filter: blur(34px) saturate(180%);
    -webkit-backdrop-filter: blur(34px) saturate(180%);
  }
  .workspace,
  body.preview-tablet .workspace {
    color: #13233a;
    background:
      radial-gradient(circle at 85% 5%, rgba(22,114,243,.08), transparent 38%),
      #edf3fb;
  }

  body:not(.preview-mobile):not(.preview-tablet) .mobile-nav {
    left: 165px;
    bottom: 18px;
    width: 294px;
    transform: translateX(-50%);
  }
  body.preview-tablet .mobile-nav {
    left: 150px;
    bottom: 18px;
    width: 270px;
    transform: translateX(-50%);
  }

  /* Shared chat-list visual system across desktop, tablet and phone. */
  .sidebar {
    background: #f7faff;
  }
  .people-section .section-heading h2,
  body.preview-tablet .people-section .section-heading h2,
  body:not(.preview-mobile):not(.preview-tablet) .people-section .section-heading h2 {
    color: #102039;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.8px;
  }
  .chat-list-heading {
    min-height: 46px;
    padding: 4px 4px 12px;
  }
  .chat-list-actions button {
    color: #172a43;
    background: transparent;
  }
  .chat-list-actions button:hover {
    color: var(--blue);
    background: var(--blue-soft);
  }
  .chat-filters,
  body.preview-tablet .chat-filters,
  body:not(.preview-mobile):not(.preview-tablet) .chat-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    margin-bottom: 12px;
    padding: 3px;
    overflow: hidden;
    border: 1px solid #dbe7f5;
    border-radius: 14px;
    background: #edf3fa;
  }
  .chat-filters button,
  body.preview-tablet .chat-filters button,
  body:not(.preview-mobile):not(.preview-tablet) .chat-filters button {
    min-width: 0;
    padding: 8px 2px;
    border-radius: 10px;
    color: #64768d;
    background: transparent;
    white-space: nowrap;
    font-size: 9px;
    line-height: 1.2;
  }
  .chat-filters button.active {
    color: #fff;
    background: linear-gradient(145deg, #3b93ff, #0b67df);
    box-shadow: 0 5px 13px rgba(22,114,243,.22);
  }
  .create-group-button {
    display: none;
  }
  .search-box {
    border-color: #dbe7f5;
    border-radius: 15px;
    background: #eef3fa;
  }
  .person,
  .general-chat-button {
    min-width: 0;
    margin-bottom: 7px;
    padding: 11px 10px;
    border: 1px solid transparent;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(38,76,120,.045);
  }
  .person:hover,
  .general-chat-button:hover {
    background: #fff;
    transform: none;
  }
  .person strong,
  .general-chat-button strong {
    color: #13233a;
    font-size: 13px;
  }
  .person small,
  .general-chat-button small {
    color: #73839a;
    font-size: 10px;
  }
  .person.offline {
    opacity: 1;
  }
  .empty-state {
    border: 1px dashed #d8e5f3;
    border-radius: 18px;
    color: #718096;
    background: #fff;
  }
  .profile {
    border-color: #e2ebf5;
    background: #fff;
  }
  .brand {
    color: #13233a;
  }
  .mobile-nav,
  body.preview-tablet .mobile-nav {
    border-color: rgba(255,255,255,.8);
    background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(229,240,255,.46));
    box-shadow: 0 18px 50px rgba(12,43,82,.2), inset 0 1px 0 #fff;
    backdrop-filter: blur(34px) saturate(180%);
    -webkit-backdrop-filter: blur(34px) saturate(180%);
  }
  .mobile-nav button.active {
    color: #fff;
    background: linear-gradient(145deg, #3b93ff, #0a64dc);
    box-shadow: 0 7px 18px rgba(22,114,243,.27);
  }
  body.preview-tablet .workspace,
  body:not(.preview-mobile):not(.preview-tablet) .workspace {
    background:
      radial-gradient(circle at 85% 5%, rgba(22,114,243,.08), transparent 38%),
      #edf3fb;
  }
  body:not(.preview-mobile):not(.preview-tablet) .mobile-nav {
    left: 165px;
    bottom: 18px;
    width: 294px;
    transform: translateX(-50%);
  }
  body.preview-tablet .mobile-nav {
    left: 150px;
    bottom: 18px;
    width: 270px;
    transform: translateX(-50%);
  }
  .app-shell { background: radial-gradient(circle at 80% 0, #123d7133, transparent 40%), var(--bg); }
  .sidebar { background: rgba(10, 24, 42, .85); }
  .profile, .chat-header, .composer { background: rgba(14, 29, 49, .92); }
  .stage { border-color: #ffffff0e; }
  .hero-icon { background: linear-gradient(145deg, #183759, #0e2139); border-color: #ffffff12; }
  .messages { background: #091524; }
  .voice-recorder { background: #0e1d31; }
  .date-separator { background: rgba(14,29,49,.9); }
  .message-bubble { border-color: var(--line); background: #122943; }
  .message-action-menu { border-color: #ffffff18; background: rgba(14,29,49,.97); }
  .composer textarea, dialog input { color: var(--text); background: #0a1728; }
  dialog { border-color: #ffffff14; background: rgba(14,29,49,.96); }
  .person-avatar::after { border-color: #0e1d31; }
  .mobile-nav, body.preview-mobile .mobile-nav { border-color: rgba(255,255,255,.12); background: linear-gradient(145deg, rgba(18,42,70,.82), rgba(8,24,43,.68)); }
  .chat-list-options-menu { border-color: rgba(255,255,255,.14); background: rgba(14,29,49,.76); box-shadow: 0 22px 58px #0006, inset 0 1px 0 #ffffff12; }
  body.preview-mobile .sidebar, body.preview-tablet .sidebar { background: #0e1d31; }
  body.preview-mobile, body.preview-tablet { background: radial-gradient(circle at 50% 20%, #244f7c, #050d18 85%); }
}

.sidebar,
body.preview-tablet .sidebar,
body.preview-mobile .sidebar {
  color: #13233a;
  background: #f7faff;
}
.chat-list-heading h2,
body.preview-tablet .chat-list-heading h2,
body.preview-mobile .chat-list-heading h2 {
  color: #102039;
}
.chat-filters,
body.preview-tablet .chat-filters,
body.preview-mobile .chat-filters {
  border-color: #dbe7f5;
  background: #edf3fa;
}
.chat-filters button,
body.preview-tablet .chat-filters button,
body.preview-mobile .chat-filters button {
  color: #64768d;
  background: transparent;
}
.chat-filters button.active,
body.preview-tablet .chat-filters button.active,
body.preview-mobile .chat-filters button.active {
  color: #fff;
  background: linear-gradient(145deg, #3b93ff, #0b67df);
}
.profile,
body.preview-tablet .profile,
.person,
body.preview-tablet .person,
.general-chat-button,
body.preview-tablet .general-chat-button {
  color: #13233a;
  border-color: #e6edf6;
  background: #fff;
}
.person strong,
.general-chat-button strong,
.profile strong { color: #13233a; }
.person small,
.general-chat-button small,
.profile small { color: #73839a; }
.search-box,
body.preview-tablet .search-box { color: #73839a; border-color: #dbe7f5; background: #eef3fa; }
.search-box input { color: #13233a; }
.mobile-nav,
body.preview-mobile .mobile-nav,
body.preview-tablet .mobile-nav {
  color: #63748b;
  border-color: rgba(255,255,255,.8);
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(229,240,255,.46));
  box-shadow: 0 18px 50px rgba(12,43,82,.2), inset 0 1px 0 #fff;
  backdrop-filter: blur(34px) saturate(180%);
  -webkit-backdrop-filter: blur(34px) saturate(180%);
}
.workspace,
body.preview-tablet .workspace {
  color: #13233a;
  background: radial-gradient(circle at 85% 5%, rgba(22,114,243,.08), transparent 38%), #edf3fb;
}

/* Light-blue phone chat design. */
body.preview-mobile.mobile-chat-open .chat-header {
  margin: 0; border: 0; border-radius: 0 0 24px 24px;
  color: #132d4f; background: #e6f4ff; box-shadow: none;
}
body.preview-mobile.mobile-chat-open .chat-screen { background: #e6f4ff; }
body.preview-mobile.mobile-chat-open[data-chat-theme="standard"] .messages {
  background: radial-gradient(ellipse at 85% 85%, #d7ecff, transparent 56%), linear-gradient(155deg, #f6fbff, #e6f3ff);
}
body.preview-mobile.mobile-chat-open .message:not(.own) .message-bubble {
  color: #132d4f; border-color: transparent; border-radius: 18px 18px 18px 6px;
  background: #fff; box-shadow: 0 5px 16px rgba(49, 104, 158, .09);
}
body.preview-mobile.mobile-chat-open[data-chat-theme="sand"] .message:not(.own) .message-bubble { background: #fffaf2; }
body.preview-mobile.mobile-chat-open .message.own .message-bubble {
  border-radius: 18px 18px 6px 18px; background: #0a84ff;
}
body.preview-mobile.mobile-chat-open .header-call-button,
body.preview-mobile.mobile-chat-open .chat-options-button {
  color: #0a84ff; border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 12px rgba(49, 104, 158, .1);
}
body.preview-mobile.mobile-chat-open .composer {
  grid-template-columns: 32px minmax(0, 1fr) 32px 32px 38px;
  gap: 4px; margin: 8px 10px 14px; padding: 8px;
  border: 0; border-radius: 24px; background: #fff;
  box-shadow: 0 8px 24px rgba(49, 104, 158, .12);
}
body.preview-mobile.mobile-chat-open .composer textarea {
  color: #132d4f; border: 1px solid #e0edf9; border-radius: 20px; background: #f9fcff;
}
body.preview-mobile.mobile-chat-open .composer-tool {
  width: 32px; height: 38px; color: #0a84ff; border: 0; border-radius: 50%;
  background: #edf7ff; box-shadow: none;
}
body.preview-mobile.mobile-chat-open .send-button {
  width: 38px; height: 38px; border-radius: 50%; background: #0a84ff;
}

/* Minimal phone chat list. */
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .sidebar {
  background: #fff;
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .chat-filters {
  gap: 4px; padding: 0; border: 0; border-radius: 0; background: transparent; backdrop-filter: none;
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .chat-filters button {
  padding: 9px 2px; border-radius: 18px; color: #536b8a; background: #f0f3f7;
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .chat-filters button.active {
  color: #fff; background: #0a84ff; box-shadow: none;
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .search-box {
  border: 0; border-radius: 22px; background: #f0f3f7;
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .person,
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .general-chat-button {
  margin: 0; padding: 11px 2px; border: 0; border-bottom: 1px solid #eef2f6;
  border-radius: 0; background: #fff; box-shadow: none; opacity: 1;
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .person > .row-unread,
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .person > .unread-count { display: none; }
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .general-chat-button.has-unread::after { display: none; }
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .chat-list-unread { background: #0a84ff; }
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .chat-list-time { color: #647d9a; }
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) #newChatButton {
  position: fixed; right: 20px; bottom: 94px; z-index: 20; width: 48px; height: 48px;
  border-radius: 50%; color: #fff; background: #0a84ff; box-shadow: 0 6px 18px rgba(10,132,255,.28);
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav {
  bottom: 13px; width: 100%; padding: 5px 8px 8px; border: 0; border-top: 1px solid #edf1f6;
  border-radius: 0; background: #fff; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav button.active {
  color: #0a84ff; background: transparent; box-shadow: none;
}
body.preview-mobile:not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav button:not(.active) { color: #526d8e; }
@media (max-width: 760px) {
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .chat-screen { background: #e6f4ff; }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .chat-header {
    margin: 0; border: 0; border-radius: 0 0 24px 24px;
    color: #132d4f; background: #e6f4ff; box-shadow: none;
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .chat-header .message-search { display: none; }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .chat-header > div:not(.chat-target-avatar) { min-width: 0; }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .chat-header strong {
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet)[data-chat-theme="standard"] .messages {
    background: radial-gradient(ellipse at 85% 85%, #d7ecff, transparent 56%), linear-gradient(155deg, #f6fbff, #e6f3ff);
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .message:not(.own) .message-bubble {
    color: #132d4f; border-color: transparent; border-radius: 18px 18px 18px 6px;
    background: #fff; box-shadow: 0 5px 16px rgba(49, 104, 158, .09);
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet)[data-chat-theme="sand"] .message:not(.own) .message-bubble { background: #fffaf2; }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .message.own .message-bubble {
    border-radius: 18px 18px 6px 18px; background: #0a84ff;
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .header-call-button,
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .chat-options-button {
    color: #0a84ff; border: 0; border-radius: 50%; background: #fff;
    box-shadow: 0 3px 12px rgba(49, 104, 158, .1);
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .composer {
    grid-template-columns: 32px minmax(0, 1fr) 32px 32px 38px;
    gap: 4px; margin: 8px 10px calc(10px + env(safe-area-inset-bottom)); padding: 8px;
    border: 0; border-radius: 24px; background: #fff;
    box-shadow: 0 8px 24px rgba(49, 104, 158, .12);
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .composer textarea {
    min-width: 0; min-height: 38px; padding: 9px 10px; font-size: 12px;
    color: #132d4f; border: 1px solid #e0edf9; border-radius: 20px; background: #f9fcff;
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .composer-tool {
    width: 32px; height: 38px; color: #0a84ff; border: 0; border-radius: 50%;
    background: #edf7ff; box-shadow: none;
  }
  body.mobile-chat-open:not(.preview-mobile):not(.preview-tablet) .send-button {
    width: 38px; height: 38px; border-radius: 50%; background: #0a84ff;
  }

  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .sidebar { background: #fff; }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .chat-list-heading h2 {
    color: #102039; font-size: 28px;
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .chat-list-actions button { color: #172a43; }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .create-group-button { display: none; }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .search-box {
    margin: 0 0 12px; padding: 11px 13px; border: 0; border-radius: 22px; background: #f0f3f7;
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .chat-filters {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
    padding: 0; border: 0; border-radius: 0; background: transparent;
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .chat-filters button {
    min-width: 0; padding: 9px 2px; border-radius: 18px; color: #536b8a; background: #f0f3f7;
    white-space: nowrap; font-size: 9px;
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .chat-filters button.active {
    color: #fff; background: #0a84ff; box-shadow: none;
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .person,
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .general-chat-button {
    grid-template-columns: 44px minmax(0, 1fr) 42px; margin: 0; padding: 11px 2px;
    border: 0; border-bottom: 1px solid #eef2f6; border-radius: 0; background: #fff; opacity: 1;
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .person > .contact-call,
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .person > .row-unread,
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .person > .unread-count { display: none; }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .general-chat-button.has-unread::after { display: none; }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .chat-list-unread { background: #0a84ff; }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .chat-list-time { color: #647d9a; }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) #newChatButton {
    position: fixed; right: 20px; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 20;
    width: 48px; height: 48px; border-radius: 50%; color: #fff; background: #0a84ff;
    box-shadow: 0 6px 18px rgba(10,132,255,.28);
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav {
    bottom: 0; width: 100%; padding: 5px 8px calc(8px + env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid #edf1f6; border-radius: 0; background: #fff;
    box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav button.active {
    color: #0a84ff; background: transparent; box-shadow: none;
  }
  body:not(.preview-mobile):not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav button:not(.active) { color: #526d8e; }
}

/* Mobile call history. */
.call-filters { display: none; }
#callsScreen.phone-call-design {
  color: #13233a;
  background:
    radial-gradient(ellipse at 92% 43%, rgba(52,137,255,.17), transparent 44%),
    radial-gradient(ellipse at 10% 85%, rgba(69,146,255,.15), transparent 42%),
    linear-gradient(148deg, rgba(91,150,230,.12) 0%, transparent 28%, rgba(255,255,255,.25) 48%, transparent 70%),
    linear-gradient(160deg, #eef5ff, #dceaff);
}
#callsScreen.phone-call-design .calls-top {
  display: grid; grid-template-columns: minmax(0, 1fr) 48px;
  grid-template-areas: "title dialer" "search search"; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
#callsScreen.phone-call-design .calls-hero { display: contents; }
#callsScreen.phone-call-design .calls-hero > div { grid-area: title; }
#callsScreen.phone-call-design .calls-hero .eyebrow { display: none; }
#callsScreen.phone-call-design .calls-hero h2 { margin: 0; color: #102039; font-size: 28px; }
#callsScreen.phone-call-design .calls-hero .dialer-button {
  grid-area: dialer; width: 48px; height: 48px; border-radius: 50%; background: #0000ff;
  box-shadow: 0 7px 18px rgba(0,0,255,.2);
}
#callsScreen.phone-call-design .dialer-phone-icon { display: none; }
#callsScreen.phone-call-design .dialer-keypad-icon { display: block; fill: currentColor; stroke: none; }
#callsScreen.phone-call-design .call-search {
  grid-area: search; min-width: 0; margin: 0; padding: 13px;
  border: 0; border-radius: 20px; color: #6d82a4; background: #fff;
  box-shadow: 0 5px 16px rgba(27,65,125,.07);
}
#callsScreen.phone-call-design .call-search input { min-width: 0; color: #132d4f; }
#callsScreen.phone-call-design .call-search input::placeholder { color: #6d82a4; }
#callsScreen.phone-call-design .call-filters {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; margin-bottom: 14px;
}
#callsScreen.phone-call-design .call-filters button {
  min-width: 0; padding: 10px 2px; border-radius: 18px; color: #253f80;
  background: #fff; white-space: nowrap; font-size: 10px;
  box-shadow: 0 5px 16px rgba(27,65,125,.07);
}
#callsScreen.phone-call-design .call-filters button[aria-pressed="true"] { color: #fff; background: #0000ff; }
#callsScreen.phone-call-design .call-contact-card {
  min-width: 96px; padding: 9px 7px; color: #132d4f; border-color: #e2effa; background: #fff;
}
#callsScreen.phone-call-design .call-contact-card small { color: #637d99; }
#callsScreen.phone-call-design .call-contact-card.selected { border-color: #0000ff; background: #f0f5ff; }
#callsScreen.phone-call-design .call-contact-card > span { color: #0000ff; background: #e5efff; }
#callsScreen.phone-call-design .selected-call-contact { color: #132d4f; }
#callsScreen.phone-call-design .selected-call-contact small { color: #637d99; }
#callsScreen.phone-call-design .selected-call-contact > span { background: #0000ff; }
#callsScreen.phone-call-design .selected-call-contact button,
#callsScreen.phone-call-design .selected-call-contact button:last-child {
  color: #0000ff; background: #eaf2ff; box-shadow: none;
}
#callsScreen.phone-call-design .call-history { overflow: visible; border: 0; border-radius: 0; background: transparent; }
#callsScreen.phone-call-design .call-history-date {
  margin: 12px 0 7px; padding: 3px 4px; color: #607da1; background: transparent; font-size: 10px;
}
#callsScreen.phone-call-design .call-history-row {
  grid-template-columns: 42px minmax(0,1fr) auto 34px; gap: 8px; margin-bottom: 8px; padding: 11px;
  border: 0; border-radius: 18px; background: #fff; box-shadow: 0 5px 16px rgba(27,65,125,.07);
}
#callsScreen.phone-call-design .call-history-avatar {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: #0000ff; background: #e5efff; font-size: 13px; font-weight: 700;
}
#callsScreen.phone-call-design .call-history-details { min-width: 0; }
#callsScreen.phone-call-design .call-history-details strong {
  overflow: hidden; color: #132d4f; white-space: nowrap; text-overflow: ellipsis; font-size: 12px;
}
#callsScreen.phone-call-design .call-direction { color: #647d9a; font-size: 10px; }
#callsScreen.phone-call-design .call-direction span { margin-right: 5px; color: #0000ff; font-weight: 700; }
#callsScreen.phone-call-design .call-direction.outgoing span { color: #0000ff; }
#callsScreen.phone-call-design .call-history-time { color: #647d9a; white-space: nowrap; font-size: 10px; }
#callsScreen.phone-call-design .call-history-type {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  color: #0000ff; background: #eaf2ff;
}
#callsScreen.phone-call-design .call-history-type svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
#callsScreen.phone-call-design .empty-card {
  padding: 38px 16px; border: 1px dashed #c9e2f8; border-radius: 18px;
  color: #647d9a; background: rgba(255,255,255,.75);
}
/* Floating-card phone chat list. */
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .sidebar {
  background:
    radial-gradient(ellipse at 92% 43%, rgba(52,137,255,.17), transparent 44%),
    radial-gradient(ellipse at 10% 85%, rgba(69,146,255,.15), transparent 42%),
    linear-gradient(148deg, rgba(91,150,230,.12) 0%, transparent 28%, rgba(255,255,255,.25) 48%, transparent 70%),
    linear-gradient(160deg, #eef5ff, #dceaff);
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .people-section {
  position: relative; isolation: isolate; display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  overflow: visible;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .people-section::before {
  content: ""; grid-column: 1; grid-row: 1 / 3; z-index: -1;
  border-radius: 22px; background: #fff; box-shadow: 0 8px 26px rgba(27,65,125,.09);
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-list-heading {
  grid-column: 1; grid-row: 1; padding: 10px 12px 8px;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .search-box { grid-column: 1; grid-row: 2; }
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-filters {
  grid-column: 1; grid-row: 3; margin-top: 10px;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .general-chat-button { grid-column: 1; grid-row: 4; }
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .people-list {
  grid-column: 1; grid-row: 5; min-height: 0; overflow-y: auto;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-list-heading h2 { color: #102039; }
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-list-actions button {
  color: #0000ff; border-radius: 50%; background: #f1f5ff;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) #newChatButton {
  position: static; width: 35px; height: 35px; border-radius: 50%; color: #fff; background: #0000ff; box-shadow: none;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .search-box {
  margin: 0 12px 12px; color: #6d82a4; border: 0; background: #f0f5ff;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .search-box input { color: #13233a; }
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .search-box input::placeholder { color: #6d82a4; }
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-filters button {
  color: #0000c8; border: 1px solid #c8d8ff; background: rgba(255,255,255,.88);
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-filters button.active {
  color: #fff; border-color: #0000ff; background: #0000ff;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .person,
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .general-chat-button {
  margin: 0 0 8px; padding: 11px 10px; border: 0; border-radius: 18px;
  background: #fff; box-shadow: 0 5px 16px rgba(27,65,125,.07);
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-list-unread { background: #0000ff; }
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-list-time { color: #657f9d; }
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .mobile-nav {
  bottom: calc(8px + env(safe-area-inset-bottom)); width: min(354px, calc(100% - 24px));
  padding: 7px 8px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px;
  background: rgba(255,255,255,.94); box-shadow: 0 10px 32px rgba(27,65,125,.14);
}
body.preview-mobile.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav { bottom: 18px; }
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .mobile-nav button.active {
  color: #0000ff; background: transparent; box-shadow: none;
}
body.phone-list-design:not(.mobile-chat-open):not(.mobile-section-open):not(.preview-tablet) .chat-list-options-menu button { color: #13233a; }

/* Keep phone navigation consistent across sections. */
body.phone-list-design:not(.preview-tablet):not(.mobile-chat-open) .mobile-nav,
body.phone-list-design:not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav {
  width: min(354px, calc(100% - 24px)); padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.9); border-radius: 22px;
  background: rgba(255,255,255,.94); box-shadow: 0 10px 32px rgba(27,65,125,.14);
}
body.preview-mobile.phone-list-design:not(.mobile-chat-open) .mobile-nav { bottom: 18px; }
body.phone-list-design:not(.preview-tablet):not(.mobile-chat-open) .mobile-nav button,
body.phone-list-design:not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav button:not(.active) {
  color: #526d8e; background: transparent; box-shadow: none;
}
body.phone-list-design:not(.preview-tablet):not(.mobile-chat-open) .mobile-nav button.active,
body.phone-list-design:not(.preview-tablet):not(.mobile-chat-open):not(.mobile-section-open) .mobile-nav button.active {
  color: #0000ff; background: transparent; box-shadow: none;
}
body.phone-list-design #dialerCallButton { background: #0000ff; box-shadow: 0 8px 22px rgba(0,0,255,.2); }
body.phone-list-design:has(#dialerDialog[open]) .mobile-nav { visibility: hidden; }

body.phone-list-design:has(#newChatDialog[open]) .mobile-nav { visibility: hidden; }
body.phone-list-design #newChatDialog {
  position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none;
  margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #eaf3ff;
}
body.phone-list-design #newChatDialog .new-chat-shell {
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 92% 18%, rgba(52,137,255,.17), transparent 44%),
    radial-gradient(ellipse at 10% 85%, rgba(69,146,255,.15), transparent 42%),
    linear-gradient(160deg, #eef5ff, #dceaff);
}
body.phone-list-design #newChatDialog .new-chat-shell > header {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 0; border: 0;
}
body.phone-list-design #newChatDialog .new-chat-shell > header button {
  width: 40px; height: 40px; color: #0000ff; background: #fff;
  box-shadow: 0 5px 16px rgba(27,65,125,.09); font-size: 26px;
}
body.phone-list-design #newChatDialog .new-chat-shell > header strong { color: #102039; font-size: 27px; }
body.phone-list-design #newChatDialog .new-chat-shell > header small { margin-top: 5px; color: #526d8e; font-size: 12px; }
body.phone-list-design #newChatDialog .new-chat-search {
  flex: none; margin: 20px 0 12px; padding: 12px 14px; border-radius: 16px;
  color: #526d8e; background: #fff; box-shadow: 0 5px 16px rgba(27,65,125,.07);
}
body.phone-list-design #newChatDialog .new-chat-search input { min-width: 0; color: #102039; font-size: 16px; }
body.phone-list-design #newChatDialog .new-chat-list { padding: 2px 0 12px; }
body.phone-list-design #newChatDialog .new-chat-person {
  grid-template-columns: 46px minmax(0,1fr) 16px; gap: 12px; margin-bottom: 10px;
  padding: 11px 12px; color: #102039; background: #fff;
  box-shadow: 0 5px 16px rgba(27,65,125,.07);
}
body.phone-list-design #newChatDialog .new-chat-person::after { content: "›"; color: #7893bd; font-size: 22px; }
body.phone-list-design #newChatDialog .new-chat-person > span:first-child {
  width: 46px; height: 46px; color: #fff; background: #0000ff;
}
body.phone-list-design #newChatDialog .new-chat-person.offline > span:first-child { color: #0000b5; background: #dce9ff; }
body.phone-list-design #newChatDialog .new-chat-person strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
body.phone-list-design #newChatDialog .new-chat-person small { color: #0000b5; font-size: 10px; }
body.phone-list-design #newChatDialog .new-chat-person.offline small { color: #526d8e; }
body.phone-list-design #newChatDialog .shared-media-empty { color: #526d8e; }
body.preview-mobile #newChatDialog {
  position: fixed; top: var(--dialog-center-y); left: var(--dialog-center-x);
  right: auto; bottom: auto; margin: 0; width: 368px; height: 822px; border-radius: 45px;
  transform: scale(var(--dialog-scale)) translate(-50%, -50%); transform-origin: top left;
}
body.preview-mobile #newChatDialog .new-chat-shell { padding-top: 52px; padding-bottom: 30px; }
body.preview-mobile #newChatDialog::before {
  content: ""; position: absolute; top: 10px; left: 50%; width: 112px; height: 31px;
  border-radius: 18px; background: #030509; transform: translateX(-50%);
}
body.preview-mobile #newChatDialog::after {
  content: ""; position: absolute; bottom: 8px; left: 50%; width: 128px; height: 5px;
  border-radius: 5px; background: #172235; transform: translateX(-50%);
}
body.preview-mobile #newChatDialog::backdrop { background: transparent; backdrop-filter: none; }

body.phone-list-design #dialerDialog {
  position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none;
  margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #eaf3ff;
}
body.phone-list-design #dialerDialog .dialer-shell {
  display: flex; flex-direction: column; min-height: 100%;
  padding: calc(20px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 85% 40%, rgba(52,137,255,.14), transparent 50%),
    linear-gradient(160deg, #f3f8ff, #dceaff);
}
body.phone-list-design #dialerDialog .dialer-shell > header { flex: none; margin-bottom: 24px; }
body.phone-list-design #dialerDialog .dialer-shell > header button {
  width: 40px; height: 40px; color: #0000ff; background: #fff;
  box-shadow: 0 5px 16px rgba(27,65,125,.09); font-size: 24px;
}
body.phone-list-design #dialerDialog .dialer-shell > header strong { color: #102039; font-size: 20px; }
body.phone-list-design #dialerInput {
  flex: none; min-height: 54px; padding: 12px; border: 0; border-radius: 18px;
  color: #102039; background: #fff; box-shadow: 0 5px 16px rgba(27,65,125,.07);
}
body.phone-list-design #dialerDialog .dialer-results { flex: none; }
body.phone-list-design #dialerDialog .dial-pad {
  flex: none; grid-template-columns: repeat(3, 68px); justify-content: center;
  gap: 12px 25px; margin-top: auto; padding-top: 16px;
}
body.phone-list-design #dialerDialog .dial-pad button {
  aspect-ratio: 1; border: 1px solid rgba(192,211,255,.75); color: #102039;
  background: #fff; box-shadow: 0 6px 18px rgba(27,65,125,.1); font-size: 24px;
}
body.phone-list-design #dialerDialog .dial-pad button:active {
  color: #0000ff; background: #e5eeff; transform: scale(.94);
}
body.phone-list-design #dialerDialog .dialer-actions { flex: none; margin-top: 20px; }
body.phone-list-design #dialerDialog .dialer-actions button { width: 56px; height: 56px; }

body.preview-mobile #dialerDialog {
  position: fixed; top: var(--dialog-center-y); left: var(--dialog-center-x);
  right: auto; bottom: auto; margin: 0; width: 368px; height: 822px; border-radius: 45px;
  overflow-y: auto; transform: scale(var(--dialog-scale)) translate(-50%, -50%); transform-origin: top left;
}
body.preview-mobile #dialerDialog .dialer-shell { padding-top: 52px; padding-bottom: 30px; }
body.preview-mobile #dialerDialog::before {
  content: ""; position: absolute; top: 10px; left: 50%; width: 112px; height: 31px;
  border-radius: 18px; background: #030509; transform: translateX(-50%);
}
body.preview-mobile #dialerDialog::after {
  content: ""; position: absolute; bottom: 8px; left: 50%; width: 128px; height: 5px;
  border-radius: 5px; background: #172235; transform: translateX(-50%);
}
body.preview-mobile #dialerDialog::backdrop { background: transparent; backdrop-filter: none; }
body.preview-mobile #groupDialog {
  position: fixed; top: var(--dialog-center-y); left: var(--dialog-center-x);
  right: auto; bottom: auto; margin: 0; width: 350px; max-width: none; max-height: 740px;
  overflow-y: auto; transform: scale(var(--dialog-scale)) translate(-50%, -50%); transform-origin: top left;
}
body.preview-mobile #groupDialog::backdrop { background: transparent; backdrop-filter: none; }

.group-form select {
  width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 13px;
  color: var(--text); background: var(--surface-soft); font: inherit;
}
.group-form label[for="groupCategoryInput"] { margin-top: 16px; }
#groupGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.group-category {
  min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 20px;
  background: #fff; box-shadow: 0 8px 28px rgba(31,65,110,.06);
}
.group-category h3 { margin: 0 0 12px; color: #102039; font-size: 15px; }
.group-card {
  display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center;
  gap: 10px; padding: 10px 0; border-top: 1px solid #e8effa;
}
.group-avatar {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: #fff; background: #0000ff; font-weight: 700;
}
.group-details { min-width: 0; }
.group-details strong { display: block; overflow: hidden; color: #102039; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.group-details small { display: block; margin-top: 4px; color: #637d99; font-size: 10px; }
.group-open {
  padding: 9px 10px; border-radius: 18px; color: #0000ff; background: #eaf2ff;
  white-space: nowrap; font-size: 10px; font-weight: 700;
}
.group-category-select {
  grid-column: 2 / -1; width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid #d5e4ff;
  border-radius: 10px; color: #365381; background: #f7faff; font: inherit; font-size: 10px;
}
body.phone-list-design #groupsScreen {
  background: radial-gradient(ellipse at 92% 43%, rgba(52,137,255,.17), transparent 44%),
    radial-gradient(ellipse at 10% 85%, rgba(69,146,255,.15), transparent 42%),
    linear-gradient(148deg, rgba(91,150,230,.12), transparent 28%, rgba(255,255,255,.25) 48%, transparent 70%),
    linear-gradient(160deg, #eef5ff, #dceaff);
}
body.phone-list-design #groupsScreen .feature-heading { align-items: center; gap: 10px; margin-bottom: 20px; }
body.phone-list-design #groupsScreen .feature-heading .eyebrow,
body.phone-list-design #groupsScreen .feature-heading p { display: none; }
body.phone-list-design #groupsScreen .feature-heading h2 { margin: 0; color: #102039; font-size: 28px; }
body.phone-list-design #groupsCreateButton {
  flex: none; padding: 12px 16px; border-radius: 22px; background: #0000ff;
  box-shadow: 0 7px 18px rgba(0,0,255,.2);
}
body.phone-list-design #groupGrid { grid-template-columns: minmax(0,1fr); gap: 12px; }
body.phone-list-design #groupGrid .group-category { border: 0; background: #fff; }

body.phone-list-design #settingsScreen {
  color: #102039;
  background: radial-gradient(ellipse at 92% 18%, rgba(52,137,255,.17), transparent 44%),
    radial-gradient(ellipse at 10% 85%, rgba(69,146,255,.15), transparent 42%),
    linear-gradient(160deg, #eef5ff, #dceaff);
}
body.phone-list-design #settingsScreen .feature-heading { margin-bottom: 20px; }
body.phone-list-design #settingsScreen .feature-heading .eyebrow,
body.phone-list-design #settingsScreen .feature-heading p { display: none; }
body.phone-list-design #settingsScreen .feature-heading h2 { margin: 0; color: #0000ff; font-size: 28px; }
body.phone-list-design #settingsScreen .settings-card {
  align-items: center; gap: 12px; padding: 14px; border: 0;
  border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(27,65,125,.08);
}
body.phone-list-design #settingsScreen .profile-card { flex-wrap: wrap; }
body.phone-list-design #settingsScreen .profile-card .large-avatar {
  width: 52px; height: 52px; color: #fff; background: #0000ff;
}
body.phone-list-design #settingsScreen .profile-card .secondary-button {
  width: 100%; margin: 0; color: #fff; background: #0000ff; border: 0;
}
body.phone-list-design #settingsScreen .settings-value.secure { color: #0000ff; background: #eaf2ff; }
body.phone-list-design #settingsScreen .planned-settings { display: block; margin-top: 20px; }
body.phone-list-design #settingsScreen .planned-settings h3 { margin: 0; font-size: 15px; }
body.phone-list-design #settingsScreen .planned-settings p { margin: 5px 0 10px; color: #526d8e; font-size: 11px; }
body.phone-list-design #settingsScreen .planned-settings ul {
  margin: 0; padding: 0 14px; list-style: none; border-radius: 18px;
  background: #fff; box-shadow: 0 8px 24px rgba(27,65,125,.08);
}
body.phone-list-design #settingsScreen .planned-settings li {
  display: flex; align-items: center; gap: 10px; min-height: 51px;
  border-bottom: 1px solid #e8effa;
}
body.phone-list-design #settingsScreen .planned-settings li:last-child { border-bottom: 0; }
body.phone-list-design #settingsScreen .planned-settings li > span {
  display: grid; flex: none; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; color: #fff; background: #0000ff; font-size: 17px;
}
body.phone-list-design #settingsScreen .planned-settings li strong { flex: 1; min-width: 0; font-size: 12px; }
body.phone-list-design #settingsScreen .planned-settings li small { color: #526d8e; font-size: 10px; }

body.phone-list-design #contactInfoDialog {
  position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none;
  margin: 0; border: 0; border-radius: 0; background: #eaf3ff; box-shadow: none;
}
body.phone-list-design #contactInfoDialog .contact-info-shell {
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 92% 18%, rgba(52,137,255,.17), transparent 44%),
    radial-gradient(ellipse at 10% 85%, rgba(69,146,255,.15), transparent 42%),
    linear-gradient(160deg, #eef5ff, #dceaff);
}
body.phone-list-design #contactInfoDialog .contact-info-shell > header {
  flex: none; gap: 12px; padding: 0 0 16px; border: 0; color: #0000ff;
}
body.phone-list-design #contactInfoDialog .contact-info-shell > header button {
  flex: none; width: 40px; height: 40px; color: #0000ff; background: #fff;
  box-shadow: 0 5px 16px rgba(27,65,125,.09); font-size: 26px;
}
body.phone-list-design #contactInfoDialog .contact-info-shell > header strong { font-size: 17px; }
body.phone-list-design #contactInfoDialog .contact-info-profile {
  flex: none; padding: 20px 14px; border: 0; border-radius: 20px; background: #fff;
  box-shadow: 0 8px 24px rgba(27,65,125,.08);
}
body.phone-list-design #contactInfoDialog .contact-info-profile .large-avatar {
  width: 76px; height: 76px; margin-bottom: 12px; color: #fff; background: #0000ff; box-shadow: none;
}
body.phone-list-design #contactInfoDialog .contact-info-profile h2 {
  overflow: hidden; color: #102039; text-overflow: ellipsis; font-size: 19px;
}
body.phone-list-design #contactInfoDialog .contact-info-profile p { color: #526d8e; font-size: 11px; }
body.phone-list-design #contactInfoDialog .contact-info-content { padding: 12px 0 0; }
body.phone-list-design #contactInfoDialog .media-tabs {
  flex: none; gap: 4px; padding: 5px; border-radius: 16px; background: #fff;
  box-shadow: 0 7px 20px rgba(27,65,125,.08);
}
body.phone-list-design #contactInfoDialog .media-tabs button { min-width: 0; color: #526d8e; font-size: 11px; }
body.phone-list-design #contactInfoDialog .media-tabs button.active { color: #fff; background: #0000ff; }
body.phone-list-design #contactInfoDialog .shared-media-grid { flex: 1; align-content: start; min-height: 0; }
body.phone-list-design #contactInfoDialog .shared-media-empty {
  display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 52px 18px;
  color: #526d8e; font-size: 12px; line-height: 1.5;
}
body.phone-list-design #contactInfoDialog .shared-media-empty::before {
  content: ""; display: block; width: 76px; height: 76px; border-radius: 50%; background-color: #d6e5ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%230000ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='11' width='30' height='26' rx='4'/%3E%3Ccircle cx='19' cy='19' r='3'/%3E%3Cpath d='m10 33 8-8 5 5 5-7 9 10'/%3E%3C/svg%3E");
  background-position: center; background-repeat: no-repeat; background-size: 48px;
}
body.phone-list-design #contactInfoDialog .contact-info-content:has([data-media-tab="links"].active) .shared-media-empty::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%230000ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m20 28 8-8M17 31l-2 2a7 7 0 0 1-10-10l7-7a7 7 0 0 1 10 0M31 17l2-2a7 7 0 0 1 10 10l-7 7a7 7 0 0 1-10 0'/%3E%3C/svg%3E");
}
body.phone-list-design #contactInfoDialog .contact-info-content:has([data-media-tab="docs"].active) .shared-media-empty::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%230000ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 6h15l8 8v28H13zM28 6v9h8M18 23h13M18 29h13M18 35h9'/%3E%3C/svg%3E");
}
body.preview-mobile #contactInfoDialog {
  position: fixed; top: var(--dialog-center-y); left: var(--dialog-center-x);
  right: auto; bottom: auto; margin: 0; width: 368px; height: 822px; border-radius: 45px;
  transform: scale(var(--dialog-scale)) translate(-50%, -50%); transform-origin: top left;
}
body.preview-mobile #contactInfoDialog .contact-info-shell { padding-top: 52px; padding-bottom: 30px; }
body.preview-mobile #contactInfoDialog::before {
  content: ""; position: absolute; top: 10px; left: 50%; width: 112px; height: 31px;
  border-radius: 18px; background: #030509; transform: translateX(-50%);
}
body.preview-mobile #contactInfoDialog::after {
  content: ""; position: absolute; bottom: 8px; left: 50%; width: 128px; height: 5px;
  border-radius: 5px; background: #172235; transform: translateX(-50%);
}
body.preview-mobile #contactInfoDialog::backdrop { background: transparent; backdrop-filter: none; }

body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-screen {
  padding-top: calc(10px + env(safe-area-inset-top));
  background: #e4efff;
}
body.preview-mobile.phone-list-design.mobile-chat-open .chat-screen { padding-top: 46px; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-screen::before { display: none; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .mobile-nav { display: none; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-header {
  flex: none; grid-template-columns: 28px 38px minmax(0, 1fr) 32px 32px 28px;
  gap: 4px; min-height: 64px; margin: 0 10px 8px; padding: 8px;
  border: 0; border-radius: 22px; color: #102039; background: #fff;
  box-shadow: 0 6px 20px rgba(27,65,125,.12);
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-header > div:not(.chat-target-avatar) { min-width: 0; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-header strong {
  overflow: hidden; color: #102039; text-overflow: ellipsis; white-space: nowrap; font-size: 12px;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-header small {
  overflow: hidden; color: #526d8e; text-overflow: ellipsis; white-space: nowrap; font-size: 9px;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-target-avatar {
  width: 38px; height: 38px; color: #fff; background: #0000ff; box-shadow: none;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .mobile-back-button,
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .header-call-button,
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-options-button {
  width: 28px; height: 36px; border: 0; color: #0000ff; background: transparent; box-shadow: none;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .header-call-button { width: 32px; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-header .message-search { display: none; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet)[data-chat-theme="standard"] .messages {
  background: radial-gradient(ellipse at 95% 15%, rgba(52,137,255,.15), transparent 35%),
    radial-gradient(ellipse at 8% 85%, rgba(69,146,255,.19), transparent 42%),
    linear-gradient(160deg, #eef5ff, #dceaff);
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .messages { gap: 18px; padding: 14px 12px 20px; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .message { max-width: 84%; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .message-bubble {
  padding: 11px 13px; border-radius: 18px; box-shadow: 0 5px 16px rgba(27,65,125,.08);
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet)[data-chat-theme="standard"] .message:not(.own) .message-bubble {
  color: #102039; border-color: transparent; background: #fff;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .message.own .message-bubble {
  border-color: transparent; border-radius: 18px; color: #fff; background: #0000ff;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .composer {
  flex: none; grid-template-columns: 30px minmax(0, 1fr) 30px 30px 38px;
  gap: 4px; margin: 8px 10px calc(10px + env(safe-area-inset-bottom)); padding: 8px;
  border: 0; border-radius: 24px; background: #fff;
  box-shadow: 0 8px 24px rgba(27,65,125,.12);
}
body.preview-mobile.phone-list-design.mobile-chat-open .composer { margin-bottom: 20px; }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .composer textarea {
  min-width: 0; min-height: 38px; max-height: 100px; padding: 9px 10px;
  border: 1px solid #e0e9f6; border-radius: 20px; color: #102039; background: #f5f8fc; font-size: 16px;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .composer-tool {
  width: 30px; height: 38px; border: 0; color: #0000ff; background: transparent; box-shadow: none;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .composer-tool.recording { color: #fff; background: var(--danger); }
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .send-button {
  width: 38px; height: 38px; border-radius: 50%; color: #fff; background: #0000ff;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .attachment-menu {
  left: 12px; width: calc(100% - 24px); grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 0; background: #fff;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .attachment-menu button {
  color: #102039; background: #f2f6ff;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .attachment-menu button span {
  color: #fff; background: #0000ff;
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-empty-avatar {
  border-radius: 50%; background: #0000ff; box-shadow: 0 10px 24px rgba(0,0,255,.18);
}
body.phone-list-design.mobile-chat-open:not(.preview-tablet) .chat-options-menu { top: 76px; }
body.preview-mobile.phone-list-design.mobile-chat-open .chat-options-menu { top: 112px; }

body.phone-list-design:has(#groupDialog[open]) .mobile-nav { visibility: hidden; }
body.phone-list-design #groupDialog {
  position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none;
  margin: 0; overflow-y: auto; border: 0; border-radius: 0; box-shadow: none; background: #eaf3ff;
}
body.phone-list-design #groupForm {
  display: grid; grid-template-rows: 40px auto auto minmax(0,1fr) auto; grid-auto-rows: auto; gap: 12px;
  height: 100%; min-height: 430px; padding: calc(20px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  text-align: left; background: radial-gradient(ellipse at 92% 43%, rgba(52,137,255,.17), transparent 44%),
    linear-gradient(160deg, #f3f8ff, #dceaff);
}
body.phone-list-design #groupForm .group-form-header { display: flex; position: relative; align-items: center; justify-content: center; }
body.phone-list-design #groupForm .group-form-header .dialog-icon,
body.phone-list-design #groupForm > p,
body.phone-list-design #closeGroupDialog span { display: none; }
body.phone-list-design #groupForm h2 { margin: 0; color: #102039; font-size: 21px; }
body.phone-list-design #closeGroupDialog {
  position: absolute; inset: 0 auto auto 0; display: grid; place-items: center;
  width: 40px; height: 40px; color: #0000ff; background: #fff; box-shadow: 0 5px 16px rgba(27,65,125,.09);
}
body.phone-list-design #closeGroupDialog .group-back-icon {
  display: block; width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
body.phone-list-design #groupForm .group-form-field,
body.phone-list-design #groupForm .group-members-panel {
  display: block; min-width: 0; padding: 12px; border-radius: 18px; background: #fff;
  box-shadow: 0 5px 16px rgba(27,65,125,.09);
}
body.phone-list-design #groupForm .group-form-field label {
  margin: 0 0 7px; color: #102039; font-size: 12px; font-weight: 700;
}
body.phone-list-design #groupForm .group-form-field input,
body.phone-list-design #groupForm .group-form-field select {
  width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #d5e4ff;
  border-radius: 11px; color: #102039; background: #f2f6ff; font-size: 13px;
}
body.phone-list-design #groupForm #groupCategoryInput { display: none; }
body.phone-list-design #groupForm .group-category-picker { display: block; position: relative; }
body.phone-list-design #groupForm .group-category-picker summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 40px;
  padding: 9px 11px; border: 1px solid #d5e4ff; border-radius: 11px;
  color: #173571; background: #f2f6ff; cursor: pointer; font-size: 12px; list-style: none;
}
body.phone-list-design #groupForm .group-category-picker summary::-webkit-details-marker { display: none; }
body.phone-list-design #groupForm .group-category-picker summary:focus-visible { outline: 3px solid rgba(0,0,255,.25); outline-offset: 2px; }
body.phone-list-design #groupForm .group-category-picker summary svg {
  width: 16px; height: 16px; fill: none; stroke: #0000ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
body.phone-list-design #groupForm .group-category-options {
  position: absolute; z-index: 4; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 5px;
  border: 1px solid #d5e4ff; border-radius: 13px; background: #fff; box-shadow: 0 12px 30px rgba(27,65,125,.18);
}
body.phone-list-design #groupForm .group-category-options legend {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
body.phone-list-design #groupForm .group-category-options label {
  position: relative; display: flex; align-items: center; min-height: 38px; margin: 0; padding: 8px 10px;
  border-radius: 9px; color: #173571; cursor: pointer; font-size: 12px; font-weight: 500;
}
body.phone-list-design #groupForm .group-category-options label:has(input:checked) { color: #0000ff; background: #eaf2ff; font-weight: 700; }
body.phone-list-design #groupForm .group-category-options label:has(input:focus-visible) { outline: 2px solid #0000ff; outline-offset: -2px; }
body.phone-list-design #groupForm .group-category-options input {
  position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0;
}
body.phone-list-design #groupForm .group-members-panel { display: flex; flex-direction: column; min-height: 0; }
body.phone-list-design #groupForm .group-list-label { margin: 0 0 4px; color: #102039; font-size: 12px; font-weight: 700; }
body.phone-list-design #groupForm .group-members-hint { display: block; margin-bottom: 6px; color: #637d99; font-size: 10px; }
body.phone-list-design #groupForm .group-members { min-height: 0; max-height: none; overflow-y: auto; margin: 0; padding: 0; }
body.phone-list-design #groupForm .member-choice {
  grid-template-columns: 36px minmax(0,1fr) 20px; grid-template-areas: "avatar name check" "avatar status check";
  gap: 2px 9px; margin: 0; padding: 9px 2px; border: 0; border-bottom: 1px solid #e8effa; border-radius: 0; background: #fff;
}
body.phone-list-design #groupForm .member-choice input { grid-area: check; width: 18px; height: 18px; accent-color: #0000ff; }
body.phone-list-design #groupForm .member-choice > span {
  grid-area: avatar; width: 36px; height: 36px; border-radius: 50%; color: #0000ff; background: #e5efff;
}
body.phone-list-design #groupForm .member-choice strong {
  grid-area: name; overflow: hidden; color: #102039; text-overflow: ellipsis; white-space: nowrap;
}
body.phone-list-design #groupForm .member-choice small { grid-area: status; color: #637d99; }
body.phone-list-design #groupForm .group-form-status { margin: 0; }
body.phone-list-design #groupForm > .primary-button {
  min-height: 46px; border-radius: 24px; color: #fff; background: #0000ff; box-shadow: 0 7px 18px rgba(0,0,255,.2);
}
body.preview-mobile #groupDialog {
  inset: auto; top: var(--dialog-center-y); left: var(--dialog-center-x);
  width: 368px; height: 822px; border-radius: 45px;
}
body.preview-mobile #groupForm { padding-top: 52px; padding-bottom: 30px; }
body.preview-mobile #groupDialog::before {
  content: ""; position: absolute; top: 10px; left: 50%; width: 112px; height: 31px;
  z-index: 1; pointer-events: none; border-radius: 18px; background: #030509; transform: translateX(-50%);
}
body.preview-mobile #groupDialog::after {
  content: ""; position: absolute; bottom: 8px; left: 50%; width: 128px; height: 5px;
  border-radius: 5px; background: #172235; transform: translateX(-50%);
}

.chat-options-menu { width: 250px; padding: 8px; border: 1px solid #e4ecf8; border-radius: 18px; background: #fff; }
.chat-options-menu button { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 9px 10px; color: #172a43; font-size: 12px; font-weight: 600; }
.chat-options-menu svg, .wallpaper-image-button svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #0000ff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-search-bar { position: relative; z-index: 3; display: flex; gap: 8px; padding: 9px 12px; background: #fff; }
.chat-search-bar input { min-width: 0; flex: 1; padding: 10px 14px; border: 1px solid #e2eafa; border-radius: 18px; background: #f3f7ff; font-size: 16px; }
.chat-search-bar button { width: 36px; border-radius: 50%; color: #0000ff; background: #eef3ff; font-size: 24px; }
.wallpaper-dialog { width: min(92vw, 460px); height: min(88vh, 760px); max-height: 90vh; overflow: hidden; }
.wallpaper-shell { display: flex; height: 100%; flex-direction: column; background: #f1f6ff; }
.wallpaper-shell > header { display: flex; align-items: center; gap: 12px; flex: none; padding: 16px; background: #fff; }
.wallpaper-shell > header button { width: 36px; height: 36px; border-radius: 12px; color: #0000ff; background: #eef3ff; font-size: 27px; }
.wallpaper-shell > header strong, .wallpaper-shell > header small { display: block; }
.wallpaper-shell > header strong { font-size: 16px; }
.wallpaper-shell > header small { margin-top: 3px; color: #647d9a; font-size: 10px; }
.wallpaper-content { min-height: 0; flex: 1; overflow-y: auto; padding: 16px; }
.wallpaper-preview { display: flex; flex-direction: column; justify-content: center; gap: 12px; height: 150px; padding: 20px; border-radius: 20px; background: linear-gradient(160deg, #eef5ff, #dceaff); }
.wallpaper-bubble { align-self: flex-start; padding: 10px 14px; border-radius: 16px; color: #172a43; background: #fff; font-size: 12px; box-shadow: 0 4px 12px #1635631a; }
.wallpaper-bubble.own { align-self: flex-end; color: #fff; background: #0000ff; }
.wallpaper-content h3 { margin: 20px 0 10px; color: #172a43; font-size: 13px; }
.wallpaper-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.wallpaper-grid button { min-width: 0; padding: 0 0 8px; overflow: hidden; border: 2px solid transparent; border-radius: 14px; color: #172a43; background: #fff; font-size: 11px; font-weight: 600; }
.wallpaper-grid button span { display: block; height: 65px; margin-bottom: 7px; }
.wallpaper-grid button[aria-pressed="true"], .wallpaper-colors button[aria-pressed="true"] { border-color: #0000ff; }
.wallpaper-colors { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wallpaper-colors button, .wallpaper-custom-color { width: 38px; height: 38px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 8px #153d6920; }
.wallpaper-custom-color { position: relative; display: grid; place-items: center; overflow: hidden; color: #0000ff; background: #fff; font-size: 24px; cursor: pointer; }
.wallpaper-custom-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.wallpaper-image-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 22px; padding: 14px; border-radius: 16px; color: #0000ff; background: #fff; font-size: 12px; font-weight: 700; }
.wallpaper-content p { margin: 12px 0 0; color: #647d9a; font-size: 10px; }
@media (max-width: 760px) {
  body:not(.preview-tablet) .wallpaper-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; border-radius: 0; }
  body:not(.preview-mobile) .wallpaper-shell { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}
body.preview-mobile #wallpaperDialog {
  position: fixed; top: var(--dialog-center-y); left: var(--dialog-center-x); right: auto; bottom: auto;
  width: 368px; height: 822px; max-width: none; max-height: none; margin: 0; border-radius: 45px;
  transform: scale(var(--dialog-scale)) translate(-50%, -50%); transform-origin: top left;
}
body.preview-mobile #wallpaperDialog .wallpaper-shell { padding-top: 52px; padding-bottom: 30px; }
body.preview-mobile #wallpaperDialog::before { content: ""; position: absolute; top: 10px; left: 50%; z-index: 1; width: 112px; height: 31px; border-radius: 18px; background: #030509; transform: translateX(-50%); }
body.preview-mobile #wallpaperDialog::after { content: ""; position: absolute; bottom: 8px; left: 50%; width: 128px; height: 5px; border-radius: 5px; background: #172235; transform: translateX(-50%); }
body.preview-mobile #wallpaperDialog::backdrop { background: transparent; backdrop-filter: none; }

body .chat-screen .messages .message.own .message-bubble:has(audio),
body.phone-list-design .chat-screen .messages .message.own .message-bubble:has(audio) {
  padding: 0; border: 0; color: #13233a; background: transparent; box-shadow: none;
}
.message.own .message-bubble:has(audio) audio:first-child { margin-top: 0; }
.message.own .message-bubble:has(audio) :is(p, .message-quote, .forwarded-label) {
  padding: 8px 10px; border-radius: 12px; color: #13233a; background: #fff;
}

body.preview-mobile:has(.call-screen:not([hidden])) .sidebar,
body.preview-mobile:has(.call-screen:not([hidden])) .mobile-nav { display: none; }
body.preview-mobile:has(.call-screen:not([hidden])) .workspace { position: absolute; inset: 0; display: flex; padding: 0; }
body.preview-mobile:has(.call-screen:not([hidden])) .topbar { display: none; }
body.preview-mobile:has(.call-screen:not([hidden])) .stage { width: 100%; height: 100%; flex: 1; border: 0; border-radius: 0; }
body.preview-mobile .call-meta { top: 60px; left: 20px; }
body.preview-mobile .call-controls { bottom: 26px; }

@media (max-width: 760px) {
  body:not(.preview-mobile):not(.preview-tablet):has(.call-screen:not([hidden])) .sidebar,
  body:not(.preview-mobile):not(.preview-tablet):has(.call-screen:not([hidden])) .mobile-nav { display: none; }
  body:not(.preview-mobile):not(.preview-tablet):has(.call-screen:not([hidden])) .workspace { position: fixed; inset: 0; z-index: 10; display: flex; height: 100dvh; padding: 0; }
  body:not(.preview-mobile):not(.preview-tablet):has(.call-screen:not([hidden])) .topbar { display: none; }
  body:not(.preview-mobile):not(.preview-tablet):has(.call-screen:not([hidden])) .stage { width: 100%; height: 100%; flex: 1; border: 0; border-radius: 0; }
  body:not(.preview-mobile) .call-meta { top: calc(20px + env(safe-area-inset-top)); }
  body:not(.preview-mobile) .call-controls { bottom: calc(20px + env(safe-area-inset-bottom)); }
}

.call-video-panel { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.call-video-panel video { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--video-zoom, 1)); }
.call-screen.front-camera #localVideo { transform: scaleX(-1) scale(var(--video-zoom, 1)); }
.call-screen > #localVideo { position: absolute; right: 24px; bottom: 112px; width: 140px; height: 180px; object-fit: cover; border: 2px solid #fff; border-radius: 14px; background: #111; box-shadow: 0 14px 35px #0008; }
.call-screen:not(.videos-swapped) .local-panel,
.call-screen.videos-swapped .remote-panel {
  inset: auto 24px 112px auto; z-index: 2; width: 140px; height: 180px;
  border: 2px solid #fff; border-radius: 14px; background: #111;
  box-shadow: 0 14px 35px #0008; cursor: grab;
}
.call-screen:not(.videos-swapped) .local-panel video,
.call-screen.videos-swapped .remote-panel video { position: static; width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.call-screen.videos-swapped .local-panel video { position: static; width: 100%; height: 100%; border: 0; border-radius: 0; background: #111; box-shadow: none; }
.call-screen.videos-swapped .remote-placeholder .call-placeholder-avatar { width: 55px; height: 55px; }
.call-meta { z-index: 3; pointer-events: none; }
.call-controls { z-index: 4; width: min(390px, calc(100% - 24px)); gap: 5px; padding: 12px 10px; transition: opacity .2s, visibility .2s; }
.call-controls .control-button { display: flex; align-items: center; justify-content: center; flex: 0 1 52px; width: 52px; height: auto; aspect-ratio: 1; min-width: 0; padding: 0; line-height: 0; background: transparent; }
.call-screen:not(.audio-call) .call-controls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.call-screen:not(.audio-call) .control-button { justify-self: center; width: min(52px, 100%); }
.call-controls .control-button::before { width: 27px; height: 27px; filter: brightness(0) saturate(100%) invert(16%) sepia(100%) saturate(6500%) hue-rotate(230deg); }
.call-controls .control-button.off::before { opacity: .55; }
.call-controls .end-button::before { filter: brightness(0) saturate(100%) invert(28%) sepia(91%) saturate(3100%) hue-rotate(338deg); }
.call-controls .control-button:focus-visible { outline: 3px solid #7bb5ff; outline-offset: 3px; }
#switchCameraButton::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v10H4z'/%3E%3Cpath d='M9 13a3 3 0 0 1 5-2l1 1M15 13a3 3 0 0 1-5 2l-1-1'/%3E%3C/svg%3E"); }
#cameraButton.off::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h10a2 2 0 0 1 2 2v3l5-3v10l-5-3v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7M3 3l18 18'/%3E%3C/svg%3E"); }
#speakerButton.off::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4ZM17 9l4 6M21 9l-4 6'/%3E%3C/svg%3E"); }
.call-screen.controls-hidden .call-controls { visibility: hidden; opacity: 0; pointer-events: none; }
.audio-call .local-panel { display: none; }
body.preview-mobile .call-screen:not(.videos-swapped) .local-panel,
body.preview-mobile .call-screen.videos-swapped .remote-panel { right: 16px; bottom: 120px; width: 95px; height: 125px; }
body.preview-mobile .call-screen > #localVideo { right: 16px; bottom: 120px; width: 95px; height: 125px; }
@media (max-width: 760px) {
  body:not(.preview-mobile) .call-screen:not(.videos-swapped) .local-panel,
  body:not(.preview-mobile) .call-screen.videos-swapped .remote-panel { right: 16px; bottom: calc(120px + env(safe-area-inset-bottom)); width: 95px; height: 125px; }
  body:not(.preview-mobile) .call-screen > #localVideo { right: 16px; bottom: calc(120px + env(safe-area-inset-bottom)); width: 95px; height: 125px; }
}

.sound-settings { display: block; }
.sound-settings .sound-heading label { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; }
.sound-settings .sound-setting { margin-top: 16px; }
.sound-settings .sound-setting small { overflow-wrap: anywhere; }
.sound-settings .sound-setting > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sound-settings .sound-setting button { padding: 8px 11px; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 11px; }
.sound-settings > small { margin-top: 14px; }

.audio-call::after { content: "MOIN"; position: absolute; z-index: 3; top: calc(26px + env(safe-area-inset-top)); right: 24px; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 2px; }
body.preview-mobile .audio-call::after { top: 55px; }
.audio-call .remote-placeholder { overflow: hidden; background: linear-gradient(155deg, #0d1638 10%, #123a87 55%, #1665c0); }
.audio-call .remote-placeholder::before,
.audio-call .remote-placeholder::after { content: ""; position: absolute; top: 38%; left: 50%; width: 180px; height: 180px; border: 2px dashed #83e3ff; border-radius: 50%; opacity: var(--voice-opacity, .16); transform: translate(-50%, -50%) scale(var(--voice-scale, 1)); transition: transform .1s ease-out, opacity .1s ease-out; pointer-events: none; }
.audio-call .remote-placeholder::after { width: 155px; height: 155px; border-style: solid; opacity: var(--voice-opacity-inner, .28); }
.audio-call .call-placeholder-avatar { position: absolute; z-index: 1; top: 38%; left: 50%; width: 114px; height: 114px; border: 3px solid #cceeff; background-color: #315ae8; box-shadow: 0 0 35px #46c0ff7a; transform: translate(-50%, -50%); }
.audio-call .call-placeholder-avatar.with-profile-photo { display: grid; place-items: center; overflow: hidden; color: #fff; background-image: none; font-size: 38px; font-weight: 700; }
.audio-call .call-meta, body.preview-mobile .audio-call .call-meta, body:not(.preview-mobile) .audio-call .call-meta { top: calc(38% + 76px); right: 20px; left: 20px; display: block; text-align: center; }
.audio-call .call-avatar { display: none; }
.audio-call .call-meta strong { font-size: 21px; }
.audio-call .call-state { justify-content: center; color: #c9daff; font-size: 12px; }
.call-duration { display: block; margin-top: 14px; color: #c9daff; font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.minimize-call-button { position: absolute; z-index: 5; top: calc(20px + env(safe-area-inset-top)); left: 20px; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: #06153e99; font-size: 32px; line-height: 1; }
.call-screen.controls-hidden .minimize-call-button { visibility: hidden; }
body.preview-mobile .minimize-call-button { top: 50px; }
.return-call-button { position: fixed; z-index: 50; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); display: grid; place-items: center; overflow: hidden; width: 142px; height: 168px; padding: 8px; border: 2px solid #fff; border-radius: 18px; color: #fff; background: linear-gradient(155deg, #0d1638, #1665c0); box-shadow: 0 5px 18px #001c5a55; }
.return-call-button video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.return-call-avatar { width: 70px; height: 70px; box-shadow: 0 0 0 8px #ffffff18; }
.return-call-avatar.with-profile-photo { display: grid; place-items: center; overflow: hidden; color: #fff; background-image: none; font-size: 24px; font-weight: 700; }
.return-call-caption { position: absolute; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; gap: 3px; overflow: hidden; padding: 20px 8px 8px; background: linear-gradient(transparent, #071329e6); text-align: left; }
.return-call-caption strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.return-call-caption small { font-size: 9px; }
body.preview-mobile .return-call-button { position: absolute; bottom: 94px; }
@media (max-width: 760px) { .return-call-button { bottom: calc(90px + env(safe-area-inset-bottom)); } }
.call-screen .call-controls { bottom: calc(28px + env(safe-area-inset-bottom)); width: min(390px, calc(100% - 32px)); padding: 10px 8px 26px; border-radius: 20px; background: #0c193ce8; box-shadow: 0 10px 28px #0004; }
body.preview-mobile .audio-call .call-controls { bottom: 30px; }
.call-screen .control-button { position: relative; }
.call-screen .control-button::before { filter: none; }
.call-screen .end-button::before { filter: brightness(0) saturate(100%) invert(28%) sepia(91%) saturate(3100%) hue-rotate(338deg); }
.call-screen .control-button::after { position: absolute; top: calc(100% + 3px); color: #fff; font-size: 10px; line-height: 1; }
.call-screen #micButton::after { content: "Mikrofon"; }
.call-screen #cameraButton::after { content: "Kamera"; }
.call-screen #switchCameraButton::after { content: "Wechseln"; }
.call-screen #speakerButton::after { content: "Audio"; }
.call-screen #endButton::after { content: "Beenden"; }
.call-screen:not(.audio-call)::after { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(#07132990, transparent 30%, transparent 57%, #071329e6); pointer-events: none; }
.call-screen:not(.audio-call) .call-avatar { display: none; }
.call-screen:not(.audio-call) .call-meta,
body.preview-mobile .call-screen:not(.audio-call) .call-meta,
body:not(.preview-mobile) .call-screen:not(.audio-call) .call-meta { top: auto; right: 20px; bottom: calc(130px + env(safe-area-inset-bottom)); left: 24px; }
.call-screen:not(.audio-call) .call-meta strong { font-size: 19px; }
.call-screen:not(.audio-call) .call-duration { margin-top: 6px; }
.call-screen:not(.audio-call):not(.videos-swapped) .local-panel,
.call-screen:not(.audio-call).videos-swapped .remote-panel { top: 18%; bottom: auto; }
@media (prefers-reduced-motion: reduce) {
  .audio-call .remote-placeholder::before, .audio-call .remote-placeholder::after { transform: translate(-50%, -50%); opacity: .2; transition: none; }
}
