:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --tab: #f0f2f8;
  --chat-bg: #e8edf4;
  --bubble-in: #ffffff;
  --bubble-out: #426fca;
  --text: #0f1117;
  --text-muted: #8891a5;
  --accent: #426fca;
  --accent2: #5b8ad4;
  --border: #e4e8f0;
  --green: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --unread-accent: #426fca;
  --gradient: linear-gradient(135deg, #426fca, #5b8ad4);
  --r: 16px;
  --r-sm: 10px;
  --r-xs: 6px;
  --r-bubble: 16px;
  --bubble-group-gap: 2px;
  --bubble-block-gap: 10px;
  --list-row-h: 4.5rem;
  --shadow: 0 2px 12px rgb(15 17 23 / 6%);
  --app-shell-max: 480px;
  --list-pane-width: 100%;
  --bubble-max: 85%;
  --image-bubble-max: 180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: var(--app-shell-max);
  margin: 0 auto;
  background: var(--bg);
}

.app-header {
  display: none;
}

.app-header-btn {
  display: none;
  padding: 0.375rem 0.625rem;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.app-header-btn:active {
  background: var(--tab);
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.screen.is-active {
  display: flex;
}

.screen-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* ── LOGIN ── */
.login-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 2rem 1.25rem 1.5rem;
  background: var(--bg);
}

.login-form {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-logo {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.875rem;
}

.login-title {
  margin: 0 0 0.25rem;
  font-size: 1.375rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.login-sub {
  margin: 0 0 2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.field-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field select,
.field input {
  width: 100%;
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
}

.field select:focus,
.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-error {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--r-sm);
  background: rgb(239 68 68 / 10%);
  color: var(--danger);
  font-size: 0.875rem;
  text-align: center;
}

.btn-primary {
  width: 100%;
  padding: 0.8125rem 1rem;
  border: none;
  border-radius: var(--r-sm);
  background: var(--gradient);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-footnote {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── SETTINGS (Telegram-style) ── */
.settings-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  width: 100%;
  max-width: var(--app-shell-max);
  margin: 0 auto;
  background: var(--bg);
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.875rem 0.75rem 0.75rem;
  padding-top: max(0.875rem, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.settings-header-title {
  flex: 1;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.settings-back {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.settings-back:active {
  background: var(--tab);
}

.settings-body {
  padding: 0.75rem 0 1.5rem;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
}

.settings-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.settings-profile-text {
  min-width: 0;
}

.settings-profile-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.settings-profile-sub {
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.settings-group-label {
  margin: 0 1rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}

.settings-group {
  margin: 0 0 0.75rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.settings-group-spaced {
  margin-top: 1.5rem;
}

.settings-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 1rem;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  color: var(--text);
}

.settings-row-toggle {
  gap: 0.75rem;
  cursor: pointer;
}

.settings-row-main {
  flex: 1;
  min-width: 0;
}

.settings-row-label {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}

.settings-row-sub {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.settings-toggle-wrap {
  position: relative;
  flex-shrink: 0;
  width: 3rem;
  height: 1.75rem;
}

.settings-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.settings-toggle:disabled {
  cursor: not-allowed;
}

.settings-toggle-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #c5cad6;
  transition: background 0.2s ease;
}

.settings-toggle-track::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(15 17 23 / 18%);
  transition: transform 0.2s ease;
}

.settings-toggle:checked + .settings-toggle-track {
  background: var(--accent);
}

.settings-toggle:checked + .settings-toggle-track::after {
  transform: translateX(1.25rem);
}

.settings-toggle:disabled + .settings-toggle-track {
  opacity: 0.45;
}

.settings-row-logout {
  justify-content: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--danger);
  cursor: pointer;
}

.settings-row-logout:active {
  background: var(--tab);
}

.list-header-icon-btn,
.app-header-icon-btn {
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.375rem 0.5rem;
}

/* ── LIST ── */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem 0.75rem;
  padding-top: max(0.875rem, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.list-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.list-header-btn {
  padding: 0.375rem 0.625rem;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.list-header-btn:active {
  background: var(--tab);
}

.thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg);
}

.thread-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: var(--list-row-h);
  padding: 0.625rem 1rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.thread-item:hover:not(:disabled) {
  background: var(--tab);
}

.thread-item:active:not(:disabled) {
  background: #e8ebf3;
}

.thread-item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.thread-item.has-unread .thread-name,
.thread-item.has-unread .thread-preview {
  font-weight: 600;
  color: var(--text);
}

.thread-item.has-unread .thread-time {
  color: var(--unread-accent);
  font-weight: 600;
}

.thread-avatar {
  width: 3rem;
  height: 3rem;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  user-select: none;
}

.avatar-tone-egor {
  background: #426fca;
}

.avatar-tone-olya {
  background: #2db89f;
}

.avatar-tone-person3 {
  background: #7d69b3;
}

.thread-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.thread-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.thread-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-preview {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-preview-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.thread-preview-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.thread-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.thread-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.thread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.4rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
}

/* ── CHAT HEADER ── */
.offline-banner {
  padding: 0.5rem 1rem;
  background: var(--warn);
  color: #fff;
  font-size: 0.8125rem;
  text-align: center;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  padding-top: max(0.625rem, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.chat-back {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.chat-header-avatar {
  width: 2.25rem;
  height: 2.25rem;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  user-select: none;
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
}

.chat-header-status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.chat-status-encrypted {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
}

.chat-status-encrypted .chat-status-icon {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.75;
}

.chat-status-secure {
  color: var(--text-muted);
}

.chat-call-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.chat-call-btn:active {
  background: var(--surface-2);
}

.chat-call-icon {
  width: 1.375rem;
  height: 1.375rem;
  opacity: 0.9;
}

.call-in-app-state {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.call-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  background: #000;
}

.call-overlay[hidden] {
  display: none !important;
}

body.call-overlay-open {
  overflow: hidden;
}

.call-overlay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  padding-top: max(0.625rem, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.call-overlay-title {
  font-weight: 600;
  color: var(--text);
}

.call-hangup-btn {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  background: #e53935;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.call-overlay-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #111;
}

.bubble-call-invite {
  max-width: 16rem;
}

.call-invite-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
}

.call-invite-label {
  font-size: 0.875rem;
  font-weight: 600;
}

.call-invite-expired {
  opacity: 0.55;
}

.call-join-btn {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 0.375rem 0.875rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.call-join-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* unlock bottom sheet */
.unlock-overlay {
  position: fixed;
  inset: 0;
  z-index: 57;
  border: none;
  padding: 0;
  margin: 0;
  background: rgb(15 17 23 / 40%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.unlock-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.unlock-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  z-index: 58;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 1rem 1.25rem;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -10px 32px rgb(15 17 23 / 12%);
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.24s;
}

.unlock-sheet[hidden] {
  display: none !important;
}

.unlock-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.unlock-sheet-handle {
  width: 2.25rem;
  height: 0.25rem;
  margin: 0.125rem auto 0.25rem;
  border-radius: 999px;
  background: var(--border);
  flex-shrink: 0;
}

.unlock-sheet-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.unlock-sheet-desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
}

.thread-unlock-sheet-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.thread-unlock-sheet-form input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
}

.thread-unlock-sheet-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.thread-unlock-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--r-sm);
  background: var(--gradient);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.thread-unlock-error {
  margin: 0;
  padding: 0.625rem 0.75rem;
  border-radius: var(--r-sm);
  background: rgb(239 68 68 / 10%);
  color: var(--danger);
  font-size: 0.8125rem;
  text-align: center;
}

.thread-unlock-forget {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8125rem;
  text-decoration: underline;
  cursor: pointer;
}

.thread-unlock-forget:hover {
  color: var(--text);
}

.locked-compose-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: var(--tab);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
}

.locked-compose-banner[hidden] {
  display: none !important;
}

.locked-compose-banner .chat-status-icon {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.7;
}

/* ── MESSAGES ── */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: var(--bubble-block-gap);
  padding: 0.75rem;
  background-color: var(--chat-bg);
  background-image: radial-gradient(circle at 1px 1px, rgb(66 111 202 / 4%) 1px, transparent 0);
  background-size: 20px 20px;
}

.date-separator {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0;
}

.date-separator span {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 1px 4px rgb(15 17 23 / 6%);
}

.msg-block {
  display: flex;
  flex-direction: column;
  gap: var(--bubble-group-gap);
  max-width: var(--bubble-max);
}

.msg-block.in {
  align-self: flex-start;
}

.msg-block.out {
  align-self: flex-end;
}

.chat-empty {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.empty-chat-img {
  width: 180px;
  height: 140px;
  object-fit: contain;
}

.chat-empty-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.chat-empty-sub {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 16rem;
}

.msg-wrap {
  display: flex;
  flex-direction: column;
}

.msg-wrap.in {
  align-items: flex-start;
}

.msg-wrap.out {
  align-items: flex-end;
}

.bubble {
  max-width: 100%;
  border-radius: var(--r-bubble);
  position: relative;
  box-shadow: 0 1px 2px rgb(15 17 23 / 6%);
  touch-action: pan-y;
}

.bubble-in {
  background: var(--bubble-in);
  color: var(--text);
}

.bubble-out {
  background: var(--bubble-out);
  color: #fff;
}

/* grouped bubble radii — outgoing (right) */
.msg-block.out .bubble-only,
.msg-block.out .bubble-last {
  border-bottom-right-radius: 4px;
}

.msg-block.out .bubble-first {
  border-bottom-right-radius: 4px;
}

.msg-block.out .bubble-middle,
.msg-block.out .bubble-last {
  border-top-right-radius: 4px;
}

.msg-block.out .bubble-middle,
.msg-block.out .bubble-first:not(.bubble-only) {
  border-bottom-right-radius: 4px;
}

/* grouped bubble radii — incoming (left) */
.msg-block.in .bubble-only,
.msg-block.in .bubble-last {
  border-bottom-left-radius: 4px;
}

.msg-block.in .bubble-first {
  border-bottom-left-radius: 4px;
}

.msg-block.in .bubble-middle,
.msg-block.in .bubble-last {
  border-top-left-radius: 4px;
}

.msg-block.in .bubble-middle,
.msg-block.in .bubble-first:not(.bubble-only) {
  border-bottom-left-radius: 4px;
}

.bubble-locked {
  opacity: 0.88;
}

.bubble-locked .bubble-play {
  pointer-events: none;
  opacity: 0.55;
}

.bubble-body {
  padding: 0.5625rem 0.75rem;
}

.bubble-text-content {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble-locked-text {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
  opacity: 0.85;
}

.bubble-locked-text .bubble-lock-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  opacity: 0.75;
}

.bubble-out .bubble-locked-text .bubble-lock-icon {
  filter: brightness(0) invert(1);
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  font-size: 0.625rem;
  margin-top: 0.25rem;
  padding: 0 0.75rem 0.5rem;
}

.bubble-text .bubble-meta,
.bubble-image .bubble-meta,
.bubble-video .bubble-meta {
  padding: 0 0.5rem 0.375rem;
}

.bubble:not(.bubble-text):not(.bubble-image):not(.bubble-video) .bubble-meta {
  padding-top: 0;
}

.bubble-in .bubble-meta {
  color: var(--text-muted);
}

.bubble-out .bubble-meta {
  color: rgb(255 255 255 / 65%);
}

.bubble-status img {
  width: 1rem;
  height: auto;
  display: block;
}

.bubble-out .bubble-status img {
  filter: brightness(0) invert(1);
  opacity: 0.72;
}

.bubble-out .bubble-status.heard img {
  filter: none;
  opacity: 1;
}

.bubble-in .bubble-status.heard img {
  opacity: 1;
}

.bubble-status.pending {
  font-size: 0.75rem;
}

/* audio */
.audio-bubble {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-width: 12.5rem;
}

.bubble-play {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
}

.bubble-in .bubble-play {
  background: var(--accent);
}

.bubble-out .bubble-play {
  background: rgb(255 255 255 / 22%);
}

.bubble-play .kz-icon-bubble {
  width: 0.875rem;
  height: 0.875rem;
  display: block;
}

.waveform {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.5px;
  height: 1.75rem;
  position: relative;
  cursor: pointer;
  min-width: 0;
}

.wf-bar {
  width: 2px;
  border-radius: 2px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.bubble-in .wf-bar {
  background: var(--accent);
}

.bubble-out .wf-bar {
  background: rgb(255 255 255 / 60%);
}

.wf-bar.rest {
  opacity: 0.35;
}

.bubble-progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.audio-dur {
  font-size: 0.6875rem;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.bubble-in .audio-dur {
  color: var(--text-muted);
}

.bubble-out .audio-dur {
  color: rgb(255 255 255 / 70%);
}

.audio-speed {
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  cursor: pointer;
  margin-left: 4px;
  flex-shrink: 0;
}

.bubble-out .audio-speed {
  background: rgba(255, 255, 255, 0.2);
}

/* image / video */
.bubble-image,
.bubble-video {
  display: flex;
  flex-direction: column;
  padding: 0.25rem;
  max-width: var(--bubble-max);
}

.bubble-image-btn,
.bubble-video-btn {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
}

.bubble-thumb {
  display: block;
  max-width: var(--image-bubble-max);
  max-height: calc(var(--image-bubble-max) * 1.333);
  border-radius: 12px;
  object-fit: cover;
}

.bubble-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--image-bubble-max);
  max-width: 100%;
  height: calc(var(--image-bubble-max) * 0.778);
  border-radius: 12px;
  font-size: 0.875rem;
}

.bubble-in .bubble-thumb-placeholder {
  background: #d8dce8;
  color: var(--text-muted);
}

.bubble-out .bubble-thumb-placeholder {
  background: rgb(255 255 255 / 15%);
  color: rgb(255 255 255 / 70%);
}

.bubble-image-overlay,
.bubble-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgb(0 0 0 / 22%);
  color: #fff;
  font-size: 1.25rem;
  pointer-events: none;
}

.bubble-play-overlay {
  font-size: 0.8125rem;
  gap: 0.25rem;
}

.inline-video {
  display: block;
  width: 100%;
  max-width: var(--image-bubble-max);
  margin-top: 0.25rem;
  border-radius: 12px;
}

#screen-chat {
  position: relative;
}

#screen-chat .chat-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: calc(var(--compose-inset, 4.5rem) + env(safe-area-inset-bottom));
}

.reply-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.reply-bar[hidden] {
  display: none !important;
}

.reply-bar-accent {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--kz-accent);
  flex-shrink: 0;
}

.reply-bar-body {
  flex: 1;
  min-width: 0;
}

.reply-bar-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-bar-cancel {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  flex-shrink: 0;
}

.bubble-reply-quote {
  display: block;
  width: 100%;
  margin-bottom: 0.375rem;
  padding: 0.375rem 0.5rem;
  border: none;
  border-left: 3px solid var(--kz-accent);
  border-radius: 0.375rem;
  background: rgb(0 0 0 / 6%);
  text-align: left;
  cursor: pointer;
}

.bubble-out .bubble-reply-quote {
  background: rgb(255 255 255 / 12%);
}

.bubble-reply-author {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--kz-accent);
}

.bubble-reply-preview {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bubble-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.reaction-pill {
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}

.reaction-pill.reaction-own {
  box-shadow: 0 0 0 1px var(--kz-accent);
  background: rgb(66 111 202 / 10%);
}

.reaction-count {
  margin-left: 0.125rem;
  font-size: 0.625rem;
  font-weight: 600;
}

.reaction-picker {
  position: fixed;
  z-index: 100;
  display: flex;
  gap: 0.25rem;
  padding: 0.375rem 0.5rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.reaction-pick {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.125rem;
}

.bubble-highlight {
  animation: bubble-flash 1.5s ease;
}

@keyframes bubble-flash {
  0%,
  100% {
    filter: none;
  }
  20% {
    filter: brightness(1.15);
  }
}

/* ── COMPOSE ── */
.compose-chrome {
  position: sticky;
  bottom: 0;
  z-index: 50;
  width: 100%;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgb(15 17 23 / 4%);
}

.attach-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  border: none;
  padding: 0;
  margin: 0;
  background: rgb(15 17 23 / 32%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.attach-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.attach-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  z-index: 56;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: min(40vh, 16rem);
  overflow-y: auto;
  padding: 0.375rem 0.75rem 0.625rem;
  background: var(--surface);
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -10px 32px rgb(15 17 23 / 10%);
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.24s;
}

.attach-sheet[hidden] {
  display: none !important;
}

.attach-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.attach-sheet-handle {
  width: 2.25rem;
  height: 0.25rem;
  margin: 0.125rem auto 0.375rem;
  border-radius: 999px;
  background: var(--border);
  flex-shrink: 0;
}

.attach-sheet-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border: none;
  border-radius: var(--r-sm);
  background: var(--tab);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  flex-shrink: 0;
}

.attach-sheet-item:active {
  background: #e8ebf3;
}

.attach-sheet-icon {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
  max-width: 1.375rem;
  max-height: 1.375rem;
  flex: 0 0 1.375rem;
  object-fit: contain;
  pointer-events: none;
}

.attach-sheet-item > span {
  flex: 1;
  min-width: 0;
}

.attach-sheet-cancel {
  margin-top: 0.25rem;
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.attach-sheet-cancel:active {
  color: var(--text);
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  background: transparent;
  border-top: none;
}

.compose-bar {
  flex-direction: row;
  align-items: center;
}

.attach-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease;
}

.emoji-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease;
}

.emoji-btn.is-active {
  opacity: 0.85;
}

.emoji-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.attach-btn.is-active {
  opacity: 0.85;
}

.attach-btn .attach-icon {
  transition: transform 0.2s ease;
}

.attach-btn.is-active .attach-icon {
  transform: rotate(45deg);
}

.attach-btn .kz-icon,
.emoji-btn .kz-icon-glyph {
  width: 1.375rem;
  height: 1.375rem;
}

.attach-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.text-input {
  flex: 1;
  min-width: 0;
  max-height: 6rem;
  min-height: 2.375rem;
  padding: 0.5625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: #eef1f6;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
}

.text-input::placeholder {
  color: var(--text-muted);
}

.text-input:disabled {
  opacity: 0.5;
}

.record-btn,
.send-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  touch-action: none;
  user-select: none;
  transition: opacity 0.15s ease;
}

.record-btn[hidden],
.send-btn[hidden] {
  display: none !important;
}

.record-btn .kz-icon,
.send-btn .kz-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.record-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.record-btn.is-recording {
  animation: record-pulse 1s ease-in-out infinite;
}

.record-btn.is-cancel {
  transform: translateX(-4rem);
  opacity: 0.7;
}

@keyframes record-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(66 111 202 / 35%);
  }
  50% {
    box-shadow: 0 0 0 0.375rem rgb(66 111 202 / 0%);
  }
}

