body.messenger-page {
  /* WhatsApp Web light palette — zero purple */
  --ym-purple: #00a884;
  --ym-purple-dark: #008f72;
  --ym-purple-light: #25d366;
  --ym-lavender: #f0f2f5;
  --ym-lavender-dark: #e9edef;
  --ym-border: #e9edef;
  --ym-bg-gradient: #f0f2f5;
  --ms-app-bg: #f0f2f5;
  --ms-sidebar-bg: #ffffff;
  --ms-sidebar-border: #e9edef;
  --ms-search-bg: #f0f2f5;
  --ms-ink: #111b21;
  --ms-ink-muted: #667781;
  --ms-ink-faint: #8696a0;
  --ms-row-bg: #ffffff;
  --ms-row-hover: #f5f6f6;
  --ms-row-selected: #f0f2f5;
  --ms-row-border: #e9edef;
  --ms-unread: #25d366;
  --ms-icon: #54656f;
  --ms-panel-bg: #efeae2;
  --ms-chip-bg: #f0f2f5;
  --ms-accent: #00a884;
  height: 100vh;
  overflow: hidden;
  background: var(--ms-app-bg);
  color: var(--ms-ink);
}

body.messenger-page .ym-btn-primary {
  background: linear-gradient(180deg, #25d366, #00a884);
  border-color: #008f72;
  color: #fff;
}

body.messenger-page .ym-btn-primary:hover {
  background: linear-gradient(180deg, #2be072, #00b894);
}

.ym-sync-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(0, 168, 132, 0.12), transparent 28%),
    linear-gradient(180deg, #f0f2f5 0%, #e9edef 48%, #d1d7db 100%);
}

.ym-sync-overlay.hidden {
  display: none !important;
}

.ym-sync-card {
  width: min(100%, 320px);
  padding: 28px 24px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 168, 132, 0.12);
  box-shadow: 0 24px 48px rgba(17, 27, 33, 0.18);
  text-align: center;
}

.ym-sync-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
  color: #111b21;
}

.ym-sync-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #25d366, #00a884);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(0, 168, 132, 0.24);
}

.ym-sync-label {
  margin: 0 0 14px;
  font-size: 13px;
  color: #667781;
}

.ym-sync-bar-track {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 168, 132, 0.12);
}

.ym-sync-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #25d366, #00a884);
  transition: width 0.25s ease;
}

.ym-sync-percent {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #111b21;
}

/* ---- Duplicate / inactive tab lock (one live messenger.html session) ---- */
.ym-tab-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 20, 26, 0.72);
  backdrop-filter: blur(4px);
}

.ym-tab-modal.hidden {
  display: none;
}

.ym-tab-modal-card {
  width: min(420px, 100%);
  padding: 32px 28px 26px;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.ym-tab-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 168, 132, 0.1);
  color: #00a884;
}

.ym-tab-modal-icon svg {
  width: 28px;
  height: 28px;
}

.ym-tab-modal-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #111b21;
}

.ym-tab-modal-sub {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
  color: #667781;
}

.ym-tab-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.ym-tab-modal-actions .ym-btn {
  min-width: 120px;
}

body.ym-tab-inactive .messenger-shell {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

body.ym-app-locked .messenger-shell {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.ym-app-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(0, 168, 132, 0.14), transparent 30%),
    linear-gradient(180deg, #0b141a 0%, #111b21 45%, #202c33 100%);
}

.ym-app-lock-overlay.hidden {
  display: none !important;
}

.ym-app-lock-card {
  width: min(100%, 360px);
  padding: 28px 24px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 168, 132, 0.14);
  box-shadow: 0 24px 48px rgba(11, 20, 26, 0.35);
  text-align: center;
}

.ym-app-lock-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #111b21;
  font-weight: 700;
}

.ym-app-lock-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #25d366, #00a884);
  color: #fff;
  font-weight: 800;
}

.ym-app-lock-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 168, 132, 0.1);
  color: #00a884;
}

.ym-app-lock-icon svg {
  width: 26px;
  height: 26px;
}

.ym-app-lock-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #111b21;
}

