/* 13-accounts.css — accounts and sign-in (task 094): the account menu in the header, /Account and /Admin/Users, and
   the sign-in pages (/Account/Login, Setup, Invite, ResetPassword — task 101, at the end of the file, on
   Pages/Account/_AuthLayout). Linked after 12-auctions.css; the sign-in layout links only 00, 01-base, 01-components
   and this file. */

/* The account in the header (task 125): a circle with a person in it (the address itself was ~300 px of the
   row) that opens a popover — the address and role, Акаунт · Налаштування, the theme, the administration (an
   administrator's) and «Вийти». The popover lives in the top layer, out of the header's box, so it is placed on the
   viewport: under the 56 px header (sticky at the top, so the same place on a scrolled page), at the right edge of
   .app-header-inner (min(2200px, 100vw − 40px), centred). Its items are .ui-menu's (01-components.css). */
.app-account__toggle {
  display: inline-grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.app-account__toggle .ui-avatar {
  transition: box-shadow var(--duration-1) var(--ease);
}

.app-account__toggle:hover .ui-avatar,
.app-account__toggle:has(+ :popover-open) .ui-avatar {
  box-shadow: 0 0 0 3px var(--surface-3);
}

.app-account__toggle[aria-current="page"] .ui-avatar {
  box-shadow: 0 0 0 2px var(--surface-1), 0 0 0 4px var(--accent);
}

.app-account__toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.app-account__menu {
  position: fixed;
  inset: calc(56px + var(--space-2)) max(20px, calc((100vw - 2200px) / 2)) auto auto;
  width: 272px;
  max-height: calc(100dvh - 56px - var(--space-5));
  margin: 0;
  padding: var(--space-1);
  overflow-y: auto;
  border: 0;
  border-radius: var(--radius-3);
  background: var(--surface-1);
  box-shadow: var(--shadow-2);
  color: var(--text);
}

.app-account__menu:popover-open {
  display: grid;
  gap: 2px;
}

.app-account__who {
  padding: var(--space-2) var(--space-3);
}

.app-account__menu form {
  margin: 0;
}

/* The sign-out page: one card in the middle of the page (/Account was the same card until task 125, below). */
.account-card {
  width: min(440px, 100%);
  margin: 48px auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-card h1 {
  margin: 0 0 16px;
  font-size: 1.6rem;
}

.account-card h2 {
  margin: 28px 0 12px;
  font-size: 1.15rem;
}

.account-form {
  display: grid;
  gap: 14px;
}

.account-form label {
  display: grid;
  gap: 6px;
}

.account-form label > span:first-child {
  font-weight: 600;
}

.account-form small {
  color: var(--muted);
  font-weight: 400;
}

/* /Account (task 188; task 125's cards before it). The desktop: one column of sections, the title on the left and the
   controls on the right, a hairline between them — the settings pages of GitHub, Linear and Vercel. Under 901 px (a
   tablet, or a phone that chose the desktop page) the title goes above its controls. The phone's own page is cells
   (_Mobile, 16-phone.css) with the same parts. */
.account-page {
  width: min(880px, 100%);
  margin: var(--space-2) auto var(--space-8);
}

.account-page__title {
  margin: 0 0 var(--space-6);
  font-size: var(--text-2xl);
  font-weight: 700;
}

.account-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-6);
  padding: var(--space-7) 0;
  border-top: 1px solid var(--border);
}

.account-section__title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
}

.account-section__body {
  display: grid;
  gap: var(--space-5);
  max-width: 560px;
  min-width: 0;
}

.account-section__h {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 600;
}

@media (max-width: 900px) {
  .account-section {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-6) 0;
  }
}

/* Who the account is: the name it goes by, then the address (under a name) cut to its line, then the role and since when
   — each fact whole on its line, a break only between them (task 190). */