.record-timer {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.record-lock-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.record-lock-bar[hidden] {
  display: none !important;
}

.record-lock-cancel {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 8%);
  color: var(--danger);
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.record-lock-pulse {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.record-lock-timer {
  flex: 1;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.record-lock-send {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
}

.record-lock-send img {
  width: 1.25rem;
  height: 1.25rem;
}

.record-lock-preview {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 8%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
}

.record-lock-preview img {
  width: 1rem;
  height: 1rem;
}

.audio-unheard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kz-accent);
  flex-shrink: 0;
}

.scroll-down-btn {
  position: absolute;
  right: 1rem;
  bottom: calc(var(--compose-inset, 4.5rem) + 0.75rem);
  z-index: 20;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-down-btn[hidden] {
  display: none !important;
}

.scroll-down-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--kz-accent);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
}

.scroll-down-badge[hidden] {
  display: none !important;
}

.chat-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0.75rem;
}

.skeleton-bubble {
  height: 2.75rem;
  border-radius: 1rem;
  background: linear-gradient(
    90deg,
    rgb(0 0 0 / 6%) 25%,
    rgb(0 0 0 / 10%) 50%,
    rgb(0 0 0 / 6%) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-in {
  align-self: flex-start;
  width: 55%;
}

.skeleton-out {
  align-self: flex-end;
  width: 45%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.emoji-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  max-height: min(18rem, 42vh);
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgb(15 17 23 / 8%);
}

.emoji-panel[hidden] {
  display: none !important;
}

.emoji-panel-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.125rem;
  padding: 0.5rem 0.625rem;
}

.emoji-panel-item {
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: var(--r-xs);
  background: transparent;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.emoji-panel-item:hover {
  background: var(--tab);
}

.emoji-panel-tabs {
  display: flex;
  gap: 0.125rem;
  padding: 0.375rem 0.5rem calc(0.375rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--tab);
  overflow-x: auto;
}

.emoji-panel-tab {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: var(--r-xs);
  background: transparent;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.emoji-panel-tab.is-active {
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* removed old attach-sheet block */
/* ── LIGHTBOX ── */
#lightbox {
  padding: 0;
  border: none;
  max-width: 100vw;
  max-height: 100vh;
  background: rgb(0 0 0 / 92%);
}

#lightbox::backdrop {
  background: rgb(0 0 0 / 85%);
}

#lightbox-img {
  display: block;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
}

#lightbox-close {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: 0.75rem;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 55%);
  color: #fff;
  font-size: 1.125rem;
  cursor: pointer;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(5rem + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  transform: translateX(-50%) translateY(1rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.kz-icon,
.kz-icon-glyph {
  display: block;
  pointer-events: none;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.splash-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── RESPONSIVE LAYOUT ── */
.main-shell {
  display: contents;
}

.chat-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
}

.chat-pane[hidden],
.chat-shell-empty[hidden] {
  display: none !important;
}

.chat-shell-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--chat-bg);
}

.chat-shell-empty-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.chat-shell-empty-sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.layout-wide {
  --app-shell-max: 100%;
  --list-pane-width: 340px;
  --bubble-max: 72%;
  --image-bubble-max: 280px;
}

.layout-desktop {
  --app-shell-max: 1280px;
  --list-pane-width: 380px;
  --bubble-max: 65%;
  --image-bubble-max: 360px;
}

.layout-wide .main-shell:not([hidden]),
.layout-desktop .main-shell:not([hidden]) {
  display: flex;
  flex: 1;
  min-height: 0;
}

.layout-wide .main-shell[hidden],
.layout-desktop .main-shell[hidden] {
  display: none;
}

.layout-wide #screen-list,
.layout-desktop #screen-list {
  width: var(--list-pane-width);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}