.ym-app-lock-sub {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #667781;
}

.ym-app-lock-form {
  display: grid;
  gap: 10px;
}

.ym-app-lock-form input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(0, 168, 132, 0.18);
  padding: 12px 14px;
  font-size: 14px;
}

.ym-app-lock-error {
  margin: 0;
  color: #a02622;
  font-size: 12px;
}

.ym-app-lock-error.hidden {
  display: none;
}

.messenger-shell {
  display: grid;
  /* WA-like: rail + wider chat list (~30%) + conversation */
  grid-template-columns: 72px minmax(420px, 30%) minmax(0, 1fr);
  height: 100vh;
  gap: 0;
}

/* Settings replaces the conversation list column (WhatsApp-style). */
body.ym-view-settings .messenger-sidebar {
  display: none;
}

body.ym-view-settings .messenger-shell {
  grid-template-columns: 72px minmax(0, 1fr);
}

.messenger-rail,
.messenger-sidebar,
.messenger-main {
  min-height: 0;
}

.messenger-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 10px;
  background: #f0f2f5;
  color: #54656f;
  border-right: 1px solid #e9edef;
}

.messenger-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.messenger-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #25d366, #00a884);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  box-shadow: none;
}

.messenger-brand-title {
  font-size: 13px;
  font-weight: 700;
  color: #111b21;
}

.messenger-brand-subtitle {
  font-size: 10px;
  color: #667781;
}

.rail-btn {
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  transition: background 0.18s ease, color 0.18s ease;
}

.rail-btn:hover,
.rail-btn.active {
  background: rgba(0, 168, 132, 0.12);
  color: #00a884;
  transform: none;
}

.rail-btn-ghost {
  color: #54656f;
}

.rail-btn-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.rail-btn-icon .yoyo-icon {
  width: 18px;
  height: 18px;
}

.rail-btn-profile {
  margin-top: 2px;
}

.rail-profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.rail-btn-profile.active .rail-profile-avatar,
.rail-btn-profile:hover .rail-profile-avatar {
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.35);
}

.rail-spacer {
  flex: 1;
}

.messenger-sidebar {
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: 0;
  background: var(--ms-sidebar-bg);
  border-right: 1px solid var(--ms-sidebar-border);
  backdrop-filter: none;
}

.sidebar-top {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--ms-sidebar-border);
}

.sidebar-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 8px;
}

.sidebar-app-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ms-ink);
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.sidebar-header-actions .yoyo-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ms-icon);
  background: transparent;
}

.sidebar-header-actions .yoyo-icon-btn:hover {
  background: var(--ms-row-hover);
  color: var(--ms-ink);
}

.sidebar-header-actions .yoyo-icon-btn .yoyo-icon,
.sidebar-header-actions .rail-btn-icon .yoyo-icon {
  width: 20px;
  height: 20px;
}

.sidebar-profile-state {
  display: none !important;
}

.my-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ms-ink);
}

.my-hint {
  margin-top: 3px;
  font-size: 11px;
  color: var(--ms-ink-muted);
}

.my-status-msg,
.search-box input {
  width: 100%;
  border: 0;
  background: var(--ms-search-bg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ms-ink);
}

.search-box {
  margin-top: 4px;
  padding: 0;
  border-bottom: 0;
  position: relative;
}

.yoyo-search-wrap .yoyo-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ms-ink-faint);
}

.search-box input {
  padding-left: 34px;
}

.sidebar-filter-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.stories-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stories-section-eyebrow,
.stories-hero-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ms-ink-muted);
}
.story-feed-card:hover {
  border-color: rgba(0, 168, 132, 0.18);
  transform: translateY(-1px);
}

.story-ring {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #cfd8dc, #aebac1);
}

.story-ring .buddy-avatar {
  width: 100%;
  height: 100%;
  border-radius: 15px;
}

