/* Shared controls, spacing and surfaces across account, settings and dialogs. */
:root { --ui-line: color-mix(in srgb, currentColor 12%, transparent); --ui-surface: var(--bg, var(--color-background-01, #1a191d)); --ui-accent: #24707b; }
.app-shell { --ui-surface: var(--bg, var(--color-background-01, #1a191d)); }
.ui-icon { display: inline-block; width: 1.2rem; height: 1.2rem; flex: 0 0 1.2rem; fill: currentColor; background: none; }
:is(.settings-content, .contact-presentation) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea) { box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 2.75rem; padding: .65rem .8rem; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); border-radius: .65rem; background: var(--ui-surface); color: inherit; font: inherit; font-size: var(--directory-search-font, .85rem); }
:is(.settings-content, .contact-presentation) :is(button, .button) { box-sizing: border-box; max-width: 100%; font-weight: 550; line-height: 1.35; }
:is(.settings-content, .contact-presentation) :is(input, select, textarea, button, a):focus-visible { outline: 2px solid var(--camayo-focus-ring); outline-offset: -2px; }
.app-shell .settings-content { overscroll-behavior: contain; scroll-padding-block: 5rem 2rem; }
.avatar-editor { position: relative; flex: none; width: 6rem; height: 6rem; border-radius: 1.2rem; }
.avatar-editor .avatar-editor-image, .contact-presentation-preview .avatar-editor-image { width: 100%; height: 100%; margin: 0; border-radius: inherit; overflow: hidden; }
.avatar-editor-image > :is(img,span), .contact-presentation-preview .avatar-editor-image > :is(img,span) { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar-editor .avatar-editor-choose { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; display: grid; place-items: center; background: #ffffff00; border: 0; border-radius: inherit; text-decoration: none; color: white; transition: background .16s ease; }
.avatar-editor .avatar-editor-choose .ui-icon { width: 1.4rem; height: 1.4rem; background: currentColor; border-radius: 0; opacity: 0; filter: drop-shadow(0 1px 3px #0008); transition: opacity .16s ease; }
.avatar-editor:hover .avatar-editor-choose, .avatar-editor:focus-within .avatar-editor-choose { background: #ffffff25; }
.avatar-editor:hover .avatar-editor-choose .ui-icon, .avatar-editor:focus-within .avatar-editor-choose .ui-icon { opacity: 1; }
.avatar-editor .avatar-editor-remove { position: absolute; top: -.4rem; right: -.4rem; z-index: 2; display: grid; place-items: center; width: 1.85rem; height: 1.85rem; min-height: 0; padding: .35rem; border: 1px solid var(--ui-line); border-radius: 50%; background: var(--ui-surface); color: inherit; opacity: 0; transition: opacity .16s ease; }
.avatar-editor .avatar-editor-remove .ui-icon { width: .95rem; height: .95rem; margin: 0; border-radius: 0; }
.avatar-editor:hover .avatar-editor-remove, .avatar-editor:focus-within .avatar-editor-remove { opacity: 1; }
.contact-presentation-preview { justify-items: start; text-align: left; }
.contact-presentation-preview strong { text-align: left; }
.contact-presentation-actions:empty { display: none; }
@media (hover: none) { .avatar-editor .avatar-editor-choose .ui-icon { opacity: .8; } .avatar-editor .avatar-editor-remove { opacity: 1; } .avatar-editor .avatar-editor-choose { background: #ffffff10; } }
/* Same modal treatment for confirmations, prompts, cropping and notifications. */
:is(dialog.avatar-dialog, dialog.message-actions-dialog, .push-setup-invitation) { border: 0; border-radius: 1.1rem; background: var(--ui-surface); color: var(--text, var(--color-light-01)); box-shadow: 0 18px 70px #0004; }
dialog.avatar-dialog::backdrop { background: #09080b70; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.avatar-dialog-inner { padding: 1.25rem; }
.avatar-dialog-heading h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.avatar-dialog-heading p { font-size: .875rem; line-height: 1.5; opacity: .7; }
.avatar-crop-frame { border-radius: .85rem; box-shadow: none; }
.avatar-crop-frame::after { border-width: 1px; border-color: #ffffff70; border-radius: inherit; }
.avatar-dialog-actions { gap: .65rem; padding-top: .75rem; border-top: 1px solid var(--ui-line); }
.avatar-dialog-actions button { font: inherit; font-size: .9rem; font-weight: 550; min-height: 2.75rem; }
.app-shell .settings-content .settings-group-content { gap: 1rem; }
.app-shell .settings-content button:not(.password-visibility-toggle) { min-height: 2.75rem; border-radius: .65rem; padding: .65rem .9rem; }
.app-shell .settings-content :is(p,small) { line-height: 1.55; }
.app-shell .settings-content input[type="checkbox"]:not(.camayo-switch) { accent-color: var(--ui-accent); }
.app-shell .settings-profile-selection .profile-switcher-menu { position: static; width: 100%; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.settings-profile-selection #profileSwitcherButton { display: none; }
.settings-about-row { display: flex; align-items: stretch; gap: .5rem; margin-top: auto; }
.settings-about-row .category-about { flex: 1; min-width: 0; margin: 0; }
.settings-about-row .app-reload-control { align-self: center; flex-shrink: 0; white-space: nowrap; }
#chat ::selection { background: #9ad2ff80; color: inherit; }
body.touch .message-body > .message-meta { margin-top: .25rem; }
.bubble .text > .link-preview:not(:has(.preview-image)) { width: 100%; }
.bubble .text:has(> .link-preview .preview-image) { max-width: min(23rem, 100%); }
.bubble .text > .message-body:has(~ .link-preview .preview-image),
.bubble .text > .link-preview:has(.preview-image) ~ .message-body { contain: inline-size; }
@media (max-width: 649.98px) { .settings-about-row .category-about::after { display: none; } }
/* One visual group for the images attached to a single message. */
.bubble .text .attachment-frame:has(+ .attachment-frame) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 2px; }
.bubble .text .attachment-frame + .attachment-frame { border-top-left-radius: 0; border-top-right-radius: 0; }
.push-setup { position: fixed; inset: auto 1rem max(1rem, env(safe-area-inset-bottom)) auto; width: min(24rem, calc(100vw - 2rem)); padding: 1.1rem; border: 1px solid var(--ui-line); border-radius: 1rem; background: var(--ui-surface); color: var(--color-light-01); box-shadow: 0 .75rem 3rem #0004; z-index: 700; }
.push-setup strong { font-size: 1rem; }
.push-setup p { font-size: .875rem; line-height: 1.55; margin-block: .6rem 1rem; }
.push-setup-actions { display: flex; justify-content: flex-end; gap: .65rem; }
@media (max-width: 649.98px) { .push-setup { bottom: calc(5rem + env(safe-area-inset-bottom)); } }
/* Inline SVGs inherit the control colour; never paint an icon-sized square. */
svg.ui-icon, .avatar-editor .avatar-editor-choose svg.ui-icon, .avatar-editor .avatar-editor-remove svg.ui-icon { display: block; fill: currentColor; background: none; mask: none; -webkit-mask: none; }
.avatar-editor:hover .avatar-editor-choose, .avatar-editor:focus-within .avatar-editor-choose { background: #00000030; }
.push-setup { transform: none; }
.contact-presentation-preview { justify-items: start; text-align: left; }
.contact-presentation-preview strong { text-align: left; }
.contact-custom-name button { justify-self: start; }
.app-shell .settings-account-actions { display: block; }
.settings-account-actions > section + section { border-top: 1px solid var(--ui-line); margin-top: 1.5rem; padding-top: 1.5rem; }
.settings-account-actions :is(.session-list, .recovery-codes) { list-style: none; padding: 0; display: grid; gap: .8rem; }
.settings-account-actions :is(.session-card, .security-card) { border: 1px solid var(--ui-line); border-radius: .75rem; padding: 1rem; }
.settings-account-actions .session-card h3 { font-size: 1rem; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.settings-account-actions .session-meta { display: grid; grid-template-columns: minmax(5rem,1fr) minmax(0,2fr); gap: .5rem; font-size: .85rem; overflow-wrap: anywhere; }
.settings-account-actions .session-meta dd { margin: 0; }
.settings-account-actions .session-meta dt { opacity: .65; }
.settings-account-actions .totp-qr { width: min(14rem,100%); background: white; padding: .8rem; border-radius: .8rem; }
.settings-account-actions .totp-qr svg { width: 100%; height: auto; }
.avatar-editor [hidden] { display: none !important; }
.app-shell #newChatDialog :is(form, .new-chat-person-list) { background: transparent; padding: 0; }
.app-shell #newChatDialog :is(input,button) { max-width: 100%; box-sizing: border-box; }
.app-shell #newChatDialog form { display: grid; gap: .85rem; }
@media (prefers-reduced-motion: reduce) { .avatar-editor button, .avatar-editor .ui-icon { transition: none !important; } }
.app-shell #newChatDialog :is(.sidebar-list, .sidebar-address-book-list) { grid-template-columns: minmax(0,1fr); min-width: 0; }
.app-shell #newChatDialog li { min-width: 0; }
/* Keep the picker controls fixed; only the active result list scrolls. */
.app-shell #newChatDialog { overflow: hidden; }
.app-shell #newChatDialog[open] { display: flex; flex-direction: column; }
.app-shell #newChatDialog > :is(.group-dialog-heading,.new-chat-tabs,.group-dialog-status) { flex-shrink: 0; }
.app-shell #newChatDialog .new-chat-tab-panel:not([hidden]), .app-shell #newChatDialog #addressBookSection:not([hidden]) { display: flex; flex-direction: column; flex: 1 1 0px; min-height: 0; min-width: 0; overflow: hidden; }
.app-shell #newChatDialog :is(.new-chat-tab-panel,#addressBookSection) > :not(.sidebar-list,#addressBookSection) { flex-shrink: 0; }
.app-shell #newChatDialog :is(.sidebar-address-book-list,.new-chat-person-list,.new-chat-conversation-list) { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; touch-action: pan-y pinch-zoom; -webkit-overflow-scrolling: touch; align-content: start; scroll-padding-block: .5rem; }

.status-as-toast { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%) !important; border: 0 !important; }
.ui-toast { position: fixed; z-index: 13000; right: max(1rem,env(safe-area-inset-right)); bottom: var(--toast-bottom,calc(1rem + env(safe-area-inset-bottom))); display: grid; grid-template-columns: 1.25rem minmax(0,1fr) 2rem; align-items: center; gap: .7rem; box-sizing: border-box; width: max-content; max-width: min(25rem,calc(100vw - 2rem)); padding: .55rem .6rem .55rem .85rem; border: 0; border-radius: 1rem; background: color-mix(in srgb,var(--ui-surface) 94%,var(--text,var(--color-light-01))); color: var(--text,var(--color-light-01)); box-shadow: 0 .3rem 1.2rem #0003; font: inherit; font-size: max(.8rem,14px); line-height: 1.4; pointer-events: auto; --toast-tone: #49ad79; }
.ui-toast[data-tone="warning"] { --toast-tone: #e39a3b; }
.ui-toast[data-tone="error"] { --toast-tone: #dc6570; }
.ui-toast-icon { display: grid; place-items: center; color: color-mix(in srgb,currentColor 65%,var(--toast-tone)); }
.ui-toast-icon svg { display: block; width: 1.2rem; height: 1.2rem; fill: currentColor; }
.ui-toast-message { min-width: 0; overflow-wrap: anywhere; }
.ui-toast-close { display: grid; place-items: center; width: 2rem; height: 2rem; min-height: 0; padding: .5rem; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.ui-toast-close svg { display: block; width: .85rem; height: .85rem; fill: currentColor; opacity: .65; }
.ui-toast-close:hover, .ui-toast-close:focus-visible { background: color-mix(in srgb,currentColor 9%,transparent); }
.ui-toast-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (pointer: coarse) { .ui-toast { grid-template-columns: 1.25rem minmax(0,1fr) max(2.75rem,44px); padding-block: .3rem; } .ui-toast-close { width: max(2.75rem,44px); height: max(2.75rem,44px); } }

.settings-profile-selection .profile-switcher-option .profile-switcher-avatar::after { content: none; }
.local-testing-inline > section + section { border-top: 1px solid var(--ui-line); padding-top: 1.5rem; margin-top: 1.5rem; }
.local-testing-inline ul { list-style: none; padding: 0; display: grid; gap: .75rem; }
.local-testing-inline li { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; padding: 1rem; border: 1px solid var(--ui-line); border-radius: .75rem; }
.local-testing-inline .identity { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.local-testing-inline .identity :is(strong, small) { display: block; }
.local-testing-inline .identity small { opacity: .65; font-size: .8rem; margin-top: .35rem; }
.local-testing-inline form.create { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.local-testing-inline form.create label { display: grid; gap: .5rem; flex: 1 1 12rem; }
.local-testing-inline .hint { font-size: .875rem; opacity: .7; }

#settingsCategories .category-button[hidden] { display: none; }
/* View headings receive focus for announcements, not a control-style outline. */
#settingsPageTitle:focus { outline: none; }
.settings-profile-selection .profile-switcher-menu { display: grid; gap: .5rem; }
.settings-profile-selection .profile-switcher-manage { justify-self: start; margin: .4rem 0 0; text-align: left; }
.app-shell .settings-content .local-testing-inline { text-align: left; }
.app-shell .settings-content .local-testing-inline h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .65rem; }
.app-shell .settings-content .local-testing-inline form { display: flex; flex-direction: row; flex-wrap: wrap; align-items: end; justify-content: flex-start; gap: .75rem; margin: 1rem 0 0; width: auto; }
.app-shell .settings-content .local-testing-inline form.create { display: grid; grid-template-columns: minmax(0, 22rem) auto; justify-content: start; }
.app-shell .settings-content .local-testing-inline form.create label { display: grid; gap: .5rem; min-width: 0; font-size: .9rem; font-weight: 500; }
.app-shell .settings-content .local-testing-inline input:not([type="hidden"]) { width: 100%; height: 2.75rem; min-height: 2.75rem; }
.app-shell .settings-content .local-testing-inline button, .app-shell .settings-account-actions button:not(.password-visibility-toggle) { width: auto; min-height: 2.75rem; border: 1px solid var(--ui-line); background: var(--shell-selection); color: inherit; font-size: .875rem; font-weight: 550; text-align: left; }
.app-shell .settings-content .local-testing-inline form.create button { background: var(--camayo-primary); border-color: transparent; color: var(--camayo-on-primary); }
.app-shell .settings-content .local-testing-inline .actions form { margin: 0; }
.app-shell .settings-content .local-testing-inline .actions button { font-size: .85rem; }
@media (max-width: 649.98px) { .app-shell .settings-content .local-testing-inline form.create { grid-template-columns: minmax(0,1fr); } .app-shell .settings-content .local-testing-inline form.create button { justify-self: start; } }
@media (max-width: 649.98px) {
  .app-shell .settings-content .local-testing-inline li { flex-direction: column; align-items: flex-start; }
  .app-shell .settings-content .local-testing-inline .identity { width: 100%; }
}
#companyFrame { width:100%; min-width:0; border:0; display:block; }
html .app-shell .settings-account-actions button:not(.password-visibility-toggle) { background:var(--selection,var(--shell-selection)); color:var(--text,var(--color-light-01)); border:1px solid transparent; }
html .app-shell .settings-account-actions button:not(.password-visibility-toggle):hover { background:color-mix(in srgb,currentColor 12%,var(--ui-surface)); color:var(--text,var(--color-light-01)); filter:none; }

.app-shell, .company-page { --camayo-text:var(--text,var(--color-light-01)); --camayo-muted:var(--muted,var(--color-light-01)); --camayo-surface:var(--ui-surface); --camayo-canvas:var(--ui-surface); }
html .camayo-button--secondary { border-color:transparent; background:color-mix(in srgb,var(--camayo-text) 8%,var(--camayo-surface)); color:var(--camayo-text); font-weight:550; }
html .camayo-button--secondary:not(:disabled):hover { background:color-mix(in srgb,var(--camayo-text) 13%,var(--camayo-surface)); color:var(--camayo-text); }
.sidebar-conversation-button .sidebar-item-icon { border-radius:.3rem; }
.sidebar-conversation-button[data-conversation-type="direct"] .sidebar-item-icon { border-radius:.3rem; }
@media (max-width:649.98px) {
  .app-shell .database-sidebar { padding-top:0; }
  .app-shell .sidebar-toolbar { top:0; height:calc(3.5rem + env(safe-area-inset-top,0px)); min-height:calc(3.5rem + env(safe-area-inset-top,0px)); box-sizing:border-box; padding:env(safe-area-inset-top,0px) .45rem 0; align-items:center; }
  .app-shell .sidebar-toolbar h2 { margin:0; font-size:1.2rem; font-weight:650; line-height:1.4; }
  .app-shell .settings-navigation { padding-top:0; }
  .settings-navigation h1 { display:flex; align-items:center; height:calc(3.5rem + env(safe-area-inset-top,0px)); box-sizing:border-box; margin:0; padding:env(safe-area-inset-top,0px) .6rem 0; }
  .app-shell .settings-content .section-heading { height:calc(3.5rem + env(safe-area-inset-top,0px)); min-height:calc(3.5rem + env(safe-area-inset-top,0px)); box-sizing:border-box; margin:0; padding:env(safe-area-inset-top,0px) 0 0; }
}
@media (max-width:649.98px) {
  .section-heading h1, #accountPageTitle { min-width:0; overflow:hidden; text-overflow: clip;
  -webkit-mask-image: var(--text-overflow-mask, none);
  --text-overflow-kind: single;
  mask-image: var(--text-overflow-mask, none); white-space:nowrap; }
}
/* Destructive menu labels need contrast on both pale and dark surfaces. */
/* Shared action controls. Navigation rows retain their reading alignment. */
html body :is(button, .button) { transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease; }
html body :is(form, .row, .session-actions, .avatar-dialog-actions, .camayo-dialog__actions) :is(button, .button),
html body :is(.settings-content, .contact-presentation) > button,
html body :is(.code-rotate, .camayo-button) { text-align: center; justify-content: center; }
html body button:disabled { cursor: default; opacity: .5; }
/* The overlay covers the entire avatar, including the generated fallback. */
html body .avatar-editor > button.avatar-editor-choose, html body .avatar-editor > #avatarDropArea.avatar-editor-choose { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; border-radius: inherit; background: transparent; color: white; display: grid; place-items: center; text-decoration: none; box-shadow: none; }
html body .avatar-editor:is(:hover,:focus-within) > button.avatar-editor-choose, html body .avatar-editor:is(:hover,:focus-within) > #avatarDropArea.avatar-editor-choose { background: #0007; color: white; }
html body.app-shell .avatar-editor > button.avatar-editor-remove:not(#_) { inset: -.1rem -.1rem auto auto; display: grid; place-items: center; box-sizing: border-box; width: 2.1rem; min-width: 0; height: 2.1rem; min-height: 0; padding: 0; border: .18rem solid var(--sidebar-background); border-radius: 50%; background: light-dark(#e4e0e6, #3b3840); color: var(--color-light-01); box-shadow: none; }
html body.app-shell .avatar-editor > button.avatar-editor-remove[hidden] { display: none !important; }
html body.app-shell .avatar-editor > button.avatar-editor-remove:not(#_):hover { background: light-dark(#d9d4dc, #4a4650); }
html body .avatar-editor .ui-icon { transition: opacity 140ms ease; }
html .app-shell input[type="file"] { box-sizing: border-box; width: 100%; padding: .65rem; min-height: 3.5rem; border: 1px dashed var(--ui-line); border-radius: .8rem; background: color-mix(in srgb,currentColor 3%,transparent); color: inherit; font: inherit; font-size: .875rem; }
html body input[type="file"]::file-selector-button { margin-right: .8rem; border: 0; border-radius: .5rem; padding: .6rem .8rem; background: color-mix(in srgb,currentColor 10%,var(--ui-surface)); color: inherit; font: inherit; cursor: pointer; }
html body input[type="file"]::file-selector-button:hover { background: color-mix(in srgb,currentColor 16%,var(--ui-surface)); }
/* One heading baseline for chat, picker, settings and profile. */
.app-shell { --view-heading-height: 4rem; }
html .app-shell :is(.database-sidebar,.settings-navigation) { padding-top: 0; }
html .app-shell .sidebar-toolbar { top: 0; height: var(--view-heading-height); min-height: var(--view-heading-height); padding: 0 .6rem; margin: 0; box-sizing: border-box; align-items: center; }
html .app-shell .settings-navigation h1 { height: var(--view-heading-height); padding: 0 .6rem; margin: 0; display: flex; align-items: center; box-sizing: border-box; }
html .app-shell .section-heading { height: var(--view-heading-height); min-height: var(--view-heading-height); padding: 0; margin: 0; box-sizing: border-box; }
html .app-shell #newChatDialog { padding-top: 0; padding-inline: 1.25rem; }
html .app-shell #newChatDialog .group-dialog-heading { height: var(--view-heading-height); margin: 0 0 .5rem; padding: 0; box-sizing: border-box; }
html .app-shell :is(.sidebar-toolbar h2,.settings-navigation h1,.section-heading h1,#newChatDialogTitle) { font-size: 1.2rem; font-weight: 650; line-height: 1.4; letter-spacing: -.025em; margin: 0; }
@media (max-width:649.98px) {
  .app-shell { --view-heading-height: calc(3.5rem + env(safe-area-inset-top,0px)); }
  /* The settings titles take their inset from the shared settings heading rule below. */
  html .app-shell :is(.sidebar-toolbar,.section-heading,#newChatDialog .group-dialog-heading) { padding-top: env(safe-area-inset-top,0px); }
}
@media (prefers-reduced-motion:reduce) {
  html body :is(button,.button), html body .avatar-editor .ui-icon { transition: none; animation: none; }
}
/* Embedded profile uses the parent viewport, which includes the desktop rail. */

/* Settings headers stay outside the scroll surface; content scrolls behind
   the title's fading surface (.scroll-fade-before) and rests below it. */
.app-shell #settingsPane { overflow: clip; }
.app-shell #settingsContent { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto minmax(0,1fr); overflow: hidden; padding-bottom: 0; }
.app-shell #settingsPages { box-sizing: border-box; min-height: 0; width: 100%; overflow: auto; padding: 1.6rem .2rem 3rem; }
.app-shell #settingsPages .settings-group { padding-top: 0; margin-top: 0; }
.app-shell .settings-pane #switchTheme label { transition: background-color 140ms ease, box-shadow 140ms ease; }
.app-shell .settings-pane #switchTheme label:has(:checked) { background: color-mix(in srgb, var(--color-light-01) 23%, var(--color-background-01)); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--color-light-01) 25%,transparent); color: var(--color-light-01); font-weight: 650; }
.app-shell .settings-pane #switchTheme label:focus-within { outline: none; }
.app-shell .settings-pane #switchTheme label:has(:focus-visible) { outline: 2px solid var(--camayo-focus); outline-offset: 2px; }
.sidebar-conversation-button .sidebar-avatar { position: relative; display: block; width: var(--sidebar-avatar-size); height: var(--sidebar-avatar-size); grid-row: 1 / span 2; grid-column: 1; }
.sidebar-conversation-button .sidebar-avatar .sidebar-item-icon {
  width: 100%;
  height: 100%;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  overflow: hidden;
  border-radius: 50%;
}
.sidebar-conversation-button .sidebar-avatar-image { min-width: 0; min-height: 0; }
.sidebar-avatar-flags {
  position: absolute;
  inset-block-start: -.29rem;
  inset-inline-end: -.34rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .16rem;
  box-sizing: border-box;
  width: 1.25rem;
  height: 1.25rem;
  padding: .18rem;
  overflow: hidden;
  transition: width 160ms ease-out;
  border-radius: 2rem;
  color: var(--color-light-01);
  background: var(--color-background-01);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-light-01) 16%, transparent);
}
.is-muted .sidebar-avatar-flags:has(.sidebar-pinned-indicator) { width: 2.25rem; }
.sidebar-avatar-flags :is(.sidebar-muted-indicator, .sidebar-pinned-indicator) {
  display: grid;
  place-items: center;
  flex: none;
  width: .82rem;
  height: .82rem;
  margin: 0;
  color: inherit;
}
.sidebar-avatar-flags[hidden], .sidebar-avatar-flags > [aria-hidden="true"] { display: none; }
.sidebar-avatar-flags .ui-icon { display: block; width: .82rem; height: .82rem; fill: currentColor; stroke: none; }
.sidebar-avatar-flags .sidebar-pinned-indicator .ui-icon { rotate: 45deg; }
.sidebar-list > [data-pinned] + li:not([data-pinned]) { margin-block-start: .35rem; }
[data-touch-pin-sort] .sidebar-conversation-button[data-pin-draggable] {
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}
#databaseSidebar:not([data-pin-sort]) .sidebar-pin-sort-heading,
#databaseSidebar[data-pin-sort] .sidebar-toolbar h2:not(.sidebar-pin-sort-heading) { display: none; }
#databaseSidebar[data-pin-sort] #chatListCancelSelection { width: auto; padding-inline: .65rem; font-weight: 650; }
.sidebar-chat-selection-dot {
  position: absolute;
  inset-inline-start: var(--selection-dot-gap);
  inset-block-start: 50%;
  transform: translateY(-50%) scale(.85);
  box-sizing: border-box;
  width: var(--selection-dot-size);
  height: var(--selection-dot-size);
  border: 1.5px solid var(--color-light-01);
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 110ms ease-out, transform 160ms ease-out;
}
.sidebar-chat-selection-dot svg { width: .83rem; height: .83rem; visibility: hidden; }
.sidebar-conversation-button {
  --sidebar-avatar-size: 2.85rem;
  column-gap: .75rem;
  --selection-dot-gap: .6rem;
  --selection-dot-size: 1.25rem;
  grid-template-columns: var(--sidebar-avatar-size) minmax(0, 1fr) max-content;
  grid-template-rows: 1.2rem 1.8rem;
  min-height: 3.9rem;
  position: relative;
  padding-inline-start: .58rem;
}
.sidebar-conversation-button .sidebar-item-details {
  align-self: start;
  align-items: flex-start;
  font-size: .75rem;
  line-height: 1.2;
  white-space: normal;
}
.sidebar-conversation-button :is(.sidebar-preview-copy,.sidebar-presence-copy) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sidebar-preview-media-icon {
  display: inline-flex;
  margin-inline-end: .4em;
  vertical-align: -.12em;
}
.sidebar-preview-media-icon > svg { width: 1.08em; height: 1.08em; }
html body .sidebar-conversation-button {
  transition: padding-left 230ms cubic-bezier(.25, .1, .25, 1),
    padding-right 230ms cubic-bezier(.25, .1, .25, 1),
    background-color 140ms ease, color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease, opacity 140ms ease !important;
}
.sidebar-conversation-button[aria-pressed] {
  padding-inline-start: calc(var(--selection-dot-size) + 2 * var(--selection-dot-gap));
}
.sidebar-conversation-button[aria-pressed] .sidebar-chat-selection-dot {
  opacity: 1;
  transform: translateY(-50%);
  transition-delay: 55ms;
}
.sidebar-conversation-button[aria-pressed="true"] .sidebar-chat-selection-dot { background: #0873c4; border-color: #0873c4; color: white; }
.sidebar-conversation-button[aria-pressed="true"] .sidebar-chat-selection-dot svg { visibility: visible; }
.sidebar-toolbar-actions .sidebar-list-control[hidden],
.sidebar-toolbar-actions :is(.sidebar-archive-toggle,.sidebar-add-button)[hidden] { display: none; }
#databaseSidebar .sidebar-toolbar-actions .sidebar-list-control:not([hidden]) {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  color: var(--color-light-01);
}
.sidebar-toolbar-actions .sidebar-list-control svg { display: block; width: 1.05rem; height: 1.05rem; fill: currentColor; }
.app-shell .sidebar-toolbar-actions #chatListActions:is(:active,[aria-expanded="true"]) { background: var(--shell-selection); }
.app-shell .sidebar-toolbar-actions #chatListActions:focus-visible,
.app-shell .conversation-menu-button:focus-visible { outline: 2px solid var(--camayo-focus-ring); outline-offset: -2px; }
.sidebar-toolbar-actions #chatListSelectAll { font-size: .8rem; font-weight: 650; }
@media (prefers-reduced-motion: reduce) {
  html body .sidebar-conversation-button { transition: none !important; }
  .sidebar-chat-selection-dot { transition: none; }
}
.sidebar-item-with-action.is-pin-placeholder { opacity: .25; }
.sidebar-pin-ghost {
  position: fixed;
  z-index: 400;
  pointer-events: none;
  list-style: none;
  border-radius: .55rem;
  background: var(--color-background-01);
  box-shadow: 0 .5rem 1.4rem #0005;
}
.sidebar-pin-ghost .sidebar-item-actions { display: none; }

.sidebar-group-indicator { display: inline-block; width: .9rem; height: .9rem; margin-right: .35rem; vertical-align: -.1rem; }
.sidebar-group-indicator svg { width: 100%; height: 100%; fill: currentColor; }
html body :is(.avatar-editor,.account-contact-avatar,.profile-switcher-avatar,.contact-presentation-avatar,.avatar,.sidebar-person-avatar,.conversation-header-avatar,.conversation-header-avatar-fallback) { border-radius: .3rem; }
@media (max-width: 649.98px) {
  .app-shell .settings-pane:not(.has-detail) #settingsContent { display: none; }
  .app-shell #settingsPages { padding-bottom: calc(6rem + env(safe-area-inset-bottom,0px)); }
}
@media (prefers-reduced-motion: reduce) { .app-shell .settings-pane #switchTheme label { transition: none; } }

.app-shell .settings-pane #switchTheme { box-sizing: border-box; min-width: 0; }

@keyframes settings-content-enter { from { opacity: 0; transform: translateY(.25rem); } to { opacity: 1; transform: translateY(0); } }
.app-shell #settingsPages > .settings-group:not([hidden]) { animation: settings-content-enter 160ms ease-out; }
@media (max-width: 649.98px) {
  .app-shell #settingsPages > .settings-group:not([hidden]) { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-avatar-flags { transition: none; }
  .app-shell #settingsPages > .settings-group { animation: none; }
}

/* Visibility is an explicit draft; status occupies a stable space while saving. */
html .profile-switcher-option { box-sizing: border-box; margin: 0; min-height: 3.5rem; border: 1px solid transparent; transition: background 160ms ease, border-color 160ms ease; }
html .profile-switcher-option[aria-current="true"] { background: transparent; }
html .profile-switcher-option[data-selected="true"] { background: color-mix(in srgb, var(--color-accent-01) 12%, transparent); border-color: color-mix(in srgb, var(--color-accent-01) 38%, transparent); box-shadow: none; }
html .profile-switcher-option:hover { background: color-mix(in srgb, var(--color-accent-01) 18%, transparent); }
html .profile-switcher-option input[type="checkbox"] { grid-column: 4; margin: 0; justify-self: end; }
.profile-switcher-save { display: grid; gap: .5rem; margin-top: .5rem; }
html .profile-switcher-save-status { min-height: 2.8em; margin: 0; font-size: .82rem; line-height: 1.4; opacity: .75; }
html .profile-switcher-save .profile-switcher-apply { justify-self: start; min-width: 11rem; margin: 0; text-align: center; }

/* The archive count is independent of which list is currently open. */
.app-shell .sidebar-toolbar-actions .sidebar-archive-toggle { position: relative; }
.sidebar-archive-badge { position: absolute; top: -.15rem; right: -.2rem; display: grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; box-sizing: border-box; border-radius: 999px; background: #c73550; color: #fff; font: 650 .65rem/1 system-ui, sans-serif; pointer-events: none; }
.sidebar-archive-badge[hidden] { display: none; }
#desktopArchiveButton { position: relative; }
#desktopArchiveButton > span:first-child { display: grid; place-items: center; }
#databaseSidebar .sidebar-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .2rem;
  padding-inline: 0;
}
#databaseSidebar .sidebar-toolbar h2 {
  grid-area: 1 / 1 / 2 / -1;
  justify-self: center;
  max-inline-size: calc(100% - 6rem);
  font-size: .94rem;
  font-weight: 550;
  text-align: center;
  text-overflow: ellipsis;
  pointer-events: none;
}
#databaseSidebar .sidebar-pin-sort-heading { max-inline-size: calc(100% - 8rem); }
#databaseSidebar .sidebar-toolbar h2[hidden],
#databaseSidebar[data-selecting] .sidebar-heading,
#databaseSidebar[data-selecting] .sidebar-archive-heading { display: none; }
.sidebar-toolbar-start { grid-area: 1 / 1; justify-content: flex-start; }
.sidebar-toolbar-end { grid-area: 1 / 2; justify-content: flex-end; }
#sidebarListScroller {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 0;
  overflow: hidden;
}
#sidebarListScroller > .sidebar-search {
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-light-01) 8%, var(--sidebar-background));
  padding-inline: .65rem;
}
#databaseSidebar #showArchiveButton, #databaseSidebar #closeArchiveButton { display: none; }
@media (max-width: 649.98px) {
  #desktopArchiveButton { display: none; }
  .app-shell #databaseSidebar {
    --sidebar-toolbar-height: calc(3.55rem + env(safe-area-inset-top, 0px));
    --sidebar-fade-start: calc(.05rem + env(safe-area-inset-top, 0px));
    --sidebar-search-clearance: .55rem;
    --sidebar-archive-height: 2rem;
    --sidebar-archive-gap: .55rem;
    padding-top: 0;
  }
  .app-shell #databaseSidebar > .sidebar-toolbar {
    position: relative;
    top: auto;
    height: var(--sidebar-toolbar-height);
    padding-block: calc(.35rem + env(safe-area-inset-top, 0px)) .35rem;
    align-items: center;
    background: transparent;
    isolation: isolate;
  }
  #sidebarListScroller {
    /* The rows scroll under the toolbar and fade out (.scroll-fade) without tinting its background. */
    margin-top: calc(-1 * var(--sidebar-toolbar-height));
    padding-top: var(--sidebar-toolbar-height);
    scroll-padding-top: var(--sidebar-toolbar-height);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    overflow-anchor: none;
    scrollbar-width: none;
    --scroll-fade-top-inset: var(--sidebar-fade-start);
    --scroll-fade-top: 4.35rem;
  }
  #sidebarListScroller > #conversationSections {
    flex: 0 0 auto;
    min-height: 100%;
    box-sizing: border-box;
    overflow: visible;
    margin-top: 0;
    padding-top: 0;
    mask-image: none;
    -webkit-mask-image: none;
  }
  #sidebarListScroller:has(#showArchiveButton:not([hidden])) > #conversationSections {
    min-height: calc(100% - var(--sidebar-archive-height) - var(--sidebar-archive-gap));
  }
  #chatList #showArchiveButton:not([hidden]) + #conversationSections .sidebar-list { margin-top: 0; }
  #sidebarListScroller:has(.sidebar-search.has-query, .search-filter-wrapper:not([hidden])) { overflow: hidden; }
  #sidebarListScroller > .sidebar-search {
    --search-full-height: 2.35rem;
    --search-height: var(--mobile-search-height, var(--search-full-height));
    position: sticky;
    top: var(--sidebar-search-clearance);
    margin-top: var(--sidebar-search-clearance);
    height: var(--search-height);
    min-height: 0;
    margin-bottom: calc(.3rem + var(--search-full-height) - var(--search-height));
    overflow: clip;
  }
  #sidebarListScroller > .sidebar-search:not([data-search-sized]) { visibility: hidden; }
  #sidebarListScroller > .sidebar-search > * { filter: opacity(var(--mobile-search-content-opacity, 1)); }
  #sidebarListScroller > .sidebar-search[data-collapsed] { pointer-events: none; }
  #sidebarListScroller > .sidebar-search:focus-within { --search-height: var(--search-full-height); pointer-events: auto; }
  #sidebarListScroller > .sidebar-search:focus-within > * { filter: opacity(1); }
  #databaseSidebar > .sidebar-toolbar {
    /* Only toolbar controls receive taps through the overlap with a revealed search. */
    pointer-events: none;
  }
  #databaseSidebar > .sidebar-toolbar button { pointer-events: auto; }
  #sidebarListScroller > #globalChatSearchResults { margin-top: 0; }
  #databaseSidebar #showArchiveButton:not([hidden]) {
    position: relative;
    display: grid;
    grid-template-columns: 2.85rem 1fr auto;
    align-items: center;
    gap: .65rem;
    flex: 0 0 var(--sidebar-archive-height);
    margin-top: var(--sidebar-archive-gap);
    padding: 0 .75rem 0 .58rem;
    border: 0;
    border-radius: .6rem;
    color: var(--color-placeholder);
    background: transparent;
    font: inherit;
    font-size: .85rem;
    font-weight: 550;
    text-align: start;
  }
  #databaseSidebar #showArchiveButton:not([hidden]):is(:hover,:focus-visible) { background: var(--shell-selection); }
  #showArchiveButton .sidebar-archive-row-icon { display: grid; place-items: center; }
  #showArchiveButton .sidebar-archive-row-icon .ui-icon { width: 1.2rem; height: 1.2rem; }
  #showArchiveButton .sidebar-archive-badge { position: static; }
  #databaseSidebar #closeArchiveButton:not([hidden]) { display: grid; place-items: center; }
  #closeArchiveButton svg { rotate: 90deg; }
}
@media (max-width: 649.98px) { body.sidebar-button-back { --mobile-pane-duration: .18s; } }
@media (hover: none) { .message-actions-trigger:not(.is-pending-action) { display: none; } }

.swipe-setting-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem; color: #fff; background: var(--message-action-blue); }
.swipe-preview-hint { background: var(--message-action-blue); }
:is(.swipe-setting-icon, .swipe-preview-hint)[data-tone="sky"] { background: var(--message-action-sky); }
:is(.swipe-setting-icon, .swipe-preview-hint)[data-tone="indigo"] { background: var(--message-action-indigo); }
:is(.swipe-setting-icon, .swipe-preview-hint)[data-tone="mint"] { background: var(--message-action-mint); }
:is(.swipe-setting-icon, .swipe-preview-hint)[data-tone="green"] { background: var(--message-action-green); }
:is(.swipe-setting-icon, .swipe-preview-hint)[data-tone="orange"] { background: var(--message-action-orange); }
:is(.swipe-setting-icon, .swipe-preview-hint)[data-tone="danger"] { background: var(--message-action-danger); }
.swipe-setting-icon[data-tone="none"] { background: var(--ui-surface); color: var(--color-light-01); }
.swipe-setting-icon .ui-icon { width: 1.2rem; height: 1.2rem; fill: currentColor; }

/* Settings copy can be selected without changing how controls behave. */
.swipe-select-chevron { display: flex; flex: 0 0 .9rem; }
.swipe-select-chevron .ui-icon { width: .9rem; height: .9rem; }

#settingsPane, #settingsPane * { user-select: text !important; -webkit-user-select: text !important; }
#settingsPane :is(button,button *,input,select,textarea) { user-select: auto !important; -webkit-user-select: auto !important; }

/* Section subtitles share the heading alignment on settings and profile pages. */
:is(.settings-group-content) :is(h2,h3,h4) { text-align: left; }

/* Keep reaction contents below the bubble, including audio timestamps. */
.bubble .text:has(.reaction) { margin-bottom: 1.8rem; }
.reactions { top: calc(100% - 1px); bottom: auto; gap: 5px; }
.reaction { position: relative; display: inline-flex; align-items: center; gap: 3px; min-height: 24px; padding: 2px 7px; line-height: 1; font-size: .7rem; }
.reaction:only-child::after { content: ''; position: absolute; inset: -4px -2px; }
.reaction-glyph { display: inline-block; font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-size: .85rem; line-height: 1.2; transform-origin: center; }

/* List containers and items need an explicit override of the app-wide selection reset. */
body:not(.touch) .bubble :is(.text-content,.attachment-caption) :is(a,span,strong,em,b,i,s,u,code,ul,ol,li),
.message-actions-preview .bubble a { user-select: text; -webkit-user-select: text; -webkit-user-drag: none; }

/* Reply previews are tap/drag controls; message-body text stays selectable. */
#chat .text-reply, #chat .text-reply * { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }

:is(.mobile-message-actions, .message-actions-return) .message-actions-options { max-width: 100%; align-self: flex-start; }
:is(.mobile-message-actions, .message-actions-return)[data-side="me"] .message-actions-options { align-self: flex-end; }
.text-reply { position: relative; }
.reply-summary { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.reply-summary .ui-icon { flex: 0 0 1rem; width: 1rem; height: 1rem; fill: currentColor; }
.reply-summary-label { display: block; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; mask-image: linear-gradient(to right,#000 calc(100% - 1.5rem),transparent); }
/* Voice labels include the duration: reserve their content width instead of
   sizing them from the answer and fading out the final digits. */
.reply-summary--voice { inline-size: max-content; max-inline-size: 100%; }
.reply-summary--voice .reply-summary-label { flex: 0 1 auto; white-space: normal; overflow-wrap: anywhere; mask-image: none; -webkit-mask-image: none; }
.reply-thumbnail { display: none; position: absolute; top: 0; right: 0; bottom: 0; width: 3.5rem; pointer-events: none; }
.reply-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reply-thumbnail img.is-site-icon { box-sizing: border-box; padding: .85rem; object-fit: contain; background: color-mix(in srgb, currentColor 8%, transparent); }
.text-reply:has(> .reply-thumbnail[data-reserved]), .text-reply.has-reply-thumbnail { padding-right: 4rem; }
.text-reply > .reply-thumbnail[data-reserved], .text-reply.has-reply-thumbnail .reply-thumbnail { display: block; }
.message-forwarded-label + .text-reply { border-radius: 0; }

/* Reactions share one pill; individual counts remain attached to their emoji. */
.bubble .reactions { --reaction-surface: color-mix(in srgb,var(--color-light-01) 12%,var(--ui-surface)); gap: 0; padding: 0; margin-top: -3px; border: 0; border-radius: 999px; }
.bubble .text:has(.voice-message, .attachment-audio) .reactions { margin-top: -1px; }
/* Large emoji have no bubble: the pill starts below their time, on their side. */
.bubble .text.is-emoji-only > .reactions { margin-top: 4px; }
.bubble.other .text.is-emoji-only > .reactions { left: 0; }
.bubble.me .text.is-emoji-only > .reactions { right: 0; }
.bubble .text.is-emoji-only:has(> .reactions) { margin-bottom: 2.15rem; }
/* A real gap between bubble and pill, the chat background showing through:
   the bubble is clipped to everything except a ring of --reaction-gap around
   the pill (even-odd: a large area, the grown pill, the pill itself). A clip
   path may reach beyond the bubble, unlike a mask in WebKit, so the tail, the
   author's picture and the swipe action stay visible. reaction-motion.js
   cutReactionGaps() measures the pill once: its offset from its anchored side
   (left, or right for own messages), from the bubble's bottom, and its size.
   Without shape() support there is simply no gap. */
@property --reaction-cut-x { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --reaction-cut-b { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --reaction-cut-w { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --reaction-cut-h { syntax: '<length>'; inherits: false; initial-value: 0px; }
@supports (clip-path: shape(from 0 0, line to 1px 1px)) {
  .bubble .text.has-reaction-cutout {
    /* --cut-in: the pill is shown slightly inside its own edge, so the
       bubble's colour never shows through the pill's anti-aliased rim. */
    --cut-gap: 3px; --cut-in: .5px; --cut-r: calc(var(--reaction-cut-h) / 2); --cut-l: var(--reaction-cut-x);
    --cut-top: calc(100% - var(--reaction-cut-b) - var(--reaction-cut-h)); --cut-bottom: calc(100% - var(--reaction-cut-b));
    --cut-start: calc(var(--cut-l) + var(--cut-r)); --cut-end: calc(var(--cut-l) + var(--reaction-cut-w) - var(--cut-r));
    clip-path: shape(evenodd from -100vw -200px, line to calc(100% + 100vw) -200px, line to calc(100% + 100vw) calc(100% + 200px), line to -100vw calc(100% + 200px), close,
      move to var(--cut-start) calc(var(--cut-top) - var(--cut-gap)), line to var(--cut-end) calc(var(--cut-top) - var(--cut-gap)), arc to var(--cut-end) calc(var(--cut-bottom) + var(--cut-gap)) of calc(var(--cut-r) + var(--cut-gap)) cw,
      line to var(--cut-start) calc(var(--cut-bottom) + var(--cut-gap)), arc to var(--cut-start) calc(var(--cut-top) - var(--cut-gap)) of calc(var(--cut-r) + var(--cut-gap)) cw, close,
      move to var(--cut-start) calc(var(--cut-top) + var(--cut-in)), line to var(--cut-end) calc(var(--cut-top) + var(--cut-in)), arc to var(--cut-end) calc(var(--cut-bottom) - var(--cut-in)) of calc(var(--cut-r) - var(--cut-in)) cw,
      line to var(--cut-start) calc(var(--cut-bottom) - var(--cut-in)), arc to var(--cut-start) calc(var(--cut-top) + var(--cut-in)) of calc(var(--cut-r) - var(--cut-in)) cw, close);
  }
  .bubble.me .text.has-reaction-cutout { --cut-l: calc(100% - var(--reaction-cut-x) - var(--reaction-cut-w)); }
}
.bubble:is(.me,.other) .reaction { box-sizing: border-box; justify-content: center; height: 24px; min-height: 24px; min-width: 30px; padding: 2px 8px 2px 4px; gap: 4px; margin: 0; border: 0; border-radius: 0; background: var(--reaction-surface); color: var(--color-light-01); font-size: .7rem; font-weight: 500; }
/* A lone pill is round; the short start padding is only for a face's round edge. */
.bubble:is(.me,.other) .reaction:only-child { min-width: 34px; padding-inline-end: 9px; border-radius: 999px; }
/* Without faces the emoji is centred, alone or among others. */
.bubble:is(.me,.other) .reaction:not(.has-people) { padding-inline: 6px; }
.bubble:is(.me,.other) .reaction:hover { background: color-mix(in srgb,currentColor 10%,var(--reaction-surface)); }
/* Neighbouring reactions overlap by a pixel so no seam shows between them. */
.bubble:is(.me,.other) .reaction + .reaction { margin-inline-start: -1px; }
/* Each face has a thin ring in the person's name colour (person-colors.css,
   contrast-checked on message surfaces in both themes, which the pill shares).
   A face in front rings over the one behind it, which keeps them apart. */
.bubble .reaction-person { box-shadow: 0 0 0 1.5px var(--person-color, color-mix(in srgb, currentColor 55%, transparent)); }
.reaction-count { line-height: 1; font-variant-numeric: tabular-nums; }
.reaction-people { display: inline-flex; flex: none; }
.reaction-person { position: relative; display: grid; place-items: center; width: 17px; height: 17px; overflow: hidden; border-radius: 50%; color: #fff; font: 600 9px/1 system-ui, -apple-system, sans-serif; background: #3f7d88; }
.reaction-person + .reaction-person { margin-inline-start: -6px; }
.reaction-person > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reaction-person[data-tone="1"] { background: #7a5ea8; } .reaction-person[data-tone="2"] { background: #b0663a; } .reaction-person[data-tone="3"] { background: #4b8a55; }
.reaction-person[data-tone="4"] { background: #4d6fb0; } .reaction-person[data-tone="5"] { background: #b0506f; }
html body .image-lightbox-reaction-summary .reactions { position: static; display: flex; gap: .35rem; padding: 0; margin: 0; border: 0; background: none; }
html body .image-lightbox-reaction-summary .reaction-person { box-shadow: 0 0 0 1.5px #353139; }
html body .image-lightbox .image-lightbox-reaction-summary button.reaction { display: inline-flex; align-items: center; gap: .3rem; height: 1.9rem; min-height: 0; padding: .2rem .6rem .2rem .35rem; border: 0; border-radius: 999px; background: #353139f5; color: #fff; font-size: .8rem; cursor: pointer; }
html body .image-lightbox-reaction-summary .reaction-glyph { font-size: 1.1rem; }
.reaction-details { position: fixed; inset: auto; margin: 0; padding: 0; width: min(340px,calc(100vw - 24px)); max-width: none; border: 1px solid var(--ui-line); border-radius: 1rem; background: var(--ui-surface); color: var(--color-light-01); box-shadow: 0 12px 36px #0004; overflow: hidden; }
.reaction-details[open] { display: flex; flex-direction: column; }
.reaction-details::backdrop { background: transparent; backdrop-filter: none; }
.reaction-details header { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--ui-line); }
.reaction-detail-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
html body .reaction-detail-tab, html body .reaction-details-close { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex-shrink: 0; padding: 7px 9px; margin: 0; min-height: 34px; border: 0; border-radius: .65rem; background: transparent; color: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; transition: background-color .15s; }
html body .reaction-detail-tab[aria-selected=true] { background: var(--shell-selection); }
html body .reaction-detail-tab:hover, html body .reaction-details-close:hover { background: color-mix(in srgb,currentColor 8%,transparent); }
.reaction-detail-count { opacity: .7; font-size: .8rem; }
.reaction-details-close .ui-icon { width: 18px; height: 18px; margin: 0; }
.reaction-detail-list { min-height: 62px; overflow-y: auto; overscroll-behavior: contain; padding: 5px; }
html body .reaction-detail-person { box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 8px; margin: 0; border: 0; border-radius: .7rem; background: transparent; color: inherit; font: inherit; text-align: left; }
html body button.reaction-detail-person { cursor: pointer; transition: background-color .15s; }
html body button.reaction-detail-person:hover { background: var(--shell-selection); }
.reaction-detail-avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-size: .75rem; color: white; }
.reaction-detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.reaction-detail-person-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: .9rem; line-height: 1.3; }
.reaction-detail-person-text > span { white-space: nowrap; overflow: hidden; text-overflow: clip;
  -webkit-mask-image: var(--text-overflow-mask, none);
  --text-overflow-kind: single;
  mask-image: var(--text-overflow-mask, none); }
.reaction-detail-person-text small { font-size: .75rem; color: var(--color-placeholder); }
.reaction-detail-person-emojis { flex-shrink: 0; font-size: 1.45rem; }
.reaction-details button:focus-visible { outline: 2px solid var(--color-accent-01); outline-offset: -2px; }
@media(prefers-reduced-motion:reduce) { .reaction-details button { transition: none !important; } }
.reaction-details .reaction-detail-person { text-transform: none; }
.bubble .reactions { max-width: min(calc(100vw - 5rem),20rem); overflow: visible; overscroll-behavior: none; }
/* Only long multi-emoji strips scroll, never the lone badge or its hit area. */
.bubble .reactions:has(> .reaction + .reaction) { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.bubble .reaction { flex-shrink: 0; }


/* A menu owns scrolling until it closes; its own lists remain scrollable. */
body:has(.floating-menu, dialog[open]) #chatWrapper { overflow-y: hidden !important; }
.floating-menu { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.floating-menu > * { flex-shrink: 0; }

/* Profile changes temporarily disable these controls; their icons stay put. */
html body :is(#newChatButton, #showArchiveButton, #conversationMenuButton, #chatSearchToggle):disabled { opacity: 1; }

.message-info { width: min(25rem, 100vw); }
@media (max-width: 649.98px) { .message-info { width: 100%; } }

/* The scroller spans the pane; readable content and dividers keep their width. */
.app-shell #settingsContent {
  --settings-inset: clamp(1.25rem, 4vw, 4rem);
  padding: 0;
}
html .app-shell #settingsContent > .section-heading { padding: 0 var(--settings-inset); margin: 0; background: transparent; }
.app-shell #settingsContent > .section-heading { grid-row: 1; }
.app-shell #settingsContent > .account-settings-sync { grid-row: 2; }
.app-shell #settingsPages { grid-row: 3; }
.app-shell #settingsPages {
  max-width: none; padding: 3rem var(--settings-inset) 3rem; margin-top: -2rem;
  scrollbar-gutter: stable;
}
.app-shell #settingsPages > .settings-group { max-width: 44rem; }
.app-shell #settingsPages .settings-group-content > :first-child { margin-top: 0; }
.app-shell #settingsPages .settings-group-content > h3 { font-size: 1rem; font-weight: 600; margin-bottom: .35rem; }
.app-shell #settingsPages .settings-group-content > p { margin-top: 0; }
.account-settings-sync[data-state="error"] { display: block; min-height: 2rem; }
#settingsPane :is(.quick-reaction-setting,.quick-reaction-setting *,[draggable="true"],[draggable="true"] *),
.reaction-drag-ghost, .reaction-drag-ghost *, .avatar-crop-canvas {
  user-select: none !important; -webkit-user-select: none !important; -webkit-touch-callout: none;
}
#reactionSettings > h3 { font-size: .95rem; font-weight: 550; margin-bottom: .35rem; }
#reactionSettings > p { font-size: .82rem; margin-top: 0; }
#settingsPane .reaction-drag-handle { background: transparent; border-radius: .55rem; }
#settingsPane .reaction-drag-handle:active { background: color-mix(in srgb,var(--color-light-01) 5%,transparent); }
@media (hover: hover) and (pointer: fine) {
  #settingsPane .reaction-drag-handle:hover { background: color-mix(in srgb,var(--color-light-01) 5%,transparent); }
}
.emoji-skin-settings { padding: 0; background: transparent; }
.emoji-skin-settings h3 { margin-top: 0; font-size: .95rem; font-weight: 550; }
@media (max-width: 649.98px) {
  .app-shell #settingsContent { --settings-inset: 1.1rem; }
  .app-shell #settingsPages { padding-bottom: calc(6rem + env(safe-area-inset-bottom,0px)); }
}


@media (max-width: 649.98px) {
  html .app-shell #settingsContent > .section-heading { padding-top: env(safe-area-inset-top,0px); }
}

/* People, invitations and conversation creation share one compact dialog layout. */
html .app-shell .people-sheet { box-sizing: border-box; width: min(32rem, calc(100vw - 2rem)); max-width: none; padding: 1.25rem 1.35rem 1.35rem; border: 0; border-radius: 1.25rem; background: var(--color-background-01); color: var(--color-light-01); box-shadow: 0 1.5rem 5rem #0005; overflow: hidden; max-height: min(90dvh, 54rem); }
html .app-shell .people-sheet[open], html .app-shell .people-sheet > form { display: flex; flex-direction: column; min-height: 0; gap: 1rem; }
html .app-shell .people-sheet > form { margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; overflow: hidden; width: 100%; }
/* Heading: title, a muted line saying what happens, and a round close button. */
html .app-shell .people-sheet .group-dialog-heading { flex: none; align-items: flex-start; margin: 0; height: auto; padding: 0; gap: .75rem; }
html .app-shell .people-sheet:not(#newChatDialog) .group-dialog-heading > div { flex: 1; min-width: 0; padding-top: .3rem; }
html .app-shell .people-sheet .group-dialog-heading h2 { margin: 0; font-size: 1.25rem; font-weight: 650; line-height: 1.3; letter-spacing: -.025em; text-wrap: balance; }
html .app-shell .people-sheet .group-dialog-heading p { margin: .3rem 0 0; font-size: .85rem; line-height: 1.45; opacity: 1; color: color-mix(in srgb,var(--color-light-01) 65%,var(--color-background-01)); }
html .app-shell .people-sheet .dialog-close-button { display: grid; place-items: center; flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; margin: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; transition: background-color 140ms ease; }
html .app-shell .people-sheet .dialog-close-button:hover { background: color-mix(in srgb, currentColor 14%, transparent); filter: none; }
html .app-shell .people-sheet .dialog-close-button .ui-icon { width: 1rem; height: 1rem; fill: currentColor; }
/* No line under the heading or above the actions: the body runs up through the
   gap below the heading and fades at both ends (.scroll-fade). */
html .app-shell .people-sheet-body { --scroll-fade-top: 1.2rem; --scroll-fade-bottom: 1rem; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1rem; margin-top: -1rem; padding: 1.2rem .1rem 1rem; scroll-padding-block: 1.2rem 1rem; }
html .app-shell .people-sheet :is(.primary-button,.secondary-button) { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.7rem; padding: .6rem .85rem; border: 0; border-radius: .75rem; font: inherit; font-size: .88rem; line-height: 1.25; background: color-mix(in srgb,var(--color-light-01) 9%,transparent); color: var(--color-light-01); }
html .app-shell .people-sheet .primary-button { background: var(--camayo-primary); color: var(--camayo-on-primary); }
html .app-shell .people-sheet button:hover { filter: brightness(1.12); }
html .app-shell .people-sheet button :is(.ion-svg,.ui-icon) { width: 1.1rem; height: 1.1rem; flex: none; }
html .app-shell .people-sheet :is(input:not([type=checkbox]),select) { box-sizing: border-box; min-width: 0; min-height: 2.8rem; width: 100%; padding: .7rem .8rem; border: 1px solid var(--color-border-subtle); border-radius: .7rem; background: color-mix(in srgb,var(--color-light-01) 5%,var(--color-background-01)); color: var(--color-light-01); font: inherit; font-size: var(--directory-search-font, .85rem); }
html .app-shell .people-sheet label, html .app-shell .people-sheet legend { font-size: .85rem; font-weight: 500; }
/* One action pair: neutral secondary, then the primary that names the result. */
html .app-shell .people-sheet .group-dialog-actions { flex: none; justify-content: flex-end; margin: 0; padding-top: .3rem; gap: .5rem; }
html .app-shell .people-sheet .group-dialog-actions > :is(.primary-button,.secondary-button) { min-width: 7.5rem; min-height: 2.75rem; font-size: .9rem; font-weight: 600; }
html .app-shell .people-sheet .primary-button:disabled { opacity: .4; filter: none; cursor: default; }
html .app-shell .people-sheet .group-dialog-status { margin: 0; padding: .65rem .8rem; border-radius: .7rem; font-size: .85rem; }
html .app-shell .people-sheet .group-dialog-status:empty { display: none; }
html .app-shell .people-sheet::backdrop { background: #0006; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
/* Desktop: the same short rise as confirmDialog() (camayo-ui.css). */
@media (min-width: 650px) and (prefers-reduced-motion: no-preference) {
  html .app-shell .people-sheet:not(#newChatDialog)[open] { animation: camayo-dialog-in .16s ease-out; }
  html .app-shell .people-sheet:not(#newChatDialog)[open]::backdrop { animation: people-sheet-backdrop-in .16s ease-out; }
}
html .app-shell .people-sheet-handle { display: none; }
html .app-shell #newChatDialog { inset: 0 auto 0 var(--rail-width); width: var(--chat-sidebar-width, var(--section-sidebar-width)); height: 100dvh; max-height: 100dvh; padding: 0 .65rem .65rem; margin: 0; border: 0; border-radius: 0; gap: .6rem; background: var(--sidebar-background); }
html .app-shell #newChatDialog::backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
html .app-shell #newChatDialog .sidebar-address-book-heading { display: none; }
html .app-shell .new-chat-toolbar { display: flex; flex: none; gap: .4rem; }

html .app-shell #newChatDialog .new-chat-tab-panel, html .app-shell #newChatDialog #addressBookSection { gap: .4rem; }
:is(html .app-shell .people-sheet, html body .settings-content, html body .emoji-picker) .directory-search { display: flex; align-items: center; gap: .1rem; flex: none; min-height: 2.35rem; margin: 0; padding: 0 .55rem; border-radius: .65rem; background: color-mix(in srgb,var(--color-light-01) 8%,transparent); transition: box-shadow .16s ease; }
:is(html .app-shell .people-sheet, html body .settings-content, html body .emoji-picker) .directory-search:has(> input:focus-visible) { box-shadow: inset 0 0 0 var(--sheet-focus, 2px) var(--camayo-focus); }
/* A ring tells keyboard users where they are; a pointer already knows. */
html.uses-pointer :is(.people-sheet, .settings-content, .emoji-picker) { --sheet-focus: 0px; }
:is(html .app-shell .people-sheet, html body .settings-content, html body .emoji-picker) .directory-search > span { display: grid; place-items: center; flex: 0 0 1.5rem; color: color-mix(in srgb,var(--color-light-01) 65%,var(--color-background-01)); }
:is(html .app-shell .people-sheet, html body .settings-content, html body .emoji-picker) .directory-search :is(.ion-svg,.ui-icon) { width: 1rem; height: 1rem; }
:is(html .app-shell .people-sheet, html body .settings-content, html body .emoji-picker) .directory-search input[type=search], :is(html .app-shell .people-sheet, html body .settings-content, html body .emoji-picker) .directory-search input[type=search]:focus { flex: 1; width: 0; min-height: 0; padding: .55rem 0; line-height: 1.25; margin: 0; border: 0; outline: 0; box-shadow: none; background: transparent; border-radius: 0; text-align: left; font: inherit; font-size: var(--directory-search-font, .85rem); }
:is(html .app-shell .people-sheet, html body .settings-content, html body .emoji-picker) .directory-search input::placeholder { color: color-mix(in srgb,var(--color-light-01) 65%,var(--color-background-01)); opacity: 1; }
html body .directory-search input::-webkit-search-cancel-button { display: none; }
html body .directory-search-clear { width: 2rem; height: 2rem; min-width: 2rem; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--color-light-01); }
/* The result list scrolls under the search field with the chat list's fade
   (.scroll-fade) and reaches both panel edges like the chat list. */
html .app-shell #newChatDialog .sidebar-list {
  --scroll-fade-top: 1.65rem;
  gap: .22rem; margin: -1.35rem -.65rem 0; padding-top: 1.65rem; padding-inline: .65rem; scroll-padding-top: 1.65rem;
}
html .app-shell #newChatDialog :is(.directory-search, .new-chat-tab-panel > .group-dialog-actions) { position: relative; z-index: 1; }
html .app-shell #newChatDialog .directory-search { border-radius: 999px; background: color-mix(in srgb, var(--color-light-01) 8%, var(--sidebar-background)); padding-inline: .65rem; }
html .app-shell #newChatDialog .new-chat-panel-heading { margin: 0; }
html .app-shell #newChatDialog .new-chat-panel-heading h3 { display: none; }
html .app-shell #newChatDialog .new-chat-panel-heading button { margin-left: auto; }
/* Rows match chat list rows: avatar, typography and the flat full-width band
   (.sidebar-conversation-button::before in styles.css). */
html .app-shell #newChatDialog .sidebar-person-button { position: relative; display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 3.9rem; padding: .48rem .58rem; border: 1px solid transparent; border-radius: 0; background: transparent; }
html .app-shell #newChatDialog .sidebar-person-avatar { flex: 0 0 2.85rem; width: 2.85rem; height: 2.85rem; border-radius: 50%; font-size: .9rem; font-weight: 800; }
html .app-shell #newChatDialog .sidebar-person-button .sidebar-item-label { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
html .app-shell #newChatDialog .sidebar-person-button .sidebar-item-label > span { font-weight: 680; }
/* Same cards and rows as the settings: name first, then what the group may do. */
html .app-shell #groupDialog :is(.group-profile-picker, .group-conversation-options, .group-members-fieldset) { display: block; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: var(--camayo-card-radius); background: var(--camayo-settings-card); overflow: hidden; }
html .app-shell #groupDialog .group-members-fieldset { overflow: visible; }
html .app-shell #groupDialog :is(.group-profile-picker, .group-conversation-options label) { position: relative; display: flex; align-items: center; justify-content: space-between; column-gap: .8rem; min-height: 3rem; padding: 0 .9rem; font-size: .92rem; font-weight: 450; }
/* Only the area picker wraps (its hint); option rows keep label and value on one line. */
html .app-shell #groupDialog .group-profile-picker { flex-wrap: wrap; }
html .app-shell #groupDialog .group-conversation-options label[hidden] { display: none; }
html .app-shell #groupDialog .group-conversation-options label + label::before { content: ''; position: absolute; inset: 0 .9rem auto; border-top: 1px solid var(--color-border-subtle); }
html .app-shell #groupDialog .group-conversation-options label[hidden] + label::before { content: none; }
html .app-shell #groupDialog .group-profile-picker > label { font-size: .92rem; font-weight: 450; }
html .app-shell #groupDialog :is(.group-profile-picker, .group-conversation-options) select {
  flex: 0 1 auto; width: auto; max-width: 64%; min-height: 2.6rem; padding: 0 1.35rem 0 .4rem; border: 0; border-radius: .6rem;
  color: var(--color-placeholder); text-align: end; text-align-last: end; text-overflow: ellipsis; font-size: .92rem; appearance: none; -webkit-appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='m136 208 120-104 120 104M136 304l120 104 120-104' fill='none' stroke='%238b8590' stroke-width='48' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .1rem center / .95rem;
}
html .app-shell #groupDialog :is(.group-profile-picker, .group-conversation-options) select:focus-visible { background-color: color-mix(in srgb, currentColor 10%, transparent); }
html .app-shell #groupDialog .group-profile-picker p { flex-basis: 100%; margin: 0; padding-bottom: .7rem; font-size: .8rem; color: var(--color-placeholder); }
html .app-shell #groupDialog .people-sheet-body > :is(.group-title-field, #groupTitle) { order: -1; }
html .app-shell #groupDialog .people-sheet-body > .group-title-field { order: -2; margin: 0 .9rem -.6rem; font-size: .82rem; font-weight: 550; color: var(--color-placeholder); }
html .app-shell #groupDialog #groupTitle { min-height: 3rem; border: 0; border-radius: var(--camayo-card-radius); background: var(--camayo-settings-card); font-size: 1rem; user-select: text; }
html .app-shell #groupDialog .group-members-fieldset legend { float: left; width: 100%; padding: .8rem .9rem .5rem; font-size: .92rem; font-weight: 450; }
html .app-shell #groupDialog .group-members-fieldset > :not(legend) { clear: both; margin-inline: .6rem; }
html .app-shell #groupDialog .group-members-fieldset > :last-child { margin-bottom: .6rem; }
html .app-shell #groupDialog .group-member-search { font-size: .8rem; color: var(--color-placeholder); }
html .app-shell #groupDialog .group-member-options { max-height: 16rem; }
html .app-shell #groupDialog .group-member-search { display: flex; flex-direction: column; gap: .5rem; }
html .app-shell #contactInviteDialog { width: min(32rem,calc(100vw - 2rem)); }
html .app-shell #contactInviteDialog .contact-invite-email-form { display: flex; flex-direction: column; gap: .65rem; margin: 0; padding: 1rem; border: 0; border-radius: .9rem; background: color-mix(in srgb,var(--color-light-01) 4%,transparent); box-shadow: none; }
html .app-shell #contactInviteDialog .contact-invite-email-form > div { display: flex; flex-direction: column; gap: .6rem; }
html .app-shell #contactInviteDialog .contact-invite-email-form small { margin: 0; font-size: .8rem; line-height: 1.5; }
html .app-shell #contactInviteDialog .contact-invite-unregistered-send { width: 100%; min-height: 2.75rem; }
html .app-shell .contact-invite-divider { margin: 0; font-size: .8rem; }
html .app-shell #contactInviteShare { padding: 1rem; border-radius: .9rem; background: color-mix(in srgb,var(--color-light-01) 5%,transparent); }
html .app-shell .contact-invite-qr { width: min(11rem,100%); padding: .6rem; margin: 0 auto 1rem; background: #fff; border-radius: 1rem; }
html .app-shell .contact-invite-qr:empty { display: none; }
html .app-shell .contact-invite-qr svg { display: block; width: 100%; height: auto; }
html .app-shell #contactInviteShare .group-dialog-actions { margin-top: .7rem; }
html .app-shell .personal-code-content { text-align: center; padding: 1rem; }
html .app-shell #personalCodeValue { display: block; font-size: 1.8rem; font-weight: 700; letter-spacing: .16em; user-select: all; }
html .app-shell #personalCodeStatus { font-size: .85rem; }
@media (max-width: 649.98px) {
  html .app-shell .people-sheet, html .app-shell #newChatDialog, html .app-shell #groupDialog, html .app-shell #contactInviteDialog { position: fixed; inset: auto 0 0; margin: 0; width: 100%; max-width: 100%; height: auto; max-height: calc(100dvh - max(1rem,env(safe-area-inset-top))); border: 0; border-radius: 1.3rem 1.3rem 0 0; padding: 0 1rem calc(.8rem + env(safe-area-inset-bottom)); gap: .8rem; }
  html .app-shell .people-sheet { --directory-search-font: 1rem; }
  html .app-shell #newChatDialog { height: min(88dvh,48rem); }
  html .app-shell .people-sheet[open] { animation: people-sheet-enter .28s cubic-bezier(.22,.7,.28,1); }
  html .app-shell .people-sheet[open]::backdrop { animation: people-sheet-backdrop-in .22s ease-out; }
  html .app-shell .people-sheet-handle { display: block; flex: none; align-self: center; width: 5rem; height: 1.4rem; margin: 0 auto -.3rem; padding: 0; border: 0; background: transparent; touch-action: none; }
  html .app-shell .people-sheet .group-dialog-actions > :is(.primary-button,.secondary-button) { flex: 1 1 0; min-width: 0; }
  html .app-shell .people-sheet-handle::after { content: ''; display: block; width: 2.3rem; height: 4px; margin: auto; border-radius: 9px; background: var(--color-light-01); opacity: .85; }
  html .app-shell #newChatDialog::backdrop { background: #0006; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
}
@keyframes people-sheet-enter { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes people-sheet-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html .app-shell .people-sheet[open], html .app-shell .people-sheet[open]::backdrop { animation: none; }
}

html .app-shell .people-sheet [hidden] { display: none !important; }
html .app-shell #newChatDialog .directory-search input[type=search], html .app-shell #newChatDialog .directory-search input[type=search]:focus { min-height: 0; margin: 0; padding: .55rem 0; border: 0; outline: none; box-shadow: none; background: transparent; font: inherit; font-size: var(--directory-search-font, .85rem); }

html .app-shell .people-sheet-body > * { flex-shrink: 0; }
/* Category titles stay outside the shared scroll/fade surface. */
html .app-shell .settings-navigation { display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-sizing: border-box; padding-bottom: 0; }
html .app-shell .settings-navigation h1 { flex: none; position: relative; z-index: 1; }
html .app-shell #settingsCategories { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: .25rem; margin: -2rem 0 0; padding: 3rem 0 1.25rem; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 3rem 1.25rem; }
/* Navigation rows own their typography and states; generic action-button rules
   must not center or capitalize the embedded profile menu. */
html :is(#settingsCategories .category-button, #accountCategories button) { flex: none; display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 3rem; padding: .8rem .65rem; border: 0; border-radius: .6rem; font-family: Arial, Helvetica, sans-serif; font-size: .92rem; font-weight: 400; line-height: 1.4; letter-spacing: normal; text-align: left; color: var(--color-light-01,var(--text)); background: transparent; box-shadow: none; box-sizing: border-box; cursor: pointer; }
html :is(#settingsCategories .category-button, #accountCategories button)[aria-current] { background: var(--shell-selection,var(--selection)); }
html :is(#settingsCategories .category-button, #accountCategories button):focus-visible { outline: 3px solid var(--camayo-focus,#24707b45); outline-offset: 2px; }
@media (max-width: 649.98px) { html .app-shell .settings-pane:not(.has-detail) #settingsCategories .category-button[aria-current] { background: transparent; } }
html :is(.settings-navigation,.account-categories) h1 { font-family: Arial, Helvetica, sans-serif; color: var(--color-light-01,var(--text)); }

html .app-shell #newChatDialog:not([data-category=newChatChannelsTab]) #createChannelButton { display: none; }
html .app-shell #newChatDialog .new-chat-panel-heading, html .app-shell #newChatDialog .new-chat-tab-panel > label, html .app-shell #newChatDialog #addressBookSection > label { display: none; }

html .app-shell #contactInviteDialog > .group-dialog-actions .primary-button { width: 100%; }

@media (min-width: 650px) {
 html .app-shell #newChatDialog { padding-top: 0; }
 html .app-shell #newChatDialog .group-dialog-heading { position: relative; height: var(--view-heading-height); }
 html .app-shell #newChatDialog .group-dialog-heading > div { position: absolute; inset: 0 3.5rem; display: grid; place-items: center; pointer-events: none; }
 html .app-shell #newChatDialog .group-dialog-heading .dialog-close-button { margin-inline-start: auto; }
 html .app-shell #newChatDialog #newChatDialogTitle { font-size: .94rem; font-weight: 550; letter-spacing: normal; text-align: center; }
}
@media (max-width: 649.98px) { html .app-shell #newChatDialog .group-dialog-heading { height: auto; min-height: 2.75rem; } }

html .app-shell #newChatDialog .new-chat-toolbar { align-items: center; gap: .3rem; }
html .app-shell #newChatDialog .new-chat-toolbar > button { display: grid; place-items: center; flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; min-height: 0; margin: 0; padding: .5rem; border: 0; border-radius: .55rem; }
html .app-shell #newChatDialog .new-chat-toolbar > button .ui-icon { width: 1.1rem; height: 1.1rem; }
html .app-shell #newChatDialog .group-dialog-heading { flex: none; padding: 0 .6rem; margin: 0; }

html .app-shell #newChatDialog .group-dialog-heading > div { flex: 1; min-width: 0; }


/* Mobile detail navigation keeps both layers mounted and preserves their scroll. */
.mobile-back-chevron { transform: rotate(90deg); width: 1.25rem; height: 1.25rem; }
.mobile-back-button-arrow { display: none; }
.mobile-back-button-close { display: grid; place-items: center; }
.mobile-back-active { animation: none !important; }
.mobile-back-dragging { transform: translateX(var(--back-progress, 0px)) !important; transition: none !important; }
.mobile-back-background-dragging { transform: translateX(var(--back-underlay-offset, 0%)) !important; transition: none !important; }
@media (max-width: 1099.98px) {
  #chatSearchPanel.mobile-back-panel, #chatSearchResults { touch-action: pan-y pinch-zoom; }
  #chatSearchLayout.search-full #container.mobile-back-underlay { visibility: visible; }
  #chatSearchLayout.search-full #chatSearchClose { display: none; }
}
@media (max-width: 649.98px) {
  .mobile-back-panel, #settingsPages, .message-info-body { touch-action: pan-y pinch-zoom; }
  .mobile-back-button-close { display: none; }
  .mobile-back-button-arrow { display: grid; place-items: center; }
  .mobile-back-button { order: -1; flex: 0 0 2.75rem; }
  .contact-presentation-heading, #groupMembersDialog .group-dialog-heading { justify-content: flex-start; gap: .35rem; }
  .contact-presentation-heading h2, #groupMembersDialog .group-dialog-heading h2 { flex: 1; }
  .app-shell .settings-pane.has-detail .settings-navigation.mobile-back-underlay { display: flex; position: absolute; inset: 0; }
  .app-shell .settings-pane.has-detail .settings-content.mobile-back-active { position: relative; z-index: 2; background: var(--color-background-01); }
  .mobile-back-panel input[type="range"], .mobile-back-panel [role="slider"], .mobile-back-panel [draggable="true"] { touch-action: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-back-dragging, .mobile-back-background-dragging { transform: none !important; }
}

/* The plus panel keeps identity, actions and search outside its result scroller. */
html .app-shell #newChatDialog .new-chat-identity { display: flex; align-items: center; gap: .8rem; flex: none; width: 100%; min-height: 0; margin: 0; padding: .4rem .55rem; border: 0; border-radius: .65rem; background: transparent; color: var(--color-light-01); text-align: left; text-transform: none; }
html .app-shell #newChatDialog .new-chat-code-qr { display: grid; place-items: center; flex: 0 0 4.25rem; width: 4.25rem; height: 4.25rem; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: .5rem; overflow: hidden; background: #fff; }
html .app-shell #newChatDialog #newChatCodeQr { display: block; width: 100%; height: 100%; }
html .app-shell #newChatDialog .new-chat-code-qr svg { display: block; width: 100%; height: 100%; }
html .app-shell #newChatDialog .new-chat-code-copy { display: flex; flex-direction: column; min-width: 0; gap: .25rem; }
html .app-shell #newChatDialog #newChatCodeName { font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: clip;
  -webkit-mask-image: var(--text-overflow-mask, none);
  --text-overflow-kind: single;
  mask-image: var(--text-overflow-mask, none); white-space: nowrap; }
html .app-shell #newChatDialog #newChatCodeValue { font-size: 1.1rem; font-weight: 650; letter-spacing: .06em; overflow-wrap: anywhere; }
html .app-shell #newChatDialog #newChatCodeCopy { position: relative; display: block; align-self: flex-start; max-width: 100%; min-height: 1.5rem; padding: 0; margin: 0; border: 0; border-radius: .2rem; background: transparent; color: inherit; text-align: left; text-transform: none; line-height: 1.4; }
html .app-shell #newChatDialog #newChatCodeValue { display: block; user-select: text; -webkit-user-select: text; opacity: 1; transform: translateY(0); transition: opacity 140ms ease, transform 140ms ease; }
html .app-shell #newChatDialog .new-chat-code-feedback { position: absolute; inset: 0; display: flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; letter-spacing: 0; white-space: nowrap; opacity: 0; transform: translateY(.25rem); transition: opacity 140ms ease, transform 140ms ease; pointer-events: none; }
html .app-shell #newChatDialog .new-chat-code-feedback svg { width: 1em; height: 1em; flex: none; }
html .app-shell #newChatDialog #newChatCodeCopy.is-copied #newChatCodeValue { opacity: 0; transform: translateY(-.25rem); }
html .app-shell #newChatDialog #newChatCodeCopy.is-copied .new-chat-code-feedback { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
 html .app-shell #newChatDialog :is(#newChatCodeValue, .new-chat-code-feedback) { transition: none; transform: none !important; }
}
html .app-shell #newChatDialog .new-chat-code-status { margin: 0 .55rem; font-size: .75rem; }
html .app-shell #newChatDialog .new-chat-toolbar > button { display: inline-flex; justify-content: center; align-items: center; flex: 1 1 0; gap: .35rem; width: auto; height: 2.5rem; padding: .45rem .25rem; font-size: .8rem; font-weight: 500; white-space: nowrap; }
html .app-shell #newChatDialog #newChatSearchLabel { display: none; }
html .app-shell #newChatDialog .new-chat-tabs { --chips-bleed: .65rem; margin-block: .1rem .2rem; }
html .app-shell #newChatDialog .new-chat-tabs > button { max-width: none; }
html .app-shell #newChatDialog .sidebar-item-label { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; text-align: left; }
html .app-shell #newChatDialog .sidebar-item-label small { font-size: .75rem; font-weight: 400; color: var(--color-placeholder); line-height: 1.3; }
html .app-shell .people-sheet input:not([type=checkbox]):not([type=radio]):is(:focus,:focus-visible) { outline: none; border-color: transparent; box-shadow: inset 0 0 0 var(--sheet-focus, 2px) var(--camayo-focus); }
:is(html .app-shell .people-sheet, html body .settings-content, html body .emoji-picker) .directory-search input[type=search]:is(:focus,:focus-visible) { box-shadow: none; outline: none; }
/* Rows fade under the search field; the card's end cuts them hard. */
html .app-shell #groupDialog .group-member-options { --scroll-fade-top: 1.35rem; flex: 0 1 auto; min-height: 0; max-height: min(26dvh,14rem); overflow: auto; overscroll-behavior: contain; margin-top: -.6rem; padding-top: 1.35rem; scroll-padding-top: 1.35rem; }
@media (max-height: 650px) {
 html .app-shell #newChatDialog { gap: .35rem; }
 html .app-shell #newChatDialog .new-chat-code-qr { flex-basis: 3.25rem; width: 3.25rem; height: 3.25rem; }
}

html .app-shell #newChatDialog .new-chat-toolbar > #createChannelButton { flex: 0 0 2.5rem; }
html .app-shell #groupDialog input:not([type=checkbox]):not([type=radio]):is(:focus,:focus-visible) { outline: none; border-color: transparent; box-shadow: inset 0 0 0 var(--sheet-focus, 2px) var(--camayo-focus); }
html .app-shell #groupDialog .directory-search input[type=search]:is(:focus,:focus-visible) { outline: none; box-shadow: none; }

/* Version and reload share a reachable footer inside the category scroller. */
html .app-shell #settingsCategories .settings-about-row { flex: none; display: flex; align-items: stretch; gap: .35rem; margin-top: auto; min-width: 0; }
html .app-shell #settingsCategories .settings-about-row .category-about { flex: 1 1 0; min-width: 0; width: auto; font-size: .78rem; padding-inline: .55rem; }
@media (max-width: 649.98px) {
 html .app-shell #settingsCategories { padding-bottom: calc(6rem + env(safe-area-inset-bottom,0px)); scroll-padding-bottom: calc(6rem + env(safe-area-inset-bottom,0px)); }
}

/* Keep the existing icon/title gap, but align the painted Ionicon edge with
   the content inset. Its 512px viewBox includes whitespace around the stroke. */
html .app-shell #settingsBack { position: relative; width: 2.75rem; height: 2.75rem; min-height: 2.75rem; flex: 0 0 2.75rem; padding: 0; margin: 0 0 0 -1.140625rem; place-items: center; border: 0; box-shadow: none; background: transparent; }
html .app-shell #settingsBack:is(:hover,:active,:focus) { background: transparent; box-shadow: none; }
html .app-shell #settingsBack .mobile-back-chevron { display: block; width: 1.25rem; height: 1.25rem; }

.swipe-sheet:not([open]) { display: none !important; }
.sheet-drag-handle { display: none; }
@media (max-width: 649.98px) {
 html body .sheet-drag-handle { display: block; flex: none; align-self: center; width: 5rem; height: 1.4rem; min-height: 1.4rem; margin: 0 auto; padding: 0; border: 0; background: transparent; color: var(--color-light-01); touch-action: none; cursor: grab; }
 html body .sheet-drag-handle::after { content: ''; display: block; width: 2.3rem; height: 4px; margin: auto; border-radius: 9px; background: currentColor; opacity: .85; }
 html body .sheet-drag-handle:active { cursor: grabbing; background: transparent; }
 html body .sheet-drag-handle:hover { background: transparent; }
}

.floating-menu {
  box-sizing: border-box;
  width: max-content;
  min-width: min(10rem, var(--floating-menu-available-width, calc(100vw - 24px)));
  max-width: min(23rem, var(--floating-menu-available-width, calc(100vw - 24px)));
  max-height: var(--floating-menu-available-height, calc(100dvh - 24px));
}
.floating-submenu { z-index: 1301; }
.floating-menu-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.floating-menu-item > .floating-menu-chevron:has(.ui-icon) {
  display: grid;
  place-items: center;
  flex: 0 0 14px;
  margin-inline-start: auto;
  margin-inline-end: -2px;
  transform: rotate(var(--submenu-chevron-angle, -90deg));
}
.floating-menu-chevron .ui-icon { display: block; width: 13px; height: 13px; opacity: .68; }
[data-submenu-side="left"] { --submenu-chevron-angle: 90deg; }
[data-submenu-side="below"] { --submenu-chevron-angle: 0deg; }
[data-submenu-side="above"] { --submenu-chevron-angle: 180deg; }

@media (max-width: 649.98px) {
  html body .mobile-back-button { color: inherit; display: grid; position: relative; box-sizing: border-box; width: 2.75rem; height: 2.75rem; min-height: 2.75rem; flex: 0 0 2.75rem; padding: 0; margin: 0 0 0 -1.140625rem; place-items: center; background: transparent; border: 0; box-shadow: none; }
  html body .mobile-back-button:is(:hover,:active,:focus) { background: transparent; box-shadow: none; }
  html body .mobile-back-button:focus:not(:focus-visible) { outline: none; }
  html body .contact-presentation-heading { gap: .6rem; }
}


#messageInfoTitle:focus { outline: none; }

.contact-presentation .shell-icon-button { color: inherit; }

@media (max-width: 649.98px) {
  html body .swipe-sheet, html body .swipe-sheet :is(.people-sheet-body,.sidebar-list,.group-member-options,.emoji-picker-scroll) { overscroll-behavior-y: none; }
}

/* Lists reach the sheet edge; safe-area space belongs to scrollable content. */
html .app-shell #newChatDialog { padding-bottom: 0; }
html .app-shell #newChatDialog :is(.sidebar-address-book-list,.new-chat-person-list,.new-chat-conversation-list) { margin-bottom: 0; padding-bottom: calc(.8rem + env(safe-area-inset-bottom,0px)); }
html .app-shell #newChatDialog .forward-target-footer { padding-bottom: calc(.8rem + env(safe-area-inset-bottom,0px)); }

/* Keep category row insets, but put the scrollbar at the pane edge. */
html .app-shell .settings-navigation { --category-inset: .75rem; padding-inline: 0; }
html .app-shell .settings-navigation h1 { padding-inline: calc(var(--category-inset) + .6rem); }
html .app-shell #settingsCategories { padding-inline: var(--category-inset); }
@media (max-width: 649.98px) { html .app-shell .settings-navigation { --category-inset: .9rem; } }

/* iOS date controls have an intrinsic native width. Size from the filter column,
   not the native date editor, and keep its value inside the same box. */
html .app-shell .search-filters .search-date-range { grid-template-columns: minmax(0,1fr); }
html .app-shell .search-filters .search-date-range > label { display: grid; grid-template-columns: minmax(0,1fr); min-inline-size: 0; }
html .app-shell .search-filters :is(input[type="date"],input[type="number"],select) {
  box-sizing: border-box;
  inline-size: 0; min-inline-size: 100%; max-inline-size: 100%;
  block-size: 44px; min-block-size: 44px; max-block-size: 44px;
  padding: 8px 10px; margin-inline: 0; font-size: 14px; line-height: 1.25;
}
html .app-shell .search-filters input[type="date"] { -webkit-appearance: none; appearance: none; }
html .app-shell .search-filters input[type="date"]::-webkit-date-and-time-value { min-inline-size: 0; inline-size: 100%; text-align: start; }
html .app-shell .search-filters input[type="date"]::-webkit-datetime-edit { min-inline-size: 0; padding: 0; }

/* The title may extend under the toolbar; only its final letters fade. */
html .app-shell .chatNameWrapper { flex: 1 1 auto; width: 0; margin-right: -3.5rem; mask-image: linear-gradient(to right,#000 calc(100% - 3.75rem),transparent); -webkit-mask-image: linear-gradient(to right,#000 calc(100% - 3.75rem),transparent); }
html .app-shell .conversation-title-button { width: 100%; max-width: none; }
html .app-shell .conversation-title-button > span:last-child { flex: 1; }
html .app-shell .conversation-title-button :is(strong,small) { text-overflow: clip; }
html .app-shell #nav-bar .tool-bar { position: relative; z-index: 1; }
html .app-shell .conversation-title-button > span:last-child { grid-template-rows: auto 1.1rem; }
html .app-shell #conversationHeaderMeta, html .app-shell #typingIndicator { grid-column: 1; grid-row: 2; line-height: 1.1rem; }
html .app-shell .conversation-title-button:has(#typingIndicator:not([hidden])) #conversationHeaderMeta { opacity: 0; }
html .app-shell #typingIndicator:not([hidden]) { animation: conversation-status-in .18s ease-out; }
@keyframes conversation-status-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
html .app-shell #conversationHeaderMeta { transition: opacity .18s ease; }
.conversation-info-sections { margin-block: 1rem; }
.conversation-info-sections details { border-top: 1px solid var(--color-border-subtle); padding-block: .9rem; }
.conversation-info-sections summary { cursor: pointer; font-size: .95rem; font-weight: 650; }
.conversation-info-sections dl { display: grid; gap: 1rem; font-size: .85rem; margin-bottom: 0; }
.conversation-info-sections dl > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: .75rem; }
.conversation-info-sections dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.conversation-media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .45rem; }
.conversation-media-grid h3 { grid-column: 1 / -1; margin: .9rem 0 .15rem; font-size: .85rem; font-weight: 600; }
.conversation-media-grid h3:first-child { margin-top: .25rem; }
#contactPresentation .conversation-media-tile, .conversation-media-skeleton {
  display: grid; position: relative; place-items: center; aspect-ratio: 1; width: 100%; height: auto; min-width: 0;
  padding: 0; overflow: hidden; border: 0; border-radius: .65rem; background: var(--conversation-info-surface);
}
.conversation-media-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.conversation-media-tile.is-loaded:not(.preview-unavailable) img { opacity: 1; }
.conversation-media-grid.is-list { display: flex; flex-direction: column; gap: .55rem; }
.conversation-media-grid.is-list .conversation-media-skeleton { aspect-ratio: auto; height: 4.2rem; flex: none; }
.conversation-media-badge { position: absolute; inset: auto auto .35rem .35rem; display: flex; align-items: center; gap: .25rem; padding: .12rem .4rem; border-radius: 1rem; background: #000a; color: #fff; font-size: .68rem; font-variant-numeric: tabular-nums; }
#contactPresentation .conversation-media-badge { width: max-content; max-width: calc(100% - .7rem); line-height: 1.35; white-space: nowrap; }
#contactPresentation .conversation-media-badge .ui-icon { flex: none; width: .68rem; height: .68rem; margin: 0; }
.conversation-info-media > .camayo-chips { --chips-bleed: 1rem; }
.conversation-media-filter { display: flex; margin: 0 0 .6rem; }
.conversation-media-filter[hidden] { display: none; }
.conversation-media-audio, .conversation-media-file { border-radius: var(--camayo-card-radius); background: var(--camayo-settings-card); }
.conversation-media-audio { padding: .4rem .55rem .45rem .8rem; }
/* Own memos: the whole card in the own-bubble colour; the player draws in currentColor. */
.conversation-media-audio.is-own { background: var(--color-accent-01); color: var(--color-light-03, #fff); }
/* The player sits right under the heading, on the same left edge, without its own padding. */
.conversation-media-audio .search-result-audio { margin: 0; padding: 0; background: transparent; color: inherit; }
/* The time row hangs below the waveform; the bottom padding is its room. */
.conversation-media-audio .search-result-audio .attachment-audio { padding: 0 0 1rem; }
.conversation-media-audio .search-audio-status:empty { display: none; }
.conversation-media-audio .attachment-audio-name { display: none; }
.conversation-media-row-heading { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.conversation-media-row-heading strong { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .85rem; font-weight: 700; }
.conversation-media-row-heading small { flex: none; font-size: .74rem; color: var(--color-placeholder); }
.conversation-media-row-heading small::before { content: '· '; }
.conversation-media-audio.is-own .conversation-media-row-heading small { color: color-mix(in srgb, currentColor 75%, transparent); }
#contactPresentation .conversation-media-go { display: grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; margin: 0 0 0 auto; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .6; }
.conversation-media-go .ui-icon { width: 1.05rem; height: 1.05rem; }
/* In a voice card the icon stays small and does not make the heading line taller. */
#contactPresentation .conversation-media-row-heading .conversation-media-go { width: 2rem; height: 2rem; margin-block: -.45rem; margin-inline-end: -.3rem; }
.conversation-media-row-heading .conversation-media-go .ui-icon { width: .95rem; height: .95rem; }
.conversation-media-file { display: flex; align-items: center; padding-inline-end: .55rem; }
#contactPresentation .conversation-media-file > [data-open-file] { display: flex; align-items: center; gap: .8rem; flex: 1; min-width: 0; min-height: 3.6rem; margin: 0; padding: .5rem .4rem .5rem .9rem; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; }
.conversation-media-file-icon .ion-svg { display: block; width: 1.5rem; height: 1.5rem; opacity: .8; }
.conversation-media-file-copy { display: grid; gap: .15rem; min-width: 0; }
.conversation-media-file-copy strong { font-size: .9rem; font-weight: 550; overflow-wrap: anywhere; }
.conversation-media-file-copy small { font-size: .74rem; color: var(--color-placeholder); }
.conversation-media-empty { grid-column: 1 / -1; padding-block: 18vh 2rem; }
.conversation-media-placeholder { display: grid; place-items: center; opacity: .42; }
.conversation-media-placeholder .ui-icon { width: 1.35rem; height: 1.35rem; }
.conversation-media-tile.is-loaded:not(.preview-unavailable) .conversation-media-placeholder { visibility: hidden; }
.conversation-media-tile:active { opacity: .75; }
.conversation-media-skeleton, .conversation-media-tile:not(.is-loaded) .conversation-media-placeholder {
  animation: conversation-info-loading 1.4s ease-in-out infinite alternate;
}
@keyframes conversation-info-loading { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .conversation-media-skeleton, .conversation-media-tile:not(.is-loaded) .conversation-media-placeholder { animation: none; }
}
.conversation-info-sections [role=status] { font-size: .8rem; }
.contact-presentation.is-chat-info > :is(.contact-presentation-note,.camayo-field,.contact-custom-name,.contact-presentation-actions,.contact-presentation-status) { display: none; }
.contact-presentation.is-chat-info .avatar-editor-toolbar { display: none; }
.conversation-start { display: grid; justify-items: center; gap: .6rem; width: min(100%,24rem); margin: 1.5rem auto 2rem; padding: 1.25rem; box-sizing: border-box; text-align: center; border-radius: 1rem; background: color-mix(in srgb,var(--color-background-01) 82%,transparent); }
.conversation-start > img, .conversation-start-avatar { width: 4rem; height: 4rem; border-radius: 1rem; object-fit: cover; }
.conversation-start-avatar { display: grid; place-items: center; font-size: 1.5rem; color: white; }
.conversation-start strong { font-size: .95rem; overflow-wrap: anywhere; }
.conversation-start small { opacity: .65; font-size: .75rem; }
.chat-date-badge.is-loading, .chat-date-badge.is-retry { box-sizing: border-box; text-align: center; font-size: .65rem; padding-inline: .25rem; white-space: nowrap; }
.chat-date-badge.is-loading::before { content: ''; display: inline-block; width: .7em; height: .7em; margin-right: .45em; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.04em; animation: history-spin .65s linear infinite; }
.chat-date-badge.is-retry { cursor: pointer; pointer-events: auto; }
@keyframes history-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #conversationHeaderMeta, #typingIndicator:not([hidden]) { animation: none !important; transition: none !important; } }

.contact-presentation-status:empty { display: none; }

/* The header fades as a whole behind its buttons; do not mask it twice.
   Receipt icons remain outside the sidebar text fade. */
.conversation-title-button strong, .conversation-title-button small,
.sidebar-item-details { -webkit-mask-image: none; mask-image: none; }

/* A single title is centered on the avatar; the status occupies the second row. */
html .app-shell .conversation-title-button > span:last-child { grid-template-rows: 1.2rem 1.1rem; height: 2.3rem; }
html .app-shell .conversation-title-button strong { line-height: 1.2rem; transform: translateY(0); transition: transform .18s ease; }
html .app-shell .conversation-title-button:has(#conversationHeaderMeta:empty):not(:has(#typingIndicator:not([hidden]))) #channelName { transform: translateY(.55rem); }
html .app-shell .conversation-title-button { transition: opacity .15s ease; }
html .app-shell .conversation-title-button:not(:disabled):is(:hover,:focus-visible) { background: transparent; opacity: .72; }
html .app-shell .conversation-title-button:focus-visible { outline: 2px solid var(--color-accent-01); outline-offset: -2px; }

/* Contact information has the same root/detail navigation on both layouts. */
html body .contact-presentation { --contact-panel-gutter: 1.25rem; display: flex; flex-direction: column; overflow: hidden; padding: 0; box-sizing: border-box; }
html body .contact-presentation[hidden] { display: none; }
.contact-presentation-heading {
  flex: none; box-sizing: border-box; gap: .55rem;
  min-height: calc(4.25rem + env(safe-area-inset-top,0px));
  padding: calc(.65rem + env(safe-area-inset-top,0px)) var(--contact-panel-gutter) .65rem;
}
.contact-presentation-heading h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
html body .contact-presentation-heading :is(.contact-presentation-back,.contact-presentation-close) {
  display: grid; place-items: center; flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem;
  margin: 0; padding: 0; border: 0; border-radius: .6rem; background: transparent; color: inherit;
}
html body .contact-presentation-heading :is(.contact-presentation-back,.contact-presentation-close):is(:hover,:active) {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
@media (max-width: 649.98px) {
  html body .message-info .contact-presentation-close:is(:hover,:active) { background: transparent; }
}
html body .contact-presentation-heading .contact-presentation-back[hidden] { display: none; }
.contact-presentation-heading :is(.contact-presentation-back,.contact-presentation-close) svg {
  display: block; width: 1.15rem; height: 1.15rem;
}
.contact-presentation-pages { position: relative; flex: 1; min-height: 0; overflow: hidden; isolation: isolate; }
#contactPresentation {
  --conversation-info-surface: var(--selection, var(--shell-selection, color-mix(in srgb, currentColor 7%, transparent)));
}
#contactPresentation .contact-presentation-preview {
  display: flex; align-items: center; gap: .9rem; padding: .4rem 0 0; margin: 0; border: 0;
}
#contactPresentation .contact-presentation-preview .avatar-editor { width: 3.5rem; height: 3.5rem; }
#contactPresentation .contact-presentation-preview button[hidden] { display: none; }
#contactPresentation .contact-presentation-preview strong { min-width: 0; font-size: 1rem; }
#contactPresentation .contact-presentation-preview button.contact-portrait {
  display: block; padding: 0; border: 0; border-radius: inherit; background: transparent;
  opacity: 1;
}
#contactPresentation .contact-portrait:enabled { cursor: zoom-in; }
#contactPresentation .contact-presentation-note {
  display: flex; align-items: center; gap: .35rem; margin: .65rem 0 1.1rem; font-size: .78rem; opacity: .75;
}
#contactPresentation .contact-presentation-note .ui-icon { width: .85rem; height: .85rem; }
#contactPresentation.is-chat-info .contact-presentation-note { display: none; }
#contactPresentation .contact-page-main > .camayo-field { margin-bottom: .65rem; }
#contactPresentation .contact-custom-name .camayo-field { margin-bottom: 0; }
#contactPresentation .contact-presentation-status:not(:empty), .conversation-stats-status {
  min-height: 0; margin: .65rem 0; font-size: .82rem; line-height: 1.45;
}
#contactPresentation .contact-presentation-retry[hidden] { display: none; }
.contact-page-main, .conversation-info-detail { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; box-sizing: border-box; padding: .5rem var(--contact-panel-gutter) calc(1.25rem + env(safe-area-inset-bottom,0px)); scrollbar-gutter: stable; }
.conversation-info-detail { position: absolute; inset: 0; z-index: 1; background: var(--color-background-01); }
.contact-presentation .conversation-info-detail[hidden] { display: none; }
.contact-presentation.is-chat-info .contact-page-main > :is(.contact-presentation-note,.camayo-field,.contact-custom-name,.contact-presentation-actions,.contact-presentation-status) { display: none; }

.info-nav-members-label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.info-nav-members-label small { opacity: .65; }
.conversation-info-stats dl, .conversation-weekdays {
  margin: 0 0 .65rem;
  border-radius: .9rem;
  background: var(--conversation-info-surface);
}
.conversation-info-stats dl > div {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center; gap: .65rem; min-height: 3rem; padding: .7rem 1rem; box-sizing: border-box;
}
.conversation-info-stats dl > div:not(:first-child)::before {
  content: ""; position: absolute; inset: 0 1rem auto; border-top: 1px solid var(--ui-line);
}
.conversation-info-stats :is(dt, dd) { font-size: .88rem; overflow-wrap: anywhere; }
.conversation-info-stats dt { display: grid; grid-template-columns: 1rem minmax(0,1fr); align-items: center; gap: .55rem; }
.conversation-info-stats dt .ui-icon { width: 1rem; height: 1rem; opacity: .75; }
.conversation-info-stats dd { margin: 0; text-align: end; font-weight: 650; font-variant-numeric: tabular-nums; }
.conversation-info-stats .conversation-stats-total > div { grid-template-columns: 1fr; gap: .45rem; padding: .95rem 1rem; }
.conversation-stats-total [data-message-count] { text-align: start; font-size: 2.1rem; line-height: 1.05; letter-spacing: -.035em; }
.conversation-info-stats [data-average-length][data-loading] { opacity: .5; }
.conversation-weekdays { padding: .9rem 1rem .8rem; }
.conversation-weekdays h3 { margin: 0 0 .65rem; font-size: .9rem; }
.conversation-weekday-bars {
  /* Whole pixels between bars that fill their column: both edges of a gap then
     round alike. Fractional gaps and centered bars looked uneven. */
  --bar-gap: 9px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  gap: var(--bar-gap);
  padding: 0;
  margin: 0;
  list-style: none;
}
.conversation-weekday-bars li {
  /* A label must never widen its bar. */
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 4.25rem auto; gap: .28rem;
  min-width: 0; text-align: center; font-size: .7rem; font-variant-numeric: tabular-nums;
}
.conversation-weekday-bars li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-weekday-bars li > div { display: flex; align-items: end; justify-content: center; border-bottom: 1px solid var(--ui-line); }
.conversation-weekday-bars li > div > span {
  display: block; width: 100%; border-radius: .38rem .38rem .2rem .2rem;
  background: #5b9af3;
  background: light-dark(#2a6ed5, #81b4ff);
}
.conversation-week-trend { grid-template-columns: repeat(8, minmax(0, 1fr)); --bar-gap: 8px; }
.conversation-week-trend li { grid-template-rows: auto 5.1rem auto; }
.conversation-week-trend li > span:last-child { font-size: .65rem; }
.conversation-week-trend li:not(:last-child) > div > span {
  background: light-dark(#6899e3, #648bc5);
}
.conversation-week-trend li:last-child > span { font-weight: 700; }
.conversation-stats-status:empty { margin: 0; }
.conversation-people { padding-bottom: .35rem; }
.conversation-people-list { display: grid; margin: 0; padding: 0; list-style: none; }
.conversation-person {
  position: relative; display: grid; grid-template-columns: 2.35rem minmax(0, 1fr); align-items: center;
  gap: .75rem; padding: .55rem 0;
}
.conversation-person + .conversation-person::before { content: ""; position: absolute; inset: 0 0 auto 3.1rem; border-top: 1px solid var(--ui-line); }
.conversation-person[hidden] { display: none; }
.conversation-person-avatar {
  display: grid; place-items: center; width: 2.35rem; height: 2.35rem; overflow: hidden; border-radius: 50%;
  background-size: cover; color: #fff; font-size: .74rem; font-weight: 650;
  box-shadow: 0 0 0 2px var(--conversation-info-surface), 0 0 0 3.5px var(--person-color, var(--ui-line));
}
.conversation-person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conversation-person-body { display: grid; gap: .3rem; min-width: 0; }
.conversation-person-line { display: flex; align-items: baseline; gap: .45rem; min-width: 0; }
.conversation-person-line strong {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--person-color, inherit); font-size: .88rem; font-weight: 650;
}
.conversation-person-count { margin-inline-start: auto; flex: none; font-size: .88rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.conversation-person-bar { height: .3rem; border-radius: .3rem; background: var(--ui-line); overflow: hidden; }
.conversation-person-bar > span {
  display: block; height: 100%; border-radius: inherit; background: var(--person-color, light-dark(#2a6ed5, #81b4ff));
}
.conversation-person-meta { display: flex; flex-wrap: wrap; gap: .15rem .7rem; font-size: .74rem; opacity: .72; font-variant-numeric: tabular-nums; }
.conversation-person-meta > span { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.conversation-person-meta .ui-icon { width: .8rem; height: .8rem; }
/* "Alle N anzeigen" under a capped list (capped-list.js): opens the whole list as a page. */
.capped-list-more {
  display: flex; align-items: center; justify-content: center; gap: .35rem; width: 100%; min-height: 2.5rem;
  margin-top: .1rem; border: 0; border-top: 1px solid var(--ui-line); background: transparent; color: inherit;
  font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer;
}
.capped-list-more .ui-icon { width: .85rem; height: .85rem; opacity: .55; rotate: -90deg; }
.capped-list-more[hidden] { display: none; }
.capped-list-more:active { background: var(--shell-selection); }
@media (hover: hover) { .capped-list-more:hover { background: var(--shell-selection); } }
.capped-list-more:focus-visible { outline: 2px solid var(--camayo-focus); outline-offset: -2px; }
.conversation-common-list { display: grid; margin: 0; padding: 0; list-style: none; }
.conversation-common-list > li[hidden] { display: none; }
.conversation-common-group {
  position: relative; display: grid; grid-template-columns: 2.35rem minmax(0, 1fr) auto; align-items: center; gap: .75rem;
  width: 100%; min-height: 3.4rem; margin: 0; padding: .5rem .9rem; border: 0; border-radius: 0; background: transparent;
  color: inherit; font: inherit; text-align: start; cursor: pointer; transition: background-color 140ms ease;
}
.conversation-common-list > li:not([hidden]) ~ li .conversation-common-group::before { content: ""; position: absolute; inset: 0 .9rem auto 4.05rem; border-top: 1px solid var(--ui-line); }
.conversation-common-group:focus-visible { outline: 2px solid var(--camayo-focus); outline-offset: -2px; }
@media (hover: hover) { .conversation-common-group:hover { background: var(--shell-selection); } }
.conversation-common-group:active { background: var(--shell-selection); }
.conversation-common-avatar { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; overflow: hidden; border-radius: .3rem; color: #fff; font-size: .74rem; font-weight: 650; }
.conversation-common-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conversation-common-body { display: grid; gap: .12rem; min-width: 0; }
.conversation-common-body strong { display: flex; align-items: center; gap: .35rem; min-width: 0; font-size: .9rem; font-weight: 600; }
.conversation-common-body strong > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conversation-common-body strong .ui-icon { flex: none; width: .9rem; height: .9rem; opacity: .7; }
.conversation-common-body small { font-size: .78rem; font-weight: 400; opacity: .7; font-variant-numeric: tabular-nums; }
.conversation-common-group > .ui-icon:last-child { width: .85rem; height: .85rem; opacity: .55; rotate: -90deg; }
.conversation-common-groups .capped-list-more { margin: 0; }
.conversation-media-footer { display: grid; justify-items: center; padding-block: .85rem .25rem; }
.conversation-media-footer [role=status] { font-size: .82rem; line-height: 1.45; text-align: center; margin: 0 0 .4rem; }
.conversation-media-footer [role=status]:empty { margin: 0; }
#contactPresentation [data-media-more]:not([hidden]) {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; width: auto;
  padding: .4rem .75rem; border: 0; border-radius: .7rem; background: transparent; font-size: .85rem;
}
#contactPresentation [data-media-more] .ui-icon { width: .9rem; height: .9rem; }
#contactPresentation [data-media-more]:not(:disabled):hover { background: var(--conversation-info-surface); }
#contactPresentation [data-media-more][data-loading] { opacity: .75; cursor: default; }
@media (max-width:649.98px) {
  html body .contact-presentation.has-info-page .contact-presentation-close { display: none; }
  .contact-presentation-back { order: -1; }
  html body .contact-presentation { --contact-panel-gutter: 1rem; }
}
@media (prefers-reduced-motion:reduce) { html .app-shell .conversation-title-button, html .app-shell .conversation-title-button strong { transition: none; } }

#contactPresentation .conversation-info-media, #contactPresentation .conversation-info-stats { margin: 0; padding: 0; border: 0; }

/* Channel administration shares Chatinfo's scroll surface and existing controls. */
#contactPresentation :is(#groupTitleUpdateForm, #groupMemberAddForm) > div {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .5rem;
}
#contactPresentation #groupMemberAddForm > .profile-add:has(> select:disabled) { grid-template-columns: minmax(0,1fr); }
#contactPresentation #groupMemberAddForm > .profile-add:has(> select:disabled) > #groupMemberAddButton { display: none; }
#contactPresentation #groupAvatarForm { display: grid; gap: .45rem; }
#contactPresentation #groupAvatarDropArea {
  justify-content: flex-start; gap: .6rem; padding: .55rem .65rem; border: 0; border-radius: .55rem;
  text-align: start; font-size: .85rem; background: transparent;
}
#contactPresentation #groupAvatarDropArea:is(:hover,:focus-visible,.dragover) {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
#contactPresentation #groupAvatarDropArea .file-upload-icon { width: 1.25rem; height: 1.25rem; }
#contactPresentation #groupAvatarDropArea .file-upload-copy strong { color: inherit; }
#contactPresentation #groupAvatarDropArea small { font-size: .75rem; opacity: .72; }
#contactPresentation #groupAvatarSubmit:disabled:not([aria-busy]) { display: none; }

#contactPresentation select[name="name_mode"],
#contactPresentation .conversation-transfer-preview { background: transparent; padding-inline: 0; font-size: .85rem; line-height: 1.45; }
#contactPresentation #conversationTransferSubmit { justify-self: start; padding: .45rem .7rem; border: 0; border-radius: .55rem; }
#contactPresentation .conversation-transfer-section > * { min-width: 0; overflow-wrap: anywhere; }
#contactPresentation .avatar-editor-image.dragover { outline: 3px solid var(--color-accent-01); outline-offset: 3px; }
#contactPresentation .group-image-status { margin: .5rem 0; font-size: .85rem; overflow-wrap: anywhere; }
#contactPresentation .group-image-status[data-error="true"] { color: var(--color-danger-01, #c13d54); }
#contactPresentation .group-image-retry { margin-block: .5rem; }

/* Person actions and mentions share the existing menu and surface palette. */
.message-mention { display:inline-flex; align-items:center; gap:.25rem; padding:0 .25rem; border-radius:.4rem; background:var(--shell-selection,#80808025); color:inherit; vertical-align:middle; max-width:100%; }
.message-mention img,.mention-initial { width:1.25rem; height:1.25rem; border-radius:50%; object-fit:cover; flex:none; }
.mention-initial { display:inline-grid; place-items:center; background:#24707b; color:white; font-size:.8rem; }
.mention-suggestions { position:fixed; z-index:10050; max-height:16rem; overflow:auto; }
.mention-suggestions button { display:flex; width:100%; padding:.65rem; border:0; background:transparent; color:inherit; text-align:left; }
.mention-suggestions button[aria-selected="true"] { background:var(--shell-selection,#80808025); }
.mention-suggestions .message-mention { background:transparent; }
.message-private-reply { display:grid; gap:.2rem; margin-bottom:.4rem; padding:.4rem .6rem; border-left:3px solid var(--accent,#24707b); background:#80808018; border-radius:.3rem; max-width:100%; overflow-wrap:anywhere; font-size:.85rem; cursor:pointer; }
.message-private-reply span { white-space:pre-wrap; }
.mention-suggestions button { font:inherit; font-size:.92rem; line-height:1.4; min-height:2.75rem; }

/* The editor, attachment and send controls share one surface. */
form#form:has(> .composer-bar) {
  display: grid;
  grid-template-columns: var(--composer-control-size) minmax(0, 1fr);
  align-items: end;
  gap: 0 var(--composer-more-gap);
  --composer-control-size: 2.25rem;
  --composer-action-width: var(--composer-control-size);
  --composer-more-gap: .32rem;
  --composer-more-offset: calc(var(--composer-control-size) + var(--composer-more-gap));
  --composer-surface: color-mix(in srgb, var(--color-light-01) 7%, var(--color-background-01));
  transition: grid-template-columns .22s cubic-bezier(.2,.8,.2,1), column-gap .22s cubic-bezier(.2,.8,.2,1);
}
form#form:has(> .composer-bar):is(.is-recording,.is-recorder-starting) {
  grid-template-columns: 0px minmax(0, 1fr);
  column-gap: 0;
  --composer-more-offset: 0px;
}
.composer-bar {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--composer-action-width) var(--composer-action-width);
  align-items: end;
  padding-inline-end: .5rem;
  overflow: clip;
  border-radius: calc(var(--composer-control-size) / 2);
  background: var(--composer-surface);
  box-shadow: 0 1px 4px #0001;
  transition: grid-template-columns .22s cubic-bezier(.2,.8,.2,1), border-top-left-radius .22s cubic-bezier(.2,.8,.2,1),
    border-top-right-radius .22s cubic-bezier(.2,.8,.2,1);
}
form#form:is(.has-composer-text,.is-recording,.is-recorder-starting) .composer-bar {
  grid-template-columns: minmax(0, 1fr) 0px var(--composer-action-width);
}
form#form .composer-more {
  grid-column: 1;
  --overflow-menu-width: var(--composer-control-size);
  border-radius: 50%;
  background: var(--composer-surface);
  box-shadow: none;
  transition: opacity .14s ease-out, scale .2s ease-out, visibility 0s;
}
form#form .composer-more svg { width: 1.2rem; height: 1.2rem; }
form#form .composer-more:is(:hover, [aria-expanded="true"]) {
  background: color-mix(in srgb, var(--color-light-01) 13%, var(--color-background-01));
}
form#form:is(.is-recording,.is-recorder-starting) .composer-more {
  opacity: 0;
  scale: .7;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease-out, scale .16s ease-out, visibility 0s .15s;
}
form#form .composer-more:disabled { opacity: .45; }
form#form:has(> .composer-bar) #scrollBtn {
  right: 0;
  width: var(--composer-control-size);
  height: var(--composer-control-size);
  padding: 0;
  border-radius: .72rem;
  background: var(--composer-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 2px 6px #0002;
}
form#form:has(> .composer-bar) #scrollBtn:hover {
  background: color-mix(in srgb, var(--color-light-01) 13%, var(--color-background-01));
}
form#form:has(> .composer-bar) .composer-popovers {
  --composer-chip-height: 2.45rem;
  left: var(--composer-more-offset);
  right: 0;
  bottom: calc(100% - .25rem);
  max-width: none;
  flex-direction: row;
  align-items: flex-end;
  gap: 0;
}
form#form:has(> .composer-bar) .composer-popovers:has(.composer-limit-notice:not([hidden])) {
  flex-wrap: wrap;
}
.composer-limit-notices {
  order: -1;
  flex: 0 0 100%;
  display: grid;
  justify-items: start;
  padding-bottom: .35rem;
}
.composer-limit-notices:not(:has(.composer-limit-notice:not([hidden]))),
form#form.is-recording .composer-limit-notices:has(#voiceLimitNotice[hidden]) { display: none; }
.composer-popovers .composer-reply {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  min-width: min(10.5rem, 48%);
  max-width: min(22rem, 100%);
  height: var(--composer-chip-height);
  padding: .12rem .2rem .2rem .62rem;
  grid-template-columns: 1.15rem minmax(0, 1fr) 2rem;
  gap: .32rem;
  border: 0;
  border-radius: .85rem .85rem .25rem 0;
  background: var(--composer-surface);
  box-shadow: none;
  pointer-events: auto;
}
.composer-popovers .composer-reply-copy { gap: .05rem; }
.composer-popovers .composer-reply-copy strong { line-height: 1.05; }
.composer-popovers .composer-reply-copy > span { line-height: 1.15; }
.composer-popovers .composer-reply.has-reply-thumbnail {
  grid-template-columns: 1.15rem minmax(0, 1fr) 2rem 2rem;
}
.composer-popovers .composer-reply.has-reply-thumbnail .composer-reply-thumbnail { margin-block: -.12rem -.2rem; }
.composer-popovers:has(#attachedFiles:not(:empty)) .composer-reply {
  max-width: min(22rem, 50%);
  box-shadow: .25rem 0 .45rem -.3rem #0009;
}
.composer-popovers .composer-reply:not([hidden]) ~ #attachedFiles { margin-inline-start: -.5rem; }
.composer-popovers .composer-reply:not([hidden]) ~ #attachedFiles .attached-file:first-child { padding-inline-start: .8rem; }
/* The link preview chip (composer-link-preview.js) is a reply chip with a
   fixed width: arriving titles and thumbnails never move what is around it. */
.composer-popovers .composer-link-preview { width: min(17rem, 100%); }
.composer-popovers #composerReply:not([hidden]) + .composer-link-preview:not([hidden]) {
  margin-inline-start: -.5rem;
  padding-inline-start: .95rem;
  box-shadow: -.22rem 0 .4rem -.22rem #0008 inset;
}
.composer-popovers:has(#attachedFiles:not(:empty)) .composer-link-preview,
.composer-popovers:has(#attachedFiles:not(:empty)):has(.composer-link-preview:not([hidden])) #composerReply { max-width: min(14rem, 36%); }
.composer-link-preview .composer-reply-icon img { display: block; width: 1rem; height: 1rem; object-fit: contain; }
.composer-link-preview .composer-reply-icon .preview-globe { width: .95rem; height: .95rem; box-sizing: border-box; border-width: 1.5px; }
.composer-link-preview.is-loading .composer-link-preview-title { animation: composer-link-preview-wait 1.2s ease-in-out infinite alternate; }
@keyframes composer-link-preview-wait { from { opacity: .68; } to { opacity: .32; } }
form#form:is(.is-recording,.is-recorder-starting) .composer-link-preview { display: none; }
form#form:has(> .composer-bar) #attachedFiles {
  min-width: 0;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
form#form #attachedFiles[data-overflow-end] {
  mask-image: linear-gradient(to right, #000 calc(100% - 1.25rem), transparent);
}
.composer-popovers #attachedFiles:empty { display: none; }
form#form:has(.composer-reply:not([hidden]), #attachedFiles:not(:empty)) .composer-bar {
  border-top-left-radius: .25rem;
}
form#form[data-tray-joins-right] .composer-bar {
  border-top-right-radius: 0;
}
form#form[data-tray-joins-right]:not(:has(#attachedFiles:not(:empty))) .composer-reply {
  border-bottom-right-radius: 0;
}
@media (max-width: 649.98px) {
  form#form:is(.is-recording,.is-recorder-starting) .composer-popovers:not(:has(#attachedFiles:not(:empty))) .composer-reply {
    max-width: 100%;
  }
}
#attachedFiles .attached-file {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  height: var(--composer-chip-height);
  padding: .18rem .25rem .18rem .48rem;
  gap: .08rem;
  border: 0;
  border-radius: .85rem .85rem 0 0;
  background: var(--composer-surface);
  box-shadow: none;
  animation: composer-chip-in .2s cubic-bezier(.18, .85, .32, 1) both;
}
#attachedFiles .attached-file + .attached-file {
  margin-inline-start: -.32rem;
  padding-inline-start: .8rem;
  box-shadow: -.22rem 0 .4rem -.22rem #0008 inset;
}
#attachedFiles .attached-file-preview {
  width: 1.5rem;
  height: 1.5rem;
  flex-basis: 1.5rem;
}
#attachedFiles .attached-file-preview {
  display: grid;
  place-items: center;
  position: relative;
  color: var(--color-placeholder);
  background: none;
}
#attachedFiles .attached-file-preview canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: #fff;
}
#attachedFiles .attached-file-preview .ui-icon { width: 1rem; height: 1rem; }
#attachedFiles .attached-file-details { flex: 0 1 auto; }
#attachedFiles .attached-file .attached-file-details {
  flex-flow: row nowrap;
  align-items: baseline;
  gap: .18rem .44rem;
}
#attachedFiles .attached-file-name {
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
  mask-image: none;
  -webkit-mask-image: none;
}
#attachedFiles .attached-file-meta { white-space: nowrap; }
#attachedFiles .attached-file-remove {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 0;
  position: static;
  flex: 0 0 1.7rem;
  width: 1.7rem;
  height: 1.7rem;
}
#attachedFiles .attached-file-remove .ui-icon { width: .9rem; height: .9rem; margin: 0; }
#attachedFiles .attached-file-open {
  position: static;
  width: auto;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: 0 .18rem 0 0;
  border: 0;
  border-radius: .4rem;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: start;
}
#attachedFiles .attached-file-open:hover { background: var(--shell-selection); }
#attachedFiles .attached-file-open:focus-visible { outline-offset: 1px; }
@keyframes composer-chip-in {
  from { opacity: 0; transform: translate(-.35rem, .32rem) scale(.97); }
  to { opacity: 1; transform: none; }
}
.composer-bar .message-input-area {
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
form#form .composer-bar :is(textarea,.composer-list-editor) {
  font-size: .875rem;
  line-height: 1.3;
  min-height: var(--composer-control-size);
  padding: calc((var(--composer-control-size) - 1.3em) / 2) .55rem calc((var(--composer-control-size) - 1.3em) / 2) 1rem;
  border-radius: inherit;
}
form#form.has-composer-text .composer-bar textarea { padding-inline-end: .125rem; }
form#form .composer-bar .composer-list-editor { padding-inline-end: 2rem; }
form#form .composer-bar :is(#fileDropArea,.composer-action-slot,#sendBtn,#voiceRecordButton) {
  width: var(--composer-action-width);
}
form#form .composer-bar #fileDropArea {
  width: 100%;
  min-width: 0;
}
form#form.has-composer-text .composer-bar #fileDropArea {
  opacity: 0;
  transform: scale(.8);
  overflow: clip;
  pointer-events: none;
}
form#form .composer-bar :is(#fileDropArea,#sendBtn,#voiceRecordButton) {
  position: relative;
  isolation: isolate;
  border-radius: calc(var(--composer-control-size) / 2);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
form#form .composer-bar :is(#fileDropArea,#sendBtn,#voiceRecordButton):focus-visible {
  outline: 2px solid var(--camayo-focus);
  outline-offset: -3px;
}
@media (min-width: 650px) and (hover: hover) and (pointer: fine) {
  form#form:has(> .composer-bar) { --composer-action-width: calc(var(--composer-control-size) - .125rem); }
}
@media (hover: hover) {
  form#form:has(> .composer-bar) {
    --composer-action-overhang: calc(var(--composer-control-size) - var(--composer-action-width) + .375rem);
  }
  form#form .composer-bar #fileDropArea > .ui-icon {
    width: 1.125rem;
    height: 1.125rem;
    translate: calc(.25rem - var(--composer-action-overhang) / 2) 0;
  }
  form#form .composer-bar :is(#fileDropArea,#sendBtn,#voiceRecordButton)::before {
    content: '';
    position: absolute;
    inset-block: .125rem;
    inset-inline: calc(-1 * var(--composer-action-overhang) + .25rem) -.25rem;
    z-index: -1;
    border-radius: inherit;
    background: color-mix(in srgb, var(--color-light-01) 10%, transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
  }
  form#form .composer-bar :is(#sendBtn,#voiceRecordButton) {
    translate: .125rem 0;
  }
  form#form .composer-bar .composer-action-slot .ion-svg {
    translate: calc(.25rem - var(--composer-action-overhang) / 2) 0;
  }
  form#form .composer-bar :is(#fileDropArea,#sendBtn,#voiceRecordButton):hover { background: transparent; }
  form#form .composer-bar :is(#fileDropArea,#sendBtn,#voiceRecordButton):hover::before { opacity: 1; }
}
form#form .composer-bar .composer-action-slot > button {
  transform: none;
  transition: opacity .14s ease, background-color .15s ease;
}
.composer-bar :is(.composer-send-button,.voice-record-button) .ion-svg {
  grid-area: 1 / 1;
  transform: none;
  opacity: 1;
  scale: 1;
  filter: blur(0);
  transition: opacity .15s ease, scale .2s cubic-bezier(.25,.75,.25,1), filter .16s ease;
}
form#form .composer-bar :is(.voice-record-glyph,.voice-record-send-glyph) { display: block; }
form#form:not(.has-sendable-content) .composer-bar .composer-send-button .ion-svg,
form#form.has-sendable-content:not(.is-recording,.is-recorder-starting) .composer-bar .voice-record-glyph,
form#form:not(.is-recording,.is-recorder-starting) .composer-bar .voice-record-send-glyph,
form#form:is(.is-recording,.is-recorder-starting) .composer-bar .voice-record-glyph {
  opacity: 0;
  scale: .55;
  filter: blur(2px);
}
form#form .composer-bar .voice-recorder {
  min-height: var(--composer-control-size);
  padding: 0 .3rem 0 .45rem;
  grid-template-columns: 2rem max-content minmax(0, 1fr) 2rem;
  gap: .22rem;
}
form#form .composer-bar .voice-recorder > button { background: transparent; }
form#form .composer-bar .voice-recorder-discard .ion-svg { transform: none; }
form#form .composer-bar .voice-recorder :is(canvas,time) { align-self: center; }
.send-form-wrapper .forward-selection-bar {
  width: min(90%, 75rem);
  min-height: 2.45rem;
  padding: .16rem .4rem;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}
.send-form-wrapper .forward-selection-bar span { color: inherit; }
@media (max-width: 649.98px) {
  .send-form-wrapper .forward-selection-bar { width: calc(100% - .8rem); }
}
#container { --chat-scroll-space: max(4.25rem, var(--chat-bottom-clearance)); }

/* Floating chat chrome paints this colour; its surfaces fade out with the shared .scroll-fade curve. */
.app-shell { --chrome-edge-color: var(--sidebar-background, var(--color-background-01)); }
@media (min-width: 650px) {
  /* The rows scroll and fade in the inner list here; no mask on its wrapper,
     which would clip the search options. */
  #sidebarListScroller { mask-image: none; }
  /* Rows fade under the search field; the list ends at the window edge, cut hard. */
  #sidebarListScroller > #conversationSections {
    --scroll-fade-top: 1.65rem;
    margin-top: -1.35rem;
    padding-top: 1.65rem;
    scroll-padding-top: 1.65rem;
  }
}
html .app-shell #nav-bar::before,
html .app-shell.conversation-active #chatViewport::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
#container { --chat-header-inset: 0px; --chat-toolbar-fade-overhang: 2.65rem; }
html .app-shell #nav-bar {
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  isolation: isolate;
}
html .app-shell #nav-bar::before {
  --scroll-fade-bottom: calc(var(--header-height) + 2.1rem);
  inset: 0 0 calc(-1 * var(--chat-toolbar-fade-overhang));
  background: color-mix(in srgb, var(--chrome-edge-color) 88%, transparent);
  z-index: -1;
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}
html .app-shell :is(#chatViewport,#chatWrapper) { height: 100%; }
html .app-shell #chatViewport { overflow: clip; }
html .app-shell.conversation-active #chatViewport {
  contain: paint;
  border-bottom: 2px solid var(--chrome-edge-color);
}
html .app-shell:not(.conversation-active) #chatViewport::after { content: none; }
html .app-shell.conversation-active #chatViewport::after {
  --composer-fade-core: .4rem;
  --scroll-fade-top: max(4.2rem, calc(var(--chat-scroll-space) - .65rem));
  z-index: 1;
  bottom: -2px;
  height: calc(var(--composer-fade-core) + var(--scroll-fade-top) + 2px);
  background: var(--chrome-edge-color);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
/* Scale the stationary fade independently of transcript layout. Alternating
   names restart rapid retargets without a forced animation-reset layout. */
html .app-shell.conversation-active #chatViewport[data-composer-space-motion]::after {
  transform-origin: center bottom;
  animation: composer-clearance-fade-a 240ms cubic-bezier(.333333,0,.666667,1) both;
}
html .app-shell.conversation-active #chatViewport[data-composer-space-motion="b"]::after { animation-name: composer-clearance-fade-b; }
@keyframes composer-clearance-fade-a { from { transform: scaleY(var(--composer-fade-from-scale,1)); } to { transform: scaleY(1); } }
@keyframes composer-clearance-fade-b { from { transform: scaleY(var(--composer-fade-from-scale,1)); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { html .app-shell #chatViewport[data-composer-space-motion]::after { animation: none; } }
/* Cover the pane's rounding at fractional window sizes, outside the masked layer. */
html .app-shell.conversation-active #container::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 3px;
  z-index: 1;
  background: var(--chrome-edge-color);
  pointer-events: none;
}
html .app-shell .send-form-wrapper { z-index: 2; }
@media (max-width: 649.98px), (pointer: coarse) {
  form#form:has(> .composer-bar) { --composer-control-size: 2.75rem; }
  form#form .composer-bar :is(textarea,.composer-list-editor) { font-size: 16px; }
}
@media (max-width: 649.98px) {
  html .app-shell[data-app-section="chats"] #appSafeArea { background: transparent; }
  .send-form-wrapper { bottom: clamp(.3rem, env(safe-area-inset-bottom, 0px), 1.55rem); }
  .send-form-wrapper.keyboard-open { bottom: calc(var(--keyboard-offset, 0px) + .5rem); }
  html .app-shell.conversation-active #chatViewport::after {
    --composer-fade-core: .2rem;
    --scroll-fade-top: 4.2rem;
    background: color-mix(in srgb, var(--chrome-edge-color) 82%, transparent);
  }
  #container { --chat-header-inset: env(safe-area-inset-top, 0px); }
}
@media (prefers-reduced-motion: reduce) {
  .composer-popovers .composer-reply, #attachedFiles .attached-file, .composer-link-preview.is-loading .composer-link-preview-title { animation: none; }
  form#form:has(> .composer-bar), form#form .composer-more,
  form#form .composer-bar #fileDropArea,
  .composer-bar, .composer-bar :is(.composer-send-button,.voice-record-button) .ion-svg,
  form#form .composer-bar :is(#fileDropArea,#sendBtn,#voiceRecordButton)::before { transition: none; }
}

/* Grouped settings and conversation details share the same surfaces and rows. */
.settings-link[hidden] { display: none; }
.settings-link {
  appearance: none; display: grid; align-items: center;
  grid-template-columns: 1.25rem minmax(0, 1fr) .85rem; gap: .78rem;
  width: 100%; min-height: 3rem; padding: .65rem .9rem;
  border: 0; border-radius: .88rem; background: transparent; box-shadow: none;
  color: inherit; font: inherit; font-size: .88rem; font-weight: 550;
  text-align: start; cursor: pointer; transition: background-color .16s ease;
}
.settings-link > .ui-icon { width: 1.12rem; height: 1.12rem; }
.settings-link > .ui-icon:last-child { width: .8rem; opacity: .5; rotate: -90deg; }
.settings-link:focus-visible { outline: 2px solid var(--camayo-focus, currentColor); outline-offset: -2px; }
:is(.conversation-info-navigation,.conversation-info-stats dl,.conversation-weekdays) { border-radius: var(--camayo-card-radius); }
.settings-content .section-heading, .contact-presentation-heading {
  isolation: isolate;
}

.app-navigation [data-section="settings"] { margin-top: auto; }
.settings-navigation { padding: 0; }
.settings-navigation > h1 {
  position: relative; z-index: 1; padding: 1.15rem 1.25rem .65rem;
}
#settingsCategories {
  padding: .55rem .85rem 1rem; gap: .8rem;
  scroll-padding-block: .6rem;
}
.settings-profile-entry.settings-link {
  display: grid; grid-template-columns: 2.7rem minmax(0,1fr) .85rem;
  flex: none; padding: .78rem .85rem; min-height: 4.2rem;
  border-radius: var(--camayo-card-radius);
  background: var(--conversation-info-surface, light-dark(#e7e6ea, #29272d));
}
.settings-profile-label { display: grid; gap: .18rem; min-width: 0; }
.settings-profile-label strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.settings-profile-label > span { color: var(--color-placeholder); font-size: .76rem; }
.settings-profile-avatar { position: relative; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; overflow: hidden; }
.settings-profile-avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.settings-category-card { flex: none; padding: .26rem; }
#settingsCategories .category-button { min-height: 2.8rem; }
#settingsCategories .category-button::after { content: none; }
.app-shell #settingsContent { position: relative; display: flex; flex-direction: column; overflow: hidden; height: 100%; padding: 0; }
.app-shell #settingsContent > .section-heading {
  position: absolute; inset: 0 0 auto; min-height: 4.25rem; height: 4.25rem;
  margin: 0; padding-inline: var(--settings-content-inset, clamp(1.2rem, 4vw, 3rem)); z-index: 4; background: transparent;
}
#settingsPageTitle:focus { outline: none; }
#settingsPages { flex: 1; width: 100%; max-width: none; overflow: auto; padding: 4.25rem var(--settings-content-inset, clamp(1.2rem, 4vw, 3rem)) 2rem; box-sizing: border-box; scrollbar-gutter: stable; scroll-padding-top: 4.4rem; overscroll-behavior: contain; }
#settingsPages[hidden] { display: none; }
.app-shell #settingsPages > .settings-group { width: min(100%, 43rem); padding: .55rem 0; margin: 0; }
.app-shell #settingsPages .settings-group-content { display: grid; grid-template-columns: minmax(0,1fr); gap: .72rem; align-items: start; }
#settingsPages :is(input:not([type="checkbox"],[type="radio"],[type="range"]),select) {
  min-height: 2.65rem; color: var(--color-light-01); border: 1px solid transparent;
  border-radius: .7rem; background: color-mix(in srgb, currentColor 7%, transparent);
}
#settingsPages :is(input,select,button):focus-visible { outline: 2px solid var(--camayo-focus); outline-offset: 2px; }
#settingsPages #reactionSettings { display: grid; grid-template-columns: minmax(0,1fr); gap: .72rem; }
.settings-pane.has-parent-page #settingsBack { display: grid; }
@media (max-width: 649.98px) {
  .app-navigation [data-section="settings"] { margin: 0; }
  .settings-navigation > h1 { padding-top: calc(1.15rem + env(safe-area-inset-top,0px)); }
  #settingsCategories { padding-bottom: calc(5.8rem + env(safe-area-inset-bottom,0px)); }
  .app-shell #settingsContent { --settings-content-inset: 1rem; --settings-header-size: calc(4.25rem + env(safe-area-inset-top,0px)); }
  .app-shell #settingsPane:not(.has-detail) #settingsContent { display: none; }
  .app-shell #settingsContent > .section-heading { height: var(--settings-header-size); padding-top: env(safe-area-inset-top,0px); padding-inline-start: .65rem; }
  #settingsPages { padding-top: var(--settings-header-size); padding-bottom: calc(5.8rem + env(safe-area-inset-bottom,0px)); scroll-padding-top: var(--settings-header-size); }
  body.app-shell:has(#settingsContent :is(input:not([type="checkbox"],[type="radio"],[type="range"]),textarea):focus) .app-navigation { display: none; }
}

.app-shell #settingsPages { margin: 0; }
#settingsPages .reaction-drag-handle { touch-action: none; }
:is(#contactPresentation, .message-info) { --info-header: calc(4.25rem + env(safe-area-inset-top,0px)); }
:is(#contactPresentation, .message-info) .contact-presentation-heading { position: absolute; inset: 0 0 auto; z-index: 3; background: transparent; }
#contactPresentation :is(.conversation-info-detail,.contact-page-main) {
  padding-top: calc(var(--info-header) + .5rem);
  scroll-padding-top: calc(var(--info-header) + .3rem);
}
#contactPresentation [data-media-more]:not([hidden]) {
  min-width: 9rem; justify-content: center; gap: .55rem; margin: .2rem 0; padding-inline: .85rem;
  color: var(--color-light-01); background: var(--conversation-info-surface); border-radius: 2rem;
}
#contactPresentation [data-media-more]:active:enabled { background: var(--shell-selection); }
@media (hover: hover) and (pointer: fine) {
  #contactPresentation [data-media-more]:hover:enabled { background: var(--shell-selection); }
}
/* While loading: a small spinner in place of the arrow, the label on one line. */
#contactPresentation [data-media-more] { white-space: nowrap; }
#contactPresentation [data-media-more][data-loading] .ui-icon { display: none; }
#contactPresentation [data-media-more][data-loading]::before {
  content:''; width:.78rem; height:.78rem; border:.11rem solid currentColor; border-right-color:transparent;
  border-radius:50%; flex: none; animation: media-footer-spin .65s linear infinite;
}
@keyframes media-footer-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { #contactPresentation [data-media-more][data-loading]::before { animation:none; } }
.conversation-hour-chart { grid-template-columns: repeat(24,minmax(0,1fr)); --bar-gap: 2px; }
.conversation-hour-chart li { grid-template-rows: 4.2rem 1.1rem; position: relative; }
@media (min-width: 761px) {
  #settingsPages .conversation-weekday-bars { --bar-gap: 22px; }
  #settingsPages .conversation-hour-chart { --bar-gap: 5px; }
}
.conversation-hour-chart li > div > span { border-radius: .27rem .27rem .14rem .14rem; }
.conversation-hour-chart li > span:last-child { width: max-content; overflow: visible; font-size: .65rem; text-align: start; margin-top: .16rem; }
.conversation-media-counts.conversation-media-counts { margin: 0; background: transparent; }
.conversation-media-counts.conversation-media-counts > div { min-height: 2.1rem; padding: .25rem 0; grid-template-columns: 1fr auto; }
.conversation-info-stats .conversation-stat-hint { font-size: .78rem; margin: 0 .7rem .8rem; opacity: .78; }
.conversation-info-stats [data-most-reacted] { margin-bottom: .65rem; }
.account-stat-overview { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:.55rem; }
.account-stat-overview > div { display:grid; align-content:start; gap:.3rem; padding:.75rem; min-width:0; }
.account-stat-overview .ui-icon { width:1.05rem; height:1.05rem; opacity:.72; }
.account-stat-overview strong { font-size:clamp(1.12rem,3vw,1.85rem); letter-spacing:-.035em; overflow-wrap:anywhere; }
.account-stat-overview span { font-size:.74rem; line-height:1.25; overflow-wrap:anywhere; }
@media (max-width: 649.98px) {
  html .app-shell #settingsContent > .section-heading { padding: env(safe-area-inset-top,0px) .65rem 0; }
  html .app-shell #settingsPages { padding-top: var(--settings-header-size); }
  #settingsPages input:not([type="checkbox"],[type="radio"],[type="range"]), #settingsPages select { font-size: 16px; }
}

.settings-navigation { position: relative; }
.settings-navigation > h1 { pointer-events: none; }
#settingsCategories { padding-top: 3.85rem; scroll-padding-top: 3.8rem; }
/* Test chats: one floating row, what it will do below it. */
.test-chat-controls.camayo-card { box-sizing: border-box; padding: var(--camayo-card-inset); background: var(--menu-surface); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); box-shadow: 0 .3rem 1.2rem #0003; pointer-events: auto; }
.test-chat-controls[hidden], .test-chat-controls [hidden] { display: none !important; }
.composer-popovers > .test-chat-controls { order: -2; flex: 0 0 100%; width: 100%; margin-bottom: .75rem; }
/* Part of the composer's height, so messages end above it. */
form#form:has(> .composer-bar) .composer-popovers:has(> .test-chat-controls:not([hidden])) { flex-wrap: wrap; left: 0; max-width: none; }
body:has(#chatSearchLayout.search-open) .test-chat-controls,
form#form:is(.is-recording, .is-recorder-starting) .test-chat-controls { display: none; }
.test-chat-presets { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: .5rem; }
.test-chat-presets > label { min-width: 0; }
html body .test-chat-presets select { appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; min-height: 2.75rem; padding: 0 1.9rem 0 .8rem; border: 0; border-radius: var(--camayo-inner-radius); color: inherit; background: color-mix(in srgb, currentColor 8%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='m136 208 120-104 120 104M136 304l120 104 120-104' fill='none' stroke='%238b8590' stroke-width='48' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .6rem center / .95rem; font: inherit; font-size: 1rem; text-overflow: ellipsis; }
.test-chat-presets > button { min-height: 2.75rem; padding: .4rem .9rem; border-radius: var(--camayo-inner-radius); font-size: .87rem; white-space: nowrap; }
.test-chat-presets .ui-icon { width: 1rem; height: 1rem; flex: none; }
.test-chat-controls [data-cleanup-optin] { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; margin: .55rem .3rem 0; font-size: .78rem; line-height: 1.4; }
.test-chat-controls p { margin: .45rem .3rem 0; font-size: .76rem; line-height: 1.4; color: var(--color-placeholder); }
.test-chat-controls p:empty { display: none; }
.test-chat-controls progress { display: block; width: calc(100% - .6rem); height: .22rem; margin: .5rem .3rem .1rem; accent-color: var(--camayo-primary); }

html .app-shell #settingsPane, #contactPresentation :is(.conversation-info-detail,.contact-page-main) {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html .app-shell #settingsPane :is(button,input,select) { font-family: inherit; }
html .app-shell .settings-navigation h1 { padding-inline: 1.2rem; }

#settingsPane {
  --conversation-info-surface: var(--camayo-settings-card);
  --settings-title-size: 1.48rem;
}
html .app-shell #settingsCategories .category-button {
  display: grid; grid-template-columns: 1.25rem minmax(0,1fr) .85rem; justify-content: normal;
  width: 100%; font: inherit; font-size: .88rem; font-weight: 550;
}

/* One row and separator treatment for all grouped navigation. */
.camayo-navigation-card { display: grid; grid-auto-rows: min-content; gap: 0; overflow: hidden; }
.camayo-navigation-card > .camayo-navigation-row,
html .app-shell #settingsCategories .camayo-navigation-row,
html body #contactPresentation .camayo-navigation-row {
  position: relative; display: grid; align-items: center;
  grid-template-columns: 1.25rem minmax(0,1fr) .85rem; gap: .78rem;
  width: 100%; min-height: 3rem; padding: .65rem .9rem;
  border: 0; border-radius: 0; background: transparent; color: inherit;
  font: inherit; font-size: .9rem; text-align: start; box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.camayo-navigation-card > .camayo-navigation-row[hidden],
html .app-shell #settingsCategories .camayo-navigation-row[hidden],
html body #contactPresentation .camayo-navigation-row[hidden] { display: none; }
.camayo-navigation-card > .camayo-navigation-row > .ui-icon { width: 1.15rem; height: 1.15rem; }
.camayo-navigation-card > .camayo-navigation-row > .ui-icon:last-child { width: .85rem; opacity: .55; rotate: -90deg; transform: none; }
.camayo-navigation-card > .camayo-navigation-row:not([hidden]):has(~ .camayo-navigation-row:not([hidden]))::before {
  content: ''; position: absolute; inset: auto .9rem 0 2.93rem; pointer-events: none;
  border-bottom: 1px solid var(--ui-line, var(--line, #80808042));
  transition: opacity .16s ease;
}
.camayo-navigation-card > .camayo-navigation-row:is(:active,:focus-visible)::before,
.camayo-navigation-card > .camayo-navigation-row:has(~ .camayo-navigation-row:is(:active,:focus-visible)):not(:has(~ .camayo-navigation-row:not([hidden]) ~ .camayo-navigation-row:is(:active,:focus-visible)))::before { opacity: 0; }
.camayo-navigation-card .camayo-navigation-row:focus-visible,
html .app-shell #settingsCategories .camayo-navigation-row:focus-visible { outline: 2px solid var(--camayo-focus-ring, currentColor); outline-offset: -3px; }
html .app-shell #settingsCategories .settings-profile-entry {
  grid-template-columns: 2.7rem minmax(0,1fr) .85rem; min-height: 4.35rem;
  padding: .8rem .9rem; border-radius: var(--camayo-card-radius); background: var(--conversation-info-surface);
}
:is(.camayo-navigation-card,.settings-navigation,#contactPresentation,#accountCategories) .camayo-navigation-row:active:not(:disabled),
html .app-shell #settingsCategories .camayo-navigation-row:active:not(:disabled),
html body #contactPresentation .camayo-navigation-row:active:not(:disabled) { background-color: color-mix(in srgb, currentColor 8%, var(--conversation-info-surface, transparent)); }
@media (hover: hover) and (pointer: fine) {
  .camayo-navigation-card .camayo-navigation-row:hover:not(:disabled),
  html .app-shell #settingsCategories .camayo-navigation-row:hover:not(:disabled),
  html body #contactPresentation .camayo-navigation-row:hover:not(:disabled) { background-color: color-mix(in srgb, currentColor 8%, var(--conversation-info-surface, transparent)); }
  .camayo-navigation-card > .camayo-navigation-row:hover::before,
  .camayo-navigation-card > .camayo-navigation-row:has(~ .camayo-navigation-row:hover):not(:has(~ .camayo-navigation-row:not([hidden]) ~ .camayo-navigation-row:hover))::before { opacity: 0; }
}
@media (min-width: 650px) {
  html .app-shell #settingsCategories .camayo-navigation-row[aria-current] { background-color: color-mix(in srgb, currentColor 11%, var(--conversation-info-surface)); }
  #settingsCategories .camayo-navigation-card > .camayo-navigation-row[aria-current="page"]::before,
  #settingsCategories .camayo-navigation-card > .camayo-navigation-row:has(~ .camayo-navigation-row[aria-current="page"]:not([hidden])):not(:has(~ .camayo-navigation-row:not([hidden]) ~ .camayo-navigation-row[aria-current="page"]:not([hidden])))::before {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) { .camayo-navigation-card > .camayo-navigation-row::before { transition: none; } }

html .app-shell #settingsCategories { gap: 1rem; }
.settings-category-card { padding: 0; }

.app-shell #settingsContent, .settings-navigation {
  background-color: var(--sidebar-background);
  --settings-header-size: 4.2rem;
  --settings-content-inset: clamp(1.2rem, 4vw, 3rem);
}
html .app-shell .settings-navigation h1,
html .app-shell #settingsContent > .section-heading {
  position: absolute; inset: 0 0 auto; height: var(--settings-header-size); min-height: var(--settings-header-size);
  padding: .55rem var(--settings-content-inset) 0; background: transparent;
}
html .app-shell .settings-navigation h1 { padding-inline: 1.2rem; isolation: isolate; }
html .app-shell #settingsCategories {
  position: relative; margin-top: 0; padding-top: calc(var(--settings-header-size) + .3rem);
  scroll-padding-top: calc(var(--settings-header-size) + .3rem);
}
html .app-shell #settingsPages {
  position: relative; padding-top: calc(var(--settings-header-size) + .3rem);
  padding-inline: var(--settings-content-inset); scroll-padding-top: var(--settings-header-size);
}
html .app-shell #settingsPages > .settings-group { padding-block: 0; }
#settingsPages #reactionSettings { margin: 0; padding: 0; border: 0; }
#settingsPages #reactionSettings > .settings-card-heading { margin: .1rem .9rem -.35rem; }

html .app-shell #settingsPane :is(.settings-navigation > h1,#settingsPageTitle) {
  font-size: var(--settings-title-size); font-weight: 680; line-height: 1.18;
  letter-spacing: -.035em;
}
#settingsPageTitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(#contactPresentation, .message-info) .contact-presentation-heading h2 { font-size: 1.48rem; font-weight: 680; line-height: 1.18; letter-spacing: -.035em; }
html .app-shell #settingsBack { margin-inline-start: -.6rem; }
:is(#contactPresentation, .message-info) .contact-presentation-heading { min-height: var(--info-header); }
#contactPresentation .contact-presentation-heading > .contact-presentation-back { margin-inline-start: -.6rem; }
#contactPresentation :is(.contact-page-main,.conversation-info-detail) > :first-child { margin-block-start: 0; }

.settings-navigation h1::before,
.settings-content .section-heading::before,
.contact-presentation-heading::before {
  content: ''; position: absolute; inset: -1px 0 -.3rem; z-index: -1; pointer-events: none;
  --heading-surface: var(--sidebar-background);
  /* Opaque behind the title itself; scrolled text must never read through it.
     Below the title the surface runs out along the shared eased curve down to
     where the resting content starts (.scroll-fade-before, camayo-ui.css). */
  background: var(--heading-surface);
  --scroll-fade-bottom: 1.75rem;
}
.contact-presentation-heading::before { --heading-surface: var(--color-background-01); }
:is(#settingsCategories,#settingsPages) { overscroll-behavior-y: contain; }
html body :is(#settingsCategories,#settingsPages)::after {
  content: ''; position: absolute; inset-block-start: 100%; width: 1px; height: 2px; pointer-events: none;
}
@media (max-width: 649.98px) {
  .app-shell #settingsContent, .app-shell .settings-navigation {
    --settings-header-size: calc(4.05rem + env(safe-area-inset-top, 0px));
    --settings-content-inset: 1rem;
  }
  html .app-shell .settings-navigation h1, html .app-shell #settingsContent > .section-heading {
    padding-top: calc(env(safe-area-inset-top, 0px) + .55rem);
    padding-inline: var(--settings-content-inset);
  }
  .app-shell .settings-pane.has-detail .settings-content.mobile-back-active { background: var(--sidebar-background); }
  :is(#contactPresentation, .message-info) { --info-header: calc(4.55rem + env(safe-area-inset-top, 0px)); }
  :is(#contactPresentation, .message-info) .contact-presentation-heading { padding-top: calc(.95rem + env(safe-area-inset-top, 0px)); }
  .app-shell #databaseSidebar {
    --sidebar-toolbar-height: calc(4.05rem + env(safe-area-inset-top, 0px));
  }
}

html :is(.settings-content) :is(input,select,textarea,button):focus:not(:focus-visible) { outline: none; }
html body :is(#settingsPages,#contactPresentation,.test-chat-presets) select:focus {
  outline: none; box-shadow: none;
}
html body :is(#settingsPages,#contactPresentation,.test-chat-presets) select:focus-visible {
  background-color: color-mix(in srgb, currentColor 13%, var(--conversation-info-surface,var(--ui-surface)));
}
#settingsPane select:not([multiple]) {
  padding-block: .3rem;
  line-height: normal;
}
html .app-shell #settingsRecovery .e2ee-recovery-settings {
  display: grid;
  gap: .9rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
