:root {
  --camayo-control-height: 2.75rem;
  --camayo-control-radius: .6rem;
  --camayo-control-border: color-mix(in srgb, currentColor 24%, transparent);
  --camayo-focus: light-dark(#5d5862, #c3bdc9);
  --camayo-focus-ring: var(--camayo-focus);
  --camayo-surface: var(--card, var(--color-background-01, #242127));
  --camayo-canvas: var(--bg, var(--color-background-01, #1a191d));
  --camayo-text: var(--text, var(--color-light-01, #f3eff4));
  --camayo-muted: var(--muted, #aaa4ad);
  --camayo-accent: var(--accent, var(--color-accent-01, #24707b));
  --camayo-danger: var(--danger, #9a4454);
  /* The one main action of a page or dialog: strong, but without a colour. */
  --camayo-primary: light-dark(#28252b, #ece8ee);
  --camayo-on-primary: light-dark(#fff, #1d1b21);
  --camayo-card-radius: 1.18rem;
  /* A control inside a card keeps its corners parallel to the card's. */
  --camayo-card-inset: .6rem;
  --camayo-inner-radius: calc(var(--camayo-card-radius) - var(--camayo-card-inset));
  --camayo-settings-card: light-dark(#faf9fc, #29272d);
}

/* A focus ring answers the keyboard. Touch and mouse show what they press. */
html.uses-pointer :focus-visible { outline: none !important; }

.camayo-card {
  border-radius: var(--camayo-card-radius);
  background: var(--conversation-info-surface, var(--camayo-settings-card));
}
.camayo-card[hidden] { display: none; }

/* Text fields use a change of fill for focus throughout Settings. */
html :is(#settingsPane, body.setup-embedded, body.company-page, .language-workbench)
  :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), textarea, select):focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
  background-color: color-mix(in srgb, currentColor 12%, transparent);
}
html :is(#settingsPane) .directory-search:focus-within {
  box-shadow: none;
  background-color: color-mix(in srgb, currentColor 12%, var(--camayo-settings-card));
}
html :is(#settingsPane) .directory-search input:focus {
  background-color: transparent;
}

/* Safe baseline for native single-choice selects, including legacy forms. */
select:not([size]):not([multiple]) {
  min-height: var(--camayo-control-height);
  font-size: 1rem;
}

.camayo-field {
  display: grid;
  gap: .4rem;
}

.password-visibility-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-visibility-field > input:is([type="password"], [type="text"]) {
  min-height: var(--camayo-control-height);
  box-sizing: border-box;
  width: 100%;
  padding-right: 3.2rem;
}

.password-visibility-field > button.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: .25rem;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  max-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: .5rem;
  color: inherit;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}

.password-visibility-field > button.password-visibility-toggle:hover,
.password-visibility-field > button.password-visibility-toggle:focus-visible {
  color: var(--camayo-text);
  background: color-mix(in srgb, var(--camayo-text) 10%, transparent);
  transform: translateY(-50%);
}

.password-visibility-toggle .ui-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.camayo-control,
select.camayo-control,
textarea.camayo-control {
  width: 100%;
  min-height: var(--camayo-control-height);
  padding: .7rem .8rem;
  border: 1px solid var(--camayo-control-border);
  border-radius: var(--camayo-control-radius);
  color: inherit;
  background: var(--camayo-canvas);
  font: inherit;
}

select.camayo-control {
  padding-right: 2.25rem;
}

.camayo-control:hover {
  border-color: color-mix(in srgb, currentColor 38%, transparent);
}

.camayo-control:focus-visible,
.camayo-button:focus-visible {
  outline: 2px solid var(--camayo-focus-ring);
  outline-offset: -2px;
}

.camayo-control:disabled,
.camayo-button:disabled {
  cursor: default;
  opacity: .55;
}

.camayo-button {
  display: inline-flex;
  min-height: var(--camayo-button-height, var(--camayo-control-height));
  align-items: center;
  justify-content: center;
  gap: var(--camayo-button-gap, .4rem);
  box-sizing: border-box;
  padding: var(--camayo-button-padding, .55rem .9rem);
  border: 0;
  border-radius: var(--camayo-button-radius, var(--camayo-control-radius));
  color: var(--camayo-on-primary);
  background: var(--camayo-primary);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
}

.camayo-button--secondary {
  color: var(--camayo-text);
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.camayo-button--compact {
  --camayo-button-height: 2rem;
  --camayo-button-padding: .35rem .6rem;
  --camayo-button-radius: .5rem;
  font-size: .8rem;
  font-weight: 550;
}
.camayo-button.camayo-button--quiet {
  border-color: transparent;
  background: transparent;
  color: var(--camayo-text, var(--color-light-01));
}
.camayo-button.camayo-button--quiet:not(:disabled):is(:hover,:focus-visible,.is-active,[aria-expanded="true"],[aria-pressed="true"]) {
  background: color-mix(in srgb, currentColor 9%, transparent);
}
.camayo-button--danger {
  color: #fff;
  background: var(--camayo-danger);
}

@media (hover: hover) {
  .camayo-button:not(:disabled):hover { background: color-mix(in srgb, var(--camayo-primary) 88%, transparent); }
  .camayo-button--secondary:not(:disabled):hover { background: color-mix(in srgb, var(--camayo-text) 13%, transparent); }
  .camayo-button--danger:not(:disabled):hover { background: color-mix(in srgb, var(--camayo-danger) 88%, white); }
}
:is(.camayo-button, dialog .primary-button, dialog .secondary-button):not(:disabled):active {
  filter: brightness(.92);
}
.camayo-button--danger:focus-visible {
  outline-color: color-mix(in srgb, var(--camayo-danger) 45%, currentColor);
}

/* A modal is elevated by its shadow. Its controls retain keyboard focus styling. */
dialog:modal {
  border: 0;
  outline: 0;
}

.camayo-dialog {
  position: fixed;
  inset: 0;
  width: min(36rem, calc(100vw - 2rem));
  max-width: 36rem;
  box-sizing: border-box;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 1.15rem;
  color: var(--camayo-text);
  background: color-mix(in srgb, var(--camayo-text) 3%, var(--camayo-surface));
  box-shadow: 0 1rem 3rem #0006;
}

.camayo-dialog::backdrop {
  background: #09080b8c;
  backdrop-filter: blur(4px);
}

.camayo-dialog__surface {
  display: grid;
  gap: 0;
  margin: 0;
  padding: clamp(1.1rem, 4vw, 1.4rem);
  font-family: system-ui, sans-serif;
  background: transparent;
  backdrop-filter: none;
}

.camayo-dialog__title {
  margin: 0;
  color: var(--camayo-text);
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

.camayo-dialog__message {
  font-family: inherit;
  margin: .7rem 0 0;
  color: color-mix(in srgb, var(--camayo-text) 78%, var(--camayo-surface));
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.camayo-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1.2rem;
}

.camayo-dialog__actions .camayo-button {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.3;
}

.camayo-dialog--choice {
  width: min(29rem, calc(100vw - 2rem));
  border-radius: 1rem;
}
.camayo-dialog--choice:has(.camayo-dialog__actions > :nth-child(3)) {
  width: min(34rem, calc(100vw - 2rem));
}
.camayo-dialog--choice .camayo-dialog__surface {
  padding: clamp(1.35rem, 4.8vw, 1.8rem);
  text-align: center;
}
.camayo-dialog--choice .camayo-dialog__actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  justify-content: center;
  margin-top: 1.65rem;
}
.camayo-dialog__checks { display: grid; gap: .2rem; margin: 1.1rem 0 0; padding: .35rem; border-radius: .8rem; background: color-mix(in srgb, var(--camayo-text) 5%, transparent); text-align: start; }
.camayo-dialog__checks[hidden] { display: none; }
.camayo-dialog__field { display: grid; gap: .55rem; margin: 1.1rem 0 0; text-align: start; }
.camayo-dialog__field[hidden] { display: none; }
.camayo-dialog__field .camayo-field > span { font-size: .88rem; font-weight: 500; }
.camayo-dialog__field .camayo-control { width: 100%; min-width: 0; box-sizing: border-box; }
/* Native iOS date intrinsics must not widen the dialog (UI_STANDARDS.md). */
.camayo-dialog__field input[type="datetime-local"] { inline-size: 0; min-inline-size: 100%; -webkit-appearance: none; appearance: none; text-align: start; }
.camayo-dialog__presets { flex-wrap: wrap; margin: 0; overflow: visible; }
.camayo-dialog__hint { min-height: 1.2em; color: color-mix(in srgb, var(--camayo-text) 62%, var(--camayo-surface)); font-size: .8rem; line-height: 1.4; }
.camayo-dialog__check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .7rem; min-height: 2.75rem; box-sizing: border-box; padding: .6rem .65rem; border-radius: calc(.8rem - .35rem); cursor: pointer; transition: background-color 140ms ease; }
.camayo-dialog__check input { margin-top: .1rem; }
.camayo-dialog__check span { display: grid; gap: .15rem; font-size: .9rem; line-height: 1.35; }
.camayo-dialog__check strong { font-weight: 500; }
.camayo-dialog__check small { color: color-mix(in srgb, var(--camayo-text) 62%, var(--camayo-surface)); font-size: .8rem; }
.camayo-dialog__check:has(input:disabled) { cursor: default; opacity: .55; }
@media (hover: hover) { .camayo-dialog__check:not(:has(input:disabled)):hover { background: color-mix(in srgb, var(--camayo-text) 6%, transparent); } }
.camayo-dialog--choice .camayo-dialog__title { font-size: 1.2rem; }
.camayo-dialog--choice .camayo-dialog__message { margin-top: .55rem; font-size: .9rem; }
.camayo-dialog--choice .camayo-button {
  --camayo-button-padding: .55rem 1rem;
  --camayo-button-radius: .65rem;
}
/* When scopes are ordered from local to global, reserve the strongest fill for the last action. */
.camayo-dialog__actions .camayo-button--danger:has(~ .camayo-button--danger) {
  background: color-mix(in srgb, var(--camayo-danger) 17%, var(--camayo-surface));
  color: color-mix(in srgb, var(--camayo-danger) 38%, var(--camayo-text));
}
@media (hover: hover) {
  .camayo-dialog__actions .camayo-button--danger:has(~ .camayo-button--danger):not(:disabled):hover {
    background: color-mix(in srgb, var(--camayo-danger) 26%, var(--camayo-surface));
  }
}

.camayo-dialog--capture { width: min(30rem, calc(100vw - 1.5rem)); }
.camayo-dialog--capture .camayo-dialog__surface { gap: .6rem; padding: .65rem; }
.camayo-capture-header { display: flex; justify-content: space-between; align-items: center; padding-left: .45rem; }
.camayo-capture-header .camayo-dialog__title { font-size: 1rem; }
.camayo-capture-header .camayo-capture-close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: .65rem;
  color: var(--camayo-text);
  background: transparent;
}
.camayo-capture-close:hover { background: color-mix(in srgb, var(--camayo-text) 9%, transparent); }
.camayo-capture-close svg { width: 1.1rem; height: 1.1rem; }
.camayo-capture-stage {
  position: relative;
  min-height: 9rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: .8rem;
  background: color-mix(in srgb, var(--camayo-surface) 86%, #000);
}
.camayo-capture-stage video {
  position: absolute;
  width: 100%;
  height: 100%;
  max-height: min(25rem, 57dvh);
  object-fit: contain;
  opacity: 0;
}
.camayo-dialog--capture.is-preview-ready .camayo-capture-stage video { position: static; height: auto; opacity: 1; }
.camayo-capture-state {
  display: grid;
  justify-items: center;
  gap: .65rem;
  padding: 1rem;
  text-align: center;
}
.camayo-capture-state[hidden] { display: none; }
.camayo-dialog--capture.is-preview-ready .camayo-capture-state {
  position: absolute;
  inset: 0;
  align-content: center;
  background: var(--camayo-surface);
}
.camayo-capture-status { margin: 0; color: var(--camayo-muted); font-size: .88rem; }
.camayo-capture-indicator { inline-size: 1.25rem; block-size: 1.25rem; color: var(--camayo-muted); }
.camayo-capture-indicator svg { width: 100%; height: 100%; }
.camayo-capture-stage[aria-busy="true"] .camayo-capture-indicator {
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: camayo-capture-spin .85s linear infinite;
}
@keyframes camayo-capture-spin { to { transform: rotate(1turn); } }
.camayo-capture-controls { display: grid; place-items: center; padding: .08rem 0 .35rem; }
.camayo-capture-controls .camayo-capture-shutter {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: .18rem;
  border: 1px solid var(--camayo-text);
  border-radius: 50%;
  background: transparent;
  color: var(--camayo-text);
}
.camayo-capture-shutter::before { content: ''; width: 100%; height: 100%; border-radius: inherit; background: currentColor; }
.camayo-capture-shutter:active:not(:disabled)::before { scale: .89; }
@media (prefers-reduced-motion: reduce) {
  .camayo-capture-stage[aria-busy="true"] .camayo-capture-indicator { animation: none; }
}

@media (max-width: 34rem) {
  .camayo-dialog__actions {
    flex-direction: column;
  }

  .camayo-dialog__actions .camayo-button {
    width: 100%;
  }

  .camayo-dialog--choice .camayo-dialog__actions {
    grid-auto-flow: row;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .camayo-dialog[open] {
    animation: camayo-dialog-in .16s ease-out;
  }

  @keyframes camayo-dialog-in {
    from { opacity: 0; transform: translateY(.5rem) scale(.985); }
  }
}

/* Checkbox geometry is independent of form input sizing. */
html body input[type="checkbox"] { appearance: none; -webkit-appearance: none; position: relative; display: inline-grid; place-content: center; flex: 0 0 1.15rem; width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0; padding: 0; border: 1px solid color-mix(in srgb,currentColor 32%,transparent); border-radius: .3rem; background: color-mix(in srgb,currentColor 4%,transparent); color: inherit; vertical-align: middle; transition: background-color 140ms ease,border-color 140ms ease; }
/* Official Ionicons checkmark, MIT: public/icons/ionicons/IONICONS_LICENSE.txt.
   Embed it in the control itself: /icons/ is intercepted by some web servers,
   and input pseudo-elements are not rendered consistently across browsers. */
html body input[type="checkbox"]:checked { background: #406f78 url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpolyline%20points%3D%22416%20128%20192%20384%2096%20288%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%2232%22%2F%3E%3C%2Fsvg%3E") center / 1rem 1rem no-repeat; border-color: #406f78; }
html body input[type="checkbox"]:focus-visible { outline: 2px solid #759da5; outline-offset: 3px; }

/* Shared button motion and labels across standalone and embedded views. */
html body button, html body .button { transition: background-color 140ms ease,color 140ms ease,border-color 140ms ease,box-shadow 140ms ease,opacity 140ms ease !important; }
html body form :is(button,.button), html body .camayo-button { text-align: center; justify-content: center; }
@media (prefers-reduced-motion:reduce) { html body button, html body .button { transition: none !important; } }
html body :where(button, .button, .camayo-button, input[type="button"], input[type="submit"], input[type="reset"]) { text-transform: capitalize; }
html body button, html body a.button { text-align: center; }
/* Names and message previews keep the casing supplied by their authors. */
html body :is(.sidebar-conversation-button,.sidebar-person-button,.profile-switcher-option) { text-align: left; text-transform: none; }
html body :is(button, .button) :is([class$="name"], [class*="name "], [data-user-text]), html body .attached-file-name { text-transform: none; }

:root { --message-action-blue: #286fa8; --message-action-sky: #187e9e; --message-action-indigo: #6365b3; --message-action-mint: #167c75; --message-action-green: #277953; --message-action-orange: #a55c13; --message-action-danger: #bb2939; }

/* Location choices share the modal surface and the mobile sheet gesture. */
.map-dialog { width: min(27rem, calc(100vw - 2rem)); }
.map-dialog .camayo-dialog__surface { gap: .65rem; }
.map-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.map-dialog-close { display: grid; place-items: center; box-sizing: border-box; flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; min-height: 0; line-height: 1; border: 0; background: transparent; color: inherit; border-radius: 50%; padding: 0; }
.map-dialog-close > svg { display: block; margin: 0; }
.map-dialog-close:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.map-dialog svg { width: 1.4rem; height: 1.4rem; fill: currentColor; flex-shrink: 0; }
.map-dialog-place { margin: .25rem 0 0; font-size: 1.1rem; font-weight: 650; overflow-wrap: anywhere; }
.map-dialog-detail, .map-dialog-status { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--camayo-muted); overflow-wrap: anywhere; }
.map-dialog-choices { display: grid; gap: .65rem; margin: .5rem 0; }
.map-provider-choice { display: flex; align-items: center; gap: .8rem; min-height: 3.4rem; box-sizing: border-box; padding: .85rem 1rem; border-radius: .85rem; color: var(--camayo-text); background: color-mix(in srgb, var(--camayo-text) 7%, transparent); text-decoration: none; font-weight: 650; transition: background 140ms ease; }
.map-provider-choice:hover { background: color-mix(in srgb, var(--camayo-text) 12%, transparent); }
.map-provider-choice:focus-visible, .map-dialog-close:focus-visible { outline: 2px solid var(--camayo-focus); outline-offset: 2px; }
.map-dialog-original { margin-top: .15rem; font-size: .85rem; color: var(--camayo-muted); text-align: center; padding: .55rem; }
.map-dialog .sheet-drag-handle { display: none; }
@media (max-width: 649.98px) {
  .map-dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: calc(100dvh - 2rem); margin: 0; border-radius: 1.25rem 1.25rem 0 0; }
  .map-dialog .camayo-dialog__surface { padding: .35rem 1.15rem max(1rem, env(safe-area-inset-bottom)); }
  .map-dialog .sheet-drag-handle { display: block; }
}
@media (prefers-reduced-motion: reduce) { .map-provider-choice { transition: none; } }

.map-provider-choice[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }

.map-dialog [hidden] { display: none !important; }
.map-provider-choice small { display: block; margin-top: .25rem; font-size: .75rem; font-weight: 400; color: var(--camayo-muted); }

.map-dialog { --camayo-muted: color-mix(in srgb, var(--camayo-text) 72%, transparent); }
.map-dialog.is-pointer-open :focus { outline: none; }

/* Native inputs keep form, keyboard, labels and checked state semantics. */
input[type="checkbox"].camayo-switch {
  appearance: none; -webkit-appearance: none; position: relative; display: inline-block;
  box-sizing: border-box; width: 2.68rem; height: 1.52rem; min-width: 2.68rem;
  margin: 0; padding: 0; border: 1px solid transparent; border-radius: 2rem;
  background: light-dark(#b9b9c2,#4b4954); background-image: none; box-shadow: none;
  cursor: pointer; transition: background-color .18s ease;
  /* One "on" colour for the drawn switch and the native iOS switch (else green). */
  --camayo-switch-on: #28776c; accent-color: var(--camayo-switch-on);
}
input[type="checkbox"].camayo-switch::before {
  content:''; position:absolute; inset: .13rem auto .13rem .13rem; width: 1.13rem; height: auto;
  border-radius: 50%; background: light-dark(#fff,#e7e4ee); box-shadow: 0 1px 3px #0003;
  transform: none; transition: translate .24s cubic-bezier(.2,.85,.24,1);
}
input[type="checkbox"].camayo-switch:checked { background: var(--camayo-switch-on); background-image:none; }
input[type="checkbox"].camayo-switch:checked::before { translate: 1.13rem; }
input[type="checkbox"].camayo-switch:disabled { opacity:.45; cursor:default; }
/* A switch that depends on another one: its label dims with it. */
.settings-field-row:has(> .camayo-switch:disabled) > label { opacity:.5; }
input[type="checkbox"].camayo-switch:focus-visible { outline:2px solid var(--camayo-focus); outline-offset:3px; }
@media (prefers-reduced-motion: reduce) { input[type="checkbox"].camayo-switch, input[type="checkbox"].camayo-switch::before { transition:none; } }

@media (pointer: coarse) {
  html body input[type="checkbox"].camayo-switch[data-native-switch] {
    appearance: auto; -webkit-appearance: auto; background: none; border: 0; box-shadow: none;
    width: 3.15rem; height: 1.85rem; min-width: 3.15rem; transition: none; accent-color: var(--camayo-switch-on);
  }
  html body input[type="checkbox"].camayo-switch[data-native-switch]::before { content: none; }
}
.camayo-switch-probe { position: fixed; visibility: hidden; pointer-events: none; inset: 0 auto auto 0; }
html body .camayo-switch-probe > input[type="checkbox"] { all: revert; appearance: auto; }

/* Pills: tabs, filters and modes that share one row and may scroll sideways. */
.camayo-chips { display: flex; gap: .4rem; min-width: 0; margin: 0 calc(var(--chips-bleed, 0px) * -1) .75rem; padding: .1rem var(--chips-bleed, 0px); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: var(--chips-bleed, 0px); }
.camayo-chips::-webkit-scrollbar { display: none; }
html body .camayo-chip {
  display: inline-flex; align-items: center; justify-content: center; flex: none; gap: .4rem; width: auto; min-height: 2.2rem; margin: 0; padding: .35rem .8rem;
  border: 0; border-radius: 2rem; background: var(--camayo-settings-card); color: var(--color-light-01); box-shadow: none;
  font: inherit; font-size: .82rem; font-weight: 550; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color .16s ease, color .16s ease;
}
.camayo-chip .ui-icon { flex: none; width: 1rem; height: 1rem; }
html body .camayo-chip:is([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], [aria-expanded="true"], [aria-current="true"], [aria-current="page"], .is-active) { color: var(--camayo-on-primary); background: var(--camayo-primary); }
html body .camayo-chip:focus-visible { outline: 2px solid var(--camayo-focus-ring); outline-offset: -2px; }
/* A chip that chooses from a list: label and chevron, the native select laid
   invisibly over it so the system picker opens. */
html body .camayo-select-chip { position: relative; }
html body .camayo-select-chip > .ui-icon { width: .95rem; height: .95rem; flex: none; }
html body .camayo-select-chip > .ui-icon:last-of-type { width: .75rem; height: .75rem; opacity: .6; }
html body .camayo-select-chip > select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; font-size: 16px; cursor: pointer; appearance: none; -webkit-appearance: none; }
html body .camayo-select-chip:has(select:focus-visible) { outline: 2px solid var(--camayo-focus-ring); outline-offset: -2px; }

/* Key caps for shortcuts (keyCaps() in shortcut-settings.js): settings, menus, tooltips. */
.key-caps { display: inline-flex; align-items: center; gap: .2rem; white-space: nowrap; vertical-align: middle; }
html body .key-cap {
  display: inline-grid; place-items: center; min-width: 1.45rem; height: 1.45rem; box-sizing: border-box; margin: 0; padding: 0 .35rem;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: .38rem;
  background: color-mix(in srgb, currentColor 6%, transparent); color: inherit; font: 600 .74rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
}
html body .key-cap--modifier { font-size: .8rem; }
.key-caps.is-preview .key-cap:last-child { border-style: dashed; opacity: .6; }

/* Progress inside a button, see button-progress.js. */
html body button.is-filling { overflow: hidden; opacity: 1 !important; cursor: default; filter: none; }
html body button.is-filling:not(.app-update-prompt) { position: relative; }
.button-fill {
  position: absolute; inset: 0; display: inherit; align-items: inherit; justify-content: inherit; gap: inherit; padding: inherit; box-sizing: border-box;
  border-radius: inherit; pointer-events: none; font: inherit; text-align: inherit;
  color: var(--camayo-on-primary); background: var(--camayo-primary);
}
:is(.camayo-button--primary, .primary-button, .camayo-button:not([class*="camayo-button--"])) > .button-fill { color: var(--camayo-primary); background: light-dark(#dcd8df, #3a363f); }

/* Inline confirmation, see inline-confirm.js: a tinted fill, the icon turns
   into a drawn checkmark, the label may change. Only opacity and transform
   move; the layers sit over the control and never take space. */
/* A green tint; the checkmark leans to the control's own text colour so it
   reads on light and dark faces. */
.is-inline-confirming { isolation: isolate; --inline-confirm-green: #38a56b; --inline-confirm-tone: color-mix(in srgb, var(--inline-confirm-green) 72%, currentColor); }
.inline-confirm-fill, .inline-confirm-check, .inline-confirm-label { position: absolute; pointer-events: none; animation: var(--inline-confirm-ms, 1700ms) linear both; }
.inline-confirm-fill {
  inset: 0; z-index: -1; border-radius: inherit; transform-origin: left center;
  background: color-mix(in srgb, var(--inline-confirm-green) 20%, transparent); animation-name: inline-confirm-fill;
}
[data-inline-confirm="icon"] > .inline-confirm-fill { transform-origin: center; animation-name: inline-confirm-pulse; }
.inline-confirm-check { display: grid; place-items: center; color: var(--inline-confirm-tone); animation-name: inline-confirm-in; }
.inline-confirm-check svg { display: block; width: 100%; height: 100%; fill: none; }
.inline-confirm-check polyline { stroke: currentColor; stroke-width: 44px; stroke-dasharray: 1; stroke-dashoffset: 1; animation: inline-confirm-draw var(--inline-confirm-ms, 1700ms) linear both; }
.inline-confirm-check.is-centred { inset: 22%; }
.inline-confirm-label { display: flex; align-items: center; gap: .35em; white-space: nowrap; color: inherit; font: inherit; animation-name: inline-confirm-in; }
.inline-confirm-label > .inline-confirm-check { position: static; flex: none; width: 1.1em; height: 1.1em; animation: none; }
.is-inline-confirming .inline-confirm-out { animation: inline-confirm-out var(--inline-confirm-ms, 1700ms) linear both; }
.inline-confirm-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes inline-confirm-fill { 0% { opacity: 0; transform: scaleX(.15); } 16% { opacity: 1; transform: scaleX(1); } 82% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
@keyframes inline-confirm-pulse { 0% { opacity: 0; transform: scale(.55); } 14% { opacity: 1; transform: scale(1.06); } 24%, 82% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes inline-confirm-out { 0% { opacity: 1; transform: scale(1); } 9%, 86% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: scale(1); } }
@keyframes inline-confirm-in { 0%, 5% { opacity: 0; transform: scale(.7); } 15%, 84% { opacity: 1; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(.9); } }
@keyframes inline-confirm-draw { 0%, 7% { stroke-dashoffset: 1; } 28%, 100% { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .inline-confirm-fill, [data-inline-confirm="icon"] > .inline-confirm-fill, .inline-confirm-check, .inline-confirm-label { animation-name: inline-confirm-still-in; }
  .is-inline-confirming .inline-confirm-out { animation-name: inline-confirm-still-out; }
  .inline-confirm-check polyline { animation: none; stroke-dashoffset: 0; }
}
@keyframes inline-confirm-still-in { 0%, 2% { opacity: 0; } 6%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes inline-confirm-still-out { 0%, 100% { opacity: 1; } 4%, 94% { opacity: 0; } }

/* Scroll edges (UI_STANDARDS.md "Scrollkanten"). A clear edge cuts content
   hard; where nothing marks the edge, content runs behind the element above or
   below it and fades out along this eased curve (larsenwork.com/easing-gradients,
   ease-in-out). Set the lengths on the element itself; they are registered, so
   they can be transitioned. The -inset lengths keep a fully hidden strip
   before the fade (a status bar). Floating heads and footers that paint their
   own surface mask that surface with the same curve: .scroll-fade-before
   (::before) and .scroll-fade-after (::after), solid where the fade is 0. */
@property --scroll-fade-top { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --scroll-fade-bottom { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --scroll-fade-top-inset { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --scroll-fade-bottom-inset { syntax: '<length>'; inherits: false; initial-value: 0px; }
.scroll-fade, .scroll-fade-before::before, .scroll-fade-after::after,
/* contact-presentation.js does not mark its header yet. */
.contact-presentation-heading::before {
  mask-image: linear-gradient(
    transparent 0 var(--scroll-fade-top-inset),
    rgb(0 0 0 / .013) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .081),
    rgb(0 0 0 / .049) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .155),
    rgb(0 0 0 / .104) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .225),
    rgb(0 0 0 / .175) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .29),
    rgb(0 0 0 / .259) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .353),
    rgb(0 0 0 / .352) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .412),
    rgb(0 0 0 / .45) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .471),
    rgb(0 0 0 / .55) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .529),
    rgb(0 0 0 / .648) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .588),
    rgb(0 0 0 / .741) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .647),
    rgb(0 0 0 / .825) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .71),
    rgb(0 0 0 / .896) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .775),
    rgb(0 0 0 / .951) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .845),
    rgb(0 0 0 / .987) calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top) * .919),
    #000 calc(var(--scroll-fade-top-inset) + var(--scroll-fade-top)),
    #000 calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom)),
    rgb(0 0 0 / .987) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .919),
    rgb(0 0 0 / .951) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .845),
    rgb(0 0 0 / .896) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .775),
    rgb(0 0 0 / .825) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .71),
    rgb(0 0 0 / .741) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .647),
    rgb(0 0 0 / .648) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .588),
    rgb(0 0 0 / .55) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .529),
    rgb(0 0 0 / .45) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .471),
    rgb(0 0 0 / .352) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .412),
    rgb(0 0 0 / .259) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .353),
    rgb(0 0 0 / .175) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .29),
    rgb(0 0 0 / .104) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .225),
    rgb(0 0 0 / .049) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .155),
    rgb(0 0 0 / .013) calc(100% - var(--scroll-fade-bottom-inset) - var(--scroll-fade-bottom) * .081),
    transparent calc(100% - var(--scroll-fade-bottom-inset)) 100%);
}
/* scroll-fade.js linkHeadingFade(): the title's surface reaches 2.25rem further
   down than its resting fade; at rest that extra strip stays clear (the first
   card sits there), scrolled it carries a long eased fade behind the title. */