.story-ring.has-unviewed,
.story-ring--mine.has-story {
  background: linear-gradient(180deg, #25d366, #00a884);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.75);
}

.story-ring.is-viewed {
  background: linear-gradient(180deg, #c5cdd3, #aebac1);
}

.story-feed-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.story-feed-copy strong {
  font-size: 13px;
  color: #111b21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-feed-copy span,
.story-feed-meta {
  font-size: 11px;
  color: #667781;
}

.story-feed-card {
  border: 1px solid rgba(0, 168, 132, 0.08);
  background: rgba(255,255,255,0.88);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.story-feed-card.is-own {
  border-color: rgba(0, 168, 132, 0.16);
  background: linear-gradient(180deg, rgba(240,242,245,0.98), rgba(233,237,239,0.98));
  box-shadow: 0 10px 24px rgba(0, 168, 132, 0.08);
}

.story-feed-card.is-own .story-feed-copy strong {
  color: #111b21;
}

.story-feed-card.is-own .story-feed-count {
  background: linear-gradient(180deg, #25d366, #00a884);
  color: #fff;
}

.story-feed-count {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 168, 132, 0.1);
  color: #111b21;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-filter {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--ms-chip-bg);
  color: var(--ms-ink-muted);
  font-size: 11px;
  font-weight: 600;
}

.sidebar-filter.active {
  background: var(--ms-accent);
  color: #fff;
}

.sidebar-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ms-ink-muted);
}

.buddy-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  background: transparent;
}

.buddy-group {
  margin-bottom: 14px;
}

.buddy-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--ms-ink-muted);
  font-size: 11px;
  font-weight: 700;
  background: transparent;
  border: 0;
}

.buddy-group-header:hover {
  background: var(--ms-row-hover);
  border-radius: 12px;
}

.buddy-group-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--ms-ink-faint);
}

.buddy-group.collapsed .buddy-list {
  display: none;
}

.buddy-list {
  list-style: none;
  display: grid;
  gap: 0;
  margin: 0;
}

.buddy-item {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 0;
  background: var(--ms-row-bg);
  border: 0;
  border-bottom: 1px solid var(--ms-row-border);
  box-shadow: none;
  font-size: 12px;
  color: var(--ms-ink);
}

.buddy-item:hover {
  background: var(--ms-row-hover);
  border-color: var(--ms-row-border);
}

.buddy-item.selected {
  background: var(--ms-row-selected);
  color: var(--ms-ink);
  box-shadow: none;
}

.buddy-avatar {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  background: #dfe5e7;
  display: grid;
  place-items: center;
  color: #54656f;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.buddy-avatar-button {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.buddy-avatar-button:disabled {
  cursor: default;
}