#settingsRecovery .e2ee-recovery-form p:empty { margin: 0; min-height: 0; }

html :is(.settings-content) .directory-search > input[type="search"] { box-shadow: none; }
html body .directory-search-clear[hidden] { display: none; }
.settings-card-heading {
  margin: .1rem .9rem -.52rem; color: var(--muted, var(--color-placeholder));
  font-size: .84rem; font-weight: 650; line-height: 1.35; text-align: start;
}
@media (max-width: 649.98px) {
  .app-shell #settingsPages > .settings-group:not([hidden]) { animation: none; }
}
.account-contact-toolbar {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .35rem;
  padding-block: .2rem;
  background: var(--bg);
}
.account-contact-toolbar .ui-icon, .account-contact-message .ui-icon { width: 1rem; height: 1rem; flex: 0 0 auto; }
.account-contact-request-count {
  min-width: 1.1rem;
  padding: .08rem .2rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: .7rem;
  text-align: center;
}
.account-contacts-page #contactStatus:empty { display: none; }
.account-contact-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The app icon stands on its own above the cards, centred, with the version below it. */
#settingsPages .about-camayo-heading { flex-direction: column; align-items: center; margin: 0 0 1rem; padding: 1rem 0 .25rem; gap: .7rem; text-align: center; background: none; }
#settingsPages .about-camayo-heading img { flex: none; display: block; width: 4.5rem; height: 4.5rem; border-radius: 1.15rem; }
#settingsPages .about-camayo-heading h2:not(#_) { margin: 0 0 .2rem; font-size: 1.25rem; line-height: 1.2; text-align: center; }
#settingsPages .about-camayo-heading p { margin: 0; opacity: 1; color: var(--color-placeholder); }
#settingsPages .about-camayo-links { margin: .25rem 0 0; padding: 0; border: 0; }
#settingsPages .about-camayo-links .camayo-navigation-row {
  text-decoration: none; font-weight: 550; color: inherit; border-radius: 0; border: 0;
}
.camayo-navigation-card > .camayo-navigation-row.is-external > .ui-icon:last-child { rotate: -35deg; }
#settingsPages .about-camayo-copy { padding: .9rem 1rem; }
#settingsPages .about-camayo-copy p { margin-inline: 0; }
#settingsPages .about-camayo-copy a { color: inherit; text-underline-offset: .15em; }
#settingsPages .settings-reload-card { padding: 0; overflow: hidden; }

