/* Friends, inbox and conversations: shared social layout, 14 Oct 2026.
   Scoped to social screens; profile and video calls retain their own design. */
html .screen.main :is(.msg-page, .friends-page) {
  --social-muted: #a8a8ad;
  --social-surface: #19191b;
  --social-line: #262629;
}
html .screen.main .friends-page { padding-inline: 0; }
.social-brand-header { margin: 0 20px 6px; padding: 8px 0 14px; border-bottom: 1px solid var(--social-line); color: #f8f8f2; }
html .social-brand-header .brand-wordmark { display: inline-flex; align-items: center; gap: 7px; font: 800 29px/1 "Twoyo Display", sans-serif; letter-spacing: -1.6px; }
html .social-brand-header .brand-period { color: inherit; }
html .social-brand-header .brand-mark { display: inline-block; position: relative; flex: none; width: 32px; height: 30px; transform: rotate(-7deg); }
html .social-brand-header .brand-mark i { position: absolute; width: 18px; height: 26px; border-radius: 11px; top: 1px; left: 0; background: currentColor; }
html .social-brand-header .brand-mark i:last-child { left: 13px; top: 4px; }
html .social-brand-header .brand-mark i::after { content: ""; position: absolute; width: 3px; height: 3px; top: 8px; right: 5px; border-radius: 50%; background: #000; }
html .screen.main :is(.social-header, .msg-header) {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px 8px; min-height: 66px;
}
html .screen.main :is(.social-header h1, .msg-header h1) {
  font: 700 26px/1.2 var(--font); letter-spacing: -.65px; margin: 0;
}
.social-header p { margin: 5px 0 0; color: var(--social-muted); font-size: 13px; line-height: 1.4; }
html .screen.main .social-icon-button {
  width: 44px; height: 44px; flex: none; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 12px;
  background: transparent; color: var(--text); font-size: 23px;
}
html .screen.main :is(.msg-page, .friends-page) .search-field {
  margin: 12px 20px 16px; height: 44px; padding-inline: 14px; gap: 10px;
  background: var(--social-surface); color: var(--social-muted); border-radius: 12px;
}
html .screen.main :is(.msg-page, .friends-page) .search-field input {
  font-size: 15px; line-height: 1.4; min-height: 40px;
}
html .screen.main :is(.msg-page, .friends-page) .search-field input::placeholder { color: var(--social-muted); opacity: 1; }
html .screen.main :is(.msg-page, .friends-page) .search-clear { min-width: 32px; min-height: 40px; align-items: center; justify-content: center; }
.social-section-title { padding: 3px 20px 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.social-section-title span { color: var(--social-muted); font-weight: 400; }
html .screen.main .msg-page .active-now { padding: 14px 20px 19px; gap: 18px; }
html .screen.main .msg-page .active-person { gap: 8px; color: #dedee1; font-size: 12px; line-height: 1.3; }
html .screen.main .msg-page .active-person > .av-wrap { border-radius: 50%; padding: 3px; border: 1px solid #36363a; }
html .screen.main .msg-page .online-dot.big { width: 13px; height: 13px; right: 3px; bottom: 3px; }
html .screen.main .msg-page .chips {
  padding: 0; margin: 4px 20px 10px; gap: 22px; border-bottom: 1px solid var(--social-line);
}
html .screen.main .msg-page .chip {
  position: relative; justify-content: center; min-height: 46px; height: auto; padding: 12px 0;
  border-radius: 0; background: transparent; color: var(--social-muted); font-size: 14px; font-weight: 600;
}
html .screen.main .msg-page .chip.on { color: #fff; }
html .screen.main .msg-page .chip.on::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; border-radius: 2px; background: #fff; }
html .screen.main .msg-page .chip-count { font-size: 10px; min-width: 17px; height: 17px; background: #343438; color: #fff; }
html .screen.main .msg-page .conv-row { gap: 14px; padding: 13px 20px; min-height: 86px; border-radius: 0; }
html .screen.main .msg-page .conv-title { font-size: 15px; line-height: 1.4; font-weight: 500; }
html .screen.main .msg-page .conv-title.unread { font-weight: 700; }
html .screen.main .msg-page .conv-sub { font-size: 13px; line-height: 1.45; color: var(--social-muted); }
html .screen.main .msg-page .conv-sub.unread { color: #f5f5f7; font-weight: 500; }
html .screen.main .msg-page .conv-call { color: #d2d2d6; width: 44px; height: 44px; font-size: 22px; }
html .screen.main .msg-page .unread-dot { width: 8px; height: 8px; }
html .screen.main .friends-page .social-recent {
  width: calc(100% - 40px); margin: 0 20px 4px; min-height: 48px; display: flex;
  align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--social-line);
  font-size: 14px; color: #dddde1; text-align: left;
}
.social-recent span { display: inline-flex; align-items: center; gap: 12px; }
.social-recent span > .i { font-size: 20px; color: var(--social-muted); }
.social-recent > .i { font-size: 12px; color: var(--social-muted); }
html .screen.main .friends-page .list-header { padding: 23px 20px 10px; font: 600 14px/1.4 var(--font); color: #f1f1f3; }
html .screen.main .friends-page .list-group { background: transparent; border-radius: 0; overflow: visible; }
html .screen.main .friends-page .user-row { padding: 12px 20px; gap: 12px; min-height: 80px; }
html .screen.main .friends-page .user-row + .user-row::before { display: none; }
html .screen.main .friends-page .user-row .headline { font-size: 15px; line-height: 1.35; font-weight: 600; }
html .screen.main .friends-page .row-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html .screen.main .friends-page .row-name .seal { margin-left: 4px; }
html .screen.main .friends-page .user-row .caption { color: var(--social-muted); margin-top: 4px; font-size: 12px; line-height: 1.4; }
html .screen.main .friends-page .row-actions { gap: 4px; }
html .screen.main .friends-page .online-dot { box-shadow: 0 0 0 3px #000; }
html .screen.main .social-message-button {
  min-height: 36px; padding: 8px 14px; border-radius: 9px; background: #262629;
  font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap;
}
html .screen.main .social-message-button.accept { background: #f5f5f7; color: #111; }
html .screen.main .friends-page .friend-requests { margin: 0 12px; padding: 3px 0; border: 1px solid var(--social-line); border-radius: 14px; }
html .screen.main .friends-page .friend-requests .user-row { padding-inline: 8px; }
html .screen.main .friends-page .friend-requests .social-icon-button { color: var(--social-muted); font-size: 16px; }
html .screen.main :is(.friends-page, .msg-page) .empty { padding: 44px 24px 18px; gap: 14px; }
html .screen.main :is(.friends-page, .msg-page) .empty > .i { width: 64px; height: 64px; padding: 15px; border: 1px solid #55555b; border-radius: 50%; color: #eeeef0; }
html .screen.main :is(.friends-page, .msg-page) .empty .headline { font-size: 19px; font-weight: 600; }
html .screen.main :is(.friends-page, .msg-page) .empty .sub { font-size: 14px; line-height: 1.5; max-width: 280px; color: var(--social-muted); }
html .screen.main .friends-page .list-group:has(.empty) { text-align: center; }
html .screen.main :is(.friends-page, .msg-page) .empty .btn,
html .screen.main .friends-page .list-group:has(.empty) > .btn { border-radius: 10px; min-height: 42px; font-size: 14px; padding: 10px 18px; margin: 12px 0 24px; }
html .screen.main :is(.friends-page, .msg-page) button:focus-visible,
html .screen.main .msg-page .conv-row:focus-visible { outline: 2px solid #d6ff76; outline-offset: -2px; }
html .screen.main :is(.friends-page, .msg-page) .search-field:focus-within { box-shadow: 0 0 0 1px #707078; }
@media (hover: hover) {
  html .screen.main .social-icon-button:hover, html .screen.main .msg-page .conv-row:hover { background: #141416; }
  html .screen.main .social-message-button:hover { filter: brightness(1.15); }
}
/* Same components on desktop; only the space around them changes. */
html.desktop .desk-split { border-radius: 18px; max-height: 840px; grid-template-columns: 380px minmax(0, 1fr); }
html.desktop .desk-split.solo { max-width: 700px; grid-template-columns: minmax(0, 1fr); }
html.desktop .desk-list > .msg-page { padding-top: 8px; }
html.desktop .desk-page > .friends-page {
  max-width: 700px; max-height: 840px; margin: auto; padding: 8px 0 24px;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 18px;
}
html.desktop .desk-page > .friends-page > * { flex-shrink: 0; }
html.desktop .screen.main :is(.social-header, .msg-header) {
  min-height: 82px; align-items: flex-start;
}
html.desktop .screen.main :is(.social-header, .msg-header) > .social-icon-button { align-self: center; }
html.desktop .screen.main .friends-page .social-recent { min-height: 46px; margin: 4px 20px 10px; }
html.desktop .screen.main .friends-page .friends-list {
  display: flex; flex-direction: column; flex: 1 0 auto;
}
html.desktop .screen.main .friends-page .list-group:has(.empty) {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 220px;
}
html.desktop .screen.main .friends-page .list-group:has(.empty) > .btn { flex-shrink: 0; }
@media (max-width: 359px) {
  html .screen.main .friends-page .user-row { gap: 8px; padding-inline: 14px; }
  html .screen.main .friends-page .user-row .avatar { width: 46px; height: 46px; }
  html .screen.main .social-message-button { padding-inline: 10px; font-size: 12px; }
  html .screen.main .friends-page .row-actions .social-icon-button { width: 36px; }
}

/* Conversation: large profile introduction, flat navigation and one composer. */
html .screen.main .chat-page { --chat-accent: #6554d9; --chat-muted: #aaaab2; }
html .screen.main .chat-nav {
  grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px;
  padding: calc(var(--top) + 4px) 12px 10px; border-bottom: 1px solid #202023;
}
html .screen.main .chat-nav .nav-glass {
  background: transparent; border: 0; box-shadow: none; backdrop-filter: none;
  border-radius: 12px; font-size: 24px;
}
html .screen.main .chat-title { justify-self: stretch; justify-content: flex-start; gap: 11px; }
html .screen.main .chat-title .headline { font: 600 15px/1.35 var(--font); }
html .screen.main .chat-title .caption { font-size: 12px; color: var(--chat-muted); }
html .screen.main .chat-scroll { padding: 16px 16px 24px; }
html .screen.main .chat-head { gap: 10px; padding: 20px 8px 32px; }
html .screen.main .chat-head .title2 { font: 650 21px/1.3 var(--font); letter-spacing: -.3px; margin: 3px 0 0; overflow-wrap: anywhere; }
html .screen.main .chat-head .caption { font-size: 13px; line-height: 1.5; color: var(--chat-muted); margin: 0; }
html .screen.main .chat-head .btn { min-height: 36px; padding: 9px 16px; border-radius: 9px; font-size: 13px; background: #262629; margin-top: 5px; }
html .screen.main .day-chip { padding: 10px 0 20px; }
html .screen.main .day-chip span { background: transparent; color: var(--chat-muted); font-size: 11px; font-weight: 500; }
html .screen.main .msg { margin-top: 3px; }
html .screen.main .msg.starts { margin-top: 15px; }
html .screen.main .msg-col { max-width: min(360px, calc(100% - 38px)); }
html .screen.main .msg.mine .msg-col { max-width: min(360px, 85%); }
html .screen.main .msg-name { font-size: 12px; color: var(--chat-muted); }
html .screen.main .dm-bubble { padding: 11px 14px 9px; border-radius: 20px; background: #242427; color: #f7f7fa; }
html .screen.main .msg.mine .dm-bubble { background: var(--chat-accent); color: #fff; }
html .screen.main .dm-text { font-size: 15px; line-height: 1.45; }
html .screen.main .dm-line { row-gap: 3px; }
html .screen.main .dm-bubble .meta { font-size: 10px; color: #b9b9c1; }
html .screen.main .msg.mine .dm-bubble .meta { color: #eeebff; }
html .screen.main .msg.mine .dm-bubble .ticks:not(.failed) { color: #d4cbff; }
html .screen.main .msg.mine .dm-bubble .ticks.read { color: #fff; }
html .screen.main .msg.mine .dm-bubble .ticks.failed { color: #fff; }
html .screen.main .dm-bubble .quote.on-accent { background: #ffffff18; }
html .screen.main .dm-bubble .quote.on-accent .quote-bar { background: #e6e0ff; }
html .screen.main .chat-page .quote > div { min-width: 0; }
html .screen.main .chat-page .quote-text { overflow-wrap: anywhere; }
html .screen.main .chat-page .quote-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html .screen.main .reaction-badge { border-color: #000; background: #303034; }
html .screen.main .chat-input { padding: 10px 12px calc(var(--bottom) + 12px); border-top: 0; }
html .screen.main .chat-input .input-row {
  align-items: center; gap: 4px; padding: 4px; border: 1px solid #36363b;
  border-radius: 28px; background: #19191b; min-height: 54px;
}
html .screen.main .chat-input .input-row:focus-within { border-color: #77717f; }
html .screen.main .chat-input .photo-pick { width: 44px; height: 44px; background: transparent; border: 0; font-size: 23px; color: #eeeef2; cursor: pointer; }
html .screen.main .dm-compose { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
html .screen.main .dm-field { height: 44px; padding: 0 4px; min-width: 0; background: transparent; border: 0; font-size: 16px; }
html .screen.main .dm-field::placeholder { color: var(--chat-muted); opacity: 1; }
html .screen.main .dm-compose .send { display: inline-flex; width: 44px; height: 44px; background: var(--chat-accent); color: #fff; font-size: 21px; flex: none; }
html .screen.main .dm-compose .send:disabled { opacity: 1; background: transparent; color: #74747d; }
html .screen.main .reply-bar { padding: 4px 4px 10px; }
html .screen.main .chat-page button:focus-visible { outline: 2px solid #c6bcff; outline-offset: -2px; }
html.desktop .screen.main .chat-nav { padding-top: 14px; padding-bottom: 14px; }
html.desktop .screen.main .chat-input { padding-bottom: 16px; }
@media (hover: hover) {
  html .screen.main .chat-nav .nav-glass:hover { background: #19191b; }
  html .screen.main .chat-head .btn:hover { background: #343438; }
}
/* Keep code feedback beside the input until the next edit/retry. */
.friend-code-form .code-feedback { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.friend-code-form .code-feedback.error { color: #f28b82; }
/* Notifications keep their own contrast in both the light home and dark call. */
html .invite-banner { color: #fff; --text: #fff; --text-2: #e0e0e0; --text-3: #c7c7c7; background: rgba(32,32,32,.96); }
html .invite-banner .headline { color: #fff; }
html .invite-banner .caption { color: #e0e0e0; }
html .invite-banner .btn-secondary { background: #ededE7; color: #111; }
html .invite-banner .btn-secondary:active:not(:disabled) { background: #dcdcd5; color: #111; }
html .invite-banner .btn-primary { background: #fff; color: #111; }
html .friend-request-notice { left: auto; right: 12px; top: calc(var(--top) + 56px); width: min(276px, calc(100% - 24px)); padding: 4px; gap: 0; border-radius: 18px; animation: none; flex-direction: row; align-items: center; background: rgba(28,28,30,.97); }
.friend-notice-accept { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; min-height: 48px; padding: 5px 0 5px 7px; border-radius: 14px; text-align: left; color: #fff; cursor: pointer; }
.friend-notice-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.friend-notice-copy strong { font-size: 13px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-notice-copy > span { color: #bebec3; font-size: 11px; line-height: 14px; }
.friend-notice-check { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: #fff; color: #111; font-size: 12px; }
.friend-notice-check .spinner { width: 13px; height: 13px; }
.friend-notice-dismiss { display: flex; align-items: center; justify-content: center; width: 38px; min-height: 48px; flex: none; color: #b6b6bc; font-size: 12px; cursor: pointer; border-radius: 14px; }
.friend-notice-accept:disabled, .friend-notice-dismiss:disabled { cursor: wait; }
.friend-notice-accept:focus-visible, .friend-notice-dismiss:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
@media (hover: hover) { .friend-notice-accept:hover:not(:disabled), .friend-notice-dismiss:hover:not(:disabled) { background: #343436; } }
html.desktop .friend-request-notice { top: 76px; right: 24px; width: 276px; }