.buddy-story-ring {
  width: 48px;
  height: 48px;
  padding: 3px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.buddy-story-ring.has-unviewed {
  background: linear-gradient(180deg, #25d366, #00a884);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.82);
}

.buddy-story-ring.is-viewed {
  background: linear-gradient(180deg, #c5cdd3, #aebac1);
}

.buddy-story-ring .buddy-avatar {
  width: 100%;
  height: 100%;
}

.buddy-avatar-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

.buddy-info {
  min-width: 0;
}

.buddy-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buddy-status-msg {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--ms-ink-muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buddy-status-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-variant-emoji: text;
}

/* Same tick colors as open-chat bubbles (chat.css) — green for read */
.buddy-status-msg .chat-msg-ticks {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
  letter-spacing: -0.05em;
}
.buddy-status-msg .chat-msg-ticks--pending { color: #8696a0; opacity: 0.7; }
.buddy-status-msg .chat-msg-ticks--sent,
.buddy-status-msg .chat-msg-ticks--delivered { color: #667781; }
.buddy-status-msg .chat-msg-ticks--read { color: #53bdeb; }
.buddy-item.selected .buddy-status-msg .chat-msg-ticks--pending { color: #8696a0; }
.buddy-item.selected .buddy-status-msg .chat-msg-ticks--sent,
.buddy-item.selected .buddy-status-msg .chat-msg-ticks--delivered { color: #667781; }
.buddy-item.selected .buddy-status-msg .chat-msg-ticks--read { color: #53bdeb; }

.buddy-item.selected .buddy-status-msg,
.buddy-item.selected .buddy-name {
  color: var(--ms-ink);
}

.buddy-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ms-unread);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.buddy-item.selected .buddy-unread {
  background: var(--ms-unread);
  color: #fff;
}

.buddy-item-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.buddy-time {
  font-size: 10px;
  font-weight: 600;
  color: var(--ms-ink-faint);
  white-space: nowrap;
}

.buddy-item.selected .buddy-time {
  color: var(--ms-ink-muted);
}

.buddy-room-tag {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ms-ink-muted);
  background: var(--ms-chip-bg);
}

.buddy-item.selected .buddy-room-tag {
  color: var(--ms-ink-muted);
  background: var(--ms-search-bg);
}

/* Use background-image (not shorthand) so we don't reset
   background-size: cover from .buddy-avatar-img — shorthand was
   leaving room photos at intrinsic size (zoomed top-left crop). */
.buddy-avatar-room {
  background-image: none;
  background-color: #dfe5e7;
  color: #54656f;
}

.buddy-avatar-room.buddy-avatar-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.buddy-item-room .status-dot.available {
  background: #25d366;
}

.buddy-more-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: var(--ms-chip-bg);
  color: var(--ms-ink-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.buddy-more-btn:hover {
  background: var(--ms-row-hover);
  color: var(--ms-ink);
}

.buddy-item.selected .buddy-more-btn {
  background: var(--ms-search-bg);
  color: var(--ms-ink-muted);
}

.buddy-item.selected .buddy-story-ring.has-unviewed,
.buddy-item.selected .buddy-story-ring.is-viewed {
  box-shadow: 0 0 0 2px var(--ms-row-selected);
}

.buddy-preview {
  color: var(--ms-ink);
  font-weight: 600;
  font-family: var(--font-ui);
  font-variant-emoji: text;
}

.buddy-status-msg.buddy-composer-activity {
  color: var(--ms-accent);
  font-weight: 700;
  font-style: italic;
}

.buddy-item.selected .buddy-status-msg.buddy-composer-activity {
  color: var(--ms-accent);
}

.buddy-pin,
.buddy-mute {
  color: inherit;
}

.messenger-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  border-radius: 0;
  background: var(--ms-panel-bg);
}

.workspace-body {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0;
  margin: 0;
}

.workspace-empty,
.workspace-frame,
.devices-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.workspace-empty {
  display: grid;
  place-items: center;
}

.workspace-empty-card,
.devices-panel {
  border-radius: 0;
  background: var(--ms-sidebar-bg);
  border: 0;
  box-shadow: none;
}

.workspace-empty-card {
  max-width: 620px;
  padding: 40px;
  text-align: center;
}

.workspace-empty-card h2 {
  font-size: 28px;
  color: var(--ms-ink);
  margin-bottom: 12px;
}

.workspace-empty-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ms-ink-muted);
}

.workspace-empty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
}

.workspace-frame {
  display: block;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  margin: 0;
}

/* Settings iframe fills the messenger content column edge-to-edge. */
body.ym-view-settings .messenger-main,
body.ym-view-settings .workspace-body {
  height: 100%;
  min-height: 0;
}

body.ym-view-settings .workspace-frame {
  height: 100%;
  min-height: 100%;
}

#chat-frame.workspace-frame {
  background: var(--ms-panel-bg);
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  overflow: hidden;
}

.devices-panel {
  padding: 24px;
  overflow: auto;
}

.stories-panel {
  height: 100%;
  overflow: auto;
  padding: 24px;
  margin: 0;
  border-radius: 0;
  background: var(--ms-sidebar-bg);
  border: 0;
  box-shadow: none;
}

.stories-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 168, 132,0.95), rgba(0, 168, 132,0.92));
  color: #fff;
}

.stories-hero h2 {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.2;
}

.stories-hero p {
  margin-top: 10px;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
}

.stories-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stories-panel-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.stories-column {
  min-width: 0;
}

.stories-my-card,
.stories-feed-grid {
  margin-top: 14px;
}

.stories-feed-priority:empty {
  display: none;
}

.stories-feed-priority {
  margin-top: 14px;
}