.account-who {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-who__name {
  overflow: hidden;
  color: var(--text);
  font-size: var(--text-lg);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-who__email {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-who__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.account-who__meta > span {
  white-space: nowrap;
}

.account-who__meta > span + span::before {
  content: "·";
  margin-right: var(--space-2);
}

.account-profile,
.account-password {
  display: grid;
  gap: var(--space-4);
}

.account-profile__names {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (max-width: 480px) {
  .account-profile__names {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The picture: the circle — where a photo may be dropped —, the buttons and the hint beside it. account-profile.js draws
   the crop into the circle as it moves; the circle's wrapper takes no box of its own. */
.account-avatar {
  display: contents;
}

.account-photo {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-2);
  margin: calc(var(--space-2) * -1);
  border-radius: var(--radius-3);
  outline: 2px dashed transparent;
  outline-offset: -2px;
  transition: outline-color var(--duration-1) var(--ease), background-color var(--duration-1) var(--ease);
}

.account-photo.is-dragover {
  outline-color: var(--focus-ring);
  background: color-mix(in srgb, var(--focus-ring) 8%, transparent);
}

.account-photo__side {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.account-photo__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* Without script the native field is the control: it keeps the field's look, a row of its own. */
.account-photo__input:not(.visually-hidden) {
  height: auto;
  padding: var(--space-2);
}

.account-photo__hint,
.account-photo__error {
  margin: 0;
}

.account-photo__error[hidden] {
  display: none;
}

/* The crop: the photo under a round frame, a square of 240 px (the canvas's own size), «Масштаб» under it. */
.account-crop {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
}

.account-crop[hidden] {
  display: none;
}

.account-crop__canvas {
  width: 240px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-3);
  background: var(--surface-3);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.account-crop__canvas:active {
  cursor: grabbing;
}

.account-crop__canvas:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.account-crop__zoom {
  display: grid;
  gap: var(--space-1);
  width: 240px;
  max-width: 100%;
}

.account-crop__range {
  width: 100%;
  min-height: var(--touch);
  accent-color: var(--accent);
}

/* «Скасувати» and «Зберегти» at the form's end, the action last — and, both versions, not there at all until something
   changed (task 190; a faded primary button read as broken): the server writes an unchanged form's «Зберегти»
   aria-disabled and account-profile.js lifts it on a change; without script <noscript> holds a plain «Зберегти». */
.account-save:has([data-save-submit][aria-disabled="true"]) {
  display: none;
}

.account-save {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-2);
}

.account-save [hidden] {
  display: none;
}

/* A section's rows: a label on the left, its value or control on the right. */
.account-rows {
  gap: 0;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 52px;
  padding: var(--space-2) 0;
}

/* A row that is only an action (Сповіщення's «Налаштувати сповіщення»): at the right, where every other row's control is. */
.account-row:has(> :only-child) {
  justify-content: flex-end;
}

.account-row + .account-row {
  border-top: 1px solid var(--border);
}

.account-row__text {
  min-width: 0;
  color: var(--text);
}

.account-row__value {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.account-row__value--off {
  color: var(--text-muted);
  font-weight: 400;
}

.account-kv {
  grid-template-columns: minmax(0, 1fr) auto;
}

/* «Адміністрування» (tasks 129, 187): every page's head is the part's h1 with the parts as .ui-tabs UNDER it, in their three
   groups (_AdminHead); «Стан» is «Потребує уваги», the jobs' table and the journal; «Дані» four numbered steps. The
   components are .ui- (tables, chips, meters, buttons); what is here is the layout. */
.admin-head {
  margin: 0 0 var(--space-5);
}

.admin-head h1 {
  margin: 0 0 var(--space-3);
}

.admin-nav {
  gap: var(--space-5);
}

.admin-nav__group {
  display: flex;
  flex: none;
  gap: var(--space-4);
}

/* The groups apart: a hairline between them, inside the tabs' row. */
.admin-nav__group + .admin-nav__group {
  padding-left: var(--space-5);
  box-shadow: inset 1px 0 0 var(--border);
}

.admin-section__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
  font-weight: 700;
}

.admin-muted {
  margin: 0;
  color: var(--text-muted);
}

.admin-attention,
.admin-jobs,
.admin-journal {
  margin-bottom: var(--space-6);
  scroll-margin-top: var(--space-6);
}

/* «Потребує уваги»: one row a problem — the level, what happened, since when, the button. */
.admin-attention__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius-3);
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
}

.admin-attention__item {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) 7rem auto;
  align-items: center;
  gap: var(--space-4);
  min-height: 52px;
  padding: var(--space-2) var(--space-4);
}

.admin-attention__item + .admin-attention__item {
  box-shadow: inset 0 1px 0 var(--border);
}

.admin-attention__item > .ui-chip {
  justify-self: start;
}

.admin-attention__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-attention__since {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-attention__action {
  justify-self: end;
}

.admin-attention__form {
  margin: 0;
}

.admin-attention__ok {
  margin: 0;
}

/* The jobs' table and the journal: a .ui-table; a group's row is a caption over its jobs. */
.admin-jobs__wrap {
  position: relative;
}

.admin-jobs__table th[scope="row"],
.admin-journal__table td:nth-child(2) {
  font-weight: 600;
}

.admin-jobs__table th[scope="row"] small,
.admin-journal__table td small,
.admin-jobs__when small {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 400;
}

/* A catalogue queue's overdue sets and oldest age (task 193): numbers read down the column. */
.admin-jobs__backlog {
  font-variant-numeric: tabular-nums;
}

.admin-jobs__group th {
  padding-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: left;
}

.admin-jobs__when {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ui-table .admin-jobs__result {
  min-width: 16rem;
  max-width: 34rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-jobs__result--failed {
  color: var(--down);
}

.admin-jobs__action form {
  margin: 0;
}

.admin-journal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.admin-journal__head .admin-section__title {
  margin: 0;
}

/* «Дані»: four steps down the page, each its number and title, then its facts beside its actions. */
.admin-steps {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-step {
  padding: var(--space-4) var(--space-5) var(--space-5);
  border-radius: var(--radius-3);
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
  scroll-margin-top: var(--space-6);
}

.admin-step__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.admin-step__head h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

.admin-step__n {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-step__body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(18rem, 2fr);
  gap: var(--space-6);
  align-items: start;
}

.admin-step__facts {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.admin-step__facts .ui-kv {
  margin: 0;
}

.admin-step__sub {
  margin: var(--space-2) 0 0;
  font-size: var(--text-md);
  font-weight: 700;
}

.admin-step__sub:first-child {
  margin-top: 0;
}

.admin-step__figure {
  margin: 0;
  color: var(--text-muted);
}

.admin-step__figure strong {
  color: var(--text);
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
}

.admin-step__run {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.admin-step__run time {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.admin-step__run--failed {
  color: var(--down);
}

.admin-step__actions {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.admin-step__action {
  display: grid;
  gap: var(--space-1);
  margin: 0;
}

.admin-step__action .ui-btn,
.admin-step__actions > .ui-btn {
  width: 100%;
}

.admin-step__toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.admin-step__toggles form {
  margin: 0;
}

.admin-step__years {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

/* A running job's bar inside its step, not over the page. */
.admin-step .refresh-bar {
  position: static;
  margin: 0;
}

/* /Admin/Telegram: the token's form beside the bot's state. */
.admin-telegram {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: var(--space-4);
  align-items: start;
}

.admin-telegram__form {
  display: grid;
  gap: var(--space-3);
}

.admin-telegram__form p {
  margin: 0;
}

/* The phone's /Admin and «Дані»: a run's line under its job, the journal's filter over its rows. */
.admin-m-run {
  color: var(--text-muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.admin-m-filter {
  display: flex;
  margin: 0 0 var(--space-3);
}

.admin-m-filter .ui-segmented__option {
  flex: 1 1 0;
  justify-content: center;
  min-height: 44px;
}

@media (max-width: 1100px) {
  .admin-step__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-attention__item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .admin-attention__since {
    display: none;
  }
}

/* /Admin/Users (task 187 put it on .ui- components: the table, selects, buttons, chips). The invite form under the head;
   a new link in a tinted box once; ≤ 640 px (a narrow desktop window — the phone has its own page) a user is a card. */
.admin-users {
  display: grid;
  gap: var(--space-4);
}

.admin-users .admin-head {
  margin-bottom: var(--space-1);
}

.admin-users__invite {
  display: flex;
  align-items: end;
  gap: var(--space-2);
}

.admin-users__link {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-3);
  background: var(--up-bg);
}

.admin-users__table-wrap {
  position: relative;
}

.admin-users__table td {
  vertical-align: middle;
}

.admin-users__table tr.is-disabled td {
  color: var(--text-muted);
}

.admin-users__role {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.admin-users__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.admin-users__role form,
.admin-users__actions form {
  margin: 0;
}

.admin-users__invites {
  margin: 0;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .admin-users__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .admin-users__table,
  .admin-users__table tbody {
    display: block;
  }

  .admin-users__table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2) var(--space-3);
    padding: var(--space-3);
    box-shadow: inset 0 -1px 0 var(--border);
  }

  .admin-users__table td {
    display: block;
    min-width: 0;
    padding: 0;
    overflow-wrap: anywhere;
  }

  .admin-users__table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: var(--space-1);
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
  }

  .admin-users__email,
  .admin-users__table td:has(.admin-users__role),
  .admin-users__actions {
    grid-column: 1 / -1;
  }
}

/* ── The sign-in pages (task 101; task 154 took the brand panel and its picture out) ─────────
   Login, Setup, Invite and ResetPassword on Pages/Account/_AuthLayout: no app header — one column in the middle: the
   mark and the name, the card, /Privacy under it; the theme switch (01-base.css, .app-theme) in the top right corner.
   Every colour is a token. */
body.auth-shell {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

.auth-theme {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1;
}

.auth-main {
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-5);
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-8) var(--space-5);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  color: var(--text);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-brand__mark {
  flex: none;
  fill: var(--accent);
}

.auth-card {
  width: min(400px, 100%);
  padding: var(--space-7);
  border-radius: var(--radius-3);
  background: var(--surface-1);
  box-shadow: var(--shadow-2);
}

/* Under the card, on every sign-in page: /Privacy, open without an account (task 135). */
.auth-main__privacy {
  margin: 0;
  font-size: var(--text-sm);
  text-align: center;
}

.auth-main__privacy a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--text-muted);
}

.auth-card__title {
  margin: 0;
  color: var(--text);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* A message in the card: the system's toast, lying flat — no float shadow, the coloured rule on the left kept. */
.auth-notice {
  width: auto;
  margin-top: var(--space-5);
  box-shadow: inset 3px 0 0 var(--toast-accent, var(--info));
}

.auth-notice .ui-toast__text + .ui-toast__text {
  margin-top: var(--space-1);
}

.auth-form {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.auth-field__control {
  position: relative;
}

.auth-field__input {
  height: var(--control-lg);
}

.auth-field__input:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 30%, transparent);
}

/* Chrome paints an autofilled field pale blue in either theme; it takes the field's own colours here. */
.auth-field__input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: inset 0 0 0 100px var(--surface-2);
}

.auth-field__input:-webkit-autofill:focus-visible {
  box-shadow: inset 0 0 0 100px var(--surface-1), 0 0 0 3px color-mix(in srgb, var(--focus-ring) 30%, transparent);
}

.auth-field__control:has(.auth-field__reveal:not([hidden])) .auth-field__input {
  padding-right: calc(var(--control-sm) + var(--space-3));
}

.auth-field__reveal {
  position: absolute;
  top: 50%;
  right: var(--space-2);
  translate: 0 -50%;
}

/* Hidden until account-forms.js wires it; said here so it does not lean on Bootstrap's [hidden] rule. */
.auth-field__reveal[hidden] {
  display: none;
}

.auth-field__reveal:active {
  transform: none;
}

.auth-field__reveal .auth-field__eye-off,
.auth-field__reveal[aria-pressed="true"] .auth-field__eye {
  display: none;
}

.auth-field__reveal[aria-pressed="true"] .auth-field__eye-off {
  display: block;
}

.auth-field__hint,
.auth-field__error {
  margin: 0;
}

.auth-form__remember {
  justify-self: start;
  font-size: var(--text-sm);
}

.auth-form__submit {
  width: 100%;
  margin-top: var(--space-2);
}

/* A dead invitation or reset link: the sentence, then the way to sign-in. */
.auth-dead {
  margin: var(--space-5) 0 var(--space-4);
  color: var(--text-muted);
  line-height: 1.5;
}

/* A phone: the mark and the card start under the theme switch, not in the middle of a tall window. */
@media (max-width: 959.98px) {
  .auth-main {
    align-content: start;
    padding: calc(var(--space-4) + 56px) var(--space-4) var(--space-8);
  }

  .auth-card {
    padding: var(--space-6) var(--space-5);
  }
}

/* /Privacy (task 135): one column of reading width; the parts are h2 + list, spaced by the tokens. */
.privacy {
  max-width: 72ch;
}

.privacy__part {
  margin-top: var(--space-6);
}

.privacy__part h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xl);
  font-weight: 600;
}

.privacy__part ul {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding-left: var(--space-5);
}

.privacy__part p {
  margin: 0 0 var(--space-3);
}

/* /Admin/Reports (task 148): a card a report. */
.admin-reports {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: var(--space-4);
  align-items: start;
}

.admin-report__body {
  display: grid;
  gap: var(--space-2);
}

.admin-report__body p {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-report__comment {
  margin: 0;
  padding-left: var(--space-3);
  border-left: 3px solid var(--border-strong);
  color: var(--text-muted);
}

.admin-report__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* The phone's /Account (task 190; task 188's held card overflowed and floated right at 390). The picture, the name and
   its facts centred at the top of «Профіль» (the facts' line ~300 px wide beside an 80 px circle broke mid-fact), the two
   picture buttons one row under them. «Скасувати» «Зберегти» are the system's .ui-sticky-action, held over the bottom
   bar while the form is on the screen, and not there until something changed (.account-save, above). */
.account-m .account-photo {
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  text-align: center;
}

.account-m .account-photo__side {
  justify-items: center;
  width: 100%;
}

.account-m .account-who {
  justify-items: center;
  max-width: 100%;
}

/* A long name wraps between its words here, centred, rather than losing its end. */
.account-m .account-who__name {
  white-space: normal;
  text-wrap: balance;
}

.account-m .account-who__meta {
  justify-content: center;
}

.account-m .account-photo__actions {
  display: grid;
  margin-top: var(--space-2);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  width: 100%;
}

.account-m .account-photo__actions .ui-btn {
  min-width: 0;
}

.account-m .account-crop {
  justify-items: center;
}

.account-m .account-save {
  margin-top: var(--space-3);
}

/* A name field the keyboard moves to is scrolled clear of the held bar and the bottom bar under it (the bar: a large
   button and its paddings, 8 + 12 px, rounded up to 24) — on a 360 × 600 screen «Ім'я» sat half under it (task 190's critique). */
.account-m .account-profile .ui-input {
  scroll-margin-bottom: calc(var(--tabbar-space) + var(--control-lg) + var(--space-6));
}

.account-m .auth-field {
  width: 100%;
}

/* The sign-in address in its own row of «Вхід і безпека»: an address too long for the line wraps rather than hides. */
.account-m__email {
  color: var(--text);
  font-size: var(--text-lg);
  overflow-wrap: anywhere;
}