button.app-update-prompt { font-size: .82rem; font-weight: 500; padding: .55rem .85rem; border-radius: 999px; }
#settingsPane > .app-update-prompt { display: none; }
.settings-update-card { flex: none; overflow: hidden; }
html .app-shell :is(#settingsUpdateButton,#refreshAppFiles) {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  width: 100%; min-height: 3rem; margin: 0;
  padding: .6rem .9rem; border: 0; border-radius: 0; background: transparent;
  color: inherit; box-shadow: none; font-size: .9rem; font-weight: 550; text-align: center;
}
html .app-shell :is(#settingsUpdateButton,#refreshAppFiles):active:enabled { background: color-mix(in srgb,currentColor 8%,transparent); }
html .app-shell :is(#settingsUpdateButton,#refreshAppFiles):focus-visible { outline-offset: -3px; }
@media (hover: hover) and (pointer: fine) {
  html .app-shell :is(#settingsUpdateButton,#refreshAppFiles):hover:enabled { background: color-mix(in srgb,currentColor 8%,transparent); }
}
#settingsPages #refreshAppFilesStatus { margin: 0 .9rem; }
@media (max-width: 649.98px) {
  /* WebKit can subtract the top inset from the installed app's dynamic
     viewport. Keep all panes on one edge and bound the extension to the
     reported inset so a system-reserved strip cannot hide the dock. */
  html.standalone-app:has(> body.app-shell) { height: 100%; overflow: hidden; }
  html.standalone-app body.app-shell {
    position: relative;
    height: 100%;
    height: clamp(100%, 100lvh, calc(100dvh + env(safe-area-inset-top, 0px)));
    overflow: hidden;
  }
  html.standalone-app body.app-shell :is(#main-container, #settingsPane, .app-navigation) { position: absolute; }
  html.standalone-app body.app-shell :is(#main-container, #settingsPane, #chatList, #chatSearchLayout, #container) { height: 100%; }
  html body.app-shell .app-navigation {
    box-sizing: border-box; max-width: calc(100vw - 2rem);
  }
  #settingsPane.open.has-detail > .app-update-prompt:not([hidden]) {
    display: inline-flex; z-index: 6;
    bottom: calc(4.85rem + max(.65rem, env(safe-area-inset-bottom, 0px)));
  }
  #settingsPane:has(input:not([type="checkbox"],[type="radio"],[type="range"]):focus,textarea:focus) > .app-update-prompt:not([hidden]) { display: none; }
  #settingsPane.has-detail:has(> .app-update-prompt:not([hidden])) #settingsPages { padding-bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px)); }
}

.account-stat-overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.account-stat-overview > .camayo-card {
  display: grid; grid-template-columns: 1.25rem minmax(0,1fr); align-items: center; align-content: start; gap: .45rem .5rem;
  min-height: 5.4rem; padding: .9rem; box-sizing: border-box;
}
.account-stat-overview > .account-stat-total { grid-column: 1 / -1; padding: 1rem; }
.account-stat-overview > .camayo-card .ui-icon { width: 1.15rem; height: 1.15rem; color: light-dark(#345eae,#9fbbff); opacity: 1; }
.account-stat-overview > .camayo-card > span { font-size: .8rem; min-height: 2lh; align-content: center; }
.account-stat-overview > .account-stat-total > span { min-height: 0; }
.account-stat-overview > .camayo-card > :is(strong,small) { grid-column: 1 / -1; }
.account-stat-overview > .camayo-card > strong { font-size: clamp(1.45rem,4.2vw,2.15rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.account-stat-overview > .account-stat-total > strong { font-size: clamp(2.1rem,7vw,3rem); }
.account-stat-overview small:empty { display: none; }
.account-activity-weekdays,
.account-activity-calendar {
  display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px;
}
.account-activity-weekdays { margin: .7rem 0 .35rem; text-align: center; font-size: .7rem; color: var(--color-placeholder); }
.account-activity-calendar { list-style: none; padding: 0; margin: 0; min-height: 7.6rem; }
.account-activity-calendar li { min-width: 0; }
.account-activity-calendar button {
  display: grid; place-items: center; width: 100%; min-height: 2rem; padding: .2rem;
  border: 0; border-radius: .45rem; font: inherit; font-size: .76rem; font-weight: 600; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, light-dark(#4972c5,#8dabfa) var(--activity-intensity,0%), color-mix(in srgb,currentColor 9%,transparent));
  color: var(--activity-text, inherit);
}
.account-activity-calendar button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }
.account-activity-calendar [data-intensity="1"] { --activity-intensity: 30%; }
.account-activity-calendar [data-intensity="2"] { --activity-intensity: 50%; }
.account-activity-calendar [data-intensity="3"] { --activity-intensity: 75%; --activity-text: light-dark(#13213a,#11182a); }
.account-activity-calendar [data-intensity="4"] { --activity-intensity: 100%; --activity-text: light-dark(white,#11182a); }
.account-activity-day {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem;
  margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--ui-line); font-size: .76rem;
}
.account-activity-day[hidden] { display: none; }
.account-activity-day time { color: var(--color-placeholder); }


#settingsPages .camayo-navigation-row:is(a,button) { text-decoration: none; }
@media (max-width: 649.98px) {
  body.app-shell[data-app-section="settings"]:has(#settingsPane.frame-editing) .app-navigation { display: none; }
}


.sidebar-startup-recovery:not([hidden]) {
  display: grid;
  justify-items: start;
  gap: .65rem;
  margin: .85rem .75rem;
  padding: 1rem;
}
.sidebar-startup-recovery p { margin: 0; }
html body .sidebar-startup-recovery button { width: 100%; min-height: 2.75rem; justify-content: center; font-size: .9rem; border-radius: var(--camayo-inner-radius, .7rem); }
/* The empty list fills its column and would push the card below the screen. */
html body.app-shell #conversationSections:has(+ .sidebar-startup-recovery:not([hidden])) { display: none; }

/* Media of a conversation: the tabs stay at the top while the list scrolls. */
/* Only the chips stay; what scrolls fades out behind them. The scroller's
   scroll-padding already holds the header's height, so the offset is small. */
#contactPresentation .conversation-media-nav {
  position: sticky; top: 0; z-index: 2; isolation: isolate;
  margin: 0 calc(var(--contact-panel-gutter) * -1) .5rem; padding: .1rem var(--contact-panel-gutter) .4rem;
}
#contactPresentation .conversation-media-nav::before {
  content: ''; position: absolute; z-index: -1; inset: auto 0 -1.6rem; height: calc(100% + var(--info-header) + 1.6rem); pointer-events: none;
  /* Same colour as the panel, eased (larsenwork.com/easing-gradients) so the
     list melts away instead of ending at a visible line. */
  --fade-surface: var(--sidebar-background);
  background: linear-gradient(var(--fade-surface) calc(100% - 2.6rem),
    var(--fade-surface) calc(100% - 2.6rem + 2.6rem * 0),
    color-mix(in srgb, var(--fade-surface) 73.8%, transparent) calc(100% - 2.6rem + 2.6rem * 0.19),
    color-mix(in srgb, var(--fade-surface) 54.1%, transparent) calc(100% - 2.6rem + 2.6rem * 0.34),
    color-mix(in srgb, var(--fade-surface) 38.2%, transparent) calc(100% - 2.6rem + 2.6rem * 0.47),
    color-mix(in srgb, var(--fade-surface) 27.8%, transparent) calc(100% - 2.6rem + 2.6rem * 0.565),
    color-mix(in srgb, var(--fade-surface) 19.4%, transparent) calc(100% - 2.6rem + 2.6rem * 0.65),
    color-mix(in srgb, var(--fade-surface) 12.6%, transparent) calc(100% - 2.6rem + 2.6rem * 0.73),
    color-mix(in srgb, var(--fade-surface) 7.5%, transparent) calc(100% - 2.6rem + 2.6rem * 0.802),
    color-mix(in srgb, var(--fade-surface) 4.2%, transparent) calc(100% - 2.6rem + 2.6rem * 0.861),
    color-mix(in srgb, var(--fade-surface) 2.1%, transparent) calc(100% - 2.6rem + 2.6rem * 0.91),
    color-mix(in srgb, var(--fade-surface) 0.8%, transparent) calc(100% - 2.6rem + 2.6rem * 0.952),
    color-mix(in srgb, var(--fade-surface) 0.2%, transparent) calc(100% - 2.6rem + 2.6rem * 0.982),
    transparent calc(100% - 2.6rem + 2.6rem * 1));
}
#contactPresentation .conversation-media-nav .camayo-chips { --chips-bleed: var(--contact-panel-gutter); margin-bottom: 0; }
#contactPresentation .conversation-media-nav .conversation-media-filter { margin: .5rem 0 0; }
/* No system preview of pictures under a held finger; Camayo opens its own menu. */
:is(.conversation-media-tile, .attachment-preview, .attachment-video-stage, .search-result-thumbnail, .image-lightbox-stage, .image-lightbox-thumbnail) :is(img, video),
:is(.conversation-media-tile, a.attachment-preview) { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