.stories-my-card {
  display: grid;
  gap: 12px;
}

.stories-my-summary {
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(247,243,253,0.98), rgba(235,226,246,0.98));
  border: 1px solid rgba(0, 168, 132, 0.1);
}

.stories-my-summary h3 {
  font-size: 18px;
  color: #111b21;
}

.stories-my-summary p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #667781;
}

.stories-meta-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stories-meta-pill {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(0, 168, 132, 0.08);
  color: #667781;
  font-size: 11px;
  font-weight: 700;
}

.stories-own-list {
  display: grid;
  gap: 10px;
}

.story-own-card {
  width: 100%;
  border: 1px solid rgba(0, 168, 132, 0.1);
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
  padding: 16px;
  display: grid;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.story-own-card:hover {
  border-color: rgba(0, 168, 132, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 168, 132, 0.1);
}

.story-own-card-head,
.story-own-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.story-own-kind {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0, 168, 132, 0.08);
  color: #667781;
  font-size: 11px;
  font-weight: 700;
}

.story-own-time,
.story-own-meta {
  font-size: 11px;
  color: #667781;
}

.story-own-body {
  font-size: 13px;
  line-height: 1.6;
  color: #111b21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stories-feed-grid {
  display: grid;
  gap: 12px;
}

.story-empty-card {
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(250,247,253,0.98), rgba(241,234,249,0.98));
  border: 1px dashed rgba(0, 168, 132, 0.18);
  color: #667781;
}

.story-empty-card strong {
  display: block;
  font-size: 16px;
  color: #111b21;
}

.story-empty-card span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.story-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(calc(100vh - 32px), 920px);
  min-width: 0;
  border-radius: 24px;
  border-width: 1px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,234,249,0.98));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.story-dialog .ym-dialog-header,
.story-dialog .ym-dialog-footer {
  position: relative;
  z-index: 1;
}

.story-dialog .ym-dialog-footer {
  border-top: 1px solid rgba(0, 168, 132, 0.1);
  background: linear-gradient(180deg, rgba(250,247,253,0.98), rgba(241,234,249,0.98));
}

.story-dialog-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 12px;
}

.story-dialog-body.has-video-selection {
  gap: 12px;
}

.story-compose-type {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.story-kind-btn {
  border: 1px solid rgba(0, 168, 132, 0.14);
  border-radius: 999px;
  background: rgba(0, 168, 132,0.06);
  color: #667781;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
}

.story-kind-btn.active {
  background: linear-gradient(180deg, #25d366, #00a884);
  color: #fff;
}

.story-compose-preview {
  display: flex;
  justify-content: center;
}

.story-preview-card {
  position: relative;
  width: 100%;
  min-height: 280px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #00a884, #25d366);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 24px;
}

.story-preview-card.is-video {
  min-height: clamp(220px, 34vh, 320px);
}

.story-preview-media,
.story-preview-media img,
.story-preview-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-preview-media img,
.story-preview-media video {
  object-fit: cover;
}

.story-preview-text {
  position: relative;
  z-index: 1;
  max-width: 460px;
  text-align: center;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 700;
  white-space: pre-wrap;
  text-shadow: 0 8px 26px rgba(0,0,0,0.26);
}

.story-textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid rgba(0, 168, 132, 0.16);
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
  background: rgba(255,255,255,0.96);
}

.story-upload-row,
.story-inline-grid {
  display: grid;
  gap: 12px;
}

.story-video-trim {
  border-radius: 18px;
  background: rgba(0, 168, 132,0.05);
  padding: 14px;
}

.story-video-trim-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.story-video-trim-summary {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: #667781;
  text-align: right;
}

.story-trim-field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #432b60;
}

.story-trim-field input[type="range"] {
  width: 100%;
}

.story-sound-section {
  border-radius: 18px;
  background: rgba(0, 168, 132,0.05);
  padding: 14px;
}

.story-dialog-body.has-video-selection .story-video-trim,
.story-dialog-body.has-video-selection .story-sound-section,
.story-dialog-body.has-video-selection .story-audience-picker {
  padding: 12px;
}

