/*
 * Pages inside Settings: transitions, shared rows and the profile pages.
 * One vocabulary for every page. Do not add per-page button or input styles:
 *   .settings-card-heading   label above a card
 *   .camayo-card.settings-card   group of rows
 *   .settings-field-row      label with switch or select
 *   .profile-field           label with an inline text input
 *   .settings-action         row that does something (--danger for red)
 *   .profile-list            rows of data with small trailing actions
 *   .profile-add             input row that appends to the list above it
 *   .settings-primary        the one saving action of a form
 *   p                        hint below a card
 */

/* A hidden element stays hidden, whatever display its component sets. */
:is(#settingsPages, #contactPresentation, .message-info) [hidden] { display: none !important; }

/* Settings pages stack on phones: one page moves over a picture of the other. */
html .app-shell #settingsPane > #settingsContent.settings-page-snapshot { display: none; }
@media (max-width: 649.98px) {
  html .app-shell #settingsPane > #settingsContent.settings-page-snapshot { position: absolute; inset: 0; z-index: 1; display: flex; pointer-events: none; background: var(--sidebar-background); }
  html .app-shell .settings-pane.has-detail > #settingsContent.mobile-back-active { z-index: 2; box-shadow: -.5rem 0 1.5rem rgb(0 0 0 / .18); }
  .settings-page-snapshot * { animation: none !important; transition: none !important; }
  /* The slide is the transition. A second fade after it reads as a reload. */
  .app-shell #settingsPages > .settings-group:not([hidden]) { animation: none; }
}

/* Ascenders and umlauts must not touch the clipping edge of an ellipsis title. */
#settingsPageTitle, .settings-navigation > h1 { padding-block: .12em; }

/* Embedded server documents fill the page below the shared heading. */
html .app-shell #settingsContent > .settings-frame-page { position: absolute; inset: 0; z-index: 1; width: auto; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; }
.settings-frame-page[hidden] { display: none; }
.settings-frame-page > .settings-group-content { height: 100%; }
/* The frame keeps the page's colour scheme. A document whose scheme differs from
 * its frame's gets an opaque canvas instead of the settings background. */
.settings-frame-page iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.settings-frame-status { position: absolute; inset: var(--settings-header-size) 0 auto; display: grid; justify-items: start; gap: .8rem; padding: .65rem var(--settings-content-inset, 1rem); }
.settings-frame-status[hidden] { display: none; }
.settings-frame-status p { margin: 0; font-size: .87rem; color: var(--color-placeholder); }
.settings-frame-page:has(.settings-frame-status:not([hidden])) iframe { opacity: 0; pointer-events: none; }

/* Rows */
/* A heading stands .42rem above its card. Its margin gives back the gap of the
 * stack it sits in (--settings-stack-gap, .72rem on settings pages); a stack
 * without a gap, like the info page, sets it to 0. */
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-card-heading { margin: .85rem .9rem calc(.42rem - var(--settings-stack-gap, .72rem)); font-size: .84rem; font-weight: 650; line-height: 1.35; }
html .app-shell #contactPresentation .contact-page-main { --settings-stack-gap: 0rem; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) :is(.settings-group-content, .settings-block) > .settings-card-heading:first-child { margin-top: .1rem; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-card-heading--danger { color: light-dark(#a33951, #ffb9c5); }
/* A danger zone: the card takes a faint tint of the destructive red, its rows keep `settings-action--danger`. */
html .app-shell :is(#settingsPages, #contactPresentation) .camayo-card.settings-card--danger { background: color-mix(in srgb, #d83b55 7%, var(--camayo-settings-card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, #d83b55 22%, transparent); }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-form { display: grid; gap: .72rem; margin: 0; padding: 0; border: 0; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-field {
  position: relative; display: grid; grid-template-columns: fit-content(58%) minmax(6rem, 1fr); align-items: center;
  gap: .75rem; min-height: 3rem; padding: 0 .9rem; font-size: .87rem; line-height: 1.35; cursor: text;
}
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-field :is(input, select) {
  width: 100%; min-height: 2.9rem; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  color: inherit; font: inherit; font-size: 1rem; text-align: end; text-align-last: end;
}
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-field :is(input, select):focus-visible { outline: none; background: transparent; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-field:focus-within { background: color-mix(in srgb, currentColor 5%, transparent); }
:is(#settingsPages, #contactPresentation, .message-info) .settings-card > .profile-field + .profile-field::before,
:is(#settingsPages, #contactPresentation, .message-info) .profile-disclosure > .profile-field:not([hidden]) ~ .profile-field::before,
:is(#settingsPages, #contactPresentation, .message-info) .profile-disclosure::before,
:is(#settingsPages, #contactPresentation, .message-info) .settings-card > .settings-action:not([hidden]) ~ .settings-action::before,
:is(#settingsPages, #contactPresentation, .message-info) .settings-card > .profile-list:not(:empty) ~ :is(.profile-add, .settings-action)::before,
:is(#settingsPages, #contactPresentation, .message-info) .settings-card > .profile-add ~ .settings-action::before,
:is(#settingsPages, #contactPresentation, .message-info) .profile-list > li:not([hidden]) ~ li::before {
  content: ''; position: absolute; inset: 0 .9rem auto; border-top: 1px solid var(--ui-line, #8080803b); pointer-events: none;
}
:is(#contactPresentation, .message-info) .settings-card { overflow: hidden; padding: 0; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-action {
  position: relative; display: flex; align-items: center; gap: .78rem; width: 100%; min-height: 3rem; margin: 0; padding: .65rem .9rem;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; color: inherit; cursor: pointer;
  font: inherit; font-size: .9rem; text-align: start; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
:is(#settingsPages, #contactPresentation, .message-info) .settings-action > .ui-icon { width: 1.15rem; height: 1.15rem; flex: none; }
:is(#settingsPages, #contactPresentation, .message-info) .settings-action > span { min-width: 0; overflow-wrap: anywhere; }
/* A second, quiet line under the label says what the row does (chat info danger page). */
:is(#settingsPages, #contactPresentation, .message-info) .settings-action > span > small { display: block; margin-top: .14rem; text-transform: none; font-size: .79rem; line-height: 1.4; color: var(--color-placeholder); }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-action--danger { color: light-dark(#b3324c, #ff9aab); }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-action:disabled { opacity: .45; cursor: default; }
@media (hover: hover) {
  html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-action:enabled:hover, html .app-shell :is(#settingsPages, #contactPresentation, .message-info) a.settings-action:hover { background: var(--shell-selection); }
  html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-action--danger:enabled:hover { background: color-mix(in srgb, #d83b55 14%, transparent); }
}
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-action:active { background: var(--shell-selection); }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) :is(.settings-action, .profile-list button, .profile-add button, .profile-chips button):focus-visible { outline: 2px solid var(--camayo-focus); outline-offset: -2px; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-primary {
  justify-self: stretch; width: 100%; min-height: 2.9rem; margin: .2rem 0 0; padding: .6rem 1rem; border: 0; border-radius: .95rem;
  background: var(--camayo-primary); color: var(--camayo-on-primary); font: inherit; font-size: .92rem; font-weight: 600; box-shadow: none; cursor: pointer;
  transition: opacity .16s ease;
}
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-primary:disabled { opacity: 1; background: color-mix(in srgb, currentColor 0%, light-dark(#0000000f, #ffffff12)); color: light-dark(#00000059, #ffffff52); cursor: default; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-group-content > .status, html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-form > .status { min-height: 0; }
:is(#settingsPages, #contactPresentation, .message-info) .status:is(:empty, .status-as-toast) { display: none !important; }

/* Passwords: small label above, the whole width to type below. `.profile-field--recessed`
 * gives any longer text field (names, addresses, IDs) the same shape. */
html .app-shell :is(#settingsPages, #contactPresentation) :is(.settings-field-row, .profile-field):is(:has(> :is(.password-visibility-field, input[type="password"])), .profile-field--recessed) { grid-template-columns: minmax(0, 1fr); gap: .4rem; min-height: 0; padding: .6rem .9rem .7rem; }
html .app-shell :is(#settingsPages, #contactPresentation) :is(.settings-field-row, .profile-field) > :is(label, span:first-child):has(~ :is(.password-visibility-field, input[type="password"])),
html .app-shell :is(#settingsPages, #contactPresentation) :is(.settings-field-row, .profile-field).profile-field--recessed > :is(label, span:first-child) { font-size: .76rem; line-height: 1.3; color: var(--color-placeholder); }
/* A password sits in a recessed field (like shortcut bindings) with its eye button inside. */
html .app-shell :is(#settingsPages, #contactPresentation) :is(.settings-field-row, .profile-field) > :is(.password-visibility-field, input[type="password"]),
html .app-shell :is(#settingsPages, #contactPresentation) .profile-field--recessed > :is(input, textarea) { display: block; position: relative; border-radius: .7rem; background: light-dark(rgb(0 0 0 / .05), rgb(0 0 0 / .22)); transition: background-color .15s ease; }
html .app-shell :is(#settingsPages, #contactPresentation) :is(.settings-field-row, .profile-field) > :is(.password-visibility-field:focus-within, input[type="password"]:focus),
html .app-shell :is(#settingsPages, #contactPresentation) .profile-field--recessed > :is(input, textarea):focus { background: light-dark(rgb(0 0 0 / .09), rgb(0 0 0 / .34)); }
html .app-shell :is(#settingsPages, #contactPresentation) .profile-field--recessed > :is(input, textarea) { box-sizing: border-box; width: 100%; min-height: 2.6rem; margin: 0; padding: 0 .8rem; border: 0; color: inherit; font: inherit; font-size: 1rem; text-align: start; text-align-last: auto; }
html .app-shell :is(#settingsPages, #contactPresentation) .profile-field--recessed > :is(input, textarea):focus-visible { outline: none; }
html .app-shell :is(#settingsPages, #contactPresentation) :is(.password-visibility-field > input, .settings-field-row > input[type="password"]) { box-sizing: border-box; width: 100%; min-height: 2.6rem; margin: 0; padding: 0 2.9rem 0 .8rem; border: 0; border-radius: .7rem; color: inherit; font: inherit; font-size: 1rem; text-align: start; }
html .app-shell :is(#settingsPages, #contactPresentation) .password-visibility-field > input:is(*, :focus) { outline: none; background: transparent; }
html .app-shell :is(#settingsPages, #contactPresentation) .password-visibility-field > button.password-visibility-toggle { inset: 50% .1rem auto auto; width: 2.4rem; min-width: 2.4rem; max-width: 2.4rem; height: 2.4rem; min-height: 2.4rem; max-height: 2.4rem; border-radius: .55rem; opacity: .75; }

/* File picker */
html .app-shell #settingsPages .settings-file-row { position: relative; display: grid; grid-template-columns: auto max-content minmax(0, 1fr); align-items: center; gap: .78rem; min-height: 3.2rem; margin: 0; padding: .5rem .9rem; box-sizing: border-box; font: inherit; font-size: .9rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.settings-file-row > .ui-icon { width: 1.15rem; height: 1.15rem; }
.settings-file-name { min-width: 0; overflow: hidden; text-align: end; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; font-weight: 550; color: light-dark(#1d6570, #7cc5cf); }
.settings-file-row.has-file > .settings-file-name { font-weight: 400; color: var(--color-placeholder); }
html .app-shell #settingsPages .settings-file-row > input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.settings-file-row:active, .settings-file-row:focus-within { background: color-mix(in srgb, currentColor 5%, transparent); }
.settings-file-row:has(:focus-visible) { outline: 2px solid var(--camayo-focus); outline-offset: -2px; }
html .app-shell #settingsPages .settings-file-row + .settings-field-row::before { content: ''; position: absolute; inset: 0 .9rem auto; border-top: 1px solid var(--ui-line, #8080803b); }

/* A choice reads as a value at the end of its row. */
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) :is(.settings-field-row > select, .profile-field > select, .language-toolbar > .camayo-field > select) {
  width: auto; max-width: min(14rem, 52vw); min-height: 2.75rem; 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; 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 :is(#settingsPages, #contactPresentation, .message-info) .profile-field > select { justify-self: end; max-width: 100%; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) :is(.settings-field-row > select, .profile-field > select):focus-visible { background-color: color-mix(in srgb, currentColor 10%, transparent); }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-field input::-webkit-date-and-time-value { text-align: end; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-field input[type="time"] { width: auto; justify-self: end; appearance: none; -webkit-appearance: none; }

/* Lists */
:is(#settingsPages, #contactPresentation, .message-info) .profile-list { display: grid; margin: 0; padding: 0; list-style: none; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list:empty { display: none; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list > li {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-height: 3rem; margin: 0; padding: .55rem .9rem; border: 0; font-size: .9rem; overflow-wrap: anywhere;
}
:is(#settingsPages, #contactPresentation, .message-info) .profile-list > li > :first-child { min-width: 0; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list strong { font-weight: 500; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list br { display: none; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list small { display: block; margin-top: .1rem; font-size: .76rem; color: var(--color-placeholder); }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list .row { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: .15rem; margin-inline-end: -.5rem; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list li > button { flex: none; margin-inline-end: -.5rem; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list .blocked-person { display: flex; align-items: center; gap: .75rem; min-width: 0; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list .blocked-person-avatar { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; overflow: hidden; border-radius: 50%; color: #fff; font-size: .82rem; font-weight: 600; }
:is(#settingsPages, #contactPresentation, .message-info) .profile-list .blocked-person-avatar img { width: 100%; height: 100%; object-fit: cover; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) :is(.profile-list, .profile-add) button {
  width: auto; min-height: 2.5rem; margin-block: 0; padding: .3rem .5rem; border: 0; border-radius: .6rem; background: transparent;
  box-shadow: none; color: inherit; font: inherit; font-size: .84rem; font-weight: 550; white-space: nowrap; cursor: pointer;
}
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-list button.danger { color: light-dark(#b3324c, #ff9aab); }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-list button:active { background: var(--shell-selection); }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-add { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; margin: 0; padding: 0 .4rem 0 .9rem; border: 0; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-add input { width: 100%; min-height: 3rem; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: 1rem; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-add input:focus-visible { outline: none; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .profile-add:focus-within { background: color-mix(in srgb, currentColor 5%, transparent); }

/* List view (list-view.js): search that scrolls away, a sticky head with chips
 * and the current section, sections with titles and an A–Z index at the side.
 * The scroller fades content out below the head with an eased mask (stops from
 * larsenwork.com/easing-gradients/); no divider line, so the fade is long. Values
 * that change while scrolling are registered and written to the element using them. */
@property --list-view-fade-depth { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --list-view-fade-start { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --list-view-search-progress { syntax: '<number>'; inherits: false; initial-value: 0; }
/* Offsets inside the view are measured from the scroller: it must be positioned. */
.list-view-scroller { position: relative; }
html .app-shell #settingsPages.list-view-scroller, .list-view-scroller {
  --list-view-fade-tail: 2.25rem;
  mask-image: linear-gradient(to bottom, #000 0 var(--list-view-fade-start),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 1)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.987)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.081),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.951)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.155),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.896)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.225),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.825)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.29),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.741)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.353),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.648)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.412),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.55)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.471),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.45)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.529),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.352)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.588),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.259)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.647),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.175)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.71),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.104)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.775),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.049)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.845),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.013)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.919),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 1));
  -webkit-mask-image: linear-gradient(to bottom, #000 0 var(--list-view-fade-start),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 1)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.987)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.081),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.951)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.155),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.896)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.225),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.825)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.29),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.741)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.353),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.648)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.412),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.55)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.471),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.45)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.529),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.352)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.588),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.259)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.647),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.175)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.71),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.104)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.775),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.049)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.845),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0.013)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 0.919),
    rgb(0 0 0 / calc(1 - var(--list-view-fade-depth) * 0)) calc(var(--list-view-fade-start) + var(--list-view-fade-tail) * 1));
}
.list-view { --list-view-surface: var(--sidebar-background, var(--color-background-01)); position: relative; display: grid; gap: var(--settings-stack-gap, .72rem); min-width: 0; }
/* The search gives back the sentinel's row gap: one gap separates it from the head. */
.list-view-search { margin-bottom: calc(-1 * var(--settings-stack-gap, .72rem)); opacity: calc(1 - var(--list-view-search-progress) * 1.5); transform: scale(calc(1 - var(--list-view-search-progress) * .05)); transform-origin: 50% 100%; }
.list-view-sentinel { height: 0; }
.list-view-head { position: sticky; top: 0; z-index: 2; display: grid; gap: .55rem; padding-bottom: .1rem; background: var(--list-view-surface); }
.list-view-head[data-empty] { padding: 0; }
/* Stuck, it also covers what scrolls up behind the page title. */
.list-view-head[data-stuck]::before { content: ''; position: absolute; inset: auto 0 100%; height: 6rem; background: var(--list-view-surface); pointer-events: none; }
.list-view-controls { display: grid; gap: .45rem; }
.list-view-controls > .camayo-chips { margin-bottom: 0; }
html .app-shell :is(#settingsPages, #contactPresentation) .list-view-chips > .camayo-chip { min-height: 2.1rem; padding-block: .3rem; }
/* The title of the section under the head, as if its own title had stuck. */
.list-view-current { position: absolute; inset: 100% 0 auto; height: 2rem; overflow: hidden; background: var(--list-view-surface); opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.list-view-head[data-current] > .list-view-current { opacity: 1; }
html .app-shell .list-view-current-title { position: absolute; inset: 0 auto auto .9rem; padding-top: .3rem; font-size: .84rem; font-weight: 650; line-height: 1.35; text-transform: capitalize; }
.list-view-current-title[data-entering="up"] { animation: list-view-in-up .2s cubic-bezier(.2,.7,.2,1) both; }
.list-view-current-title[data-entering="down"] { animation: list-view-in-down .2s cubic-bezier(.2,.7,.2,1) both; }
.list-view-current-title[data-leaving="up"] { animation: list-view-out-up .2s ease both; }
.list-view-current-title[data-leaving="down"] { animation: list-view-out-down .2s ease both; }
@keyframes list-view-in-up { from { opacity: 0; transform: translateY(.7rem); } }
@keyframes list-view-in-down { from { opacity: 0; transform: translateY(-.7rem); } }
@keyframes list-view-out-up { to { opacity: 0; transform: translateY(-.7rem); } }
@keyframes list-view-out-down { to { opacity: 0; transform: translateY(.7rem); } }
.list-view-frame { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.list-view[data-index] > .list-view-frame { grid-template-columns: minmax(0, 1fr) 1.35rem; margin-inline-end: -.55rem; }
.list-view-sections { display: grid; gap: var(--settings-stack-gap, .72rem); min-width: 0; }
.list-view-section { display: grid; gap: .72rem; min-width: 0; }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .list-view-section > .list-view-section-title { margin-top: .1rem; }
/* A–Z: sticky beside the rows, centred in the visible height. */
.list-view-index {
  position: sticky; top: var(--list-view-index-top, 0px); display: flex; flex-direction: column; justify-content: center; align-items: stretch;
  height: var(--list-view-index-height, auto); max-height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
html .app-shell .list-view-index > .list-view-index-key {
  display: grid; place-items: center; width: 100%; min-width: 0; height: auto; min-height: 0; flex: 0 1 1.05rem; margin: 0; padding: 0; border: 0; border-radius: .4rem;
  background: none; box-shadow: none; color: var(--color-placeholder); font: inherit; font-size: clamp(.56rem, calc(var(--list-view-index-height, 30rem) / 27 * .62), .7rem); font-weight: 600; line-height: 1;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .15s ease, transform .15s ease;
}
html .app-shell .list-view-index > .list-view-index-key[aria-disabled="true"] { opacity: .35; cursor: default; }
html .app-shell .list-view-index > .list-view-index-key[aria-current] { color: var(--color-light-01); font-weight: 800; transform: scale(1.2); }
html .app-shell .list-view-index > .list-view-index-key:focus-visible { outline: 2px solid var(--camayo-focus); outline-offset: -1px; }
.list-view-index[data-dragging] { border-radius: 1rem; background: color-mix(in srgb, currentColor 8%, transparent); }
/* The letter under the finger, large, while the index is dragged. */
.list-view-bubble {
  position: fixed; left: var(--list-view-center-x, 50%); top: var(--list-view-center-y, 50%); z-index: 5; display: grid; place-items: center; width: 4.4rem; height: 4.4rem; margin: -2.2rem 0 0 -2.2rem;
  border-radius: 1.2rem; background: var(--menu-surface, color-mix(in srgb, var(--color-light-01) 14%, var(--list-view-surface))); color: var(--color-light-01);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 .4rem 1.6rem #0003;
  font-size: 2.1rem; font-weight: 700; opacity: 0; transform: scale(.85); transition: opacity .16s ease, transform .16s ease; pointer-events: none;
}
.list-view-bubble[data-shown] { opacity: 1; transform: none; }
/* Muted chats: name and area on the left, the switch at the end. */
.list-view-rows > .notification-conversation > label { display: grid; flex: 1; min-width: 0; gap: .1rem; cursor: pointer; }
html .app-shell .list-view-rows > .notification-conversation > [role="switch"] { flex: none; width: 2.68rem; margin: 0; }
html .app-shell .list-view > .list-view-status { margin: 0; padding: .4rem .9rem; color: var(--color-placeholder); font-size: .87rem; }
@media (prefers-reduced-motion: reduce) {
  .list-view-current-title, .list-view-current { animation: none !important; transition: none; }
  .list-view-search { transform: none; }
  .list-view-bubble, html .app-shell .list-view-index > .list-view-index-key { transition: none; }
}

/* Profile */
#settingsPages .profile-hero { display: grid; justify-items: center; gap: .55rem; padding: .35rem 0 .9rem; text-align: center; }
html .app-shell #settingsPages .profile-hero .avatar-editor { position: relative; width: 6.5rem; height: 6.5rem; border-radius: 50%; }
/* The picture opens large; its camera badge (shared with contact info) replaces it. */
html .app-shell #settingsPages .profile-hero #accountAvatar[data-open-file] { cursor: zoom-in; }
html .app-shell #settingsPages .profile-hero #accountAvatar:focus-visible { outline: 2px solid var(--camayo-focus); outline-offset: 3px; }
html .app-shell #settingsPages .profile-hero .avatar-editor.dragover { outline: 3px solid var(--color-accent-01); outline-offset: 3px; }
html .app-shell #settingsPages .profile-hero #accountAvatar { display: grid; place-items: center; width: 6.5rem; height: 6.5rem; margin: 0; overflow: hidden; border-radius: 50%; font-size: 2.1rem; font-weight: 600; }
#settingsPages .profile-hero #accountAvatar img { width: 100%; height: 100%; object-fit: cover; }
#settingsPages #profileHeading { max-width: 100%; font-size: 1.2rem; font-weight: 650; letter-spacing: -.015em; overflow-wrap: anywhere; }
#settingsPages .avatar-upload { display: grid; justify-items: center; gap: .5rem; margin: 0; padding: 0; border: 0; }
#settingsPages .avatar-upload:not(:has(> .avatar-selection:not([hidden]))) { display: none; }
#settingsPages .avatar-selection { display: flex; align-items: center; gap: .7rem; font-size: .82rem; color: var(--color-placeholder); }
#settingsPages .avatar-selection img { width: 2.6rem; height: 2.6rem; border-radius: 50%; }
/* The code and its QR stand on the page itself, centred like the app icon on "Über Camayo". */
#settingsPages .profile-code { display: grid; justify-items: center; gap: .9rem; padding: 1rem 0 .25rem; text-align: center; }
#settingsPages #contactQr { display: grid; place-items: center; width: min(13rem, 70vw); aspect-ratio: 1; padding: .55rem; border-radius: 1.1rem; background: #fff; box-sizing: border-box; }
#settingsPages #contactQr svg { display: block; width: 100%; height: auto; }
#settingsPages #contactId { padding: .2rem .5rem; border: 0; background: none; font: 600 1.25rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; cursor: copy; user-select: text; }
#settingsPages .profile-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
html .app-shell #settingsPages :is(.profile-chips button, .account-contact-toolbar > button) {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: auto; min-height: 2.5rem; margin: 0; padding: .4rem .8rem;
  border: 0; border-radius: .85rem; background: var(--camayo-settings-card); box-shadow: none; color: inherit; font: inherit; font-size: .83rem; font-weight: 550; cursor: pointer;
}
html .app-shell #settingsPages :is(.profile-chips button, .account-contact-toolbar > button):is(:active, [aria-expanded="true"]) { background: var(--shell-selection); }
#settingsPages #scheduleDays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; padding: .6rem; }
#settingsPages .profile-page #scheduleDays { padding: .6rem; }
#settingsPages #scheduleDays label { position: relative; display: grid; place-items: center; min-height: 2.6rem; border-radius: var(--camayo-inner-radius); background: color-mix(in srgb, currentColor 6%, transparent); font-size: .84rem; font-weight: 550; cursor: pointer; }
#settingsPages #scheduleDays label:has(:checked) { background: var(--camayo-primary); color: var(--camayo-on-primary); }
#settingsPages #scheduleDays label:has(:focus-visible) { outline: 2px solid var(--camayo-focus); outline-offset: 2px; }
#settingsPages #scheduleDays input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#settingsPages .profile-disclosure { position: relative; display: grid; margin: 0; padding: 0 0 var(--camayo-card-inset); border: 0; }
html .app-shell #settingsPages .profile-disclosure .settings-primary { justify-self: center; width: calc(100% - 2 * var(--camayo-card-inset)); margin-top: .5rem; border-radius: var(--camayo-inner-radius); }
#settingsPages .profile-disclosure .password-input-wrap, #settingsPages .profile-field > :not(span) { min-width: 0; }

/* Contacts */
#settingsPages .account-contact-toolbar { display: flex; gap: .45rem; }
#settingsPages .account-contact-toolbar > button { white-space: nowrap; }
#settingsPages .account-contact-toolbar .ui-icon { width: 1rem; height: 1rem; flex: none; }
html .app-shell #settingsPages .directory-search > input[type="search"] { background: transparent; }
@media (max-width: 420px) { html .app-shell #settingsPages .account-contact-toolbar > button { padding-inline: .45rem; font-size: .78rem; } }
#settingsPages .account-contact-request-count { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 1rem; background: var(--ui-accent, #24707b); color: #fff; font-size: .7rem; }
#settingsPages .account-contacts-page .list-view-rows > li { padding-block: .4rem; }
#settingsPages .account-contact-label { display: flex; flex: 1; align-items: center; gap: .7rem; }
#settingsPages .account-contact-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
#settingsPages .account-contacts-page .list-view-rows .account-contact-avatar { width: 2.2rem; height: 2.2rem; flex: none; border-radius: 50%; overflow: hidden; }
#settingsPages .account-contacts-page .list-view-rows .account-contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
#settingsPages .account-contacts-page .list-view-rows .row { flex-wrap: nowrap; align-items: center; gap: .2rem; }
html .app-shell #settingsPages .account-contacts-page .list-view-rows select { order: -1; width: auto; max-width: 8.5rem; min-height: 2.5rem; padding: .2rem .3rem; border: 0; background: transparent; color: var(--color-placeholder); font-size: .8rem; text-align-last: end; }
html .app-shell #settingsPages .account-contacts-page .list-view-rows .account-contact-message { display: grid; place-items: center; width: 2.5rem; padding: 0; }
#settingsPages .account-contacts-page .list-view-rows .account-contact-message .ui-icon { width: 1.15rem; height: 1.15rem; }

/* Companies */
#settingsPages #workspaceList .workspace-copy { display: grid; }
#settingsPages .workspace-open { display: grid; place-items: center; color: inherit; opacity: .55; }
#settingsPages .workspace-open::after { content: ''; position: absolute; inset: 0; }
#settingsPages .workspace-open .ui-icon { width: .85rem; height: .85rem; rotate: -90deg; }
#settingsPages #workspaceList > li:has(.workspace-open:active) { background: var(--shell-selection); }
@media (hover: hover) { #settingsPages #workspaceList > li:has(.workspace-open:hover) { background: var(--shell-selection); } }

/* Devices and second factor come from /auth/ */
#settingsPages .account-security-view { display: grid; gap: .72rem; }
#settingsPages .account-security-view .security-card { display: grid; gap: .45rem; margin: 0; padding: .9rem; border: 0; box-shadow: none; text-align: start; }
#settingsPages .account-security-view :is(h2, h3) { margin: 0; font-size: .92rem; font-weight: 600; }
#settingsPages .account-security-view p { margin: 0; font-size: .79rem; line-height: 1.45; }
#settingsPages .account-security-view form { display: grid; gap: .5rem; margin: 0; padding: 0; border: 0; }
#settingsPages .account-security-view .settings-card > form + form { border-top: 1px solid var(--ui-line, #8080803b); }
html .app-shell #settingsPages .account-security-view .security-card button {
  justify-self: start; width: auto; min-height: 2.5rem; margin: 0; padding: .3rem .85rem; border: 0; border-radius: .8rem; box-shadow: none;
  background: color-mix(in srgb, currentColor 9%, transparent); color: inherit; font: inherit; font-size: .84rem; font-weight: 550;
}
html .app-shell #settingsPages .account-security-view .security-card button.danger { background: color-mix(in srgb, #d83b55 14%, transparent); color: light-dark(#b3324c, #ff9aab); }
#settingsPages .account-security-view .totp-qr { width: 11rem; padding: .5rem; border-radius: 1rem; background: #fff; }
/* Recovery codes: numbers inside the panel, codes in fixed-width columns. */
#settingsPages .account-security-view .recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .35rem 1rem; margin: .2rem 0 0; padding: .75rem .85rem; list-style: none; counter-reset: recovery-code; border-radius: var(--camayo-inner-radius, .75rem); background: color-mix(in srgb, currentColor 7%, transparent); }
#settingsPages .account-security-view .recovery-codes li { display: flex; gap: .5rem; align-items: baseline; counter-increment: recovery-code; }
#settingsPages .account-security-view .recovery-codes li::before { content: counter(recovery-code) "."; min-width: 1.4em; text-align: end; color: var(--color-placeholder); font-size: .78rem; font-variant-numeric: tabular-nums; }
#settingsPages .account-security-view .recovery-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; letter-spacing: .02em; user-select: all; -webkit-user-select: all; }

/* Loading keeps the shape of what follows instead of a message. */
#settingsPages .profile-skeleton { display: grid; gap: 0; }
#settingsPages .profile-skeleton > span { position: relative; height: 3rem; }
#settingsPages .profile-skeleton > span::after { content: ''; position: absolute; inset: 1.1rem .9rem; width: 45%; border-radius: .4rem; background: color-mix(in srgb, currentColor 10%, transparent); }
#settingsPages .profile-skeleton > span:nth-child(2)::after { width: 62%; }
#settingsPages .profile-skeleton { opacity: 0; animation: settings-skeleton .2s ease .25s forwards; }
@keyframes settings-skeleton { to { opacity: 1; } }
#settingsPages .profile-error > p { margin: 0; padding: .9rem .9rem .3rem; font-size: .87rem; }

/* Setting rows. Every card is a stack of rows with one height, inset and label. */
html .app-shell #settingsPages .settings-card { min-width: 0; padding: 0; overflow: hidden; }
html .app-shell #settingsPages .settings-field-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem;
  grid-column: 1 / -1; box-sizing: border-box; min-height: 3rem; margin: 0; padding: .5rem .9rem;
}
html .app-shell #settingsPages .settings-field-row > label { min-width: 0; margin: 0; font: inherit; font-size: .87rem; line-height: 1.35; }
html .app-shell #settingsPages .settings-field-row:has(> select) { grid-template-columns: max-content minmax(0, 1fr); }
html .app-shell #settingsPages .settings-field-row > select { justify-self: end; max-width: 100%; min-height: 2.2rem; margin: -.1rem 0; }
html .app-shell #settingsPages .settings-field-row > [role="switch"] { width: 2.68rem; justify-self: end; margin: 0; }
/* A slider gets its own line: label and value above, the full width to drag. */
html .app-shell #settingsPages .settings-field-row--range { grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .75rem; padding-block: .75rem .6rem; }
html .app-shell #settingsPages .settings-range-control { display: contents; }
html .app-shell #settingsPages .settings-range-control output { grid-area: 1 / 2; font-size: .87rem; font-variant-numeric: tabular-nums; color: var(--color-placeholder); }
html .app-shell #settingsPages .settings-field-row--range > label { grid-area: 1 / 1; }
html .app-shell #settingsPages .settings-range-control input[type="range"] { grid-column: 1 / -1; width: 100%; min-width: 0; min-height: 2.4rem; height: 2.4rem; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
html .app-shell #settingsPages .settings-range-control input::-webkit-slider-runnable-track { height: .3rem; border-radius: 1rem; background: color-mix(in srgb, currentColor 18%, transparent); }
html .app-shell #settingsPages .settings-range-control input::-moz-range-track { height: .3rem; border-radius: 1rem; background: color-mix(in srgb, currentColor 18%, transparent); }
html .app-shell #settingsPages .settings-range-control input::-webkit-slider-thumb { -webkit-appearance: none; width: 1.55rem; height: 1.55rem; margin-top: -.625rem; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 .1rem .4rem rgb(0 0 0 / .35), 0 0 0 .5px rgb(0 0 0 / .12); }
html .app-shell #settingsPages .settings-range-control input::-moz-range-thumb { width: 1.55rem; height: 1.55rem; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 .1rem .4rem rgb(0 0 0 / .35); }
html .app-shell #settingsPages .settings-range-limits { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: -.35rem; font-size: .72rem; color: var(--color-placeholder); }
html .app-shell #settingsPages :is(.settings-field-row, .swipe-setting, .quick-reaction-setting):not(.is-reorder-placeholder) + :is(.settings-field-row, .swipe-setting, .quick-reaction-setting):not(.is-reorder-placeholder)::before { content: ''; position: absolute; inset: 0 .9rem auto; border-top: 1px solid var(--ui-line, #8080803b); pointer-events: none; }
/* Hints explain the card above them and never compete with it. */
html .app-shell #settingsPages .settings-group-content :is(p, .settings-row-hint):not(.camayo-card *, .settings-card *, .profile-error *) { margin: -.2rem .9rem .35rem; font-size: .79rem; line-height: 1.45; color: var(--color-placeholder); opacity: 1; overflow-wrap: anywhere; }
/* A failed save stays beside its form until the next attempt (status() in account.js). */
html .app-shell #settingsPages .settings-group-content .status[data-error="1"] { color: light-dark(#b3324c, #ff9aab); }
html .app-shell #settingsPages .settings-group-content > p:first-child { margin-top: 0; }
#settingsPages .settings-group-content p:empty { display: none; }

/* Keyboard shortcuts (shortcut-settings.js). One card fills the page below the
 * send settings: page actions, a line, then the list scrolling inside the card.
 * The list is cut hard at that line (a clear edge, see UI_STANDARDS
 * "Scrollkanten"). shortcut-settings.js measures the room; with less than
 * 260px for the card (a phone in landscape) the page scrolls normally. */
/* clip, not hidden: focus and scrollIntoView cannot move a page that does not scroll. */
html .app-shell #settingsPages.settings-pages--fill { overflow: clip; }
html .app-shell #settingsPages.settings-pages--fill > #settingsShortcuts > .settings-group-content { grid-template-rows: auto auto minmax(0, 1fr); height: var(--shortcut-fill-height, auto); box-sizing: border-box; }
html .app-shell #settingsPages.settings-pages--fill #settingsShortcuts .shortcut-settings { display: flex; align-self: stretch; min-height: 0; }
html .app-shell #settingsPages.settings-pages--fill #settingsShortcuts .shortcut-card { flex: 1; min-height: 0; }
html .app-shell #settingsPages.settings-pages--fill #settingsShortcuts .shortcut-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
html .app-shell #settingsPages .shortcut-card { display: flex; flex-direction: column; }
html .app-shell #settingsPages .shortcut-card-head { display: grid; gap: .45rem; padding: .75rem .9rem .7rem; border-bottom: 1px solid var(--ui-line, #8080803b); }
html .app-shell #settingsPages .shortcut-page-actions { flex-wrap: wrap; gap: .4rem; margin: 0; }
html .app-shell #settingsPages .shortcut-page-action { min-height: 2rem; padding-block: .3rem; background: color-mix(in srgb, currentColor 7%, transparent); }
html .app-shell #settingsPages .shortcut-page-action:not(:disabled):hover { background: color-mix(in srgb, currentColor 12%, transparent); }
#settingsPages .shortcut-page-action .ui-icon { width: .9rem; height: .9rem; fill: currentColor; }
#settingsPages .shortcut-page-action.is-danger { color: light-dark(#a33951, #ffb9c5); }
html .app-shell #settingsPages .shortcut-profile-hint { margin: 0; font-size: .79rem; line-height: 1.45; color: var(--color-placeholder); }
/* Padding sits inside the scroller, so the list still reaches the line. */
#settingsPages .shortcut-scroll { padding-bottom: .4rem; scroll-padding-block: 2.4rem .4rem; }
html .app-shell #settingsPages .shortcut-group-title { margin: 0; padding: .95rem .9rem .15rem; font-size: .76rem; font-weight: 650; line-height: 1.35; color: var(--color-placeholder); }
html .app-shell #settingsPages .shortcut-row { grid-template-columns: minmax(0, 1fr) auto 1.75rem auto; gap: .35rem .6rem; padding-block: .4rem; }
#settingsPages .shortcut-copy { display: grid; min-width: 0; gap: .1rem; }
#settingsPages .shortcut-label { font-size: .87rem; line-height: 1.35; transition: transform .2s ease, opacity .2s ease; }
/* Every row keeps one line for a note or a status, so neither moves anything.
 * Without a note the label sits centred and eases up while a status shows. */
#settingsPages .shortcut-sub { display: grid; min-width: 0; min-height: calc(.74rem * 1.35); font-size: .74rem; line-height: 1.35; }
#settingsPages .shortcut-sub > small { grid-area: 1 / 1; min-width: 0; overflow: hidden; font-size: inherit; line-height: inherit; white-space: nowrap; text-overflow: ellipsis; color: var(--color-placeholder); transition: opacity .25s ease; }
#settingsPages .shortcut-status { opacity: 0; }
#settingsPages .shortcut-copy.has-status .shortcut-status { opacity: 1; }
#settingsPages .shortcut-copy.has-status .shortcut-note { opacity: 0; }
#settingsPages .shortcut-copy:not(.has-note, .has-status) .shortcut-label { transform: translateY(calc((.74rem * 1.35 + .1rem) / 2)); }
#settingsPages .shortcut-status[data-tone="warning"] { color: light-dark(#8a5300, #ffc46b); }
#settingsPages .shortcut-status[data-tone="error"] { color: light-dark(#a33951, #ffb9c5); }
#settingsPages .shortcut-row :is(.shortcut-keys, .shortcut-label) { transition: opacity .2s ease, transform .2s ease; }
#settingsPages .shortcut-row.is-off :is(.shortcut-keys, .shortcut-label) { opacity: .5; }
/* Caps sit right-aligned in stored order from the right, so a new binding is
 * added on the left and nothing already shown moves. */
#settingsPages .shortcut-keys { position: relative; display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-start; gap: .4rem; min-width: 0; }
/* Each binding sits in a recessed field: darker than the card, darker still under the pointer. */
#settingsPages .shortcut-binding { position: relative; display: inline-flex; align-items: center; padding: .15rem; border-radius: .6rem; background: light-dark(rgb(0 0 0 / .05), rgb(0 0 0 / .22)); transition: background-color .15s ease; }
#settingsPages .shortcut-binding:is(:hover, :focus-within) { background: light-dark(rgb(0 0 0 / .09), rgb(0 0 0 / .34)); }
#settingsPages .shortcut-capture { display: inline-flex; align-items: center; min-width: 2.2rem; min-height: 1.9rem; justify-content: center; margin: 0; padding: .15rem .3rem; border: 0; border-radius: .5rem; background: transparent; color: inherit; font: inherit; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
#settingsPages .shortcut-capture.is-recording { background: color-mix(in srgb, var(--camayo-focus-ring) 16%, transparent); box-shadow: 0 0 0 2px var(--camayo-focus-ring); }
#settingsPages .shortcut-capture.is-recording .shortcut-prompt { animation: shortcut-prompt 1.2s ease-in-out infinite alternate; }
@keyframes shortcut-prompt { from { opacity: 1; } to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { #settingsPages .shortcut-capture.is-recording .shortcut-prompt { animation: none; } }
#settingsPages .shortcut-prompt { font-size: .8rem; color: var(--color-placeholder); white-space: nowrap; }
/* × as a badge on the key cap's corner; + floating left of the caps. Neither
 * takes room. With a mouse they appear on hover or focus; touch always shows them. */
#settingsPages :is(.shortcut-clear, .shortcut-add, .shortcut-reset) { display: inline-grid; place-items: center; margin: 0; padding: 0; border: 0; border-radius: 50%; color: var(--color-placeholder); cursor: pointer; transition: opacity .18s ease, background-color .15s ease, color .15s ease, visibility .18s; }
#settingsPages :is(.shortcut-clear, .shortcut-add, .shortcut-reset) .ui-icon { width: .95rem; height: .95rem; fill: currentColor; }
#settingsPages .shortcut-clear { position: absolute; top: -.4rem; right: -.4rem; z-index: 1; width: 1.15rem; height: 1.15rem; min-height: 0; background: light-dark(#77737d, #a19ca8); color: var(--camayo-settings-card); box-shadow: 0 0 0 2px var(--camayo-settings-card); }
#settingsPages .shortcut-clear .ui-icon { width: .7rem; height: .7rem; }
#settingsPages .shortcut-clear:hover { background: light-dark(#a33951, #ff8fa1); }
#settingsPages .shortcut-add { position: absolute; top: 50%; right: calc(100% + .3rem); width: 1.75rem; height: 1.75rem; background: transparent; transform: translateY(-50%); }
#settingsPages .shortcut-reset { grid-column: 3; width: 1.75rem; height: 1.75rem; background: transparent; opacity: 0; visibility: hidden; }
#settingsPages .shortcut-reset.is-visible { opacity: 1; visibility: visible; }
#settingsPages :is(.shortcut-add, .shortcut-reset):hover { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; }
html .app-shell #settingsPages .shortcut-row > [role="switch"] { grid-column: 4; }
@media (hover: hover) and (pointer: fine) {
  #settingsPages .shortcut-binding:not(:hover, :focus-within) .shortcut-clear { opacity: 0; }
  #settingsPages .shortcut-row:not(:hover, :focus-within) .shortcut-add { opacity: 0; }
}
#settingsPages .shortcut-fixed { padding: .2rem .45rem; }
/* Chat 1–9: the modifier is a select on its key cap (camayo-select-chip). */
#settingsPages .shortcut-modifier { gap: .2rem; padding: .3rem .35rem .3rem .45rem; cursor: pointer; }
#settingsPages .shortcut-modifier > .ui-icon { color: var(--color-placeholder); }
@media (max-width: 520px) {
  html .app-shell #settingsPages .shortcut-row { grid-template-columns: minmax(0, 1fr) auto; }
  #settingsPages .shortcut-keys { grid-column: 1; grid-row: 2; flex-direction: row; justify-content: flex-start; justify-self: start; }
  #settingsPages .shortcut-modifier { order: -1; }
  #settingsPages .shortcut-add { right: auto; left: calc(100% + .3rem); }
  #settingsPages .shortcut-reset { grid-column: 2; grid-row: 2; justify-self: end; }
  html .app-shell #settingsPages .shortcut-row > [role="switch"] { grid-column: 2; grid-row: 1; }
}

/* Swipe actions, reactions, language */
#settingsPages .swipe-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
#settingsPages .swipe-settings-grid fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
#settingsPages .swipe-settings-grid legend { display: flex; align-items: center; gap: .4rem; padding: .9rem .9rem .2rem; font-size: .84rem; font-weight: 650; color: var(--color-placeholder); }
#settingsPages .swipe-settings-grid legend .ui-icon { width: .95rem; height: .95rem; fill: currentColor; }
#settingsPages .swipe-setting { position: relative; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: .75rem; min-height: 3rem; padding: .2rem .5rem .2rem .9rem; box-sizing: border-box; border-radius: var(--camayo-inner-radius, .7rem); transition: background-color .3s ease; }
#settingsPages .swipe-setting.is-gesture-active { background: var(--shell-selection); }
#settingsPages .swipe-setting-stage { display: flex; align-items: center; gap: .6rem; font-size: .87rem; cursor: pointer; }
/* Two dots, the second filled for the long swipe. */
#settingsPages .swipe-stage-mark { display: inline-flex; gap: .2rem; }
#settingsPages .swipe-stage-mark i { width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; opacity: .85; }
#settingsPages .swipe-stage-mark[data-level="0"] i + i { opacity: .2; }
#settingsPages .swipe-setting-controls { display: flex; align-items: center; justify-content: flex-end; gap: .2rem; min-width: 0; }
html .app-shell #settingsPages .swipe-action-select { display: inline-flex; align-items: center; gap: .55rem; width: auto; min-width: 0; min-height: 2.6rem; margin: 0; padding: .25rem .45rem .25rem .3rem; border: 0; border-radius: .7rem; background: transparent; color: inherit; font: inherit; font-size: .87rem; box-shadow: none; cursor: pointer; transition: background-color .15s ease; }
@media (hover: hover) { html .app-shell #settingsPages .swipe-action-select:hover { background: color-mix(in srgb, currentColor 7%, transparent); } }
html .app-shell #settingsPages .swipe-action-select[aria-expanded="true"] { background: color-mix(in srgb, currentColor 9%, transparent); }
#settingsPages .swipe-action-select .swipe-setting-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#settingsPages .swipe-action-select[data-value="none"] .swipe-setting-label { color: var(--color-placeholder); }
#settingsPages .swipe-action-select .swipe-setting-icon { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; transition: background-color .3s ease; }
#settingsPages .swipe-action-select .swipe-setting-icon .ui-icon { width: 1.05rem; height: 1.05rem; }
#settingsPages .swipe-action-select .swipe-setting-icon[data-tone="none"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ui-line, #8080803b); color: var(--color-placeholder); }
#settingsPages .swipe-select-chevron { opacity: .6; }
/* Preview: a sample bubble with the chat's swipe layers; the dots beside it
   show what each direction reveals, nearest first. */
#settingsPages .swipe-preview { position: relative; display: flex; align-items: center; justify-content: center; gap: .7rem; min-height: 5.6rem; padding: 1rem .9rem; overflow: hidden; touch-action: pan-y; border-bottom: 1px solid var(--ui-line, #8080803b); background: var(--color-background-01); }
#settingsPages .swipe-preview, #settingsPages .swipe-preview * { -webkit-user-select: none !important; user-select: none !important; }
#settingsPages .swipe-preview-bubble { --bubble-background: var(--color-message-other); position: relative; flex: 0 1 auto; max-width: 13.5rem; padding: .55rem .8rem; border-radius: 1rem; background: var(--bubble-background); color: var(--color-light-01); font-size: 14px; line-height: 1.35; cursor: grab; touch-action: pan-y; }
#settingsPages .swipe-preview-bubble:is(.is-reply-swiping, .is-reply-settling) { transform: translate3d(var(--reply-swipe-x, 0px), 0, 0); isolation: isolate; background: transparent; will-change: transform; cursor: grabbing; }
#settingsPages .swipe-preview-bubble:is(.is-reply-swiping, .is-reply-settling)::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--bubble-background); z-index: -1; pointer-events: none; }
#settingsPages .swipe-preview-hints { display: flex; flex: none; align-items: center; gap: .3rem; min-width: 1.6rem; transition: opacity .2s ease; }
#settingsPages .swipe-preview-hints--right { flex-direction: row-reverse; }
#settingsPages .swipe-preview:has(.is-reply-swiping, .is-reply-settling) .swipe-preview-hints { opacity: 0; }
#settingsPages .swipe-preview-hint { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; color: #fff; }
#settingsPages .swipe-preview-hint + .swipe-preview-hint { width: 1.3rem; height: 1.3rem; opacity: .75; }
#settingsPages .swipe-preview-hint .ui-icon { width: 58%; height: 58%; fill: currentColor; }
#settingsPages .swipe-preview-hint .swipe-emoji { font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { #settingsPages :is(.swipe-setting, .swipe-preview-hints, .swipe-setting-icon) { transition: none; } }
#settingsPages #quickReactionSettings { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
#settingsPages #quickReactionSettings.is-waiting { opacity: 0; }
#settingsPages .quick-reaction-setting { position: relative; min-height: 3rem; padding: .1rem .4rem .1rem .9rem; border-radius: 0; }
#settingsPages .quick-reaction-label { font-size: .87rem; }
#settingsPages #emojiSkinToneSettings { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem; padding: .35rem .6rem; }
html .app-shell #settingsLanguage #accountLanguagePicker, #settingsLanguage :is(.language-picker, .language-select) { width: 100%; margin: 0; }
html .app-shell #settingsLanguage #accountLanguagePicker .language-select { display: flex; width: 100%; min-height: 3rem; padding: .3rem .9rem; border: 0; border-radius: 0; background: transparent; font-size: .9rem; }

/* One row height and one title line on every level. */
html .app-shell #settingsPages .camayo-navigation-row { min-height: 3rem; }
/* The card rounds; a row inside it is square, also while highlighted. */
.camayo-navigation-card > .camayo-navigation-row:not(#_) { border-radius: 0; }
html .app-shell .settings-navigation > h1 { display: flex; align-items: center; }
html .app-shell #settingsCategories .settings-update-card button { gap: .8rem; padding-inline: .9rem; font-weight: 400; }
html .app-shell #settingsCategories .settings-update-card button .ui-icon { width: 1.15rem; height: 1.15rem; margin: 0; }

/* Headings follow the casing of the rows that lead to them. */
#settingsPageTitle, .settings-card-heading { text-transform: capitalize; }
html .app-shell #settingsPane #settingsPageTitle.is-long { font-size: 1.04rem; letter-spacing: -.02em; }
html .app-shell #settingsPages button.settings-action { justify-content: flex-start; text-align: start; }

/* Recovery Kit */
html .app-shell #settingsRecovery .e2ee-recovery-form.settings-card { display: grid; gap: 0; margin: 0; padding: .15rem 0 var(--camayo-card-inset); }
html .app-shell #settingsPages #settingsRecovery .e2ee-recovery-form > p:not(:empty) { margin: .5rem .9rem .35rem; font-size: .78rem; color: var(--color-placeholder); }
html .app-shell #settingsPages #settingsRecovery .e2ee-recovery-form > :is(button[type="submit"], .e2ee-recovery-save, .e2ee-recovery-rotate) { justify-self: center; width: calc(100% - 2 * var(--camayo-card-inset)); min-height: 2.9rem; margin: .7rem 0 0; border-radius: var(--camayo-inner-radius); font-size: .92rem; }
html .app-shell #settingsPages #settingsRecovery .e2ee-recovery-form > .e2ee-recovery-rotate { min-height: 2.4rem; margin-top: .35rem; font-weight: 500; }
html .app-shell #settingsPages #settingsRecovery #e2eeRecoverySettings > p { margin: .55rem .9rem 0; }
#settingsRecovery .recovery-kit-details > summary { min-height: 3rem; }
#settingsRecovery .recovery-kit-details > summary strong { font-weight: 400; }
#settingsRecovery .recovery-kit-details > p { margin: 0 .9rem .8rem; font-size: .82rem; line-height: 1.5; color: var(--color-placeholder); }
#settingsRecovery .recovery-kit-section { display: grid; gap: .45rem; }

/* Global admins */
html .app-shell #settingsPages .platform-account-search { padding: 0 .4rem 0 .9rem; }
#settingsPlatformAdmins [data-accounts] { padding: 0; overflow: hidden; }
#settingsPlatformAdmins [data-accounts]:empty { display: none; }
html .app-shell #settingsPlatformAdmins .platform-account { position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: .75rem; min-height: 3.2rem; margin: 0; padding: .5rem .9rem; border: 0; border-radius: 0; background: transparent; font-size: .9rem; }
#settingsPlatformAdmins .platform-account + .platform-account::before { content: ''; position: absolute; inset: 0 .9rem auto; border-top: 1px solid var(--ui-line, #8080803b); }
#settingsPlatformAdmins .platform-account > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#settingsPlatformAdmins .platform-account strong { font-weight: 500; }
#settingsPlatformAdmins .platform-account small { font-size: .76rem; }
html .app-shell #settingsPages #settingsPlatformAdmins .platform-account button { flex: none; width: auto; min-height: 2.5rem; margin-inline-end: -.5rem; padding: .3rem .5rem; border: 0; border-radius: .6rem; background: transparent; box-shadow: none; color: inherit; font: inherit; font-size: .84rem; font-weight: 550; }
html .app-shell #settingsPages #settingsPlatformAdmins .platform-account button.danger { color: light-dark(#b3324c, #ff9aab); }


/* Tiles and unfolding data rows */
.settings-tile { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; border-radius: .7rem; color: #fff; background: linear-gradient(150deg, #54808a, #2f5c66); }
.settings-tile[data-tone="phone"] { background: linear-gradient(150deg, #4b93a0, #24707b); }
.settings-tile[data-tone="tablet"] { background: linear-gradient(150deg, #8a77b8, #5d4b8c); }
.settings-tile[data-tone="laptop"] { background: linear-gradient(150deg, #6f86b8, #47608f); }
.settings-tile[data-tone="desktop"] { background: linear-gradient(150deg, #7d7b86, #55535e); }
.settings-tile > .ui-icon { width: 1.2rem; height: 1.2rem; }
.settings-detail { position: relative; }
.settings-detail + .settings-detail::before { content: ''; position: absolute; inset: 0 .9rem auto 3.95rem; border-top: 1px solid var(--ui-line, #8080803b); }
.settings-detail > summary { display: flex; align-items: center; gap: .75rem; min-height: 3.6rem; padding: .5rem .9rem; box-sizing: border-box; list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.settings-detail > summary::-webkit-details-marker { display: none; }
.settings-detail > summary:active { background: var(--shell-selection); }
.settings-detail > summary:focus-visible { outline: 2px solid var(--camayo-focus); outline-offset: -2px; }
.settings-detail-copy { display: grid; flex: 1; gap: .1rem; min-width: 0; }
.settings-detail-copy > strong { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; font-size: .9rem; font-weight: 500; overflow-wrap: anywhere; }
.settings-detail-copy > small { font-size: .77rem; color: var(--color-placeholder); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-detail .badge { padding: .1rem .5rem; border-radius: 1rem; background: color-mix(in srgb, var(--ui-accent, #24707b) 30%, transparent); font-size: .68rem; font-weight: 600; }
.settings-detail > summary > .ui-icon:last-child { width: .85rem; height: .85rem; flex: none; opacity: .55; transition: rotate .18s ease; rotate: -90deg; }
.settings-detail[open]:not([data-state="closed"]) > summary > .ui-icon:last-child { rotate: 0deg; }
.settings-detail-body { display: grid; gap: .35rem; padding: 0 0 var(--camayo-card-inset); }
html .app-shell #settingsPages .settings-detail-body form { margin: .2rem var(--camayo-card-inset) 0; padding: 0; }
html .app-shell #settingsPages .settings-detail-body .settings-action { justify-content: center; gap: .55rem; min-height: 2.75rem; padding: .4rem 1rem; border-radius: var(--camayo-inner-radius); background: color-mix(in srgb, currentColor 12%, transparent); font-size: .87rem; font-weight: 600; }
html .app-shell #settingsPages .settings-detail-body .settings-action:active { background: color-mix(in srgb, currentColor 20%, transparent); }
@media (hover: hover) { html .app-shell #settingsPages .settings-detail-body .settings-action:hover { background: color-mix(in srgb, currentColor 18%, transparent); } }
#settingsPages .settings-detail-body .session-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem 1rem; margin: 0; padding: .1rem .9rem .5rem 3.95rem; font-size: .79rem; line-height: 1.4; }
#settingsPages .session-meta dt { color: var(--color-placeholder); }
#settingsPages .session-meta dd { margin: 0; overflow-wrap: anywhere; }
@media (hover: hover) { .settings-detail > summary:hover { background: var(--shell-selection); } }

/* styles.css sets a family on every element. Inside settings one family wins. */
:where(#settingsPane) * { font-family: inherit; }
html .app-shell #settingsPane :is(.settings-navigation > h1, #settingsPageTitle) { font-family: inherit; }

/* Chat and contact info: the same pages in a side panel */
:is(#contactPresentation, .message-info) { background: var(--sidebar-background); --conversation-info-surface: var(--camayo-settings-card); --heading-surface: var(--sidebar-background); }
#contactPresentation .conversation-info-detail { background: var(--sidebar-background); }
:is(#contactPresentation, .message-info) .contact-presentation-heading::before { --heading-surface: var(--sidebar-background); }
:is(#contactPresentation, .message-info) .contact-presentation-heading h2 { font-family: inherit; text-transform: capitalize; line-height: 1.18; padding-block: .12em; }
#contactPresentation .settings-block { display: grid; gap: .72rem; margin: 0; padding: 0; border: 0; background: none; }
#contactPresentation .settings-block.settings-card { gap: 0; background: var(--camayo-settings-card) !important; }
#contactPresentation .channel-management { display: grid; grid-template-columns: minmax(0, 1fr); gap: .95rem; }
#contactPresentation :is(.settings-hint, .conversation-transfer-preview p) { margin: 0 .85rem; font-size: .79rem; line-height: 1.45; color: var(--color-placeholder); }
html .app-shell #contactPresentation .profile-add > select { width: 100%; min-height: 3rem; padding: 0 1.4rem 0 0; border: 0; color: inherit; background: transparent; font: inherit; font-size: 1rem; text-overflow: ellipsis; }
html .app-shell :is(#contactPresentation, .message-info) .settings-field-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .65rem; min-height: 3rem; padding: 0 .9rem; font-size: .87rem; }
/* A label keeps its words whole; the chosen value gives way and ellipsizes. */
html .app-shell :is(#contactPresentation, .message-info) .settings-field-row:has(> select) { grid-template-columns: max-content minmax(0, 1fr); }
html .app-shell :is(#contactPresentation, .message-info) .settings-field-row > select { justify-self: end; max-width: 100%; }
#contactPresentation .settings-card > .settings-field-row[hidden] { display: none; }
#contactPresentation .settings-card > .settings-field-row:not([hidden]) ~ .settings-action:not([hidden])::before { content: ''; position: absolute; inset: 0 .9rem auto; border-top: 1px solid var(--ui-line, #8080803b); }
html .app-shell :is(#settingsPages, #contactPresentation, .message-info) .settings-primary--danger { background: #b23a52; }
#contactPresentation .group-avatar-selection { display: flex; align-items: center; gap: .7rem; padding: .5rem .9rem .8rem; font-size: .82rem; }
#contactPresentation .group-avatar-selection img { width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; }
#contactPresentation #groupAvatarSubmit:disabled { display: none; }
#contactPresentation .group-members-card:has(> ul:empty) { display: none; }
#contactPresentation .group-management-member { padding-block: .45rem !important; }
#contactPresentation .group-member-person { display: flex; flex: 1; align-items: center; gap: .7rem; min-width: 0; }
#contactPresentation .group-member-avatar { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; overflow: hidden; border-radius: 50%; }
#contactPresentation .group-management-identity { display: grid; min-width: 0; }
#contactPresentation .group-role-badge { padding: 0; border: 0; background: none; font-size: .76rem; color: var(--color-placeholder); }
html .app-shell #contactPresentation .profile-list .group-member-menu { display: grid; place-items: center; width: 2.5rem; padding: 0; color: inherit; }
#contactPresentation .group-member-menu .ui-icon { width: 1.15rem; height: 1.15rem; opacity: .7; }
#contactPresentation .contact-presentation-preview { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: .6rem; padding: .35rem 0 .4rem; text-align: center; }
html .app-shell #contactPresentation .contact-presentation-preview :is(.avatar-editor, .contact-portrait) { width: 6.5rem; height: 6.5rem; border-radius: 50%; }
#contactPresentation .contact-presentation-preview strong { font-size: 1.2rem; font-weight: 650; letter-spacing: -.015em; overflow-wrap: anywhere; }
html .app-shell :is(#contactPresentation, #settingsPages .profile-hero) .avatar-editor > button.avatar-editor-choose:not([hidden]) { inset: auto -.1rem -.1rem auto; width: 2.1rem; height: 2.1rem; min-width: 0; min-height: 0; border: .18rem solid var(--sidebar-background); border-radius: 50%; background: var(--camayo-primary); color: var(--camayo-on-primary); }
html .app-shell :is(#contactPresentation, #settingsPages .profile-hero) .avatar-editor-choose .ui-icon { width: 1rem; height: 1rem; opacity: 1; filter: none; }
#contactPresentation .conversation-info-identity { display: grid; gap: .45rem; margin-block: 1rem; }
#contactPresentation .conversation-info-identity > label { margin: 0 .9rem; font-size: .84rem; font-weight: 650; color: var(--color-placeholder); opacity: 1; }
html .app-shell #contactPresentation .conversation-info-id-value input { width: 100%; min-height: 2.9rem; padding: 0; border: 0; background: transparent; color: inherit; font: .82rem ui-monospace, SFMono-Regular, Menlo, monospace; }
html .app-shell #contactPresentation .conversation-info-id-value button { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; min-height: 0; padding: 0; border: 0; background: transparent; color: inherit; }
#contactPresentation .conversation-info-id-value .ui-icon { width: 1.1rem; height: 1.1rem; }
#contactPresentation :is(.contact-display-settings, .conversation-info-danger):not([hidden]) { display: grid; gap: .95rem; }
#contactPresentation .contact-presentation-note:not([hidden]) { display: flex; align-items: center; gap: .4rem; margin: 0 .9rem; font-size: .79rem; color: var(--color-placeholder); }
#contactPresentation .contact-presentation-note .ui-icon { width: .85rem; height: .85rem; flex: none; }
#contactPresentation .settings-card > :is(.profile-field, .profile-add):not([hidden]) ~ :is(.profile-add, .settings-action):not([hidden])::before { content: ''; position: absolute; inset: 0 .9rem auto; border-top: 1px solid var(--ui-line, #8080803b); }
#contactPresentation .settings-card-heading, #contactPresentation .settings-card-heading > label { color: var(--color-placeholder); font: inherit; font-size: .84rem; font-weight: 650; }
#contactPresentation .group-management-member > .group-member-person { justify-content: flex-start; }
#contactPresentation .group-members-card > ul { width: 100%; }
#contactPresentation #conversationTransferSection > p { margin: 0 .85rem; font-size: .79rem; line-height: 1.45; color: var(--color-placeholder); }
/* Why no area can be chosen: a quiet row of the card, padded like its rows. */
#contactPresentation .settings-card > [data-transfer-unavailable]:not([hidden]) { display: flex; align-items: center; box-sizing: border-box; min-height: 3rem; margin: 0; padding: .65rem .9rem; font-size: .87rem; line-height: 1.4; color: var(--color-placeholder); overflow-wrap: anywhere; }
html .app-shell #contactPresentation .conversation-info-id-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 3rem; padding: 0 .4rem 0 .9rem; border: 0; border-radius: var(--camayo-card-radius); background: var(--camayo-settings-card); }

html body.app-shell .contact-presentation.contact-presentation-snapshot { z-index: 649; pointer-events: none; animation: none !important; }
.contact-presentation-snapshot * { animation: none !important; transition: none !important; }
@media (max-width: 649.98px) {
  #contactPresentation .contact-presentation-heading { height: var(--settings-header-size, calc(4.05rem + env(safe-area-inset-top, 0px))); min-height: 0; padding: calc(env(safe-area-inset-top, 0px) + .55rem) 1rem 0; gap: .6rem; }
  html body #contactPresentation .contact-presentation-heading > :is(.contact-presentation-back, .contact-presentation-close) { width: 2.75rem; height: 2.75rem; margin: 0 0 0 -.6rem; padding: 0; border: 0; background: transparent; box-shadow: none; }
}

#contactPresentation :is(.conversation-info-navigation, .conversation-info-danger-entry) { margin-block: 1rem; background: var(--camayo-settings-card); }
/* The one way to the danger page: a red row like the destructive rows it leads to. */
html body #contactPresentation .camayo-navigation-row.camayo-navigation-row--danger { color: light-dark(#b3324c, #ff9aab); }
@media (hover: hover) { html body #contactPresentation .camayo-navigation-row.camayo-navigation-row--danger:hover { background: color-mix(in srgb, #d83b55 14%, transparent); } }
/* A person without a direct chat has no navigation: the rows keep its distance. */
#contactPresentation .conversation-info-navigation[hidden] ~ .conversation-info-actions { margin-top: 1rem; }
#contactPresentation .info-nav-members-label { display: flex; justify-content: space-between; gap: .5rem; }
#contactPresentation .info-nav-members-label small { opacity: .6; }

.app-shell .settings-content .local-testing-inline :is(h2, form.create) { margin-inline: .75rem; }
.app-shell .settings-content .local-testing-inline h2 { font-size: .84rem; font-weight: 650; color: var(--color-placeholder); }
#settingsPages .account-security-view .session-list { display: grid; gap: .72rem; margin: 0; padding: 0; list-style: none; }
#settingsPages .account-security-view .session-card { padding: .9rem; }

/* Message info: the message as it looks in its chat, then who received it when. */
.message-info-body { display: grid; align-content: start; grid-template-columns: minmax(0, 1fr); gap: .72rem; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--info-header) + .5rem) var(--contact-panel-gutter) calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
.message-info-preview { display: grid; padding: 1rem; border-radius: var(--camayo-card-radius); background: var(--color-background-01) var(--background-patern-url); box-shadow: inset 0 0 0 1px var(--ui-line, #8080803b); }
/* Room for the bubble tail, which hangs .23rem beside and .05rem below the bubble:
   otherwise it is clipped and makes an ordinary message scroll by a pixel. */
.message-info .message-actions-preview { max-height: 16rem; margin: -.1rem -.3rem; padding: .1rem .3rem; overflow: hidden auto; }
.message-info .bubble { width: auto; max-width: 100%; margin-block: 0; padding: 0; }
.message-info .bubble.other { margin-inline: 0 auto; }
.message-info .bubble .text { max-width: 100%; margin: 0; transform: none; animation: none; pointer-events: none; }
/* The copy stays still; its media and links act through the original message. */
.message-info .bubble .text :is(.voice-message, [data-attachment-audio], .attachment-preview, .attachment-document, .attachment-video-stage, [data-open-file], a[href]) { pointer-events: auto; cursor: pointer; }
.message-info .message-actions-preview :is(.voice-message, [data-attachment-audio]) :is(button:enabled, input:enabled:not(.voice-scrubber)) { pointer-events: auto; }
.message-info .message-actions-preview :is(.voice-message, [data-attachment-audio]) .voice-scrubber:enabled::-webkit-slider-thumb { pointer-events: auto; }
.message-info .bubble .text::before, .message-info .bubble .text::after { display: none; }
.message-info-readers { display: grid; gap: .72rem; }
.message-info dl { margin: 0; }
.message-info dl > div { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 3rem; padding: .5rem .9rem; box-sizing: border-box; font-size: .87rem; }
.message-info dl > div:not(:first-child)::before { content: ''; position: absolute; inset: 0 .9rem auto; border-top: 1px solid var(--ui-line, #8080803b); }
.message-info dt { display: flex; align-items: center; gap: .7rem; flex: none; }
.message-info dt > .ui-icon { width: 1.15rem; height: 1.15rem; }
.message-info dt[data-tone="seen"] > .ui-icon { color: light-dark(#1d7fa0, #69c6e0); }
.message-info dd { flex: 1; margin: 0; text-align: end; color: var(--color-placeholder); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.message-info-person { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 3.2rem; padding: .4rem .9rem; box-sizing: border-box; font-size: .9rem; }
.message-info-person + .message-info-person::before { content: ''; position: absolute; inset: 0 .9rem auto 3.7rem; border-top: 1px solid var(--ui-line, #8080803b); }
.message-info-person > .message-info-avatar { display: grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; overflow: hidden; border-radius: 50%; font-size: .68rem; }
.message-info-person img { width: 100%; height: 100%; object-fit: cover; }
.message-info-person > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-info-name[data-person-color]:not([data-person-color=""]) { color: var(--person-color); font-weight: 600; }
.message-info-emoji { flex: none; font-size: 1.15rem; line-height: 1; }
.message-info-reactions:empty { display: none; }
.message-info-reactions { display: grid; gap: .72rem; }
.message-info-person time, .message-info-person > small { flex: none; font-size: .78rem; color: var(--color-placeholder); font-variant-numeric: tabular-nums; }
.message-info :is(.message-info-status, .message-info-note) { margin: 0 .9rem; font-size: .79rem; line-height: 1.45; color: var(--color-placeholder); }
.message-info-status:empty { display: none; }
.message-info-retry { justify-self: start; margin-inline: .9rem; }

/* A change that cannot reach the account yet. It floats and moves nothing. */
#accountSettingsSyncStatus { display: none; }
html .app-shell #accountSettingsSyncStatus[data-state="error"] { position: fixed; z-index: 5; inset: auto 1rem calc(5.4rem + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: .75rem; max-width: 30rem; margin-inline: auto; padding: .7rem .9rem; border-radius: 1.1rem; background: var(--menu-surface); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); box-shadow: 0 .4rem 1.4rem #0004; font-size: .8rem; line-height: 1.4; }
#accountSettingsSyncStatus span { flex: 1; min-width: 0; }
html .app-shell #accountSettingsSyncStatus button { flex: none; width: auto; min-height: 2.4rem; margin: 0; padding: .3rem .6rem; border: 0; border-radius: .7rem; background: transparent; color: light-dark(#1d6570, #7cc5cf); font: inherit; font-weight: 600; }
@media (min-width: 650px) { html .app-shell #accountSettingsSyncStatus[data-state="error"] { inset: auto 1.5rem 1.2rem auto; } }

/* Cards that hold a picture or a grid instead of rows keep their own inset. */
html .app-shell #settingsPages .settings-card#scheduleDays { padding: var(--camayo-card-inset); }

/* A highlighted row has no lines beside it, however it was highlighted. */
:is(.settings-action, .settings-field-row, .settings-file-row, .profile-field, .profile-add, .swipe-setting, .message-info-person, .platform-account, .profile-list > li)::before, .settings-detail::before { transition: opacity .16s ease; }
html .app-shell :is(.settings-action, .settings-field-row, .settings-file-row, .profile-field, .profile-add, .swipe-setting, .message-info-person, .platform-account, .profile-list > li):is(:active:not(.shortcut-row, :has(:is(button, input, select, a):active)), :focus-visible, :focus-within:not(.shortcut-row, :has(> [role="switch"]:focus)), [aria-expanded="true"], [aria-current], .is-gesture-active)::before, html .app-shell :is(.settings-action, .settings-field-row, .settings-file-row, .profile-field, .profile-add, .swipe-setting, .message-info-person, .platform-account, .profile-list > li):is(:active:not(.shortcut-row, :has(:is(button, input, select, a):active)), :focus-visible, :focus-within:not(.shortcut-row, :has(> [role="switch"]:focus)), [aria-expanded="true"], [aria-current], .is-gesture-active) + :where(.settings-action, .settings-field-row, .settings-file-row, .profile-field, .profile-add, .swipe-setting, .quick-reaction-setting, .message-info-person, .platform-account, .settings-detail, .profile-list > li)::before,
html .app-shell .settings-detail:has(> summary:is(:active, :focus-visible))::before, html .app-shell .settings-detail:has(> summary:is(:active, :focus-visible)) + .settings-detail::before { opacity: 0; }
@media (hover: hover) {
  html .app-shell :is(button, a, label).settings-action:hover::before, html .app-shell :is(button, a, label).settings-action:hover + :where(.settings-action, .settings-field-row, .settings-file-row, .profile-field, .profile-add, .swipe-setting, .quick-reaction-setting, .message-info-person, .platform-account, .settings-detail, .profile-list > li)::before,
  html .app-shell .settings-file-row:hover::before, html .app-shell .settings-file-row:hover + :where(.settings-action, .settings-field-row, .settings-file-row, .profile-field, .profile-add, .swipe-setting, .quick-reaction-setting, .message-info-person, .platform-account, .settings-detail, .profile-list > li)::before,
  html .app-shell .profile-list > li:has(.workspace-open:hover)::before, html .app-shell .profile-list > li:has(.workspace-open:hover) + :where(.settings-action, .settings-field-row, .settings-file-row, .profile-field, .profile-add, .swipe-setting, .quick-reaction-setting, .message-info-person, .platform-account, .settings-detail, .profile-list > li)::before,
  html .app-shell .settings-detail:has(> summary:hover)::before, html .app-shell .settings-detail:has(> summary:hover) + .settings-detail::before { opacity: 0; }
}