.layout-wide #screen-chat,
.layout-desktop #screen-chat {
  flex: 1;
  min-width: 0;
}

.layout-wide .chat-back,
.layout-desktop .chat-back {
  display: none;
}

.layout-wide .thread-item.is-selected,
.layout-desktop .thread-item.is-selected {
  background: var(--tab);
}

.layout-wide .list-header,
.layout-desktop .list-header {
  display: none;
}

.layout-wide .app-header:not([hidden]),
.layout-desktop .app-header:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.layout-wide .app-title,
.layout-desktop .app-title {
  font-size: 1.0625rem;
  font-weight: 700;
}

.layout-wide .app-user,
.layout-desktop .app-user {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: auto;
}

.layout-wide .app-header-btn,
.layout-desktop .app-header-btn {
  display: inline-flex;
  flex-shrink: 0;
}

.layout-wide #app-settings,
.layout-desktop #app-settings {
  margin-left: 0.25rem;
}

.layout-desktop .login-form {
  max-width: 28rem;
}

.layout-desktop .login-screen {
  padding: 3rem 2rem 2rem;
}

.layout-desktop #lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: 90vh;
}

.layout-wide .toast,
.layout-desktop .toast {
  left: auto;
  right: 1.5rem;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateY(1rem);
}

.layout-wide .toast.is-visible,
.layout-desktop .toast.is-visible {
  transform: translateY(0);
}