.story-sound-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.story-sound-title {
  font-size: 13px;
  font-weight: 700;
  color: #111b21;
}

.story-sound-subtitle {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
  color: #667781;
}

.story-sound-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.story-sound-current {
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0, 168, 132, 0.1);
}

.story-audio-toggle {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #667781;
}

.story-sounds-library {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}

.story-sound-card {
  width: 100%;
  border: 1px solid rgba(0, 168, 132, 0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.story-sound-card.active {
  border-color: rgba(0, 168, 132, 0.34);
  box-shadow: 0 10px 24px rgba(0, 168, 132, 0.12);
}

.story-sound-copy strong {
  display: block;
  font-size: 13px;
  color: #111b21;
}

.story-sound-copy span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #667781;
}

.story-upload-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.story-upload-meta,
.story-audience-label {
  font-size: 12px;
  color: #667781;
}

.story-inline-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-audience-picker {
  border-radius: 18px;
  background: rgba(0, 168, 132,0.05);
  padding: 14px;
}

.story-audience-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-height: 180px;
  overflow: auto;
}

.story-audience-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #432b60;
}

.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(18, 11, 31, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.story-viewer-shell {
  width: min(760px, 100%);
  max-height: 100%;
  overflow: auto;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(27,18,43,0.98), rgba(36,21,57,0.98));
  color: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  padding: 16px;
}

.story-viewer-top,
.story-viewer-meta,
.story-viewer-nav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.story-progress {
  flex: 1;
  display: grid;
  grid-auto-flow: column;
  gap: 7px;
}

.story-progress-segment {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(79, 56, 112, 0.95), rgba(56, 38, 82, 0.98));
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.16),
    0 0 0 1px rgba(0,0,0,0.18);
}

.story-progress-fill {
  --story-progress: 0;
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--story-progress));
  background: linear-gradient(90deg, #25d366 0%, #d9fdd3 58%, #ffffff 100%);
  background-size: 200% 100%;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.24),
    0 0 14px rgba(255,255,255,0.45);
  will-change: transform;
}

.story-progress-segment.is-complete {
  background: linear-gradient(180deg, rgba(69, 46, 102, 0.96), rgba(49, 33, 73, 0.98));
}

.story-progress-segment.is-complete .story-progress-fill {
  --story-progress: 1;
  background: linear-gradient(90deg, #8f5bff 0%, #bb8cff 52%, #f0ddff 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.14),
    0 0 18px rgba(157,112,255,0.38);
}

.story-progress-segment.is-active {
  background: linear-gradient(180deg, rgba(88, 61, 127, 1), rgba(60, 40, 90, 1));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.22),
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 16px rgba(126, 92, 182, 0.28);
}

.story-progress-segment.is-active .story-progress-fill {
  transition: transform linear;
  background: linear-gradient(90deg, #31e7ff 0%, #8af1ff 24%, #ffffff 50%, #fff0a6 74%, #ff8ad8 100%);
  background-size: 220% 100%;
  animation: story-progress-shimmer 900ms linear infinite;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.34),
    0 0 20px rgba(82, 229, 255, 0.4),
    0 0 28px rgba(255, 138, 216, 0.26);
}

.story-progress-segment:not(.is-active):not(.is-complete) .story-progress-fill {
  opacity: 0;
}

@keyframes story-progress-shimmer {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 220% 0;
  }
}

.story-viewer-close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 24px;
}

.story-viewer-meta {
  margin-top: 14px;
}

.story-viewer-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.story-viewer-name {
  font-size: 16px;
  font-weight: 700;
}

.story-viewer-time {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.74);
}

.story-viewer-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.story-viewer-badge {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
}

.story-viewer-stage {
  position: relative;
  min-height: 420px;
  margin-top: 14px;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #00a884, #25d366);
}

.story-viewer-stage img,
.story-viewer-stage video {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: rgba(0,0,0,0.22);
}

.story-viewer-text {
  padding: 32px;
  text-align: center;
  font-size: 30px;
  line-height: 1.45;
  font-weight: 700;
  white-space: pre-wrap;
  text-shadow: 0 10px 28px rgba(0,0,0,0.28);
}