.scroll-fade-head::before {
  bottom: -2.25rem !important;
  --scroll-fade-bottom-inset: 2.25rem;
  transition: --scroll-fade-bottom .22s ease, --scroll-fade-bottom-inset .22s ease;
}
.scroll-fade-head.is-scrolled-under::before { --scroll-fade-bottom-inset: 0px; --scroll-fade-bottom: 3.2rem; }
@media (prefers-reduced-motion: reduce) { .scroll-fade-head::before { transition: none; } }
/* scroll-fade.js trackScrollFade(): fade only the side with more content. */
.scroll-fade-auto { transition: --scroll-fade-top .2s ease, --scroll-fade-bottom .2s ease; }
.scroll-fade-auto[data-more-above] { --scroll-fade-top: var(--scroll-fade-auto-size, 2rem); }
.scroll-fade-auto[data-more-below] { --scroll-fade-bottom: var(--scroll-fade-auto-size, 2rem); }
@media (prefers-reduced-motion: reduce) { .scroll-fade-auto { transition: none; } }

/* Overlay scrollbar (overlay-scrollbar.js): drawn over the list's edge so
   full-width rows are not cut short by a classic bar. */
.has-overlay-scrollbar { scrollbar-width: none; }
.has-overlay-scrollbar::-webkit-scrollbar { display: none; }
.overlay-scrollbar { position: absolute; right: 1px; z-index: 3; width: 10px; opacity: 0; transition: opacity .25s ease; }
.overlay-scrollbar.is-visible, .overlay-scrollbar:hover { opacity: 1; transition-duration: .08s; }
.overlay-scrollbar[hidden] { display: none; }
.overlay-scrollbar-thumb { position: absolute; top: 0; right: 2px; width: 5px; border-radius: 999px; background: color-mix(in srgb, var(--color-light-01) 34%, transparent); transition: width .12s ease, background-color .12s ease; }
.overlay-scrollbar:hover .overlay-scrollbar-thumb, .overlay-scrollbar.is-dragging .overlay-scrollbar-thumb { width: 7px; background: color-mix(in srgb, var(--color-light-01) 50%, transparent); }