.story-reshare-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(11,20,26,0.5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.story-music-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(11,20,26,0.5);
  color: #fff;
  font-size: 12px;
}

.story-viewer-caption {
  margin-top: 14px;
  min-height: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  white-space: pre-wrap;
}

.story-viewer-controls {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.story-viewer-control-grid {
  display: grid;
  gap: 14px;
}

.story-control-head {
  display: grid;
  gap: 14px;
}

.story-control-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 14px 30px rgba(0,0,0,0.14);
}

.story-control-card--actions {
  gap: 14px;
}

.story-control-card--nav {
  gap: 16px;
}

.story-control-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.story-control-note {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.78);
}

.story-reaction-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.story-reaction-btn {
  min-width: 0;
  min-height: 60px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.story-reaction-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.24);
}

.story-reaction-btn.active {
  background: linear-gradient(180deg, rgba(0, 168, 132,0.9), rgba(0, 168, 132,0.95));
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 12px 24px rgba(0, 168, 132, 0.24);
}

.story-viewer-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.story-viewer-buttons .ym-btn,
.story-viewer-nav-card .ym-btn {
  min-height: 52px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
}

.story-viewer-next {
  max-width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  text-align: left;
}

.story-viewer-buttons .ym-btn {
  min-width: 0;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

.story-viewer-nav-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
}

.story-viewer-nav-card .ym-btn {
  width: 100%;
}

.devices-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.devices-panel-header h2 {
  font-size: 24px;
  color: #111b21;
}

.devices-panel-header p {
  margin-top: 6px;
  color: #667781;
  font-size: 13px;
}

.devices-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.devices-banner {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 168, 132,0.1), rgba(0, 168, 132,0.05));
  color: #667781;
  font-size: 12px;
  font-weight: 600;
}

.devices-list {
  display: grid;
  gap: 12px;
}

.device-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(0, 168, 132, 0.1);
  background: #fff;
}

.device-copy h3 {
  font-size: 15px;
  color: #111b21;
}

.device-meta {
  margin-top: 6px;
  color: #667781;
  font-size: 12px;
}

.device-meta strong {
  color: #111b21;
}

.messenger-statusbar {
  display: none !important;
}

.buddy-context-menu {
  position: fixed;
  z-index: 10050;
  min-width: 190px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(0, 168, 132, 0.16);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  padding: 6px;
}

.buddy-context-menu.hidden {
  display: none;
}

.buddy-context-menu .yoyo-menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 10px 12px;
  font-size: 12px;
  color: #111b21;
}

.buddy-context-menu .yoyo-menu-btn:hover {
  background: rgba(0, 168, 132, 0.08);
}

@media (max-width: 1120px) {
  .messenger-shell {
    grid-template-columns: 64px minmax(360px, 34%) minmax(0, 1fr);
  }

  body.ym-view-settings .messenger-shell {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .conversation-actions {
    display: none;
  }

  .stories-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .messenger-shell {
    grid-template-columns: 1fr;
  }

  .messenger-rail {
    display: none;
  }

  .messenger-sidebar {
    display: none;
  }

  .workspace-body {
    padding: 0;
    margin: 0;
  }
}

@media (max-width: 720px) {
  .stories-hero,
  .story-viewer-meta,
  .story-viewer-nav-card {
    flex-direction: column;
    align-items: stretch;
  }

  .story-upload-row,
  .story-inline-grid,
  .story-audience-list {
    grid-template-columns: 1fr;
  }

  .story-sound-head {
    flex-direction: column;
  }

  .story-viewer-stage {
    min-height: 320px;
  }

  .story-viewer-text {
    font-size: 24px;
  }

  .story-viewer-next,
  .story-viewer-buttons {
    text-align: left;
  }

  .story-viewer-nav-card {
    grid-template-columns: 1fr;
  }
}

/* ---- Dark mode — WhatsApp Web palette (ym-theme-dark via YoyoChatPrefs) ---- */
html.ym-theme-dark body.messenger-page {
  --ms-app-bg: #111b21;
  --ms-sidebar-bg: #111b21;
  --ms-sidebar-border: #222d34;
  --ms-search-bg: #202c33;
  --ms-ink: #e9edef;
  --ms-ink-muted: #8696a0;
  --ms-ink-faint: #667781;
  --ms-row-bg: #111b21;
  --ms-row-hover: #202c33;
  --ms-row-selected: #2a3942;
  --ms-row-border: #222d34;
  --ms-unread: #00a884;
  --ms-icon: #aebac1;
  --ms-panel-bg: #0b141a;
  --ms-chip-bg: #202c33;
  --ms-accent: #00a884;
  color-scheme: dark;
}

html.ym-theme-dark .messenger-rail {
  background: #111b21;
  border-right-color: #222d34;
  color: #aebac1;
}

html.ym-theme-dark .messenger-brand-title {
  color: #e9edef;
}

html.ym-theme-dark .messenger-brand-subtitle {
  color: #8696a0;
}

html.ym-theme-dark .rail-btn:hover,
html.ym-theme-dark .rail-btn.active {
  background: rgba(0, 168, 132, 0.16);
  color: #00a884;
}

html.ym-theme-dark .rail-btn-ghost {
  color: #aebac1;
}

html.ym-theme-dark .sidebar-app-title {
  color: #e9edef;
}

html.ym-theme-dark .sidebar-header-actions .yoyo-icon-btn {
  color: #aebac1;
}

html.ym-theme-dark .sidebar-header-actions .yoyo-icon-btn:hover {
  background: #202c33;
  color: #e9edef;
}

/* Do NOT use background shorthand — it resets background-image/size on photo avatars */
html.ym-theme-dark .buddy-avatar,
html.ym-theme-dark .buddy-avatar-room {
  background-color: #6a7175;
  color: #e9edef;
}
html.ym-theme-dark .buddy-avatar.buddy-avatar-img,
html.ym-theme-dark .buddy-avatar-room.buddy-avatar-img,
html.ym-theme-dark .rail-profile-avatar.buddy-avatar-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

html.ym-theme-dark .ym-sync-overlay {
  background: #111b21;
}

html.ym-theme-dark .ym-sync-card {
  background: #202c33;
  border-color: #222d34;
  color: #e9edef;
}

html.ym-theme-dark .ym-sync-label,
html.ym-theme-dark .ym-sync-percent,
html.ym-theme-dark .ym-sync-brand {
  color: #e9edef;
}

html.ym-theme-dark .ym-tab-modal-card {
  background: #202c33;
  color: #e9edef;
}

html.ym-theme-dark .ym-tab-modal-card h2 {
  color: #e9edef;
}

html.ym-theme-dark .ym-tab-modal-sub {
  color: #8696a0;
}

html.ym-theme-dark .story-feed-copy strong,
html.ym-theme-dark .story-feed-card.is-own .story-feed-copy strong {
  color: #e9edef;
}

html.ym-theme-dark .story-feed-copy span,
html.ym-theme-dark .story-feed-meta {
  color: #8696a0;
}

html.ym-theme-dark .story-feed-card {
  background: #202c33;
  border-color: #222d34;
}

html.ym-theme-dark .story-feed-card.is-own {
  background: #2a3942;
  border-color: #222d34;
  box-shadow: none;
}

html.ym-theme-dark .story-feed-count {
  background: rgba(0, 168, 132, 0.18);
  color: #00a884;
}

html.ym-theme-dark .story-feed-card.is-own .story-feed-count {
  background: #00a884;
  color: #fff;
}

html.ym-theme-dark .workspace-frame {
  background: #111b21;
}

/* Chats list scrollbar — neutral gray (WhatsApp-style), not purple */
body.messenger-page {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}
body.messenger-page ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
body.messenger-page ::-webkit-scrollbar-track {
  background: transparent;
}
body.messenger-page ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22);
  border: none;
  border-radius: 8px;
}
body.messenger-page ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}
html.ym-theme-dark body.messenger-page {
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
html.ym-theme-dark body.messenger-page ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
}
html.ym-theme-dark body.messenger-page ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}
