/* Shared UI kit (DESIGN_CONTRACT_v2 §5). Every class is prefixed `ui-`; screens use `scr-<name>-`.
   Only tokens from theme/tokens.css. No !important. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* owner 2026-11-17: the app does not zoom when two fingers spread (the photo viewer zooms by itself, touch-action: none there) */
html { touch-action: pan-x pan-y; }
/* owner 2026-11-17: the app does not turn with the phone. Android keeps it upright by the manifest; an iPhone cannot be told, so a
   phone held on its side sees one quiet line instead of a squeezed screen */
.ui-rotate { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .ui-rotate { display: flex; position: fixed; inset: 0; z-index: 200; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); background: var(--color-bg); color: var(--color-text); text-align: center; padding: var(--space-4); }
  .ui-rotate svg { width: 44px; height: 44px; color: var(--color-gold); }
}
body {
  background: var(--color-bg);
  background-image: var(--app-bg-texture);
  background-attachment: fixed;
  color: var(--color-text);
  font: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
/* phones: no double-tap zoom delay on controls; a long press on them selects nothing and opens no system menu */
button, a, label, select, [role="button"] { touch-action: manipulation; }
button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ui-num { font-variant-numeric: tabular-nums; }
/* one visible focus for the whole app; a tap shows none */
:where(button, a, summary, select, [role="button"], [tabindex]):focus { outline: none; }
:where(button, a, summary, select, [role="button"], [tabindex]):focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.ui-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* app frame */
.ui-app { min-height: 100dvh; display: flex; flex-direction: column; }
.ui-view { flex: 1; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--space-4)); }
.ui-app--public .ui-view { padding-bottom: calc(env(safe-area-inset-bottom) + var(--space-6)); }

/* header (v0: title left + subtitle, crimson corner triangle; actions from v1) */
.ui-header {
  position: relative;
  min-height: var(--header-h);
  padding: calc(env(safe-area-inset-top) + var(--space-5)) var(--screen-pad) var(--space-4) var(--title-inset);
  display: flex; align-items: flex-start; gap: var(--space-3);
  overflow: hidden;
}
.ui-header::after {
  content: ""; position: absolute; top: 0; right: 0; width: 72px; height: 76px;
  background: linear-gradient(225deg, var(--color-header-accent) 0%, var(--color-header-accent-deep) 49.6%, var(--color-accent-deep) 50%, transparent 50.6%);
  pointer-events: none;
}
.ui-header--nested { padding-left: var(--screen-pad); }
.ui-header__titles { position: relative; z-index: 1; flex: 1; min-width: 0; padding-right: var(--space-6); } /* keep clear of the corner accent */
.ui-header__title { margin: 0; font: var(--font-title); letter-spacing: var(--tracking-title); text-transform: uppercase; overflow-wrap: anywhere; }
.ui-header--nested .ui-header__title { font-size: clamp(20px, 6.2vw, 28px); } /* long nested titles + back button fit 390 pt */
/* two buttons on the right (food: 📊 and LIVE): a 320 px phone keeps «ПИТАНИЕ» on one line */
@media (max-width: 359px) { .ui-header--nested:has(.ui-header__actions > :nth-child(2)) .ui-header__title { font-size: 17px; letter-spacing: 0.02em; overflow-wrap: normal; } }
.ui-header__subtitle { margin: var(--space-2) 0 0; font: var(--font-subtitle); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-icon-btn {
  position: relative; z-index: 1;
  width: var(--touch); height: var(--touch); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  margin: calc(var(--space-2) * -1) 0 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--color-text);
  cursor: pointer;
}
.ui-icon-btn:active { background: var(--color-pressed); }
.ui-icon-btn svg { flex: none; width: 24px; height: 24px; } /* never squeezed: an iPhone drew these at a third of their size (2026-11-11) */

/* sections & cards */
.ui-section { padding: 0 var(--screen-pad); margin-top: var(--space-6); }
.ui-section__title { margin: 0 0 var(--space-3); font: var(--font-section); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.ui-card {
  position: relative;
  background: var(--color-surface-gradient);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}
.ui-card + .ui-card { margin-top: var(--space-4); }
.ui-card--accent { background: var(--color-accent-card); box-shadow: var(--shadow-accent); }
.ui-card__title {
  position: relative; margin: 0; padding-left: calc(var(--accent-bar-w) + var(--space-3));
  font: var(--font-card-title); text-transform: uppercase;
}
.ui-card__title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: var(--accent-bar-w); height: var(--accent-bar-h); border-radius: 2px; background: var(--color-gold-gradient);
}

/* stat row: 3 columns with dividers */
.ui-stats { display: grid; grid-auto-flow: column; grid-auto-columns: auto; container-type: inline-size; } /* columns by content: «14 100 кг» never runs out of the card at 320 */
.ui-stat { min-width: 0; text-align: center; padding: 0 var(--space-1); }
.ui-stat + .ui-stat { border-left: 1px solid var(--color-divider); }
.ui-stat__label { font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-stat__value { margin-top: var(--space-1); font: var(--font-value); font-size: clamp(18px, 8.4cqi, 24px); font-variant-numeric: tabular-nums; }
.ui-unit { font-size: 0.6em; font-weight: 600; margin-left: 0.15em; }

/* buttons */
.ui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--button-h); padding: 0 var(--space-5);
  border: 0; border-radius: var(--radius-card);
  font: var(--font-label); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  cursor: pointer; transition: transform var(--duration-fast) var(--ease), opacity var(--duration-fast), box-shadow var(--duration-fast);
}
.ui-btn:active { transform: scale(0.98); }
.ui-btn:disabled { opacity: 0.4; cursor: default; }
/* Narrow phones: a button label stays on one line in every theme (the theme rules set wider letter spacing, hence html:root[data-theme]) */
@media (max-width: 374px) { html:root[data-theme] .ui-btn { letter-spacing: 0.04em; padding-left: var(--space-3); padding-right: var(--space-3); font-size: min(1em, 4.2vw); } }
@media (min-width: 375px) and (max-width: 400px) { html:root[data-theme] .ui-btn { letter-spacing: 0.06em; } }
.ui-btn--primary { background: var(--color-gold-gradient); color: var(--color-text-on-gold); font-weight: 700; box-shadow: var(--shadow-gold); }
.ui-btn--primary:active { background: var(--color-gold-pressed); box-shadow: var(--shadow-gold-pressed); }
.ui-btn--secondary { background: var(--color-raised); color: var(--color-text); box-shadow: var(--shadow-key); }
.ui-btn--secondary:active { background: var(--color-key-pressed); }
.ui-btn--danger { background: var(--color-danger-fill); color: var(--color-text-on-danger); box-shadow: var(--shadow-danger); }
.ui-btn--ghost { background: transparent; color: var(--color-gold-soft); }
.ui-btn--ghost:active { background: var(--color-pressed); }
.ui-btn--block { width: 100%; }

/* field that opens the keypad */
.ui-field {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--space-1);
  width: 100%; min-height: 64px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-row);
  background: var(--color-field); box-shadow: var(--shadow-field); color: var(--color-text); text-align: left; cursor: pointer;
}
.ui-field:active { border-color: var(--color-gold-edge); }
.ui-field:focus-within { border-color: var(--color-gold-soft); }
.ui-field--active { border-color: var(--color-gold-soft); box-shadow: var(--shadow-field), var(--gold-glow); }
.ui-field__label { font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-field__value { font: var(--font-value); font-variant-numeric: tabular-nums; }
.ui-field__value--empty { color: var(--color-text-secondary); font-weight: 400; }

/* list rows */
.ui-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; }
.ui-row + .ui-row { border-top: 1px solid var(--color-divider); }
.ui-meta { font: var(--font-subtitle); color: var(--color-text-secondary); }

/* empty state & notes */
.ui-empty { padding: var(--space-6) var(--space-4); text-align: center; color: var(--color-text-secondary); }
.ui-note { font: var(--font-subtitle); color: var(--color-text-secondary); }
.ui-note--warn { color: var(--color-gold-soft); }

/* bottom navigation (5 tabs) */
.ui-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-nav-bg); border-top: 1px solid var(--color-nav-border); box-shadow: var(--shadow-nav);
}
.ui-nav__tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1);
  border: 0; background: transparent; color: var(--color-text-secondary); cursor: pointer;
  font: var(--font-tab); letter-spacing: var(--tracking-caps); text-transform: uppercase;
}
@media (max-width: 359px) { .ui-nav__tab { letter-spacing: 0; font-size: 9px; } }
@media (max-width: 420px) { .ui-nav__tab { letter-spacing: 0; font-size: clamp(8px, 2.5vw, 10px); } } /* the wide lettering of some themes made «ТРЕНИРОВКА» and «ПРОГРАММЫ» touch */
.ui-nav__tab svg { width: 26px; height: 26px; }
.ui-nav__tab:active { background: var(--color-pressed); }
.ui-nav__tab[aria-current="page"] { color: var(--color-gold-soft); }
.ui-nav__tab[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 50%; width: 28px; height: 2px; margin-left: -14px; border-radius: 0 0 2px 2px; background: var(--color-gold-soft); box-shadow: var(--gold-glow); }
.ui-app--public .ui-nav { display: none; }

/* sheet + scrim (keypad, drawers) */
.ui-scrim { position: fixed; inset: 0; z-index: 40; background: var(--color-scrim); opacity: 0; transition: opacity var(--duration) var(--ease); }
.ui-scrim--open { opacity: 1; }
.ui-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  padding: var(--space-4) var(--space-4) calc(env(safe-area-inset-bottom) + var(--space-4));
  background: var(--color-floating); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; box-shadow: var(--shadow-floating);
  transform: translateY(100%); transition: transform var(--duration) var(--ease);
}
.ui-sheet--open { transform: translateY(0); }

/* keypad */
.ui-keypad__display { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-2) var(--space-2) var(--space-4); text-align: center; } /* owner 2026-11-05: the number in the middle, in every keypad */
.ui-keypad__label { font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-keypad__label-row { display: inline-flex; align-items: center; gap: var(--space-2); }
.ui-keypad__help, .ui-help-btn { position: relative; flex: none; width: 24px; height: 24px; padding: 0; border: 1px solid var(--color-gold-edge); border-radius: 50%; background: var(--color-surface); color: var(--color-gold-soft); font: var(--font-caption); font-weight: 700; cursor: pointer; }
.ui-keypad__help::after, .ui-help-btn::after { content: ""; position: absolute; inset: -10px; }
/* a closed feature of the competitor mode */
.ui-lock { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-lock__head { display: flex; align-items: flex-start; gap: var(--space-3); }
.ui-lock__icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--color-gold-edge); border-radius: 50%; background: var(--color-field); color: var(--color-gold-soft); }
.ui-lock__icon svg { width: 20px; height: 20px; }
.ui-lock__copy { min-width: 0; }
.ui-lock__title { margin: 0; font: var(--font-label); font-weight: 700; }
.ui-lock__text { margin: 2px 0 0; }
.ui-lock__list { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.ui-lock__item { display: flex; align-items: flex-start; gap: var(--space-2); font: var(--font-caption); color: var(--color-text-secondary); }
.ui-lock__mark { flex: none; width: 16px; height: 16px; color: var(--color-text-secondary); }
.ui-lock__mark--on { color: var(--color-gold-soft); }
.ui-lock__mark svg { display: block; width: 16px; height: 16px; }
.ui-keypad__value { font: var(--font-value); font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ui-keypad__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.ui-keypad__key {
  height: 56px; border: 0; border-radius: var(--radius-row);
  background: var(--color-key); box-shadow: var(--shadow-key); color: var(--color-text); font: var(--font-value); cursor: pointer;
}
.ui-keypad__key:active { background: var(--color-key-pressed); box-shadow: var(--shadow-field); }
.ui-keypad__key span { display: inline-flex; }
.ui-keypad__key svg { width: 28px; height: 28px; }
.ui-keypad__key--done { grid-column: 1 / -1; background: var(--color-gold-gradient); box-shadow: var(--shadow-gold); color: var(--color-text-on-gold); font: var(--font-label); font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.ui-keypad__key--done:active { background: var(--color-gold-pressed); box-shadow: var(--shadow-gold-pressed); }

/* confirm dialog */
.ui-dialog {
  position: fixed; left: 50%; top: 50%; z-index: 51; width: min(340px, calc(100vw - 2 * var(--space-5)));
  transform: translate(-50%, -50%) scale(0.96); opacity: 0;
  padding: var(--space-6) var(--space-5) var(--space-5);
  background: var(--color-floating); border-radius: var(--radius-card); box-shadow: var(--shadow-dialog);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.ui-dialog--open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ui-dialog__title { margin: 0 0 var(--space-2); font: var(--font-section); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.ui-dialog__text { margin: 0 0 var(--space-5); color: var(--color-text-secondary); }
.ui-dialog__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
/* two equal buttons that never leave the dialog (owner 2026-11-19: «Пропустить день» stuck out): the words wrap inside */
.ui-dialog__actions .ui-btn { min-width: 0; padding-inline: var(--space-3); white-space: normal; overflow-wrap: break-word; text-align: center; line-height: 1.15; }
.ui-scrim--dialog { z-index: 50; }

/* progress bar (contract §5: height 8, radius 4, gold fill) */
.ui-progress { height: 8px; border-radius: var(--radius-bar); background: var(--color-segment-bg); overflow: hidden; }
.ui-progress__fill { height: 100%; border-radius: var(--radius-bar); background: var(--color-gold-gradient); }

/* badges */
.ui-badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 3px var(--space-2); border-radius: var(--radius-chip);
  font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  background: var(--color-segment-bg); color: var(--color-text-secondary);
}
.ui-badge--gold { background: var(--color-gold-soft); color: var(--color-text-on-gold-soft); }
.ui-badge--success { background: var(--color-success-bg); color: var(--color-success); }

/* chevron for tappable cards */
.ui-chevron { width: 20px; height: 20px; flex: none; color: var(--color-text-secondary); }
.ui-chevron svg { width: 20px; height: 20px; }

/* segmented control (contract §5: segments 36, active = gold-soft fill) */
.ui-segmented { position: relative; display: flex; gap: var(--space-1); padding: var(--space-1); border-radius: var(--radius-row); background: var(--color-segment-bg); box-shadow: var(--shadow-field); overflow-x: auto; scrollbar-width: none; }
.ui-segmented::-webkit-scrollbar { display: none; }
.ui-segmented__item {
  flex: 1 0 auto; min-height: 36px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-chip);
  background: transparent; color: var(--color-text-secondary); cursor: pointer;
  font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; white-space: nowrap;
}
.ui-segmented__item { position: relative; }
.ui-segmented__item::after { content: ""; position: absolute; inset: -4px 0; } /* a finger needs 44 px */
.ui-segmented__item:active { background: var(--color-pressed); }
.ui-segmented__item[aria-selected="true"] { background: var(--color-raised); color: var(--color-gold-soft); font-weight: 700; box-shadow: var(--shadow-key); } /* gold stays an accent: filters do not compete with the main button */

/* delta chip / text, coloured by meaning */
.ui-delta { display: inline-flex; align-items: center; min-height: 30px; padding: 0 var(--space-3); border-radius: var(--radius-chip); font: var(--font-label); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-delta--good { background: var(--color-success-bg); color: var(--color-success); }
.ui-delta--bad { background: var(--color-segment-bg); color: var(--color-danger); }
.ui-delta--neutral { background: var(--color-segment-bg); color: var(--color-neutral); }
.ui-delta--text { min-height: 0; padding: 0; background: transparent; }

/* charts */
.ui-chart { display: block; width: 100%; height: auto; overflow: visible; }
.ui-chart__grid { stroke: var(--color-divider); stroke-width: 0.75; }
.ui-chart__tick { fill: var(--color-text-secondary); font: var(--font-caption); }
.ui-chart__line { fill: none; stroke: var(--color-gold-soft); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ui-chart__area-start { stop-color: var(--color-gold-soft); stop-opacity: 0.24; }
.ui-chart__area-end { stop-color: var(--color-gold-soft); stop-opacity: 0; }
.ui-chart__dot { fill: var(--color-bg); stroke: var(--color-gold-soft); stroke-width: 2; }
.ui-chart__dot--last { fill: var(--color-text); }
.ui-chart__bar { fill: var(--color-divider); }
.ui-chart__bar--last { fill: var(--color-gold-soft); }
/* a period still going on (the current week): an outline, so it is not read as a whole week (P2) */
.ui-chart__bar--partial { fill: transparent; stroke: var(--color-gold-soft); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ui-chart--spark { width: 96px; height: 32px; }

/* text input (prompt dialog) */
.ui-input {
  width: 100%; min-height: var(--button-h); margin: 0 0 var(--space-5); padding: 0 var(--space-4);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-row);
  background: var(--color-field); box-shadow: var(--shadow-field); color: var(--color-text); font: var(--font-body);
}
.ui-input:focus { outline: none; border-color: var(--color-gold-soft); box-shadow: var(--shadow-field), var(--gold-glow); }

/* section heading with an action on the right */
.ui-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.ui-section__head .ui-btn { min-height: var(--touch); padding: 0 var(--space-2); }

/* placeholder screen */
.ui-soon { padding: var(--space-8) var(--screen-pad); color: var(--color-text-secondary); }

/* header with several actions (Тренировка: колокольчик + меню) */
.ui-header__actions { position: relative; z-index: 1; display: flex; gap: var(--space-1); }

/* toast */
.ui-toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--space-4)); z-index: 60;
  max-width: calc(100vw - 2 * var(--space-5)); padding: var(--space-3) var(--space-4);
  transform: translate(-50%, var(--space-2)); opacity: 0; pointer-events: none;
  border-radius: var(--radius-row); background: var(--color-floating); box-shadow: var(--shadow-dialog); color: var(--color-text);
  font: var(--font-subtitle); text-align: center;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.ui-toast--open { opacity: 1; transform: translate(-50%, 0); }
/* switching to a new version (shared/api/app-cache.js): taps are kept off until the page reloads on it */
.ui-update-bar { position: fixed; z-index: 60; left: var(--space-3); right: var(--space-3); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--space-2));
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border-radius: 18px;
  background: var(--color-surface); color: var(--color-text); border: 1px solid color-mix(in srgb, var(--color-gold-soft) 55%, transparent);
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--color-bg) 80%, transparent); animation: ui-update-in .35s var(--ease); }
@keyframes ui-update-in { from { transform: translateY(16px); opacity: 0; } }
.ui-update-bar__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ui-update-bar__text b { font-size: 15px; font-weight: 700; }
.ui-update-bar__text small { font-size: 12.5px; color: var(--color-text-secondary); }
.ui-update-bar__btn { flex: none; min-height: 40px; padding: 0 var(--space-4); border: 0; border-radius: 999px; background: var(--color-gold-soft); color: var(--color-bg); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ui-update-bar__close { flex: none; width: 32px; height: 32px; margin-left: calc(-1 * var(--space-1)); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--color-text-secondary); font-size: 22px; line-height: 1; cursor: pointer; }
.ui-updating { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: var(--space-5); background: var(--color-scrim); color: var(--color-text); font: var(--font-subtitle); text-align: center; }
.ui-toast--success { color: var(--color-success); }
.ui-toast--gold { background: var(--color-gold-gradient); box-shadow: var(--shadow-gold); color: var(--color-text-on-gold); font-weight: 600; }
.ui-toast--danger { color: var(--color-danger); }
.ui-app--public ~ .ui-toast, .ui-toast--low { bottom: calc(env(safe-area-inset-bottom) + var(--space-5)); }

/* drawer */
.ui-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 41; width: min(300px, 82vw);
  padding: calc(env(safe-area-inset-top) + var(--space-4)) var(--space-3) var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-1);
  background: var(--color-floating); border-radius: 0 var(--radius-sheet) var(--radius-sheet) 0; box-shadow: var(--shadow-drawer);
  transform: translateX(-100%); transition: transform var(--duration) var(--ease);
}
.ui-drawer--open { transform: translateX(0); }
.ui-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 var(--space-3) var(--space-3); }
.ui-drawer__title { font: var(--font-section); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.ui-drawer__item {
  display: flex; align-items: center; gap: var(--space-3); min-height: var(--button-h); padding: 0 var(--space-3);
  border: 0; border-radius: var(--radius-row); background: transparent; color: var(--color-text);
  font: var(--font-label); text-align: left; cursor: pointer;
}
.ui-drawer__item:active, .ui-drawer__item:focus-visible { background: var(--color-pressed); }
.ui-drawer__item--danger { color: var(--color-danger); }
.ui-drawer__icon { display: inline-flex; color: var(--color-gold-soft); }
.ui-drawer__item--danger .ui-drawer__icon { color: var(--color-danger); }
.ui-drawer__icon svg { width: 24px; height: 24px; }

/* new personal record pulse (used by screens on their PR element) */
@keyframes ui-pr-pulse {
  0% { box-shadow: 0 0 0 0 transparent; }
  60% { box-shadow: var(--gold-glow-strong); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* tap on the rest timer: a gold burst around the ring and a tint inside it */
@keyframes ui-ring-flash {
  0% { box-shadow: 0 0 0 0 var(--color-gold-light); }
  30% { box-shadow: var(--gold-glow-strong); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes ui-ring-tint {
  0% { opacity: 0; }
  25% { opacity: 0.4; }
  100% { opacity: 0; }
}

/* a new award not opened yet: glow on the button, wiggle of the cup */
@keyframes ui-award-glow {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: var(--gold-glow-strong); }
}
@keyframes ui-award-wiggle {
  0%, 62%, 100% { transform: rotate(0) scale(1); }
  30% { transform: rotate(0) scale(1.14); }
  70% { transform: rotate(-14deg) scale(1.16); }
  78% { transform: rotate(12deg) scale(1.16); }
  86% { transform: rotate(-7deg) scale(1.08); }
  94% { transform: rotate(4deg) scale(1.02); }
}

/* ring-stat (contract §5: small Ø≈96 for Профиль, large for Подготовка) */
.ui-ring { display: inline-flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.ui-ring__box { position: relative; display: grid; place-items: center; }
.ui-ring--sm .ui-ring__box { width: 96px; height: 96px; }
.ui-ring--lg .ui-ring__box { width: 232px; height: 232px; max-width: 70vw; max-height: 70vw; }
.ui-ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ui-ring__track { fill: none; stroke: var(--color-divider); stroke-width: 6; }
.ui-ring__arc { fill: none; stroke: var(--color-gold-soft); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset var(--duration) var(--ease); }
.ui-ring__value { position: relative; font: var(--font-value); }
.ui-ring--lg .ui-ring__value { font: var(--font-hero); }
.ui-ring__caption { font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); text-align: center; }

/* toggle (switch) */
.ui-toggle { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: var(--button-h); cursor: pointer; }
.ui-toggle__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.ui-toggle__label { font: var(--font-label); }
.ui-toggle__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ui-toggle__track { position: relative; width: 52px; height: 32px; flex: none; border-radius: 16px; background: var(--color-segment-bg); box-shadow: var(--shadow-field); transition: background var(--duration) var(--ease); }
.ui-toggle__track::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-text-secondary); transition: transform var(--duration) var(--ease), background var(--duration) var(--ease);
}
.ui-toggle__input:checked + .ui-toggle__track { background: var(--color-gold-gradient); box-shadow: var(--shadow-gold-pressed); }
.ui-toggle__input:checked + .ui-toggle__track::after { transform: translateX(20px); background: var(--color-text-on-gold); }
.ui-toggle__input:focus-visible + .ui-toggle__track { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }

/* date field (native picker inside ui-field) */
.ui-date { cursor: pointer; }
.ui-date { min-width: 0; }
.ui-date__input {
  display: block; box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 32px; text-align: left; -webkit-appearance: none; appearance: none; padding: 0; border: 0; background: transparent; color: var(--color-text);
  font: var(--font-value); font-variant-numeric: tabular-nums; color-scheme: dark;
}
.ui-date__input:focus { outline: none; }
.ui-date__input::-webkit-date-and-time-value { text-align: left; }

/* list item (menu rows) */
.ui-list-item {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 56px; padding: var(--space-2) 0;
  border: 0; background: transparent; color: var(--color-text); text-align: left; cursor: pointer;
}
.ui-list-item + .ui-list-item { border-top: 1px solid var(--color-divider); }
.ui-list-item__icon { display: inline-flex; flex: none; color: var(--color-gold-soft); }
.ui-list-item__icon svg { width: 28px; height: 28px; }
.ui-list-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.ui-list-item__title { font: var(--font-label); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.ui-list-item__value { color: var(--color-text-secondary); font: var(--font-subtitle); }
.ui-list-item--danger, .ui-list-item--danger .ui-list-item__icon { color: var(--color-danger); }

/* tall sheet with a title (pickers) */
.ui-sheet--tall { max-height: 85vh; display: flex; flex-direction: column; }
.ui-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 0 0 var(--space-3) var(--space-2); }
.ui-sheet__title { font: var(--font-section); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.ui-sheet__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* The drug database has a fixed viewport so category changes do not resize or move the sheet. */
.ui-sheet--drug-picker { height: min(85vh, 720px); height: min(85dvh, 720px); max-height: calc(100dvh - env(safe-area-inset-top) - var(--space-3)); overflow: hidden; }
.ui-sheet--drug-picker .ui-sheet__body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* picker list inside a sheet (search + chips + items) */
.ui-picker__search { margin: 0 0 var(--space-3); }
.ui-picker__cats { flex: none; min-width: 0; margin-bottom: var(--space-2); }
.ui-picker__list { display: flex; flex-direction: column; }
.ui-picker__results { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ui-picker__item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 52px; padding: var(--space-2);
  border: 0; border-bottom: 1px solid var(--color-divider); background: transparent; color: var(--color-text);
  font: var(--font-label); text-align: left; cursor: pointer;
}
.ui-picker__item:active, .ui-picker__item:focus-visible { background: var(--color-pressed); }

/* Category tabs: all six in one row (owner 2026-11-18), an icon over a short name; nothing scrolls sideways. */
.ui-picker__cats .ui-segmented {
  width: 100%;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  overflow: visible;
}
.ui-picker__cats .ui-segmented__item {
  min-width: 0;
  min-height: 58px;
  padding: 6px 1px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-size: clamp(8.5px, 2.5vw, 10.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: nowrap;
  line-height: 1.1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.ui-picker__cat-icon { display: inline-flex; width: 22px; height: 22px; color: var(--color-text-secondary); }
.ui-picker__cat-icon svg { display: block; width: 22px; height: 22px; stroke-width: 1.7; }
.ui-picker__cat-label { display: block; max-width: 100%; overflow: hidden; text-overflow: clip; line-height: 1.1; }
@media (max-width: 359px) { .ui-picker__cats .ui-segmented__item { font-size: 8px; letter-spacing: -0.03em; padding-inline: 0; } } /* 320 px, a serif theme: six names still fit */
.ui-picker__cats .ui-segmented__item[aria-selected="true"] {
  border-color: var(--color-gold-soft);
  background: var(--color-raised);
  box-shadow: var(--shadow-key), inset 0 0 0 1px var(--color-gold-soft);
}
.ui-picker__cats .ui-segmented__item[aria-selected="true"] .ui-picker__cat-icon { color: var(--color-gold-soft); }

/* reference band on a line chart (Анализы: норма) */
.ui-chart__band { fill: var(--color-success-bg); opacity: 0.6; }

/* tariff cards (payment sheet) */
/* licence: three tariff cards, one main button that turns into «Купить» */
.ui-license { display: grid; gap: var(--space-3); }
.ui-license__caption { margin: 0; font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-license__note { margin: 0; }
.ui-license__main { display: flex; align-items: center; justify-content: center; }
.ui-tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); padding-top: var(--space-2); }
.ui-tariff {
  position: relative; min-width: 0; padding: var(--space-4) 2px var(--space-3); display: flex; flex-direction: column; align-items: center; gap: var(--space-1);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-card); background: var(--color-field); color: var(--color-text); text-align: center; cursor: pointer;
}
.ui-tariff--active { border-color: var(--color-gold-soft); box-shadow: var(--shadow-accent), var(--gold-glow); background: var(--color-accent-card); }
.ui-tariff__badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 1px var(--space-2); border-radius: var(--radius-chip);
  background: var(--color-gold-soft); color: var(--color-text-on-gold-soft); font: var(--font-tab); text-transform: uppercase; white-space: nowrap;
}
.ui-tariff__title { font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-tariff--active .ui-tariff__title { color: var(--color-text); }
.ui-tariff__price { font: var(--font-value); font-size: 21px; color: var(--color-gold-soft); white-space: nowrap; }
.ui-tariff__day { font: var(--font-subtitle); font-weight: 600; white-space: nowrap; }
.ui-tariff__term { font: var(--font-caption); color: var(--color-text-secondary); }
/* a promotion's card (lib/promo.js, owner 2026-11-25): the whole row above the usual three, the usual price struck through */
.ui-tariff--promo { grid-column: 1 / -1; margin-top: var(--space-2); padding-top: var(--space-5); }
.ui-tariff__badge--promo { background: var(--color-danger, #C0392B); color: #FFFFFF; }
.ui-tariff__old { font: var(--font-caption); color: var(--color-text-secondary); text-decoration: line-through; white-space: nowrap; }
.ui-tg-icon {
  flex: none; width: 28px; height: 28px; margin-right: var(--space-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; background: var(--color-telegram); color: var(--color-text);
}
.ui-tg-icon svg { width: 18px; height: 18px; }
.ui-ya-icon {
  flex: none; width: 28px; height: 28px; margin-right: var(--space-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; background: var(--color-yandex); color: var(--color-text);
}
.ui-ya-icon svg { width: 16px; height: 16px; }
.ui-purchase { display: grid; gap: var(--space-3); padding-bottom: var(--space-2); }
.ui-purchase__what { margin: 0; font: var(--font-label); color: var(--color-gold-soft); }
.ui-purchase__status { margin: 0; font: var(--font-subtitle); color: var(--color-danger); }

/* slider (volume) */
.ui-slider { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-2) 0; }
.ui-slider__head { display: flex; justify-content: space-between; align-items: baseline; }
.ui-slider__label { font: var(--font-label); }
.ui-slider__value { font: var(--font-label); color: var(--color-gold-soft); }
.ui-slider__input { width: 100%; height: var(--touch); margin: 0; accent-color: var(--color-gold-soft); background: transparent; cursor: pointer; }
.ui-slider--disabled { opacity: 0.4; }

/* award: «Новое достижение» pops near the save button, then flies into «Награды» (workout header) */
.ui-award-fly {
  position: fixed; z-index: 70; transform: translate(-50%, -100%) scale(0.6); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-row); background: var(--color-gold-gradient); box-shadow: var(--shadow-gold); color: var(--color-text-on-gold); font: var(--font-label); font-weight: 700;
  transition: transform 600ms var(--ease), opacity 300ms var(--ease), left 600ms var(--ease), top 600ms var(--ease);
}
.ui-award-fly__icon { display: inline-flex; }
.ui-award-fly__icon svg { width: 22px; height: 22px; }
.ui-award-fly--show { opacity: 1; transform: translate(-50%, -100%) scale(1); }
.ui-award-fly--go { transform: translate(-50%, -50%) scale(0.2); opacity: 0.2; }
.ui-award-fly--go .ui-award-fly__text { opacity: 0; }

/* water portions sheet */
.ui-portions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin-bottom: var(--space-3); }
.ui-portion {
  min-height: var(--button-h); border: 1px solid var(--color-field-border); border-radius: var(--radius-row);
  background: var(--color-field); color: var(--color-text); font: var(--font-label); font-variant-numeric: tabular-nums; cursor: pointer;
}
.ui-portion:active { background: var(--color-key-pressed); }
.ui-portion--on { border-color: var(--color-gold-soft); color: var(--color-gold-soft); }

/* small hint sheet bits (RPE help, exercise menu) */
.ui-hint__lead { margin: 0 0 var(--space-3); }
.ui-hint__list { margin: 0 0 var(--space-3); padding-left: var(--space-5); font: var(--font-body); }
.ui-hint__list li + li { margin-top: var(--space-1); }
.ui-hint__row { display: inline-flex; gap: var(--space-2); }
.ui-hint__mini { min-height: 36px; padding: 0 var(--space-3); }
.ui-picker__item--danger { color: var(--color-danger); }
/* a picker with one choice (role="radio"): the chosen one in gold with a check; a short note under the list */
.ui-picker__item[aria-checked="true"] { color: var(--color-gold-soft); font-weight: 600; }
.ui-picker__check { display: inline-flex; flex: none; color: var(--color-gold-soft); }
.ui-picker__check svg { width: 20px; height: 20px; }
.ui-picker__note { margin: var(--space-3) 0 0; }

/* fullscreen photo viewer */
.ui-photo-viewer { position: fixed; inset: 0; z-index: 70; background: var(--color-bg); }
.ui-photo-viewer__stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; display: flex; align-items: center; justify-content: center; }
.ui-photo-viewer__img { width: 100%; height: 100%; object-fit: contain; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; will-change: transform; pointer-events: none; }
.ui-photo-viewer__close { position: absolute; z-index: 1; top: calc(env(safe-area-inset-top) + var(--space-3)); right: var(--screen-pad); display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--color-bg) 55%, transparent); color: var(--color-text);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s var(--ease), background .15s var(--ease); }
.ui-photo-viewer__close svg { width: 20px; height: 20px; stroke-width: 2; }
.ui-photo-viewer__close::after { content: ""; position: absolute; inset: -4px; } /* 48 px to the finger */
.ui-photo-viewer__close:active { transform: scale(.92); background: color-mix(in srgb, var(--color-bg) 75%, transparent); }
.ui-photo-viewer__caption {
  position: absolute; z-index: 1; left: var(--screen-pad); right: var(--screen-pad); bottom: calc(env(safe-area-inset-bottom) + var(--space-4)); margin: 0; pointer-events: none;
  text-align: center; font: var(--font-subtitle); color: var(--color-text); text-shadow: 0 1px 6px var(--color-bg);
}

/* mini 1RM calculator in a sheet (Программа) */
.ui-rm-calc { display: grid; gap: var(--space-3); }
.ui-rm-calc .ui-note { margin: 0; }
.ui-rm-calc__fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.ui-rm-calc__result { margin: 0; text-align: center; font: var(--font-value); color: var(--color-gold-soft); }

/* install banner: above the bottom navigation, in the crimson + gold of the accent cards */
.ui-install {
  position: fixed; z-index: 15; left: var(--space-3); right: var(--space-3); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--space-3));
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-1) var(--space-2) var(--space-3);
  border: 1px solid var(--color-gold-edge); border-radius: var(--radius-card); background: var(--color-accent-card);
  box-shadow: var(--shadow-dialog); animation: ui-install-in 320ms var(--ease) 1;
}
@keyframes ui-install-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .ui-install { animation: none; } }
.ui-install__icon { flex: none; width: 44px; height: 44px; border-radius: 10px; }
.ui-install__text { flex: 1; min-width: 0; }
.ui-install__title { margin: 0; font: var(--font-subtitle); font-weight: 600; color: var(--color-text); }
.ui-install__hint { margin: 2px 0 0; font: var(--font-caption); color: var(--color-gold-soft); }
.ui-install__btn { flex: none; min-height: 40px; padding: 0 var(--space-3); font: var(--font-caption); font-weight: 700; letter-spacing: var(--tracking-caps); }
.ui-install__close { flex: none; width: 36px; height: 36px; margin: 0; color: var(--color-text-secondary); }
.ui-install__close svg { width: 18px; height: 18px; }

/* other languages have long words («Körperzusammensetzung»): titles break by syllables (or inside the word) instead of running out */
:root:not([lang="ru"]) :is(h1, h2, h3, .ui-card__title, .ui-section__title, .ui-header__title) { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 12 5 5; overflow-wrap: break-word; }
/* the language picker: a list (settings, the menu sheet) and a small button on the first screen */
.ui-lang-list { display: flex; flex-direction: column; }
.ui-lang-item { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 0 var(--space-1); border: 0; border-bottom: 1px solid var(--color-divider); background: transparent; color: var(--color-text); text-align: left; cursor: pointer; font: var(--font-body); }
.ui-lang-item:last-child { border-bottom: 0; }
.ui-lang-item:active { background: var(--color-pressed); }
.ui-lang-item__name { flex: 1; }
.ui-lang-item__code { font: var(--font-caption); letter-spacing: var(--tracking-caps); color: var(--color-text-secondary); }
.ui-lang-item__check { display: inline-flex; color: var(--color-gold-soft); }
.ui-lang-item__check svg { width: 20px; height: 20px; }
.ui-lang-item--on .ui-lang-item__name { color: var(--color-gold-soft); font-weight: 600; }
.ui-lang-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--space-3); border: 1px solid var(--color-divider); border-radius: var(--radius-chip); background: var(--color-surface); color: var(--color-text); font: var(--font-caption); letter-spacing: var(--tracking-caps); cursor: pointer; }
.ui-lang-btn::after { content: ""; position: absolute; inset: -6px 0; } /* a finger needs 44 px */
.ui-lang-btn__icon { display: inline-flex; color: var(--color-gold-soft); }
.ui-lang-btn__icon svg { width: 16px; height: 16px; }

/* install instructions in a sheet */
.ui-install-sheet { display: grid; gap: var(--space-4); padding-bottom: var(--space-2); }
.ui-install-sheet__hero { display: grid; justify-items: center; gap: var(--space-1); text-align: center; }
.ui-install-sheet__hero .ui-meta { margin: 0; }
.ui-install-sheet__icon { width: 72px; height: 72px; border-radius: 16px; border: 1px solid var(--color-gold-soft); box-shadow: var(--crimson-glow); }
.ui-install-sheet__name { margin: var(--space-2) 0 0; font: var(--font-section); letter-spacing: var(--tracking-title); }
.ui-install-sheet__note { margin: 0; }
.ui-install-steps { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.ui-install-step { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-row); background: var(--color-field); box-shadow: var(--shadow-field); }
.ui-install-step__num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-gold-soft); color: var(--color-text-on-gold-soft); font: var(--font-subtitle); font-weight: 700;
}
.ui-install-step__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ui-install-step__title { font: var(--font-label); color: var(--color-text); }
.ui-install-step__icon { flex: none; display: inline-flex; color: var(--color-gold-soft); }
.ui-install-step__icon svg { width: 24px; height: 24px; }

/* Telegram waiting sheet */
.ui-tg-wait { display: grid; gap: var(--space-3); padding-bottom: var(--space-2); }
.ui-tg-wait__lead { margin: 0; font: var(--font-body); color: var(--color-text); }
.ui-tg-wait__status { margin: 0; display: flex; align-items: center; gap: var(--space-2); font: var(--font-subtitle); color: var(--color-gold-soft); }
.ui-tg-wait__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-gold-soft); animation: ui-tg-pulse 1200ms ease-in-out infinite; }
@keyframes ui-tg-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ui-tg-wait__dot { animation: none; } }
.ui-tg-wait__link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }

/* a warning that does not push: one line, the full text on a tap */
.ui-more__summary { display: flex; align-items: center; gap: var(--space-2); min-height: var(--touch); list-style: none; font: var(--font-subtitle); color: var(--color-text-secondary); cursor: pointer; }
.ui-more__summary::-webkit-details-marker { display: none; }
.ui-more__icon { flex: none; display: inline-flex; color: var(--color-text-secondary); }
.ui-more__icon svg { width: 18px; height: 18px; }
.ui-more__text { flex: 1; min-width: 0; }
.ui-more__chevron { flex: none; display: inline-flex; transform: rotate(90deg); transition: transform var(--duration) var(--ease); }
.ui-more__chevron svg { width: 16px; height: 16px; }
.ui-more[open] .ui-more__chevron { transform: rotate(-90deg); }
.ui-more__body { padding-bottom: var(--space-2); }

/* last in the file: it has to win over the rules above */
@media (prefers-reduced-motion: reduce) {
  .ui-btn, .ui-scrim, .ui-sheet, .ui-dialog, .ui-drawer, .ui-toast, .ui-toggle__track, .ui-toggle__track::after, .ui-ring__arc, .ui-award-fly, .ui-more__chevron { transition: none; }
  .ui-btn:active { transform: none; }
}

/* «Как подобрать вес» */
.ui-guide { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-guide__block { display: flex; flex-direction: column; gap: var(--space-1); }
.ui-guide__title { margin: 0; font: var(--font-label); color: var(--color-gold-soft); }
.ui-guide .ui-note, .ui-guide .ui-hint__list { margin: 0; }
.ui-guide__table { padding: 0 var(--space-3); border: 1px solid var(--color-field-border); border-radius: var(--radius-row); background: var(--color-field); }
.ui-guide__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: 0; padding: var(--space-2) 0; font: var(--font-caption); color: var(--color-text-secondary); }
.ui-guide__row + .ui-guide__row { border-top: 1px solid var(--color-divider); }
.ui-guide__row b { flex: none; color: var(--color-text); }
.ui-rm-calc__name { margin: 0; font: var(--font-label); color: var(--color-gold-soft); }

.ui-toast--action { pointer-events: auto; cursor: pointer; }
.ui-nav__tab--mark { position: relative; }
.ui-nav__tab--mark::after { content: ""; position: absolute; top: 6px; left: calc(50% + 10px); width: 9px; height: 9px; border-radius: 50%; background: var(--color-gold-soft); box-shadow: 0 0 0 2px var(--color-bg); }

/* «Включи уведомления» */
.ui-push-ask { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-push-ask .ui-note { margin: 0; }

/* the choice of a theme: three arches, the chosen one open */
.ui-theme-picker { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-theme-picker__note { margin: 0; text-align: center; }
.ui-theme-sheet { display: flex; flex-direction: column; gap: var(--space-4); }
/* the character of the theme (owner 2026-11-11): its own two people as small photo tiles under the arches, «Он» and «Она» */
.ui-theme-character { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.ui-theme-character[hidden] { display: none; }
.ui-theme-character__label { font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-theme-character__tiles { display: flex; justify-content: center; gap: var(--space-3); }
.ui-theme-character__tile {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-1); min-width: 76px; padding: var(--space-1);
  border: 1px solid var(--color-divider); border-radius: var(--radius-row); background: var(--color-surface); color: var(--color-text-secondary); cursor: pointer;
}
.ui-theme-character__tile[aria-checked="true"] { border-color: var(--color-gold); color: var(--color-text); box-shadow: var(--gold-glow); }
.ui-theme-character__photo { width: 64px; height: 64px; border-radius: 50%; background-color: var(--color-bg); background-size: auto var(--character-tile-zoom, 220%); background-position: center var(--character-tile-y, 8%); background-repeat: no-repeat; } /* the head and shoulders of the theme photo */
.ui-theme-character__tile--male .ui-theme-character__photo { background-image: var(--photo-workout-male); }
.ui-theme-character__tile--female .ui-theme-character__photo { background-image: var(--photo-workout-female); }
.ui-theme-character__tile[aria-checked="false"] .ui-theme-character__photo { opacity: 0.62; }
.ui-theme-character__name { font: var(--font-caption); font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.ui-theme-arches { display: flex; gap: var(--space-2); height: clamp(264px, 42vh, 340px); }
.ui-theme-arch[data-preview="dark"] { --p-male: var(--preview-dark-male); --p-female: var(--preview-dark-female); --p-bg: var(--preview-dark-bg); --p-slab: var(--preview-dark-slab); --p-accent: var(--preview-dark-accent); --p-ink: var(--preview-dark-ink); --p-veil: var(--preview-dark-veil); }
.ui-theme-arch[data-preview="atelier"] { --p-male: var(--preview-atelier-male); --p-female: var(--preview-atelier-female); --p-bg: var(--preview-atelier-bg); --p-slab: var(--preview-atelier-slab); --p-accent: var(--preview-atelier-accent); --p-ink: var(--preview-atelier-ink); --p-veil: var(--preview-atelier-veil); }
.ui-theme-arch[data-preview="ivory"] { --p-male: var(--preview-ivory-male); --p-female: var(--preview-ivory-female); --p-bg: var(--preview-ivory-bg); --p-slab: var(--preview-ivory-slab); --p-accent: var(--preview-ivory-accent); --p-ink: var(--preview-ivory-ink); --p-veil: var(--preview-ivory-veil); }
.ui-theme-arch[data-preview="cyberpunk"] { --p-male: var(--preview-cyberpunk-male); --p-female: var(--preview-cyberpunk-female); --p-bg: var(--preview-cyberpunk-bg); --p-slab: var(--preview-cyberpunk-slab); --p-accent: var(--preview-cyberpunk-accent); --p-ink: var(--preview-cyberpunk-ink); --p-veil: var(--preview-cyberpunk-veil); }
.ui-theme-arch[data-preview="oldschool"] { --p-male: var(--preview-oldschool-male); --p-female: var(--preview-oldschool-female); --p-bg: var(--preview-oldschool-bg); --p-slab: var(--preview-oldschool-slab); --p-accent: var(--preview-oldschool-accent); --p-ink: var(--preview-oldschool-ink); --p-veil: var(--preview-oldschool-veil); }
.ui-theme-arch {
  position: relative; flex: 1 1 0; min-width: 0; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--p-accent); border-radius: 160px 160px var(--radius-row) var(--radius-row); background: var(--p-bg); color: var(--p-ink);
  box-shadow: var(--shadow-card); transition: flex-grow 420ms var(--ease), box-shadow var(--duration) var(--ease);
}
.ui-theme-arch[aria-checked="true"] { flex-grow: 2.6; box-shadow: var(--shadow-card), var(--gold-glow-strong); }
.ui-theme-arch:active { filter: brightness(0.97); }
.ui-theme-arch:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.ui-theme-arch__photo { position: absolute; inset: 0; background-image: var(--p-male); background-size: auto 112%; background-position: center 28%; background-repeat: no-repeat; opacity: 0.55; transition: opacity 420ms var(--ease); }
.ui-theme-arch[data-gender="female"] .ui-theme-arch__photo { background-image: var(--p-female); }
.ui-theme-arch[aria-checked="true"] .ui-theme-arch__photo { opacity: 1; }
.ui-theme-arch__veil { position: absolute; inset: 42% 0 0; background: linear-gradient(to bottom, transparent, var(--p-veil) 62%); }
.ui-theme-arch__line { position: absolute; inset: 5px; border: 1px solid var(--p-accent); border-radius: 156px 156px 6px 6px; opacity: 0.4; pointer-events: none; }
.ui-theme-arch__side { position: absolute; left: 50%; bottom: var(--space-4); transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl; font: var(--font-caption); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; transition: opacity var(--duration) var(--ease); }
.ui-theme-arch[aria-checked="true"] .ui-theme-arch__side { opacity: 0; }
.ui-theme-arch__open { position: absolute; left: var(--space-3); right: var(--space-3); bottom: var(--space-4); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; opacity: 0; transform: translateY(6px); transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease); }
.ui-theme-arch[aria-checked="true"] .ui-theme-arch__open { opacity: 1; transform: none; transition-delay: 140ms; }
.ui-theme-arch__stones { display: flex; gap: 4px; margin-bottom: var(--space-1); }
.ui-theme-arch__stone { width: 9px; height: 9px; border: 1px solid var(--p-accent); border-radius: 50%; }
.ui-theme-arch__stone--bg { background: var(--p-bg); }
.ui-theme-arch__stone--slab { background: var(--p-slab); }
.ui-theme-arch__stone--accent { background: var(--p-accent); }
.ui-theme-arch__open { container-type: inline-size; left: var(--space-2); right: var(--space-2); }
.ui-theme-arch__name { max-width: 100%; font: var(--font-section); font-size: min(18px, 15.5cqi); letter-spacing: 0.04em; text-transform: uppercase; text-wrap: balance; } /* the size follows the arch; words break only at spaces */
.ui-theme-arch__tag { max-width: 100%; font: var(--font-caption); opacity: 0.82; text-wrap: balance; }
.ui-theme-arch__check { position: absolute; top: var(--space-5); left: 50%; width: 24px; height: 24px; margin-left: -12px; display: grid; place-items: center; border-radius: 50%; background: var(--p-accent); color: var(--p-bg); opacity: 0; transform: scale(0.6); transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease); }
.ui-theme-arch__check svg { width: 14px; height: 14px; stroke-width: 2.6; }
.ui-theme-arch[aria-checked="true"] .ui-theme-arch__check { opacity: 1; transform: none; transition-delay: 180ms; }

/* the mark in the profile: three stones. It breathes until the first tap */
.ui-theme-btn { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch); padding: 0; border: 0; background: transparent; color: var(--color-text); font: var(--font-caption); font-weight: 600; text-shadow: var(--text-shadow-photo); cursor: pointer; }
.ui-theme-btn::before { content: ""; position: absolute; inset: 0 -6px; }
.ui-theme-btn__stones { position: relative; display: inline-flex; flex: none; padding: 3px; }
.ui-theme-btn__stone { position: relative; width: 16px; height: 16px; border: 1.5px solid var(--color-surface-top); border-radius: 50%; box-shadow: var(--shadow-key); }
.ui-theme-btn__stone + .ui-theme-btn__stone { margin-left: -6px; }
.ui-theme-btn__stone--dark { background: var(--preview-dark-bg); }
.ui-theme-btn__stone--atelier { background: var(--preview-atelier-accent); }
.ui-theme-btn__stone--ivory { background: var(--preview-ivory-slab); }
.ui-theme-btn__stone--cyberpunk { background: linear-gradient(135deg, var(--cyber-cyan-75), var(--cyber-violet-64)); box-shadow: 0 0 8px var(--cyber-cyan-75-a65); }
.ui-theme-btn__stone--oldschool { background: linear-gradient(135deg, var(--oldschool-red-35), var(--oldschool-orange-49)); }

/* Theme motion and material cues. The component geometry remains shared, but the feedback language changes with the selected world. */
@keyframes cyberpunk-scan { from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; } to { background-position: 12px -8px, -18px 14px, 0 22px, 56px 0, 0 0; } }
@keyframes cyberpunk-pulse { 0%, 100% { filter: drop-shadow(0 0 4px var(--cyber-cyan-75-a55)); } 50% { filter: drop-shadow(0 0 10px var(--cyber-violet-64-a85)); } }
@keyframes cyber-city-flicker { 0%, 14%, 18%, 43%, 47%, 72%, 100% { opacity: 0.14; } 16%, 45%, 74% { opacity: 0.38; } 17%, 46%, 75% { opacity: 0.2; } }
@keyframes cyber-light-sweep { 0% { transform: translate3d(-18%, 0, 0); opacity: 0; } 18% { opacity: 0.22; } 52% { opacity: 0.08; } 78%, 100% { transform: translate3d(22%, 0, 0); opacity: 0; } }
@keyframes cyber-scanline { 0% { transform: translateY(-18%); opacity: 0; } 14% { opacity: 0.35; } 50% { opacity: 0.1; } 86%, 100% { transform: translateY(118%); opacity: 0; } }
@keyframes cyber-air-glow { 0%, 100% { opacity: 0.08; transform: scale(0.94); } 50% { opacity: 0.2; transform: scale(1.08); } }
@keyframes oldschool-shimmer { 0%, 100% { box-shadow: var(--shadow-gold); } 50% { box-shadow: var(--shadow-gold), 0 0 14px var(--oldschool-orange-49-a24); } }
@keyframes darkside-pulse { 0%, 100% { filter: drop-shadow(0 0 4px rgba(224, 122, 112, 0.42)); } 50% { filter: drop-shadow(0 0 10px rgba(182, 37, 60, 0.82)); } }
@keyframes yujiro-steam-a { 0%, 100% { opacity: 0.18; transform: translate3d(-5px, 14px, 0) scale(0.88) rotate(-3deg); } 45% { opacity: 0.62; transform: translate3d(10px, -6px, 0) scale(1.08) rotate(3deg); } 75% { opacity: 0.3; transform: translate3d(-8px, -28px, 0) scale(1.22) rotate(-4deg); } }
@keyframes yujiro-steam-b { 0%, 100% { opacity: 0.12; transform: translate3d(8px, 16px, 0) scale(0.84) rotate(4deg); } 40% { opacity: 0.48; transform: translate3d(-10px, -10px, 0) scale(1.12) rotate(-5deg); } 80% { opacity: 0.22; transform: translate3d(4px, -34px, 0) scale(1.26) rotate(3deg); } }
@keyframes yujiro-body-steam { 0%, 100% { opacity: 0.1; transform: translate3d(0, 14px, 0) scale(0.86); } 45% { opacity: 0.5; transform: translate3d(12px, -6px, 0) scale(1.1); } 78% { opacity: 0.24; transform: translate3d(-8px, -28px, 0) scale(1.24); } }
@keyframes yujiro-body-steam-strong { 0%, 100% { opacity: 0.38; transform: translate3d(-8px, 18px, 0) scale(0.84) rotate(-2deg); } 42% { opacity: 0.9; transform: translate3d(14px, -12px, 0) scale(1.12) rotate(3deg); } 76% { opacity: 0.55; transform: translate3d(-12px, -40px, 0) scale(1.3) rotate(-3deg); } }
:root[data-theme="cyberpunk"] body { animation: cyberpunk-scan 22s linear infinite; background-size: auto, auto, auto, 56px 56px, auto; }
:root[data-theme="cyberpunk"] .ui-card,
:root[data-theme="cyberpunk"] .ui-field,
:root[data-theme="cyberpunk"] .ui-sheet,
:root[data-theme="cyberpunk"] .ui-dialog { border: 1px solid var(--cyber-cyan-75-a16); }
:root[data-theme="cyberpunk"] .ui-btn--primary,
:root[data-theme="cyberpunk"] .ui-nav__tab[aria-current="page"],
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring[data-action="ring"] { animation: cyberpunk-pulse 3.2s ease-in-out infinite; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-arc { stroke: var(--color-gold-soft); }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::before,
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::after,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::before,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::after { content: ""; position: absolute; pointer-events: none; z-index: 0; mix-blend-mode: screen; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::before,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::before { inset: 0; background: repeating-linear-gradient(90deg, transparent 0 18px, var(--cyber-cyan-75-a8) 19px 20px, transparent 21px 46px), repeating-linear-gradient(180deg, transparent 0 9px, var(--cyber-violet-64-a8) 10px 11px, transparent 12px 28px); opacity: 0.14; animation: cyber-city-flicker 11s steps(1, end) infinite; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::after,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::after { top: 0; right: -20%; bottom: 0; left: 25%; background: linear-gradient(110deg, transparent 0 42%, var(--cyber-cyan-75-a18) 48%, var(--cyber-violet-64-a12) 52%, transparent 60%); filter: blur(10px); animation: cyber-light-sweep 13s ease-in-out 1.8s infinite; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero { box-shadow: inset 0 0 90px var(--cyber-blue-57-a8); }
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero { box-shadow: inset 0 0 90px var(--cyber-violet-64-a10); }

/* A distinct cyber city layer. It gives the hero a sense of depth even when the subject photo is very dark. */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero {
  isolation: isolate;
  background-image:
    linear-gradient(180deg, var(--cyber-blue-5-a6) 0%, var(--cyber-blue-5-a8) 44%, var(--cyber-blue-4-a90) 100%),
    radial-gradient(ellipse 72% 42% at 76% 28%, var(--cyber-violet-62-a20), transparent 62%),
    radial-gradient(ellipse 55% 52% at 12% 76%, var(--cyber-cyan-60-a22), transparent 62%),
    var(--hero-workout);
  background-size: cover, 120% 120%, 120% 120%, cover;
}
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero { background-image:
    linear-gradient(180deg, var(--cyber-blue-5-a6) 0%, var(--cyber-blue-5-a12) 44%, var(--cyber-blue-4-a90) 100%),
    radial-gradient(ellipse 72% 42% at 76% 28%, var(--cyber-violet-62-a20), transparent 62%),
    radial-gradient(ellipse 55% 52% at 12% 76%, var(--cyber-cyan-60-a22), transparent 62%),
    var(--hero-profile);
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::before,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::before {
  display: block;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 52%, var(--cyber-blue-4-a72) 100%),
    repeating-linear-gradient(90deg, transparent 0 8px, var(--cyber-cyan-68-a11) 9px 10px, transparent 11px 26px),
    repeating-linear-gradient(180deg, transparent 0 12px, var(--cyber-violet-65-a10) 13px 14px, transparent 15px 31px);
  opacity: 0.76;
  filter: saturate(1.35) contrast(1.12);
  animation: cyber-city-flicker 8.5s steps(1, end) infinite;
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::after,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::after {
  display: block;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 0 38%, var(--cyber-cyan-67-a38) 47%, var(--cyber-violet-64-a28) 51%, transparent 61%),
    linear-gradient(180deg, transparent 0 62%, var(--cyber-teal-54-a22) 63%, transparent 64%),
    repeating-linear-gradient(180deg, var(--cyber-cyan-93-a8) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  filter: blur(0.2px);
  animation: cyber-light-sweep 10.5s ease-in-out 1.3s infinite, cyber-scanline 7s linear 0.4s infinite;
}

/* The profile photo fades into the page (owner 2026-11-10: no hard edge under it): the light layer ends in the page colour, the city
   lines and the sweep fade out over the lower part, the inner glow stays on the top and the sides. */
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero {
  background-image:
    linear-gradient(180deg, var(--cyber-blue-5-a6) 0%, var(--cyber-blue-5-a12) 40%, var(--cyber-blue-4-a90) 84%, var(--color-bg) 100%),
    radial-gradient(ellipse 72% 42% at 76% 28%, var(--cyber-violet-62-a20), transparent 62%),
    radial-gradient(ellipse 55% 52% at 12% 76%, var(--cyber-cyan-60-a22), transparent 62%),
    var(--hero-profile);
  background-size: cover, 120% 120%, 120% 120%, var(--hero-own-size, cover); /* the photo layer: the own picture's zoom and place, if any */
  background-position: var(--hero-profile-pos), var(--hero-profile-pos), var(--hero-profile-pos), var(--hero-own-pos, var(--hero-profile-pos));
  box-shadow: inset 0 60px 90px -60px var(--cyber-violet-64-a10), inset 60px 0 90px -60px var(--cyber-violet-64-a10), inset -60px 0 90px -60px var(--cyber-violet-64-a10);
  -webkit-mask-image: linear-gradient(180deg, black calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, black calc(100% - 16px), transparent); /* the last 16 px melt into the page; the level line ends higher */
}
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::before,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::after { -webkit-mask-image: linear-gradient(180deg, black 55%, transparent 100%); mask-image: linear-gradient(180deg, black 55%, transparent 100%); }
/* No neon flashes over the athletes (owner 2026-11-10): the city grid stays still and quiet, the light sweep and the scanline are gone. */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::before,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::before { animation: none; opacity: 0.14; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::after,
:root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::after { animation: none; display: none; }
/* The two hero layers above carry the city windows, scanline and chromatic sweep. */
:root[data-theme="cyberpunk"] .ui-card { overflow: hidden; border-radius: 10px; box-shadow: inset 0 1px 0 var(--cyber-cyan-88-a14), inset 3px 0 0 var(--cyber-cyan-64-a70), 0 14px 30px -18px var(--cyber-ink-0-a98), 0 0 26px -22px var(--cyber-violet-64-a85); }
:root[data-theme="cyberpunk"] .ui-card::after { content: ""; position: absolute; top: 0; right: 0; width: 54px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyber-violet-64)); transform: rotate(-42deg) translate(13px, -11px); transform-origin: center; opacity: 0.95; pointer-events: none; }
:root[data-theme="cyberpunk"] .ui-card__title::before { background: linear-gradient(180deg, var(--cyber-cyan-75), var(--cyber-violet-64)); box-shadow: 0 0 10px var(--cyber-cyan-75-a62); }
:root[data-theme="cyberpunk"] .ui-nav { border-top: 1px solid var(--cyber-cyan-75-a50); }
:root[data-theme="cyberpunk"] .ui-nav__tab[aria-current="page"]::before { height: 3px; background: linear-gradient(90deg, var(--cyber-cyan-75), var(--cyber-violet-64)); box-shadow: 0 0 14px var(--cyber-cyan-75-a80); }
:root[data-theme="cyberpunk"] .ui-btn { border-radius: 7px; }
:root[data-theme="cyberpunk"] .ui-btn--primary { position: relative; overflow: hidden; background: linear-gradient(105deg, var(--cyber-cyan-56) 0%, var(--cyber-blue-67) 52%, var(--cyber-violet-64) 100%); }
:root[data-theme="cyberpunk"] .ui-btn--primary::after { content: ""; position: absolute; top: -10%; left: -22%; width: 18%; height: 120%; background: var(--cyber-teal-96-a50); transform: skewX(-22deg); animation: cyber-light-sweep 4.8s ease-in-out infinite; pointer-events: none; }
/* Cyberpunk workout composition. The empty ring is part of the photo, while the live timer stays on top of it. */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-timer-section { isolation: isolate; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring {
  transform: translateY(-4px) scale(1.08);
  border-color: transparent;
  background: var(--cyber-blue-5-a20);
  box-shadow: inset 0 0 0 1px var(--cyber-cyan-75-a16), inset 0 0 24px var(--cyber-violet-64-a12), 0 0 26px -10px var(--cyber-cyan-75-a72);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-svg { position: relative; z-index: 2; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-track { stroke: var(--cyber-cyan-75-a22); }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-arc { stroke: var(--cyber-cyan-75); filter: drop-shadow(0 0 5px var(--cyber-cyan-75-a90)); }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-inner { z-index: 3; text-shadow: 0 0 14px var(--cyber-cyan-75-a50); }
/* Cyberpunk dial pair v5 (owner 2026-11-10): V's hands are cut from the photo and lie over the timer (tokens --cyber-hands-*). */
/* The athlete holds the timer (owner 2026-11-10): the photo is sized and placed from the timer, so its neon ring lies on the timer's arc
   on any screen; the hands are a layer above the arc. The sides beyond a narrow photo fade into the page. */
:root[data-theme="cyberpunk"] .scr-workout { --hero-under: calc(var(--ring-size, 194px) + 24px); } /* the photo runs on under the whole ring, then fades */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero {
  -webkit-mask-image: linear-gradient(180deg, var(--color-bg) calc(100% - 64px), transparent); /* every layer, the city lines too, fades out: no edge under the ring */
  mask-image: linear-gradient(180deg, var(--color-bg) calc(100% - 64px), transparent);
  --cyber-photo-left: calc(50% + var(--ring-size, 194px) * (var(--cyber-photo-x) - var(--cyber-photo-w) / 2));
  --cyber-photo-right: calc(50% + var(--ring-size, 194px) * (var(--cyber-photo-x) + var(--cyber-photo-w) / 2));
  background-image:
    var(--cyber-hero-light),
    linear-gradient(90deg, var(--color-bg) var(--cyber-photo-left), transparent calc(var(--cyber-photo-left) + 28px), transparent calc(var(--cyber-photo-right) - 28px), var(--color-bg) var(--cyber-photo-right)),
    var(--hero-workout);
  background-size: cover, 120% 120%, 120% 120%, 100% 100%, calc(var(--ring-size, 194px) * var(--cyber-photo-w)) calc(var(--ring-size, 194px) * var(--cyber-photo-h));
  background-position: center, center, center, center, calc(50% + var(--ring-size, 194px) * var(--cyber-photo-x)) calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * var(--cyber-photo-y));
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring::before {
  content: ""; position: absolute; z-index: 4; pointer-events: none;
  left: calc(var(--ring-size, 194px) * var(--cyber-hands-x) - 1px); top: calc(var(--ring-size, 194px) * var(--cyber-hands-y) - 1px);
  width: calc(var(--ring-size, 194px) * var(--cyber-hands-w)); height: calc(var(--ring-size, 194px) * var(--cyber-hands-h));
  background: var(--cyber-hands) center / 100% 100% no-repeat;
}

/* Cyberpunk, the rest: «неон заряжается» (owner 2026-11-12). Only while a rest runs, no flashing anywhere (2026-11-10: no flashes over
   the athletes): a spark of current with a fading tail runs round the ring and under V's fingers, thin rain runs down the glass at the
   sides (not over V), and rings spread slowly on the wet floor under the ring, two in turn. transform/opacity/background-position only. */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-spark { display: block; fill: none; stroke-linecap: round; opacity: 0; transform-box: view-box; transform-origin: 120px 120px; transition: opacity 0.8s ease; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-spark--tail { stroke: var(--cyber-spark); stroke-width: 9; filter: drop-shadow(0 0 4px var(--cyber-spark-glow)); } /* white over the cyan arc: a trail of light */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-spark--head { stroke: var(--cyber-spark); stroke-width: 10; filter: drop-shadow(0 0 6px var(--cyber-spark-glow)); }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-ring-spark { animation: cyber-spark-orbit 2.6s linear infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-ring-spark--tail { opacity: 0.38; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-ring-spark--head { opacity: 1; }
@keyframes cyber-spark-orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* Cyberpunk «кино» (owner 2026-11-13). No flash and no flicker over the athlete (the theme's rule): everything glows, drifts and pulses
   smoothly; transform / opacity only. Behind the timer (the stage, screens/workout/screen.js): the city's neon bokeh, rain in two depths at
   the sides only, the smog and the wet floor's reflections, a holographic sight round the timer (two rings turning against each other),
   now and then a flying car far over the city. A set saved: electric sparks at the hands (over the timer) and the sight switches on. The
   last 10 s: the sight brighter and faster, the rain heavier; the last 3: it pulses once a second; zero: a shockwave from the timer. */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-stage { display: block; position: absolute; inset: 0; pointer-events: none; overflow: hidden; } /* no z-index: the layers blend with the photo */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-stage > :where(i) { /* :where — a layer's own blend or display wins over this default */ display: none; position: absolute; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; mix-blend-mode: screen; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-stage > .scr-workout-cy { display: block; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--bokeh { inset: -4%; background: var(--cyber-bokeh) center / cover no-repeat; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--rain-far,
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--rain-near { /* the sides only: never over the athlete */
  left: 0; right: 0; top: -512px; bottom: 0;
  -webkit-mask-image: linear-gradient(90deg, black 0, black 16%, transparent 32%, transparent 68%, black 84%, black 100%); mask-image: linear-gradient(90deg, black 0, black 16%, transparent 32%, transparent 68%, black 84%, black 100%);
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--rain-far { background: var(--cyber-rain-far) 0 0 / 256px 256px repeat; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--rain-near { background: var(--cyber-rain-near) 0 0 / 512px 512px repeat; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--smog { /* two tiles wide, moved by one: no seam */
  left: 0; bottom: 0; height: calc(var(--ring-size, 194px) * 0.9); width: calc(var(--ring-size, 194px) * 0.9 * 8); background: var(--cyber-smog) 0 100% / 50% 100% repeat-x;
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--reflect {
  left: 0; bottom: 0; height: calc(var(--ring-size, 194px) * 0.55); width: calc(var(--ring-size, 194px) * 0.55 * 6); background: var(--cyber-reflect) 0 0 / 50% 100% repeat-x;
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%); mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--trail { left: 0; top: 9%; width: 70%; height: calc(var(--ring-size, 194px) * 0.18); background: var(--cyber-trail) center / 100% 100% no-repeat; }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--hud,
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--hud-inner,
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--shock { /* centred on the timer (lifted 4 px with it) */
  left: 50%; top: calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) / 2); width: calc(var(--ring-size, 194px) * 1.9); height: calc(var(--ring-size, 194px) * 1.9);
  margin: calc(var(--ring-size, 194px) * -0.95) 0 0 calc(var(--ring-size, 194px) * -0.95); background: var(--cyber-hud) center / contain no-repeat;
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--hud-inner { transform: scale(0.82); }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-cy--shock { background-image: var(--cyber-shock); transition: none; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-cy--bokeh { opacity: 0.5; animation: cy-bokeh-drift 26s ease-in-out infinite alternate; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-cy--rain-far { opacity: 0.55; animation: cy-rain-far 1.1s linear infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-cy--rain-near { opacity: 0.32; animation: cy-rain-near 0.75s linear infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-cy--smog { opacity: 0.5; animation: cy-drift 46s linear infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-cy--reflect { opacity: 0.4; animation: cy-drift-back 30s linear infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-cy--trail { animation: cy-trail 9s linear 2s infinite; transition: none; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-cy--hud { opacity: 0.38; animation: cy-turn 60s linear infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"] .scr-workout-cy--hud-inner { opacity: 0.22; animation: cy-turn-back 42s linear infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-chalk] .scr-workout-cy--hud { animation: cy-hud-on 0.9s ease-out 1, cy-turn 60s linear 0.9s infinite; } /* the sight switches on */
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"][data-rest-end="soon"] .scr-workout-cy--hud { opacity: 0.6; animation: cy-turn 20s linear infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"][data-rest-end="soon"] .scr-workout-cy--rain-near { opacity: 0.5; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"][data-rest-end="final"] .scr-workout-cy--hud { opacity: 0.6; animation: cy-turn 20s linear infinite, cy-pulse 1s ease-in-out infinite; }
:root[data-theme="cyberpunk"] .scr-workout[data-timer="running"][data-rest-end="final"] .scr-workout-cy--rain-near { opacity: 0.55; }
:root[data-theme="cyberpunk"] .scr-workout[data-finale] .scr-workout-cy--shock { animation: cy-shock 1.3s cubic-bezier(0.1, 0.7, 0.3, 1) 1 both; }
@keyframes cy-bokeh-drift { from { transform: translate3d(-1.5%, 0, 0) scale(1); } to { transform: translate3d(1.5%, -1%, 0) scale(1.05); } }
@keyframes cy-rain-far { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 256px, 0); } }
@keyframes cy-rain-near { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 512px, 0); } }
@keyframes cy-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes cy-drift-back { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes cy-trail { 0% { opacity: 0; transform: translate3d(-110%, 0, 0); } 3% { opacity: 0.85; } 22% { opacity: 0.85; } 26% { opacity: 0; transform: translate3d(160%, -12%, 0); } 100% { opacity: 0; transform: translate3d(160%, -12%, 0); } }
@keyframes cy-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes cy-turn-back { from { transform: scale(0.82) rotate(0deg); } to { transform: scale(0.82) rotate(-360deg); } }
@keyframes cy-hud-on { 0% { opacity: 0; transform: scale(0.7) rotate(-40deg); } 60% { opacity: 0.75; } 100% { opacity: 0.38; transform: scale(1) rotate(0deg); } }
@keyframes cy-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }
@keyframes cy-shock { 0% { opacity: 0; transform: scale(0.45); } 10% { opacity: 1; } 100% { opacity: 0; transform: scale(2.3); } }
/* over the timer: electric sparks at both hands (a set saved) — a transparent picture, plain blending; the hands' spots from the photo */
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-timer-section::before,
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-timer-section::after {
  content: ""; position: absolute; z-index: 5; pointer-events: none; opacity: 0;
  top: calc(var(--ring-size, 194px) * -0.32); left: 50%; width: calc(var(--ring-size, 194px) * 0.75); height: calc(var(--ring-size, 194px) * 0.75);
  background: var(--cyber-sparks) center / contain no-repeat;
}
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-timer-section::before { margin-left: calc(var(--ring-size, 194px) * -0.66); }
:root[data-theme="cyberpunk"] .scr-workout .scr-workout-timer-section::after { margin-left: calc(var(--ring-size, 194px) * -0.09); }
:root[data-theme="cyberpunk"] .scr-workout[data-chalk] .scr-workout-timer-section::before { animation: cy-sparks 0.9s ease-out 1; }
:root[data-theme="cyberpunk"] .scr-workout[data-chalk] .scr-workout-timer-section::after { animation: cy-sparks 0.9s ease-out 0.12s 1; }
@keyframes cy-sparks { 0% { opacity: 0; transform: scale(0.4) rotate(0deg); } 12% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2) rotate(25deg); } }
@media (prefers-reduced-motion: reduce) {
  /* Keep ambient workout effects on every device, like Yujiro steam. Only brief flashes are reduced. */
  :root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring-spark,
  :root[data-theme="cyberpunk"] .scr-workout .scr-workout-timer-section::before,
  :root[data-theme="cyberpunk"] .scr-workout .scr-workout-timer-section::after { display: none; animation: none; }
}
:root[data-theme="oldschool"] .ui-card,
:root[data-theme="oldschool"] .ui-field,
:root[data-theme="oldschool"] .ui-sheet,
:root[data-theme="oldschool"] .ui-dialog { border: 1px solid var(--oldschool-orange-49-a18); }
:root[data-theme="oldschool"] .ui-card { box-shadow: inset 0 1px 0 var(--oldschool-orange-88-a10), inset 4px 0 0 var(--oldschool-red-35-a76), 0 12px 24px -16px var(--oldschool-ink-0-a90); }
:root[data-theme="oldschool"] .ui-card__title::before { background: linear-gradient(180deg, var(--oldschool-orange-63) 0%, var(--oldschool-red-35) 100%); }
:root[data-theme="oldschool"] .ui-btn { border-radius: 5px; letter-spacing: 0.1em; }
:root[data-theme="oldschool"] .ui-btn--primary { color: var(--color-text); background: linear-gradient(180deg, var(--oldschool-red-42) 0%, var(--oldschool-red-28) 100%); /* cream on red: 5.1:1 and up; the dark label was 1.7–2.8 */ box-shadow: inset 0 1px 0 var(--oldschool-orange-91-a18), 0 7px 16px -8px var(--oldschool-red-42-a72); }
:root[data-theme="oldschool"] .ui-field { box-shadow: inset 0 2px 0 var(--oldschool-ink-0-a52), inset 4px 0 0 var(--oldschool-orange-49-a78); }
:root[data-theme="oldschool"] .ui-nav { border-top: 2px solid var(--oldschool-orange-30); }
:root[data-theme="oldschool"] .ui-nav__tab[aria-current="page"] { color: var(--oldschool-orange-88); }
:root[data-theme="oldschool"] .ui-nav__tab[aria-current="page"]::before { background: var(--oldschool-orange-63); box-shadow: 0 0 10px var(--oldschool-orange-63-a45); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring { border: 2px solid var(--oldschool-orange-38); box-shadow: inset 0 0 0 8px var(--oldschool-orange-24-a28), inset 0 1px 0 var(--oldschool-orange-88-a14), 0 0 16px -8px var(--oldschool-orange-49-a64); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-label { color: var(--oldschool-orange-63); letter-spacing: 0.14em; }
:root[data-theme="oldschool"] .ui-badge { border-radius: 5px; border: 1px solid var(--oldschool-orange-49-a24); }
:root[data-theme="oldschool"] .ui-segmented { border: 1px solid var(--oldschool-orange-24); background: var(--oldschool-red-11); }
:root[data-theme="oldschool"] .ui-segmented__item[aria-selected="true"] { background: var(--oldschool-red-28-2); color: var(--oldschool-orange-88); }
:root[data-theme="dark"] .ui-card { border: 1px solid var(--atlas-gold-60-a14); box-shadow: inset 0 1px 0 var(--atlas-white-100-a7), inset 3px 0 0 var(--atlas-gold-60-a68), 0 12px 28px -16px var(--atlas-ink-0-a94); }
:root[data-theme="dark"] .ui-card__title::before { background: var(--color-gold-gradient); }
:root[data-theme="dark"] .ui-btn--primary { border: 1px solid var(--atlas-gold-68-a35); box-shadow: var(--shadow-gold), 0 0 0 1px var(--atlas-gold-60-a8); }
:root[data-theme="dark"] .ui-nav { border-top: 1px solid var(--atlas-gold-60-a32); }
:root[data-theme="dark"] .ui-nav__tab[aria-current="page"] { color: var(--atlas-gold-93); }
:root[data-theme="dark"] .scr-workout .scr-workout-ring { border: 2px solid var(--atlas-gold-34); box-shadow: inset 0 0 0 8px var(--atlas-grey-16-a34), var(--shadow-card), 0 0 18px -8px var(--atlas-gold-60-a52); }
/* Atlas, black and gold (owner 2026-11-10): no painted marble, no frieze, no dial ticks. The important card is a clean dark slab
   with a gold hairline and a soft light from above; the timer is a plain gold ring; the navigation keeps only its gold line. */
:root[data-theme="dark"] .ui-card--accent { border-color: var(--atlas-gold-60-a32); background-image: linear-gradient(180deg, var(--atlas-gold-60-a8) 0%, transparent 46%), var(--color-accent-card); }
/* Old School «Железный блин» (owner 2026-11-11): the athlete holds a cast-iron plate and the plate is the timer. The photo is sized and
   placed from the timer (like Cyberpunk), so the plate's rim lies on the timer's edge on any screen; the iron shows through, the rest
   runs as a copper stripe along the lip, the numbers are struck in the metal, and the hands (cut from the photo) lie over the rim. */
:root[data-theme="oldschool"] .scr-workout { --hero-under: calc(var(--ring-size, 194px) + 24px); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-hero {
  background-image: linear-gradient(to bottom, var(--color-bg) 0, transparent 64px, transparent calc(100% - 96px), var(--color-bg) 100%), var(--hero-workout); /* a longer, softer fade into the page */
  background-size: cover, calc(var(--ring-size, 194px) * var(--os-photo-w)) calc(var(--ring-size, 194px) * var(--os-photo-h));
  background-position: center, calc(50% + var(--ring-size, 194px) * var(--os-photo-x)) calc(var(--hero-h, 250px) + var(--ring-size, 194px) * var(--os-photo-y));
}
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring {
  border: 0; background: var(--os-plate-veil); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring:active { background: var(--os-plate-veil-pressed); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring[data-action="ring"] { animation: os-plate-gleam 4.5s ease-in-out infinite; }
@keyframes os-plate-gleam { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 16px var(--oldschool-orange-49-a24); } }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-svg { position: relative; z-index: 2; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-track { stroke: var(--os-plate-groove); stroke-width: 7; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-arc { stroke: var(--oldschool-orange-63); stroke-width: 7; filter: drop-shadow(0 0 3px var(--oldschool-orange-63-a45)); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-inner { z-index: 3; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-time { color: var(--oldschool-orange-88); text-shadow: var(--os-struck); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-label { color: var(--oldschool-orange-63); text-shadow: var(--os-struck); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-hint { color: var(--oldschool-orange-88); opacity: 0.78; text-shadow: var(--os-struck); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring::before {
  content: ""; position: absolute; z-index: 4; pointer-events: none;
  left: calc(var(--ring-size, 194px) * var(--os-hands-x)); top: calc(var(--ring-size, 194px) * var(--os-hands-y));
  width: calc(var(--ring-size, 194px) * var(--os-hands-w)); height: calc(var(--ring-size, 194px) * var(--os-hands-h));
  background: var(--os-hands) center / 100% 100% no-repeat;
}
/* Old School, the rest after a set (owner 2026-11-13, «очень красиво»). No flicker anywhere (a film flicker was tried in 2026-11 and looked like
   a broken screen); transform / opacity only. Behind the timer (the stage, screens/workout/screen.js): the window's rays breathing as if
   clouds pass, dust motes in them at two depths, the warm lamp, a chalk haze, a fine film grain. A set saved: a burst of chalk from both
   hands on the plate (over the timer), the haze stays in the light. The last 10 s: a warm film leak creeps in from the window side, the
   rays brighten; zero: a glint runs over the rim (data-rest-end, data-finale). */
:root[data-theme="oldschool"] .scr-workout .scr-workout-stage { display: block; position: absolute; inset: 0; pointer-events: none; overflow: hidden; } /* no z-index: the layers blend with the photo */
:root[data-theme="oldschool"] .scr-workout .scr-workout-stage > :where(i) { /* :where — a layer's own blend or display wins over this default */ display: none; position: absolute; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; mix-blend-mode: screen; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-stage > .scr-workout-os { display: block; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--rays {
  top: 0; left: 0; right: 0; height: calc(var(--hero-h, 250px) + var(--ring-size, 194px) * 0.9);
  background: var(--os-rays) right top / cover no-repeat; transform: scaleX(var(--os-rays-flip)); transform-origin: 50% 0;
}
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--motes,
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--motes-far { left: 0; right: 0; top: 0; -webkit-mask-image: var(--os-dust-mask); mask-image: var(--os-dust-mask); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--motes { height: calc(100% + 512px); background: var(--os-motes) 0 0 / 512px 512px repeat; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--motes-far { height: calc(100% + 300px); background: var(--os-motes) 140px 60px / 300px 300px repeat; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--lamp { top: 0; left: 50%; width: calc(var(--ring-size, 194px) * 2.2); height: calc(var(--ring-size, 194px) * 1.1); margin-left: calc(var(--ring-size, 194px) * -1.1); background: var(--os-lamp) center top / contain no-repeat; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--haze { /* two tiles wide, moved by one: no seam */
  left: 0; top: calc(var(--hero-h, 250px) - var(--ring-size, 194px) * 0.1); height: calc(var(--ring-size, 194px) * 0.9); width: calc(var(--ring-size, 194px) * 0.9 * 8);
  background: var(--os-haze) 0 50% / 50% 100% repeat-x;
}
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--leak { top: 0; bottom: 0; left: 0; right: 0; background: var(--os-leak) right center / cover no-repeat; transform: scaleX(var(--os-rays-flip)); }
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--grain { inset: -256px 0 0 0; background: var(--os-grain) 0 0 / 256px 256px repeat; mix-blend-mode: overlay; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"] .scr-workout-os--rays { opacity: 0.6; animation: os-rays-breathe 9s ease-in-out infinite; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"] .scr-workout-os--motes { opacity: 0.85; animation: os-motes-near 40s linear infinite; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"] .scr-workout-os--motes-far { opacity: 0.55; animation: os-motes-far 70s linear infinite; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"] .scr-workout-os--lamp { opacity: 0.4; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"] .scr-workout-os--haze { opacity: 0.45; animation: os-haze-drift 55s linear infinite; }
:root[data-theme="oldschool"] .scr-workout[data-chalk] .scr-workout-os--haze { opacity: 0.8; transition-duration: 0.6s; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"] .scr-workout-os--grain { opacity: 0.16; animation: os-grain-drift 14s linear infinite; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"][data-rest-end="soon"] .scr-workout-os--leak { opacity: 0.5; transition-duration: 3s; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"][data-rest-end="final"] .scr-workout-os--leak { opacity: 0.7; transition-duration: 1.5s; }
:root[data-theme="oldschool"] .scr-workout[data-timer="running"][data-rest-end="soon"] .scr-workout-os--rays,
:root[data-theme="oldschool"] .scr-workout[data-timer="running"][data-rest-end="final"] .scr-workout-os--rays { opacity: 0.85; }
@keyframes os-rays-breathe { 0%, 100% { opacity: 0.5; transform: scaleX(var(--os-rays-flip)) translate3d(0, 0, 0); } 50% { opacity: 0.78; transform: scaleX(var(--os-rays-flip)) translate3d(-1.5%, 0, 0); } }
@keyframes os-motes-near { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -512px, 0); } }
@keyframes os-motes-far { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -300px, 0); } }
@keyframes os-haze-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes os-grain-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 256px, 0); } }
/* over the timer: the chalk from both hands (a set saved) and the glint on the rim (zero) — transparent pictures, plain blending */
:root[data-theme="oldschool"] .scr-workout .scr-workout-timer-section::before {
  content: ""; position: absolute; z-index: 3; pointer-events: none; opacity: 0; /* over the plate and the arc, under the numbers (ring-inner, z 3, later) and the hands (z 4) */
  top: calc(var(--ring-size, 194px) * 0.05); left: 50%; width: min(calc(var(--ring-size, 194px) * 2.2), 100vw); height: calc(var(--ring-size, 194px) * 0.9); margin-left: calc(min(calc(var(--ring-size, 194px) * 2.2), 100vw) / -2); /* never wider than the screen */
  background: var(--os-chalk) left center / auto 100% no-repeat, var(--os-chalk) right center / auto 100% no-repeat;
}
:root[data-theme="oldschool"] .scr-workout[data-chalk] .scr-workout-timer-section::before { animation: os-chalk-clap 1.9s cubic-bezier(0.15, 0.75, 0.3, 1) 1 both; }
@keyframes os-chalk-clap {
  0% { opacity: 0; transform: translate3d(0, 4%, 0) scale(0.45); }
  9% { opacity: 1; transform: translate3d(0, 0, 0) scale(0.8); }
  100% { opacity: 0; transform: translate3d(0, -10%, 0) scale(1.18); }
}
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring::after {
  content: ""; position: absolute; z-index: 5; pointer-events: none; opacity: 0;
  left: calc(var(--ring-size, 194px) * 0.85 - var(--ring-size, 194px) * 0.2); top: calc(var(--ring-size, 194px) * 0.15 - var(--ring-size, 194px) * 0.2);
  width: calc(var(--ring-size, 194px) * 0.4); height: calc(var(--ring-size, 194px) * 0.4); background: var(--os-glint) center / contain no-repeat;
}
:root[data-theme="oldschool"] .scr-workout[data-finale] .scr-workout-ring::after { animation: os-glint 1.4s ease-out 1 both; }
@keyframes os-glint { /* the star rides the rim from the top-right down to the right, turning */
  0% { opacity: 0; transform: translate3d(-40%, -20%, 0) scale(0.3) rotate(0deg); }
  25% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(25deg); }
  100% { opacity: 0; transform: translate3d(25%, 90%, 0) scale(0.5) rotate(70deg); }
}
@media (prefers-reduced-motion: reduce) {
  :root[data-theme="oldschool"] .scr-workout .scr-workout-timer-section::before,
  :root[data-theme="oldschool"] .scr-workout .scr-workout-ring::after { display: none; animation: none; }
}
/* Old School profile (owner 2026-11-11): the head is at the very top of these portraits, so the photo starts --os-profile-top lower and the
   page colour melts into it from above: the face stays clear of «ПРОФИЛЬ» and the theme stones on any width. */
:root[data-theme="oldschool"] .scr-profile .scr-profile-hero {
  background-image: linear-gradient(to bottom, var(--color-bg) 0, transparent calc(var(--os-profile-top) + 28px)), linear-gradient(to bottom, transparent var(--hero-fade-profile-from), var(--hero-fade-profile) 78%, var(--color-bg) 100%), var(--hero-profile);
  background-size: cover, cover, var(--hero-own-size, cover);
  background-position: center, center, var(--hero-own-pos, center var(--os-profile-top)); /* the own picture goes where its owner put it */
}
/* Atlas workout (owner 2026-11-11): the athlete stands above the timer and the dial covers his shorts. The photo is sized and placed
   from the timer (like Cyberpunk), so this holds on any screen; fitHeadroom keeps the head under the top row (--cyber-head). The
   torso is in the light above the dial; from the timer's centre down the legs fade into black by its lower edge. */
:root[data-theme="dark"] .scr-workout .scr-workout-hero {
  background-image:
    linear-gradient(to bottom, var(--color-bg) 0%, transparent 12%, transparent calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * 0.52), var(--color-bg) calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * 1.05)),
    var(--hero-workout);
  background-size: cover, calc(var(--ring-size, 194px) * var(--atlas-photo-w)) calc(var(--ring-size, 194px) * var(--atlas-photo-h));
  background-position: center, calc(50% + var(--ring-size, 194px) * var(--atlas-photo-x)) calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * var(--atlas-photo-y));
}
/* Atlas body animation (2026-11-21): only the athlete deforms. The light banks and
   floor stay fixed; the existing fog remains above the photo without any changes. */
:root[data-theme="dark"] .scr-workout .scr-workout-hero[data-atlas-breathing="ready"] { background-image: none; }
:root[data-theme="dark"] .scr-workout .scr-workout-atlas-body {
  display: none; position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * 0.52), transparent calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * 1.05));
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * 0.52), transparent calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * 1.05));
}
:root[data-theme="dark"] .scr-workout .scr-workout-hero[data-atlas-breathing="ready"] .scr-workout-atlas-body { display: block; }
:root[data-theme="dark"] .scr-workout .scr-workout-atlas-canvas {
  display: block; position: absolute;
  width: calc(var(--ring-size, 194px) * var(--atlas-photo-w)); height: calc(var(--ring-size, 194px) * var(--atlas-photo-h));
  left: calc(50% + var(--ring-size, 194px) * (var(--atlas-photo-x) - var(--atlas-photo-w) / 2));
  top: calc(var(--hero-h, 250px) - 4px + var(--ring-size, 194px) * var(--atlas-photo-y));
}
:root[data-theme="dark"] .scr-workout[data-timer="running"] .scr-workout-ring-arc {
  filter: drop-shadow(0 0 calc(2px + var(--atlas-breath, 0) * 3px) var(--color-gold));
}
/* Atlas, the stage while resting (owner 2026-11-12; no spotlight beams since 2026-11-13). The rest begins: stage smoke rises from the floor and drifts while the rest runs; a set saved: the
   hall takes a few pictures, and now and then a camera flashes all through the rest (screens/workout/screen.js); transform/opacity only. */
:root[data-theme="dark"] .scr-workout .scr-workout-stage { display: block; position: absolute; inset: 0; pointer-events: none; overflow: hidden; } /* no z-index: no stacking context of its own, so the layers blend as «screen» with the photo itself */
/* Atlas «кино» (owner 2026-11-13). Layers from the back: the light behind the athlete, far haze, dust in that light, the hall's silhouettes,
   near smoke, the cameras. While a rest runs they fade in; the two fogs drift against each other at different speeds (depth), the dust
   rises; the backlight stays steady (no pulsing, 2026-11-13); in the last 3 s the hall flashes more, at zero one bright flash (data-rest-end, data-finale: screens/workout/screen.js). transform / opacity only. */
:root[data-theme="dark"] .scr-workout .scr-workout-stage > :where(i) { /* :where — a layer's own blend or display wins over this default */ position: absolute; display: block; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; mix-blend-mode: screen; }
:root[data-theme="dark"] .scr-workout .scr-workout-backlight {
  left: 50%; top: calc(var(--hero-h, 250px) * 0.02); width: calc(var(--ring-size, 194px) * 2.3); height: calc(var(--ring-size, 194px) * 2.3); margin-left: calc(var(--ring-size, 194px) * -1.15);
  background: var(--atlas-backlight) center / contain no-repeat; transition-duration: 1.1s;
}
:root[data-theme="dark"] .scr-workout .scr-workout-fog { left: 0; background-repeat: repeat-x; background-position: 0 100%; } /* both fade at the bottom: no hard edge */
:root[data-theme="dark"] .scr-workout .scr-workout-fog--far { -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%); mask-image: linear-gradient(to bottom, black 55%, transparent 100%); }
:root[data-theme="dark"] .scr-workout .scr-workout-fog--near { -webkit-mask-image: linear-gradient(to bottom, black 62%, transparent 100%); mask-image: linear-gradient(to bottom, black 62%, transparent 100%); }
:root[data-theme="dark"] .scr-workout .scr-workout-fog--far { /* two tiles wide (4 : 1 each), moved by one tile: no seam */
  bottom: calc(var(--ring-size, 194px) * 0.35); height: calc(var(--ring-size, 194px) * 0.95); width: calc(var(--ring-size, 194px) * 0.95 * 8);
  background-image: var(--atlas-fog-far); background-size: 50% 100%;
}
:root[data-theme="dark"] .scr-workout .scr-workout-fog--near {
  bottom: 0; height: calc(var(--ring-size, 194px) * 1.1); width: calc(var(--ring-size, 194px) * 1.1 * 8);
  background-image: var(--atlas-fog-near); background-size: 50% 100%;
}
:root[data-theme="dark"] .scr-workout .scr-workout-dust { /* a 512 px tile, two tiles tall, rising by one */
  left: 0; right: 0; top: 0; height: calc(100% + 512px); background: var(--atlas-dust) 0 0 / 512px 512px repeat;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 22%, black 0, transparent 100%); mask-image: radial-gradient(ellipse 70% 55% at 50% 22%, black 0, transparent 100%);
}
:root[data-theme="dark"] .scr-workout .scr-workout-stage > .scr-workout-crowd { /* the hall, at the foot of the stage: dark heads and raised phones (> : plain blending wins over the stage's «screen», which made the dark heads vanish) */
  /* the front row of the hall (owner 2026-11-14: «они должны подниматься впереди атлета»): big dark heads at the very bottom of the frame,
     over the athlete's legs — near and large reads as in front; small heads at his waist read as far behind. No glow behind them. */
  left: -6%; right: -6%; bottom: calc(var(--ring-size, 194px) * -0.08); height: calc(var(--ring-size, 194px) * 1.05); mix-blend-mode: normal;
  -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 100%); mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
  background: var(--atlas-crowd) center bottom / auto 100% repeat-x; transform: translate3d(0, 22%, 0); transition: opacity 1.6s ease, transform 1.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}
:root[data-theme="dark"] .scr-workout .scr-workout-crowd-glow { display: none; } /* the front row needs no light behind it */
:root[data-theme="dark"] .scr-workout[data-timer="running"] .scr-workout-backlight { opacity: 0.5; } /* a steady warm light: no breathing, no flares (owner 2026-11-13: «убери жёлтое моргание») */
:root[data-theme="dark"] .scr-workout[data-timer="running"] .scr-workout-fog--far { opacity: 0.7; animation: atlas-drift-left 70s linear infinite; }
:root[data-theme="dark"] .scr-workout[data-timer="running"] .scr-workout-fog--near { opacity: 0.85; animation: atlas-drift-right 40s linear infinite; }
:root[data-theme="dark"] .scr-workout[data-timer="running"] .scr-workout-dust { opacity: 0.75; animation: atlas-dust-rise 34s linear infinite; }
:root[data-theme="dark"] .scr-workout[data-timer="running"] .scr-workout-crowd { opacity: 1; transform: none; }
@keyframes atlas-drift-left { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes atlas-drift-right { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes atlas-dust-rise { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -512px, 0); } }
:root[data-theme="dark"] .scr-workout .scr-workout-cam { /* one camera: a hot core and the anamorphic streak, placed by --fx / --fy, sized by --fs */
  /* owner 2026-11-13: «практически не вижу вспышек» — bigger, a bright halo round the core and a wider streak */
  left: var(--fx, 12%); top: var(--fy, 70%); width: calc(var(--ring-size, 194px) * 2.2); height: calc(var(--ring-size, 194px) * 2.2); margin: calc(var(--ring-size, 194px) * -1.1) 0 0 calc(var(--ring-size, 194px) * -1.1);
  /* the hot white core on top: under the pictures (black, opaque) it was hidden */
  background: radial-gradient(circle 64px at 50% 50%, var(--atlas-flash-core) 0, var(--atlas-flash-core) 14%, var(--atlas-flash-halo) 42%, transparent 100%),
    var(--atlas-flare) center / 100% 22% no-repeat, var(--atlas-flash) center / 70% 70% no-repeat;
  transform: scale(var(--fs, 1)); transition: none;
}
:root[data-theme="dark"] .scr-workout .scr-workout-cam[data-on] { animation: atlas-camera-flash 520ms ease-out 1; }
/* Atlas profile (owner 2026-11-13): still — no fog, no camera flashes (tokens.css --profile-air none). */
@keyframes atlas-camera-flash { 0% { opacity: 0; } 5% { opacity: 1; } 30% { opacity: 0.7; } 100% { opacity: 0; } }
:root[data-theme="dark"] .scr-workout .scr-workout-ring-label { color: var(--atlas-gold-60); letter-spacing: 0.14em; }
:root[data-theme="atelier"] .ui-card { border: 1px solid var(--antique-orange-41-a26); box-shadow: inset 0 1px 0 var(--antique-gold-98-a90), inset 0 3px 0 var(--antique-orange-41-a22), 0 12px 22px -16px var(--antique-orange-23-a48); }
:root[data-theme="atelier"] .ui-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--antique-orange-41-a13); border-radius: 6px; pointer-events: none; }
:root[data-theme="atelier"] .ui-card__title::before { width: 5px; height: 34px; border-radius: 1px; background: linear-gradient(180deg, var(--antique-orange-64) 0%, var(--antique-orange-41) 100%); }
:root[data-theme="atelier"] .ui-header::after { width: 82px; height: 82px; background: linear-gradient(225deg, var(--antique-orange-53) 0%, var(--antique-orange-70) 49%, transparent 50%); opacity: 0.75; }
:root[data-theme="atelier"] .ui-btn { border-radius: 7px; font-family: var(--font-family); letter-spacing: 0.07em; }
:root[data-theme="atelier"] .ui-btn--primary { background: linear-gradient(180deg, var(--antique-orange-64) 0%, var(--antique-orange-49) 54%, var(--antique-orange-45) 100%); border: 1px solid var(--antique-orange-40); box-shadow: inset 0 1px 0 var(--antique-gold-98-a58), 0 8px 16px -8px var(--antique-orange-29-a60); }
:root[data-theme="atelier"] .ui-field { border: 1px solid var(--antique-orange-65); box-shadow: inset 0 2px 2px var(--antique-orange-23-a16), inset 0 3px 0 var(--antique-orange-41-a12); }
:root[data-theme="atelier"] .ui-nav { border-top: 2px solid var(--antique-orange-73); }
:root[data-theme="atelier"] .ui-nav__tab[aria-current="page"] { color: var(--antique-orange-25); }
:root[data-theme="atelier"] .ui-nav__tab[aria-current="page"]::before { background: var(--antique-orange-41); box-shadow: 0 0 8px var(--antique-orange-41-a36); }
:root[data-theme="atelier"] .ui-segmented { border: 1px solid var(--antique-orange-67); background: var(--antique-orange-78); }
:root[data-theme="atelier"] .ui-segmented__item[aria-selected="true"] { background: var(--antique-orange-94); color: var(--antique-orange-25); box-shadow: inset 0 1px 0 var(--antique-gold-98-a90), 0 2px 5px var(--antique-orange-23-a18); }
:root[data-theme="atelier"] .scr-workout .scr-workout-ring { border: 2px solid var(--antique-orange-49); box-shadow: inset 0 0 0 8px var(--antique-orange-78-a34), inset 0 1px 0 var(--antique-gold-98-a82), 0 0 16px -8px var(--antique-orange-41-a45); }
:root[data-theme="atelier"] .scr-workout .scr-workout-ring-label { color: var(--antique-orange-25); letter-spacing: 0.12em; }
:root[data-theme="atelier"] .scr-workout .scr-workout-ring-time { font-family: var(--font-dial); } /* Georgia's own figures on the dial only (owner 2026-11-13) */
:root[data-theme="atelier"] .ui-badge { border: 1px solid var(--antique-orange-67); border-radius: 6px; background: var(--antique-orange-84); color: var(--color-text-on-gold); } /* a light badge here: dark text */
:root[data-theme="oldschool"] .ui-btn--primary,
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring[data-action="ring"] { animation: oldschool-shimmer 4.5s ease-in-out infinite; }
:root[data-theme="oldschool"] .scr-workout .scr-workout-ring-arc { stroke: var(--color-gold-soft); }

:root[data-theme="ivory"] .ui-card,
:root[data-theme="ivory"] .ui-field,
:root[data-theme="ivory"] .ui-sheet,
:root[data-theme="ivory"] .ui-dialog { border: 1px solid rgba(182, 37, 60, 0.22); }
:root[data-theme="ivory"] .ui-card { position: relative; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 220, 210, 0.1), inset 4px 0 0 rgba(182, 37, 60, 0.78), 0 14px 24px -16px rgba(0, 0, 0, 0.92); }
:root[data-theme="ivory"] .ui-card::after { content: ""; position: absolute; top: 0; right: 0; width: 56px; height: 1px; background: #E07A70; transform: rotate(-45deg) translate(15px, -12px); transform-origin: center; opacity: 0.8; pointer-events: none; }
:root[data-theme="ivory"] .ui-header::after { width: 88px; height: 88px; background: linear-gradient(225deg, #B6253C 0%, #5B0D18 48%, transparent 49%); opacity: 0.9; }
:root[data-theme="ivory"] .ui-btn { border-radius: 2px; letter-spacing: 0.14em; }
:root[data-theme="ivory"] .ui-btn--primary { position: relative; overflow: hidden; background: linear-gradient(105deg, #8B1E30 0%, #B6253C 54%, #5A0F1D 100%); box-shadow: inset 0 1px 0 rgba(255, 240, 230, 0.18), 0 0 0 1px rgba(224, 122, 112, 0.28), 0 12px 22px -10px rgba(182, 37, 60, 0.75); }
:root[data-theme="ivory"] .ui-btn--primary::after { content: ""; position: absolute; top: 0; right: -18px; width: 44px; height: 100%; background: rgba(255, 236, 228, 0.12); transform: skewX(-24deg); pointer-events: none; }
:root[data-theme="ivory"] .ui-field { background: linear-gradient(180deg, #12090C 0%, #211116 100%); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.58), inset 4px 0 0 rgba(91, 13, 24, 0.9); }
:root[data-theme="ivory"] .ui-nav { border-top: 2px solid #5B0D18; }
:root[data-theme="ivory"] .ui-nav__tab[aria-current="page"] { color: #F4E7DE; text-shadow: 0 0 10px rgba(224, 122, 112, 0.35); }
:root[data-theme="ivory"] .ui-nav__tab[aria-current="page"]::before { background: #E07A70; box-shadow: 0 0 12px rgba(224, 122, 112, 0.72); }
:root[data-theme="ivory"] .ui-badge { border-radius: 2px; border: 1px solid rgba(224, 122, 112, 0.26); }
:root[data-theme="ivory"] .ui-segmented { border-radius: 3px; border: 1px solid #48222A; background: #12090C; }
:root[data-theme="ivory"] .ui-segmented__item[aria-selected="true"] { background: #5B0D18; color: #F4E7DE; box-shadow: inset 0 1px 0 rgba(255, 220, 210, 0.14), 0 0 10px -4px rgba(182, 37, 60, 0.7); }
:root[data-theme="ivory"] .scr-workout .scr-workout-ring { border: 2px solid #8B1E30; box-shadow: inset 0 0 0 8px rgba(91, 13, 24, 0.24), inset 0 1px 0 rgba(255, 220, 210, 0.14), 0 0 24px -8px rgba(182, 37, 60, 0.9); }
:root[data-theme="ivory"] .scr-workout .scr-workout-ring-label { color: #E07A70; letter-spacing: 0.16em; }
:root[data-theme="ivory"] .scr-workout .scr-workout-ring-time { text-shadow: 0 0 16px rgba(224, 122, 112, 0.42); }
:root[data-theme="ivory"] .scr-profile .scr-profile-hero::before,
:root[data-theme="ivory"] .scr-profile .scr-profile-hero::after { display: block; content: ""; position: absolute; z-index: 0; pointer-events: none; mix-blend-mode: screen; }
:root[data-theme="ivory"] .scr-profile .scr-profile-hero::before { top: 0; left: 51%; width: 34%; height: 58%; background: radial-gradient(ellipse 38% 62% at 50% 86%, rgba(255, 247, 239, 0.62) 0%, rgba(244, 231, 222, 0.42) 24%, rgba(224, 122, 112, 0.24) 48%, rgba(182, 37, 60, 0.08) 64%, transparent 82%); filter: blur(5px); animation: yujiro-steam-a 6.8s ease-in-out infinite; }
:root[data-theme="ivory"] .scr-profile .scr-profile-hero::after { top: -2%; left: 62%; width: 26%; height: 55%; background: radial-gradient(ellipse 34% 65% at 45% 92%, rgba(255, 252, 246, 0.46) 0%, rgba(244, 231, 222, 0.28) 30%, rgba(224, 122, 112, 0.18) 54%, transparent 80%); filter: blur(7px); animation: yujiro-steam-b 8.4s ease-in-out 0.8s infinite; }
:root[data-theme="ivory"] .scr-profile .scr-profile-hero::before,
:root[data-theme="ivory"] .scr-profile .scr-profile-hero::after { display: none; animation: none; }
:root[data-theme="ivory"] .scr-workout .scr-workout-hero::before,
:root[data-theme="ivory"] .scr-workout .scr-workout-hero::after { content: ""; position: absolute; z-index: 1; pointer-events: none; mix-blend-mode: screen; }
:root[data-theme="ivory"] .scr-workout .scr-workout-hero::before { top: 8%; left: 24%; width: 52%; height: 72%; z-index: 3; background: radial-gradient(ellipse 38% 65% at 50% 92%, rgba(255, 247, 239, 0.84) 0%, rgba(244, 231, 222, 0.58) 25%, rgba(224, 122, 112, 0.34) 48%, rgba(182, 37, 60, 0.12) 66%, transparent 84%); filter: blur(3px); animation: yujiro-body-steam-strong 6.2s ease-in-out infinite; }
:root[data-theme="ivory"] .scr-workout .scr-workout-hero::after { top: 18%; left: 48%; width: 32%; height: 58%; z-index: 3; background: radial-gradient(ellipse 32% 64% at 46% 92%, rgba(255, 252, 246, 0.72) 0%, rgba(244, 231, 222, 0.42) 30%, rgba(224, 122, 112, 0.22) 52%, transparent 82%); filter: blur(5px); animation: yujiro-body-steam-b 7.5s ease-in-out 0.6s infinite; }
:root[data-theme="ivory"] .scr-workout .scr-workout-timer-section::before { content: ""; position: absolute; z-index: 4; top: -190px; left: 27%; width: 46%; height: 190px; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(ellipse 34% 60% at 45% 96%, rgba(255, 250, 242, 0.9) 0%, rgba(244, 231, 222, 0.64) 25%, rgba(224, 122, 112, 0.38) 48%, rgba(182, 37, 60, 0.12) 68%, transparent 86%); filter: blur(4px); animation: yujiro-body-steam-strong 5.8s ease-in-out 0.2s infinite; }
:root[data-theme="ivory"] .scr-workout .scr-workout-timer-section::after { content: ""; position: absolute; z-index: 4; top: -170px; left: 48%; width: 26%; height: 170px; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(ellipse 30% 62% at 44% 96%, rgba(255, 255, 248, 0.7) 0%, rgba(244, 231, 222, 0.42) 32%, rgba(224, 122, 112, 0.2) 56%, transparent 84%); filter: blur(6px); animation: yujiro-steam-b 7.2s ease-in-out 0.7s infinite; }
@media (prefers-reduced-motion: reduce) {
  :root[data-theme="ivory"] .scr-profile .scr-profile-hero::before,
  :root[data-theme="ivory"] .scr-profile .scr-profile-hero::after,
  :root[data-theme="ivory"] .scr-workout .scr-workout-hero::before,
  :root[data-theme="ivory"] .scr-workout .scr-workout-hero::after { animation: none; opacity: 0.14; }
  :root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::before,
  :root[data-theme="cyberpunk"] .scr-workout .scr-workout-hero::after,
  :root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::before,
  :root[data-theme="cyberpunk"] .scr-profile .scr-profile-hero::after { animation: none; opacity: 0.12; }
}
:root[data-theme="ivory"] .ui-card__title::before { background: linear-gradient(180deg, #E07A70 0%, #B6253C 100%); }
:root[data-theme="ivory"] .ui-btn--primary,
:root[data-theme="ivory"] .ui-nav__tab[aria-current="page"],
:root[data-theme="ivory"] .scr-workout .scr-workout-ring[data-action="ring"] { animation: darkside-pulse 3.8s ease-in-out infinite; }
:root[data-theme="ivory"] .scr-workout .scr-workout-ring-arc { stroke: var(--color-gold-soft); }
:root[data-theme="ivory"] .ui-nav__tab[aria-current="page"]::before { height: 3px; }
@media (prefers-reduced-motion: reduce) {
  :root[data-theme="cyberpunk"] body,
  :root[data-theme="cyberpunk"] .ui-btn--primary,
  :root[data-theme="cyberpunk"] .ui-nav__tab[aria-current="page"],
  :root[data-theme="cyberpunk"] .scr-workout .scr-workout-ring[data-action="ring"],
  :root[data-theme="oldschool"] .ui-btn--primary,
  :root[data-theme="oldschool"] .scr-workout .scr-workout-ring[data-action="ring"],
  :root[data-theme="ivory"] .ui-btn--primary,
  :root[data-theme="ivory"] .ui-nav__tab[aria-current="page"],
  :root[data-theme="ivory"] .scr-workout .scr-workout-ring[data-action="ring"] { animation: none; }
}
.ui-theme-btn--new .ui-theme-btn__stones::after { content: ""; position: absolute; inset: -3px; border: 2px solid var(--color-gold-soft); border-radius: 16px; animation: ui-theme-breathe 2.6s ease-in-out infinite; }
.ui-theme-btn__label { letter-spacing: var(--tracking-caps); animation: ui-theme-label 2.6s ease-in-out infinite; }
@keyframes ui-theme-breathe { 0%, 100% { opacity: 0.2; transform: scale(0.94); box-shadow: none; } 50% { opacity: 1; transform: scale(1.06); box-shadow: var(--gold-glow-strong); } }
@keyframes ui-theme-label { 0%, 100% { opacity: 0.72; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ui-theme-btn--new .ui-theme-btn__stones::after, .ui-theme-btn__label { animation: none; opacity: 1; }
  .ui-theme-arch, .ui-theme-arch__photo, .ui-theme-arch__side, .ui-theme-arch__open, .ui-theme-arch__check { transition: none; }
}

/* «Что просело» */
.ui-decline { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) 0; }
.ui-decline + .ui-decline { border-top: 1px solid var(--color-divider); }
.ui-decline__name { margin: 0; font: var(--font-label); font-weight: 600; overflow-wrap: anywhere; }
.ui-decline__item { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-2); margin: 0; font: var(--font-caption); color: var(--color-text-secondary); }
.ui-decline__type { color: var(--color-text); }
.ui-decline__percent { color: var(--color-danger); }
.ui-decline__hint { margin: var(--space-1) 0 0; }

/* the air of the dark profile: screens/profile/screen.css */
/* the fog drifts one way without end: one tile, half of the layer, in one cycle */
@keyframes ui-air-haze { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
/* in 47 s: four wide flares on the stage lights (200 ms) and the hall's cameras: 14 moments, some taken by two or three people, 350 ms or more apart.
   A camera lights at once and dies in about 100 ms; the closer to the stage, the bigger and brighter. Generated, none of them on the athlete or the text. */
@keyframes ui-air-glint {
  0%, 3.404% { opacity: 0; transform: translate(-10.25%, -4.3%) scale(0.095, 0.166); }
  3.436% { opacity: 0.83; transform: translate(-10.25%, -4.3%) scale(0.095, 0.166); }
  3.628% { opacity: 0; transform: translate(-10.25%, -4.3%) scale(0.095, 0.166); }
  3.638%, 6.809% { opacity: 0; transform: translate(5.2%, -1.8%) scale(0.101, 0.177); }
  6.84% { opacity: 0.85; transform: translate(5.2%, -1.8%) scale(0.101, 0.177); }
  7.032% { opacity: 0; transform: translate(5.2%, -1.8%) scale(0.101, 0.177); }
  7.042%, 7.872% { opacity: 0; transform: translate(3.25%, -5.7%) scale(0.091, 0.16); }
  7.904% { opacity: 0.82; transform: translate(3.25%, -5.7%) scale(0.091, 0.16); }
  8.096% { opacity: 0; transform: translate(3.25%, -5.7%) scale(0.091, 0.16); }
  8.106%, 10.638% { opacity: 0; transform: translate(0%, 0%); }
  10.766% { opacity: 1; transform: translate(0%, 0%); }
  11.064% { opacity: 0; transform: translate(0%, 0%); }
  11.074%, 15.745% { opacity: 0; transform: translate(-0.75%, -11.3%) scale(0.077, 0.134); }
  15.777% { opacity: 0.78; transform: translate(-0.75%, -11.3%) scale(0.077, 0.134); }
  15.968% { opacity: 0; transform: translate(-0.75%, -11.3%) scale(0.077, 0.134); }
  15.978%, 20.426% { opacity: 0; transform: translate(31.1%, 15%) scale(0.145, 0.253); }
  20.457% { opacity: 0.96; transform: translate(31.1%, 15%) scale(0.145, 0.253); }
  20.649% { opacity: 0; transform: translate(31.1%, 15%) scale(0.145, 0.253); }
  20.659%, 21.277% { opacity: 0; transform: translate(27.9%, 12.6%) scale(0.138, 0.242); }
  21.309% { opacity: 0.94; transform: translate(27.9%, 12.6%) scale(0.138, 0.242); }
  21.5% { opacity: 0; transform: translate(27.9%, 12.6%) scale(0.138, 0.242); }
  21.510%, 22.766% { opacity: 0; transform: translate(35.2%, 20.7%) scale(0.159, 0.279); }
  22.798% { opacity: 1; transform: translate(35.2%, 20.7%) scale(0.159, 0.279); }
  22.989% { opacity: 0; transform: translate(35.2%, 20.7%) scale(0.159, 0.279); }
  22.999%, 28.511% { opacity: 0; transform: translate(-1.3%, -8.3%) scale(0.085, 0.148); }
  28.543% { opacity: 0.8; transform: translate(-1.3%, -8.3%) scale(0.085, 0.148); }
  28.734% { opacity: 0; transform: translate(-1.3%, -8.3%) scale(0.085, 0.148); }
  28.744%, 32.34% { opacity: 0; transform: translate(-9.45%, -2.5%) scale(0.099, 0.174); }
  32.372% { opacity: 0.84; transform: translate(-9.45%, -2.5%) scale(0.099, 0.174); }
  32.564% { opacity: 0; transform: translate(-9.45%, -2.5%) scale(0.099, 0.174); }
  32.574%, 36.17% { opacity: 0; transform: translate(25%, 0%); }
  36.298% { opacity: 1; transform: translate(25%, 0%); }
  36.596% { opacity: 0; transform: translate(25%, 0%); }
  36.606%, 41.064% { opacity: 0; transform: translate(35.6%, -11.1%) scale(0.077, 0.135); }
  41.096% { opacity: 0.79; transform: translate(35.6%, -11.1%) scale(0.077, 0.135); }
  41.287% { opacity: 0; transform: translate(35.6%, -11.1%) scale(0.077, 0.135); }
  41.297%, 42.128% { opacity: 0; transform: translate(31.1%, -12%) scale(0.075, 0.131); }
  42.16% { opacity: 0.78; transform: translate(31.1%, -12%) scale(0.075, 0.131); }
  42.351% { opacity: 0; transform: translate(31.1%, -12%) scale(0.075, 0.131); }
  42.361%, 47.872% { opacity: 0; transform: translate(-4.55%, 5.6%) scale(0.12, 0.211); }
  47.904% { opacity: 0.9; transform: translate(-4.55%, 5.6%) scale(0.12, 0.211); }
  48.096% { opacity: 0; transform: translate(-4.55%, 5.6%) scale(0.12, 0.211); }
  48.106%, 53.404% { opacity: 0; transform: translate(35.2%, -5.1%) scale(0.093, 0.162); }
  53.436% { opacity: 0.83; transform: translate(35.2%, -5.1%) scale(0.093, 0.162); }
  53.628% { opacity: 0; transform: translate(35.2%, -5.1%) scale(0.093, 0.162); }
  53.638%, 54.255% { opacity: 0; transform: translate(35.1%, -2.8%) scale(0.099, 0.173); }
  54.287% { opacity: 0.84; transform: translate(35.1%, -2.8%) scale(0.099, 0.173); }
  54.479% { opacity: 0; transform: translate(35.1%, -2.8%) scale(0.099, 0.173); }
  54.489%, 55.745% { opacity: 0; transform: translate(31.95%, -10.3%) scale(0.079, 0.139); }
  55.777% { opacity: 0.79; transform: translate(31.95%, -10.3%) scale(0.079, 0.139); }
  55.968% { opacity: 0; transform: translate(31.95%, -10.3%) scale(0.079, 0.139); }
  55.978%, 61.702% { opacity: 0; transform: translate(-5%, 0%); }
  61.83% { opacity: 1; transform: translate(-5%, 0%); }
  62.128% { opacity: 0; transform: translate(-5%, 0%); }
  62.138%, 66.809% { opacity: 0; transform: translate(28%, -0.6%) scale(0.104, 0.183); }
  66.84% { opacity: 0.86; transform: translate(28%, -0.6%) scale(0.104, 0.183); }
  67.032% { opacity: 0; transform: translate(28%, -0.6%) scale(0.104, 0.183); }
  67.042%, 70.213% { opacity: 0; transform: translate(29.4%, 2.7%) scale(0.113, 0.198); }
  70.245% { opacity: 0.88; transform: translate(29.4%, 2.7%) scale(0.113, 0.198); }
  70.436% { opacity: 0; transform: translate(29.4%, 2.7%) scale(0.113, 0.198); }
  70.446%, 71.489% { opacity: 0; transform: translate(23.95%, 4.9%) scale(0.119, 0.207); }
  71.521% { opacity: 0.89; transform: translate(23.95%, 4.9%) scale(0.119, 0.207); }
  71.713% { opacity: 0; transform: translate(23.95%, 4.9%) scale(0.119, 0.207); }
  71.723%, 77.021% { opacity: 0; transform: translate(20.65%, -8.2%) scale(0.085, 0.148); }
  77.053% { opacity: 0.81; transform: translate(20.65%, -8.2%) scale(0.085, 0.148); }
  77.245% { opacity: 0; transform: translate(20.65%, -8.2%) scale(0.085, 0.148); }
  77.255%, 82.766% { opacity: 0; transform: translate(34.35%, -2.2%) scale(0.1, 0.175); }
  82.798% { opacity: 0.85; transform: translate(34.35%, -2.2%) scale(0.1, 0.175); }
  82.989% { opacity: 0; transform: translate(34.35%, -2.2%) scale(0.1, 0.175); }
  82.999%, 87.234% { opacity: 0; transform: translate(30%, 0%); }
  87.362% { opacity: 1; transform: translate(30%, 0%); }
  87.66% { opacity: 0; transform: translate(30%, 0%); }
  87.670%, 92.766% { opacity: 0; transform: translate(1%, 1.6%) scale(0.11, 0.193); }
  92.798% { opacity: 0.87; transform: translate(1%, 1.6%) scale(0.11, 0.193); }
  92.989% { opacity: 0; transform: translate(1%, 1.6%) scale(0.11, 0.193); }
  92.999%, 93.83% { opacity: 0; transform: translate(-2.8%, -4.3%) scale(0.095, 0.166); }
  93.862% { opacity: 0.83; transform: translate(-2.8%, -4.3%) scale(0.095, 0.166); }
  94.053% { opacity: 0; transform: translate(-2.8%, -4.3%) scale(0.095, 0.166); }
  94.063%, 95.532% { opacity: 0; transform: translate(-1.9%, 2.6%) scale(0.113, 0.197); }
  95.564% { opacity: 0.88; transform: translate(-1.9%, 2.6%) scale(0.113, 0.197); }
  95.755%, 100% { opacity: 0; transform: translate(-1.9%, 2.6%) scale(0.113, 0.197); }
}

/* swipe a row left: shared/ui/swipe.js. The row's own children move, so no screen's markup changes */
.ui-swipe-row { position: relative; overflow: hidden; }
.ui-swipe-row > *:not(.ui-swipe-action) { transform: translate3d(var(--swipe-x, 0), 0, 0); }
.ui-swipe-row--settle > * { transition: transform 200ms var(--ease); }
.ui-swipe-action { position: absolute; top: 0; right: 0; bottom: 0; width: 88px; padding: 0; border: 0; border-radius: 0; background: var(--color-danger-fill); color: var(--color-text-on-danger); font: var(--font-label); font-weight: 700; cursor: pointer; transform: translate3d(calc(88px + var(--swipe-x, 0px)), 0, 0); }
@media (prefers-reduced-motion: reduce) { .ui-swipe-row--settle > * { transition: none; } }
@media (hover: none) and (pointer: coarse) {
  :root [data-swipe-delete][data-swipe-delete] { position: absolute; width: 1px; min-width: 0; height: 1px; min-height: 0; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
}

/* Final Yujiro steam composition: no profile steam, two narrow shoulder wisps on workout. */
@keyframes yujiro-side-steam-final { 0%, 100% { opacity: 0.18; transform: translate3d(0, 10px, 0) rotate(-5deg) scaleY(0.9); } 45% { opacity: 0.64; transform: translate3d(10px, -8px, 0) rotate(5deg) scaleY(1.08); } 78% { opacity: 0.32; transform: translate3d(-6px, -30px, 0) rotate(-3deg) scaleY(1.18); } }
:root[data-theme="ivory"] .scr-profile .scr-profile-hero::before,
:root[data-theme="ivory"] .scr-profile .scr-profile-hero::after { display: none; animation: none; }
:root[data-theme="ivory"] .scr-workout .scr-workout-hero::before,
:root[data-theme="ivory"] .scr-workout .scr-workout-hero::after { display: none; animation: none; }
:root[data-theme="ivory"] .scr-workout .scr-workout-timer-section::before { content: ""; position: absolute; z-index: 4; top: -138px; left: 10%; width: 21%; height: 146px; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(ellipse 38% 68% at 50% 100%, rgba(255, 250, 242, 0.72) 0%, rgba(244, 231, 222, 0.38) 36%, rgba(224, 122, 112, 0.13) 58%, transparent 82%); filter: blur(3px); animation: yujiro-side-steam-final 5.6s ease-in-out infinite; }
:root[data-theme="ivory"] .scr-workout .scr-workout-timer-section::after { content: ""; position: absolute; z-index: 4; top: -142px; right: 10%; width: 21%; height: 150px; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(ellipse 38% 68% at 50% 100%, rgba(255, 250, 242, 0.68) 0%, rgba(244, 231, 222, 0.34) 36%, rgba(224, 122, 112, 0.13) 58%, transparent 82%); filter: blur(3px); animation: yujiro-side-steam-final 6.4s ease-in-out 0.9s infinite reverse; }

/* Physical steam pass. Each wisp only rises, expands and fades. There is no reverse motion. */
@keyframes yujiro-steam-rise-left { 0% { opacity: 0; transform: translate3d(-2px, 12px, 0) scale(0.58, 0.72); } 16% { opacity: 0.5; } 62% { opacity: 0.34; } 100% { opacity: 0; transform: translate3d(18px, -104px, 0) scale(1.35, 1.68); } }
@keyframes yujiro-steam-rise-right { 0% { opacity: 0; transform: translate3d(2px, 14px, 0) scale(0.56, 0.7); } 18% { opacity: 0.46; } 58% { opacity: 0.3; } 100% { opacity: 0; transform: translate3d(-15px, -112px, 0) scale(1.3, 1.72); } }
:root[data-theme="ivory"] .scr-workout .scr-workout-timer-section::before { top: -118px; left: 11%; width: 19%; height: 126px; background: radial-gradient(ellipse 42% 70% at 50% 98%, rgba(255, 250, 242, 0.78) 0%, rgba(244, 231, 222, 0.4) 30%, rgba(224, 122, 112, 0.12) 58%, transparent 82%); filter: blur(3px); animation: yujiro-steam-rise-left 5.4s cubic-bezier(.25, .72, .42, 1) infinite; will-change: transform, opacity; }
:root[data-theme="ivory"] .scr-workout .scr-workout-timer-section::after { top: -122px; right: 11%; width: 19%; height: 130px; background: radial-gradient(ellipse 42% 70% at 50% 98%, rgba(255, 250, 242, 0.72) 0%, rgba(244, 231, 222, 0.36) 30%, rgba(224, 122, 112, 0.11) 58%, transparent 82%); filter: blur(3px); animation: yujiro-steam-rise-right 6.1s cubic-bezier(.25, .72, .42, 1) 1.8s infinite; will-change: transform, opacity; }
:root[data-theme="ivory"] .scr-workout[data-steam="off"] .scr-workout-timer-section::before,
:root[data-theme="ivory"] .scr-workout[data-steam="off"] .scr-workout-timer-section::after,
:root[data-theme="ivory"] .scr-workout[data-steam="armed"] .scr-workout-timer-section::before,
:root[data-theme="ivory"] .scr-workout[data-steam="armed"] .scr-workout-timer-section::after { display: none; animation: none; }

/* Anime pass: replace the soft gradients with an inked, cel-shaded steam sprite. */
@keyframes yujiro-anime-steam-left { 0% { opacity: 0; transform: translate3d(-4px, 18px, 0) scale(0.72); } 18% { opacity: 0.86; } 100% { opacity: 0; transform: translate3d(15px, -132px, 0) scale(1.08); } }
@keyframes yujiro-anime-steam-right { 0% { opacity: 0; transform: translate3d(4px, 20px, 0) scale(0.7); } 18% { opacity: 0.8; } 100% { opacity: 0; transform: translate3d(-14px, -138px, 0) scale(1.06); } }
:root[data-theme="ivory"] .scr-workout .scr-workout-timer-section::before { top: -158px; left: 8%; width: 28%; height: 162px; background: url("/app/assets/darkside_anime_steam.webp") center / contain no-repeat; filter: drop-shadow(0 0 8px rgba(224, 122, 112, 0.28)); animation: yujiro-anime-steam-left 5.8s cubic-bezier(.2, .75, .35, 1) infinite; }
:root[data-theme="ivory"] .scr-workout .scr-workout-timer-section::after { top: -162px; right: 8%; width: 28%; height: 166px; background: url("/app/assets/darkside_anime_steam.webp") center / contain no-repeat; filter: drop-shadow(0 0 8px rgba(224, 122, 112, 0.24)); animation: yujiro-anime-steam-right 6.4s cubic-bezier(.2, .75, .35, 1) 1.2s infinite; }

/* Barcode sheet (shared/ui/barcode.js): the camera, where the browser reads codes, and the digits field always. */
.ui-scan { display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: var(--space-2); }
.ui-scan__camera { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-card); overflow: hidden; background: var(--color-ring-core); }
.ui-scan__camera[hidden] { display: none; }
.ui-scan__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-scan__frame { position: absolute; left: 5%; right: 5%; top: 22%; bottom: 22%; border: 2px solid var(--color-gold-soft); border-radius: var(--radius-row); pointer-events: none; }
.ui-scan__line { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: var(--color-crimson); opacity: 0; pointer-events: none; }
.ui-scan__camera[data-scan="on"] .ui-scan__line { opacity: 0.85; animation: ui-scan-line 1.6s ease-in-out infinite alternate; }
@keyframes ui-scan-line { from { top: 28%; } to { top: 72%; } }
@media (prefers-reduced-motion: reduce) { .ui-scan__camera[data-scan="on"] .ui-scan__line { animation: none; } }
.ui-scan__status { margin: 0; }
.ui-scan__row { display: flex; gap: var(--space-2); }
.ui-scan__input { flex: 1; min-width: 0; margin: 0; letter-spacing: 0.06em; }

/* «Вход на другом устройстве» (shared/ui/device-link.js): the QR on its own white square, the key large enough to type */
.ui-link { display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: var(--space-2); }
.ui-link p { margin: 0; }
.ui-link__qr { align-self: center; width: min(240px, 70vw); aspect-ratio: 1; border-radius: var(--radius-row); overflow: hidden; }
.ui-link__qr svg { display: block; width: 100%; height: 100%; }
.ui-link__key { align-self: center; font: var(--font-title); letter-spacing: 0.12em; color: var(--color-text); }
.ui-link__how { text-align: center; }
.ui-link__title { font: var(--font-card-title); color: var(--color-text); }
.ui-link__own { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--color-divider); }
.ui-link__code { align-self: center; font: var(--font-value); letter-spacing: 0.06em; color: var(--color-gold-soft); }
/* the request of another device: who asks and when, «Впустить» / «Не впускать» (owner 2026-11-14) */
.ui-link__ask { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-link__device { font: var(--font-title); color: var(--color-text); overflow-wrap: anywhere; }
/* «Устройства» (shared/ui/devices.js): one row per signed-in device, «Выйти» beside it */
.ui-devices { display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: var(--space-2); }
.ui-devices p { margin: 0; }
.ui-devices__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ui-devices__item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-row); background: var(--color-surface); }
.ui-devices__text { flex: 1 1 160px; min-width: 0; }
.ui-devices__name { font: var(--font-card-title); color: var(--color-text); overflow-wrap: anywhere; }
.ui-devices__mark { color: var(--color-gold-soft); }
.ui-devices__item .ui-btn { min-height: 44px; }
.ui-devices__confirm { flex: 1 1 100%; display: flex; flex-direction: column; gap: var(--space-2); }

/* ── Lumen (owner 2026-11-13): a light gym with Valkyrie Voss. Cream stone, matte metal, soft daylight, champagne gold.
   Every colour is a token of theme/tokens.css (:root[data-theme="lumen"]); nothing here touches the other themes. ── */
.ui-theme-arch[data-preview="lumen"] { --p-male: var(--preview-lumen-male); --p-female: var(--preview-lumen-female); --p-bg: var(--preview-lumen-bg); --p-slab: var(--preview-lumen-slab); --p-accent: var(--preview-lumen-accent); --p-ink: var(--preview-lumen-ink); --p-veil: var(--preview-lumen-veil); }
.ui-theme-btn__stone--lumen { background: linear-gradient(135deg, var(--preview-lumen-slab), var(--preview-lumen-accent)); }

/* the material: quiet cream slabs with a hairline of champagne, soft warm shadows, controls with a thin gold edge */
:root[data-theme="lumen"] .ui-card,
:root[data-theme="lumen"] .ui-sheet,
:root[data-theme="lumen"] .ui-dialog { border: 1px solid var(--lumen-glass-border); }
:root[data-theme="lumen"] .ui-btn--secondary { border: 1px solid var(--lumen-hairline); }
:root[data-theme="lumen"] .ui-segmented { border: 1px solid var(--lumen-glass-border); }
:root[data-theme="lumen"] .ui-segmented__item[aria-selected="true"] { color: var(--color-gold-soft); box-shadow: inset 0 0 0 1px var(--lumen-hairline), var(--shadow-key); }
:root[data-theme="lumen"] .ui-toggle__track { box-shadow: inset 0 0 0 1px var(--lumen-glass-border), var(--shadow-field); }
:root[data-theme="lumen"] .ui-field { border: 1px solid var(--color-field-border); }
:root[data-theme="lumen"] .ui-nav { border-top: 1px solid var(--lumen-glass-border); }
:root[data-theme="lumen"] .ui-nav__tab[aria-current="page"]::before { background: var(--lumen-rim-deep); }

/* Workout: Valkyrie holds the plate and the plate is under the timer. The photo is sized and placed from the timer exactly like Old School
   (--os-photo-*: the rim on the timer's edge on any screen; fitHeadroom keeps the head under the top row through --cyber-head). The page
   colour melts in at the top and the bottom; a soft daylight haze lies only over the windows high in the photo, never on her face. */
:root[data-theme="lumen"] .scr-workout { --hero-under: calc(var(--ring-size, 194px) + 24px); }
:root[data-theme="lumen"] .scr-workout .scr-workout-hero {
  background-image: linear-gradient(to bottom, var(--color-bg) 0, transparent 64px, transparent calc(100% - 96px), var(--color-bg) 100%), var(--hero-workout); /* a longer, softer fade into the page */
  background-size: cover, calc(var(--ring-size, 194px) * var(--os-photo-w)) calc(var(--ring-size, 194px) * var(--os-photo-h));
  background-position: center, calc(50% + var(--ring-size, 194px) * var(--os-photo-x)) calc(var(--hero-h, 250px) + var(--ring-size, 194px) * var(--os-photo-y));
}
:root[data-theme="lumen"] .scr-workout .scr-workout-hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 46%; pointer-events: none; background: var(--lumen-haze); }
/* the timer: matte frosted glass on the iron plate, a champagne rim, graphite numbers; the running rest glows softly in gold */
:root[data-theme="lumen"] .scr-workout .scr-workout-ring {
  border: 2px solid var(--lumen-rim); background: var(--color-ring-core);
  -webkit-backdrop-filter: blur(10px) saturate(1.05); backdrop-filter: blur(10px) saturate(1.05);
  box-shadow: inset 0 1px 0 var(--lumen-glass), 0 10px 24px -14px var(--lumen-glass-border);
}
:root[data-theme="lumen"] .scr-workout[data-timer="running"] .scr-workout-ring { box-shadow: var(--lumen-ring-glow); }
:root[data-theme="lumen"] .scr-workout .scr-workout-ring:active { background: var(--color-field); }
:root[data-theme="lumen"] .scr-workout .scr-workout-ring-track { stroke: var(--lumen-track); }
:root[data-theme="lumen"] .scr-workout .scr-workout-ring-arc { stroke: var(--lumen-rim-deep); filter: var(--gold-glow-arc); }
:root[data-theme="lumen"] .scr-workout .scr-workout-ring-time { color: var(--color-text); }
:root[data-theme="lumen"] .scr-workout .scr-workout-ring-label { color: var(--color-gold-soft); letter-spacing: 0.12em; }
:root[data-theme="lumen"] .scr-workout .scr-workout-ring-hint { color: var(--color-text-secondary); }
/* she holds the timer (owner 2026-11-13, «как в других темах»): her hands, cut from the photo, lie over the glass rim at the very spot
   they are in the photo (--os-hands-*, in timer sizes; -2px for the rim's border). Over the glass and the arc, clear of the numbers. */
:root[data-theme="lumen"] .scr-workout .scr-workout-ring-svg { position: relative; z-index: 2; }
:root[data-theme="lumen"] .scr-workout .scr-workout-ring-inner { z-index: 3; }
:root[data-theme="lumen"] .scr-workout .scr-workout-ring::before {
  content: ""; position: absolute; z-index: 4; pointer-events: none;
  left: calc(var(--ring-size, 194px) * var(--os-hands-x) - 2px); top: calc(var(--ring-size, 194px) * var(--os-hands-y) - 2px);
  width: calc(var(--ring-size, 194px) * var(--os-hands-w)); height: calc(var(--ring-size, 194px) * var(--os-hands-h));
  background: var(--os-hands) center / 100% 100% no-repeat;
}

/* Antique v3 (owner 2026-11-13): the athlete holds the timer here too — a bronze shield. The photo is sized and
   placed from the timer like Old School (--os-photo-*: the rim on the timer's edge on any screen; fitHeadroom keeps the head in view
   through --cyber-head), the page colour melts in at the top and the bottom, and the hands cut from the photo lie over the rim
   (--os-hands-*; minus the ring's border). */
:root[data-theme="atelier"] .scr-workout { --hero-under: calc(var(--ring-size, 194px) + 24px); }
:root[data-theme="atelier"] .scr-workout .scr-workout-hero {
  background-image: linear-gradient(to bottom, var(--color-bg) 0, transparent 64px, transparent calc(100% - 96px), var(--color-bg) 100%), var(--hero-workout); /* a longer, softer fade into the page */
  background-size: cover, calc(var(--ring-size, 194px) * var(--os-photo-w)) calc(var(--ring-size, 194px) * var(--os-photo-h));
  background-position: center, calc(50% + var(--ring-size, 194px) * var(--os-photo-x)) calc(var(--hero-h, 250px) + var(--ring-size, 194px) * var(--os-photo-y));
}
:root[data-theme="atelier"] .scr-workout .scr-workout-ring-svg { position: relative; z-index: 2; }
:root[data-theme="atelier"] .scr-workout .scr-workout-ring-inner { z-index: 3; }
:root[data-theme="atelier"] .scr-workout .scr-workout-ring::before {
  content: ""; position: absolute; z-index: 4; pointer-events: none;
  --os-hands-border: 2px;
  left: calc(var(--ring-size, 194px) * var(--os-hands-x) - var(--os-hands-border)); top: calc(var(--ring-size, 194px) * var(--os-hands-y) - var(--os-hands-border));
  width: calc(var(--ring-size, 194px) * var(--os-hands-w)); height: calc(var(--ring-size, 194px) * var(--os-hands-h));
  background: var(--os-hands) center / 100% 100% no-repeat;
}

/* Profile «Lumen Crest»: the portrait in an upright medallion — a large round top-left, a diagonal cut top-right, a wide oval bottom.
   It stands a little wider than the frosted card that lies over its lower part, so the photo reaches past the card's edges. Her face
   and ponytail are in the upper right, the shoulders and arms in the middle (--hero-profile-pos 62% 0%, --os-profile-top). A thin
   champagne halo sits behind her head. Pseudo-elements only, under the header and the card, so the tabs and actions stay as they are. */
:root[data-theme="lumen"] .scr-profile .scr-profile-hero {
  --crest-w: min(86vw, 380px);
  --crest-top: calc(env(safe-area-inset-top) + var(--os-profile-top) + 16px);
  --crest-h: calc(var(--crest-w) * 1.2);
  height: calc(var(--crest-top) + var(--crest-h) + 12px);
  background-image: var(--lumen-haze);
  background-size: cover;
}
:root[data-theme="lumen"] .scr-profile .scr-profile-hero::before,
:root[data-theme="lumen"] .scr-profile .scr-profile-hero::after { display: block; content: ""; position: absolute; inset: auto; z-index: 0; pointer-events: none; animation: none; transform: none; opacity: 1; }
:root[data-theme="lumen"] .scr-profile .scr-profile-hero::before {
  top: var(--crest-top); left: 50%; width: var(--crest-w); height: var(--crest-h); margin-left: calc(var(--crest-w) / -2);
  background: var(--hero-profile) var(--hero-own-pos, var(--hero-profile-pos)) / var(--hero-own-size-crest, cover) no-repeat, var(--lumen-crest-bg);
  border-radius: 58% 0 50% 50% / 34% 0 22% 22%;
  clip-path: polygon(0 0, 76% 0, 100% 13%, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 1px var(--lumen-crest-edge);
}
:root[data-theme="lumen"] .scr-profile .scr-profile-hero::after { display: none; } /* no halo round the head (owner 2026-11-13) */
:root[data-theme="lumen"] .scr-profile .scr-profile-hero-text {
  width: min(calc(var(--crest-w) - 40px), 340px); margin: 0 auto var(--space-3); padding: var(--space-3) var(--space-4);
  border: 1px solid var(--lumen-glass-border); border-radius: 22px; background: var(--lumen-glass);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--lumen-glass-shadow);
}
:root[data-theme="lumen"] .scr-profile .scr-profile-name { color: var(--color-text); letter-spacing: 0.06em; }
:root[data-theme="lumen"] .scr-profile .scr-profile-level { color: var(--color-text-secondary); }
:root[data-theme="lumen"] .scr-profile .scr-profile-row-value { color: var(--color-gold-soft); }

/* Own pictures (owner 2026-11-13, shared/ui/own-photo.js): the menu and «Положение фото». The frame has the shape of the screen's photo
   area (the Lumen medallion in the profile); the bands and the circle show where the buttons, the name and the timer lie. */
.ui-own-photo { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-own-photo .ui-note { margin: 0; }
.ui-own-photo .ui-own-photo__more { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--color-divider); }
.ui-own-photo .ui-own-photo__more .ui-meta { margin: 0; }
/* «Фон» (own-photo.js openBackgroundChooser): which screen gets one's own picture */
.ui-own-bgs { display: flex; flex-direction: column; gap: var(--space-2); }
.ui-own-bg { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 64px; padding: var(--space-2) var(--space-3); border: 1px solid var(--color-field-border); border-radius: var(--radius-card);
  background: var(--color-field); color: var(--color-text); font: inherit; text-align: left; cursor: pointer; }
.ui-own-bg__icon { flex: 0 0 auto; display: inline-flex; color: var(--color-gold-soft); }
.ui-own-bg__icon svg { width: 24px; height: 24px; }
.ui-own-bg__text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ui-own-bg__title { font-weight: 600; }
.ui-own-bg__state { flex: 0 0 auto; }
.ui-own-bg__state[data-own] { color: var(--color-gold); }
.ui-place { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-place .ui-place-frame {
  position: relative; width: 100%; max-height: 52vh; margin: 0 auto; overflow: hidden; border-radius: var(--radius-card);
  background-color: var(--color-field); background-repeat: no-repeat; border: 1px solid var(--color-field-border);
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.ui-place .ui-place-frame--crest { width: auto; height: min(52vh, 360px); border-radius: 58% 0 50% 50% / 34% 0 22% 22%; } /* the medallion's outline */
.ui-place .ui-place-shades { position: absolute; inset: 0; pointer-events: none; background-size: cover; background-repeat: no-repeat; } /* the screen's own fades */
.ui-place .ui-place-spot, .ui-place .ui-place-ring {
  position: absolute; display: flex; justify-content: center; align-items: center; pointer-events: none;
  font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text); text-shadow: var(--text-shadow-photo);
}
.ui-place .ui-place-spot { left: 6%; right: 6%; border: 1px dashed var(--color-gold-soft); border-radius: var(--radius-chip); } /* where the text lies: outlined, the picture under it is seen */
.ui-place .ui-place-ring { aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px dashed var(--color-gold-soft); border-radius: 50%; }
.ui-place .ui-place-hint { margin: 0; text-align: center; }
.ui-place .ui-place-zoom-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--touch); }
.ui-place .ui-place-zoom { flex: 1; min-height: var(--touch); accent-color: var(--color-gold-soft); }
.ui-place .ui-place-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

/* Own picture on the main screen (owner 2026-11-13): over every theme's own composition the picture fills the top like a plain photo, at
   the place and zoom set in «Положение фото» (--hero-own-*, screens/workout/screen.js); the cut-out hands of the held-timer themes go. */
:root[data-theme] .scr-workout[data-own-photo] .scr-workout-hero {
  background-image: linear-gradient(to bottom, var(--hero-fade-top) 0%, transparent 26%, transparent 66%, var(--hero-fade-soft) 78%, var(--hero-fade-strong) 91%, var(--color-bg) 100%), var(--hero-workout);
  background-size: cover, var(--hero-own-size, cover);
  background-position: center, var(--hero-own-pos, center);
  background-repeat: no-repeat;
}
:root[data-theme] .scr-workout[data-own-photo] .scr-workout-ring::before { display: none; }
/* An own picture: the theme's animations go (owner 2026-11-13: «анимация должна убираться… не мешать») — fog, dust, rain, steam, chalk,
   flashes, beams, ripples. The Lumen medallion keeps its ::before: that is where the picture itself is drawn. */
:root:not([data-theme="lumen"]) .scr-profile .scr-profile-hero[data-own-photo]::before,
:root[data-theme] .scr-profile .scr-profile-hero[data-own-photo]::after,
:root[data-theme] .scr-workout[data-own-photo] .scr-workout-hero::before,
:root[data-theme] .scr-workout[data-own-photo] .scr-workout-hero::after,
:root[data-theme] .scr-workout[data-own-photo] .scr-workout-timer-section::before,
:root[data-theme] .scr-workout[data-own-photo] .scr-workout-timer-section::after,
:root[data-theme] .scr-workout[data-own-photo] .scr-workout-stage { display: none; animation: none; }

/* «Моя тема» (owner 2026-11-13, shared/ui/theme-picker.js customPanel): six style cards in two columns, each a little picture of the style
   (its page, a card, the accent button, the ink) drawn from --st-* set on the card. */
.ui-my-theme { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--color-divider); }
.ui-my-theme[hidden] { display: none; }
.ui-my-theme .ui-my-theme__title { margin: 0; font: var(--font-label); color: var(--color-text); }
.ui-my-theme .ui-my-theme__styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.ui-my-theme .ui-my-theme__style {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1); min-height: var(--touch); padding: var(--space-1); border: 1px solid var(--color-divider);
  -webkit-appearance: none; appearance: none;
  border-radius: var(--radius-row); background: transparent; color: var(--color-text); cursor: pointer; text-align: center;
}
.ui-my-theme .ui-my-theme__style[aria-checked="true"] { border-color: var(--color-gold-soft); box-shadow: 0 0 0 1px var(--color-gold-soft); }
.ui-my-theme .ui-my-theme__mock { position: relative; display: block; height: 64px; border-radius: 8px; background: var(--st-bg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--color-divider); }
.ui-my-theme .ui-my-theme__mock-card { position: absolute; left: 10%; right: 10%; top: 14%; height: 40%; border-radius: 6px; background: var(--st-surface); display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 8%; }
.ui-my-theme .ui-my-theme__mock-line { display: block; height: 3px; border-radius: 2px; background: var(--st-text); opacity: 0.75; }
.ui-my-theme .ui-my-theme__mock-line--short { width: 55%; opacity: 0.4; }
.ui-my-theme .ui-my-theme__mock-btn { position: absolute; left: 22%; right: 22%; bottom: 12%; height: 18%; border-radius: 999px; background: var(--st-accent); }
.ui-my-theme .ui-my-theme__name { display: block; width: 100%; font: var(--font-caption); color: var(--color-text); text-align: center; }
.ui-my-theme .ui-my-theme__check { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--color-gold-soft); color: var(--color-text-on-gold-soft); }
.ui-my-theme .ui-my-theme__check svg { width: 14px; height: 14px; }
.ui-my-theme .ui-my-theme__style[aria-checked="true"] .ui-my-theme__check { display: grid; }

/* Antique «солнечные часы и лавровый венок» (owner 2026-11-13: «необычную, сложную, удивительную»). The rest is time told by the sun:
   the shadows of the columns turn slowly across the scene like the hand of a sundial and the sunbeams follow them, golden pollen rises,
   now and then two olive leaves drift down (the laurel wreath round the shield went on 2026-11-14, the owner's wish). The last 10 s:
   the sunset comes, the shadows lengthen. Zero: a light runs once round the Greek key on the rim, a sun blooms behind the shield. A set saved: gold leaf falls from
   the shield. No flicker; transform / opacity / masks only. */
:root[data-theme="atelier"] .scr-workout .scr-workout-stage { display: block; position: absolute; inset: 0; pointer-events: none; overflow: hidden; } /* no z-index: the layers blend with the photo */
:root[data-theme="atelier"] .scr-workout .scr-workout-stage > :where(i) { /* :where — a layer's own blend or display wins over this default */ display: none; position: absolute; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; mix-blend-mode: screen; }
:root[data-theme="atelier"] .scr-workout .scr-workout-stage > .scr-workout-an { display: block; }
:root[data-theme="atelier"] .scr-workout .scr-workout-an--shadows { /* the sundial: shadows on white, multiplied; two tiles wide */
  top: -10%; bottom: -10%; left: -20%; width: 280%; mix-blend-mode: multiply; background: var(--an-shadows) 0 0 / 50% 100% repeat-x; transform-origin: 30% 0;
}
:root[data-theme="atelier"] .scr-workout .scr-workout-an--rays { inset: -6% -10% 20% -10%; background: var(--an-rays) left top / cover no-repeat; transform-origin: 0 0; }
:root[data-theme="atelier"] .scr-workout .scr-workout-stage > .scr-workout-an--rays { mix-blend-mode: color-dodge; } /* golden light that shows on the light scene; black leaves it as it is */
:root[data-theme="atelier"] .scr-workout .scr-workout-stage > .scr-workout-an--pollen { mix-blend-mode: normal; }
:root[data-theme="atelier"] .scr-workout .scr-workout-an--pollen { left: 0; right: 0; top: 0; height: calc(100% + 512px); background: var(--an-pollen) 0 0 / 512px 512px repeat, var(--an-pollen) 170px 90px / 800px 800px repeat; /* the big tile: larger specks, nearer */
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 85%); mask-image: linear-gradient(to bottom, black 40%, transparent 85%); }
:root[data-theme="atelier"] .scr-workout .scr-workout-stage > .scr-workout-an--sunset { inset: 0; background: var(--an-sunset) center top / cover no-repeat; transition-duration: 4s; mix-blend-mode: soft-light; } /* a transparent picture: only the coloured sky warms the scene */ /* warms the light scene to sunset instead of washing it out */
:root[data-theme="atelier"] .scr-workout .scr-workout-stage > .scr-workout-an--leaf { /* one olive leaf of six (a 3 × 2 sheet), dropped by screen.js; «>» so plain blending wins over the stage's «screen», which made the leaves vanish */
  left: var(--lx, 15%); top: calc(var(--ring-size, 194px) * -0.3); width: calc(var(--ring-size, 194px) * 0.52); height: calc(var(--ring-size, 194px) * 0.52);
  mix-blend-mode: normal; background: var(--an-leaves) var(--leaf-pos, 0% 0%) / 300% 200% no-repeat; transition: none;
  filter: drop-shadow(0 6px 6px var(--color-scrim)) saturate(1.25); /* owner 2026-11-14: «листики почти не видно» — bigger, with a soft shadow off the light scene */
}
:root[data-theme="atelier"] .scr-workout .scr-workout-an--leaf[data-on] { animation: an-leaf-fall 7.5s cubic-bezier(0.35, 0.1, 0.55, 0.9) 1 both; }
:root[data-theme="atelier"] .scr-workout .scr-workout-an--meander,
:root[data-theme="atelier"] .scr-workout .scr-workout-an--halo { /* centred on the shield (the timer) */
  left: 50%; top: calc(var(--hero-h, 250px) + var(--ring-size, 194px) / 2);
}
/* the rest begins (and a set is saved): a light runs once round the Greek key (owner 2026-11-14); the laurel wreath went the same day */
:root[data-theme="atelier"] .scr-workout[data-chalk] .scr-workout-an--meander { animation: an-meander-run 1.8s ease-out 0.2s 1 both; }
:root[data-theme="atelier"] .scr-workout .scr-workout-an--meander { /* the Greek key just outside the rim */
  width: calc(var(--ring-size, 194px) * 1.34); height: calc(var(--ring-size, 194px) * 1.34); margin: calc(var(--ring-size, 194px) * -0.67) 0 0 calc(var(--ring-size, 194px) * -0.67);
  background: var(--an-meander) center / contain no-repeat; transition: none;
}
:root[data-theme="atelier"] .scr-workout .scr-workout-an--halo { /* the sun behind the shield */
  width: calc(var(--ring-size, 194px) * 2.2); height: calc(var(--ring-size, 194px) * 2.2); margin: calc(var(--ring-size, 194px) * -1.1) 0 0 calc(var(--ring-size, 194px) * -1.1);
  background: var(--an-halo) center / contain no-repeat; transition: none;
}
:root[data-theme="atelier"] .scr-workout[data-timer="running"] .scr-workout-an--shadows { opacity: 0.42; animation: an-sundial 30s ease-in-out infinite alternate; }
:root[data-theme="atelier"] .scr-workout[data-timer="running"] .scr-workout-an--rays { opacity: 0.75; animation: an-rays-follow 30s ease-in-out infinite alternate; }
:root[data-theme="atelier"] .scr-workout[data-timer="running"] .scr-workout-an--pollen { opacity: 0.9; animation: an-pollen-rise 26s linear infinite; }
:root[data-theme="atelier"] .scr-workout[data-timer="running"][data-rest-end="soon"] .scr-workout-an--sunset,
:root[data-theme="atelier"] .scr-workout[data-timer="running"][data-rest-end="final"] .scr-workout-an--sunset { opacity: 0.95; }
:root[data-theme="atelier"] .scr-workout[data-timer="running"][data-rest-end="soon"] .scr-workout-an--shadows,
:root[data-theme="atelier"] .scr-workout[data-timer="running"][data-rest-end="final"] .scr-workout-an--shadows { opacity: 0.4; }
:root[data-theme="atelier"] .scr-workout[data-finale] .scr-workout-an--meander { animation: an-meander-run 1.8s ease-out 1 both; }
:root[data-theme="atelier"] .scr-workout[data-finale] .scr-workout-an--halo { animation: an-sun-bloom 2.2s ease-out 1 both; }
@keyframes an-sundial { from { transform: translate3d(0, 0, 0) skewX(-6deg); } to { transform: translate3d(-18%, 0, 0) skewX(10deg); } }
@keyframes an-rays-follow { from { transform: rotate(-3deg) translate3d(0, 0, 0); } to { transform: rotate(4deg) translate3d(6%, 0, 0); } }
@keyframes an-pollen-rise { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -512px, 0); } }
@keyframes an-leaf-fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-20deg); }
  8% { opacity: 1; }
  35% { transform: translate3d(28px, calc(var(--ring-size, 194px) * 0.7), 0) rotate(40deg); }
  65% { transform: translate3d(-22px, calc(var(--ring-size, 194px) * 1.5), 0) rotate(-15deg); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(14px, calc(var(--ring-size, 194px) * 2.3), 0) rotate(70deg); }
}
@keyframes an-meander-run { /* a light runs once round the key */
  0% { opacity: 0; transform: rotate(0deg); -webkit-mask-image: conic-gradient(from 0deg, black 0deg, transparent 60deg); mask-image: conic-gradient(from 0deg, black 0deg, transparent 60deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: rotate(360deg); -webkit-mask-image: conic-gradient(from 0deg, black 0deg, transparent 60deg); mask-image: conic-gradient(from 0deg, black 0deg, transparent 60deg); }
}
@keyframes an-sun-bloom { 0% { opacity: 0; transform: scale(0.5) rotate(0deg); } 25% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.25) rotate(25deg); } }
/* over the shield: gold leaf falling when a set is saved (a transparent picture, plain blending) */
:root[data-theme="atelier"] .scr-workout .scr-workout-timer-section::before {
  content: ""; position: absolute; z-index: 5; pointer-events: none; opacity: 0;
  left: 50%; top: calc(var(--ring-size, 194px) * -0.2); width: min(calc(var(--ring-size, 194px) * 1.7), 100vw); height: calc(var(--ring-size, 194px) * 1.7); margin-left: calc(min(calc(var(--ring-size, 194px) * 1.7), 100vw) / -2);
  background: var(--an-gold) center / contain no-repeat;
}
:root[data-theme="atelier"] .scr-workout[data-chalk] .scr-workout-timer-section::before { animation: an-gold-fall 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) 1 both; }
@keyframes an-gold-fall { 0% { opacity: 0; transform: scale(0.4) translate3d(0, 0, 0); } 12% { opacity: 1; transform: scale(0.95) translate3d(0, 0, 0); } 100% { opacity: 0; transform: scale(1.15) translate3d(0, 22%, 0) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) {
  :root[data-theme="atelier"] .scr-workout .scr-workout-timer-section::before { display: none; animation: none; }
}

/* The rest layers melt into the page at the bottom of the photo (owner 2026-11-13: in Old School the light ended in a hard line over
   the black under the photo). Each layer fades on its own: a mask on the stage itself isolates it, and then the «screen» and
   «multiply» layers stop blending with the photo and show their black and white (2026-11-14). */
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--leak,
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--grain,
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--haze,
:root[data-theme="oldschool"] .scr-workout .scr-workout-os--rays,
:root[data-theme="atelier"] .scr-workout .scr-workout-an--shadows,
:root[data-theme="atelier"] .scr-workout .scr-workout-an--rays,
:root[data-theme="atelier"] .scr-workout .scr-workout-an--sunset {
  -webkit-mask-image: linear-gradient(to bottom, black 0, black calc(100% - 120px), transparent calc(100% - 8px));
  mask-image: linear-gradient(to bottom, black 0, black calc(100% - 120px), transparent calc(100% - 8px));
}

/* LIVE presence (shared/ui/live-presence.js, v2): one curtain at the top of «Тренировка» / «Питание» — a compact head, a body whose
   height follows the finger and settles on three states, a drag handle at the bottom. Only theme tokens; motion off when asked. */
.ui-live-island {
  position: fixed; z-index: 55; top: calc(env(safe-area-inset-top) + var(--space-2)); left: 50%;
  width: min(calc(100vw - 2 * var(--space-3)), 440px); transform: translate(-50%, calc(-100% - 24px)); opacity: 0;
  display: flex; flex-direction: column;
  background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-divider); border-radius: var(--radius-card);
  box-shadow: var(--shadow-floating);
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.24s ease;
}
.ui-live-island--in { transform: translate(-50%, 0); opacity: 1; }
.ui-live-head { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-2) 0 var(--space-3); min-width: 0; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.ui-live-close { flex: 0 0 auto; margin: -4px -2px 0 auto; color: var(--color-text-secondary); }
.ui-live-body { height: 0; overflow: hidden; padding: 0 var(--space-3); transition: height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); overscroll-behavior: contain; }
.ui-live-island[data-state="open"] .ui-live-body, .ui-live-island[data-state="full"] .ui-live-body { overflow-y: auto; touch-action: pan-y; }
.ui-live-island--drag .ui-live-body, .ui-live-island--drag { transition: none; }
.ui-live-sec { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); }
.ui-live-handle { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 28px; padding: 0; background: none; border: 0; touch-action: none; cursor: grab; }
.ui-live-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--color-text-secondary); opacity: 0.55; }
.ui-live-island[data-state="full"] .ui-live-grip { width: 28px; }
.ui-live-avatar { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--color-divider); color: var(--color-text); font-weight: 700; font-size: 12px; }
.ui-live-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ui-live-line { color: var(--color-text); overflow-wrap: anywhere; line-height: 1.3; }
.ui-live-sub { color: var(--color-text-secondary); font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-live-when { font-size: 12px; }
.ui-live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--color-gold); vertical-align: middle; animation: ui-live-pulse 1.6s ease-in-out infinite; }
@keyframes ui-live-pulse { 50% { opacity: 0.35; } }
.ui-live-status { margin: 0; }
.ui-live-macros { margin: 0; font-weight: 600; color: var(--color-text); }
.ui-live-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-live-items li { display: flex; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.ui-live-items li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.ui-live-ex-name { margin: 0; font-weight: 600; color: var(--color-text); overflow-wrap: anywhere; }
.ui-live-sets { list-style: none; margin: var(--space-1) 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-live-sets li { display: grid; grid-template-columns: 20px auto auto 1fr; align-items: baseline; column-gap: var(--space-2); min-width: 0; }
.ui-live-last { justify-self: end; font-size: 12px; }
/* the newest piece a followed person added glints twice, then keeps «новое» while fresh (live-fresh.js) */
.ui-live-glint[data-fresh], .ui-live-food-row[data-fresh], .ui-live-items li[data-fresh] { border-radius: 6px; }
.ui-live-glint[data-fresh="shine"], .ui-live-food-row[data-fresh="shine"], .ui-live-items li[data-fresh="shine"] {
  background-image: linear-gradient(105deg, transparent 30%, color-mix(in srgb, var(--color-gold) 38%, transparent) 50%, transparent 70%);
  background-size: 260% 100%; background-repeat: no-repeat; background-position: 130% 0;
  animation: ui-live-shine 1.3s ease-in-out 2; animation-delay: var(--ui-shine-delay, 0ms);
}
.ui-live-glint[data-fresh] { color: var(--color-gold); font-weight: 600; }
@keyframes ui-live-shine { from { background-position: 130% 0; } to { background-position: -30% 0; } }
/* the round photo over the initials (live-face.js); a failed photo goes and the initials stay */
.ui-live-avatar, .ui-live-who-ava { position: relative; }
.ui-live-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; pointer-events: none; }
/* one's own round photo (avatar.js): a gold ring like a story's; «+» while there is none */
.ui-avatar-btn { position: relative; display: inline-grid; place-items: center; padding: 3px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; flex: 0 0 auto; }
.ui-avatar-btn[data-ring] { background: conic-gradient(from 210deg, var(--color-gold), var(--color-gold-soft), var(--color-gold)); }
.ui-avatar-me { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background-color: var(--color-surface);
  background-repeat: no-repeat; border: 2px solid var(--color-bg); color: var(--color-text); font-weight: 700; }
.ui-avatar-me[data-size="sm"] { width: 44px; height: 44px; font-size: 14px; border-width: 1px; border-color: var(--color-divider); }
.ui-avatar-me[data-size="md"] { width: 52px; height: 52px; font-size: 16px; }
.ui-avatar-me[data-size="lg"] { width: 86px; height: 86px; font-size: 26px; } /* Instagram's profile photo */
.ui-avatar-me[data-size="xl"] { width: 132px; height: 132px; font-size: 40px; }
.ui-avatar-plus { position: absolute; z-index: 1; right: 0; bottom: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--color-gold); color: var(--color-text-on-gold); font-size: 20px; font-weight: 800; line-height: 1; border: 3px solid var(--color-bg); box-sizing: border-box; }
.ui-avatar-plus[data-size="sm"], .ui-avatar-plus[data-size="md"] { width: 20px; height: 20px; font-size: 15px; border-width: 2px; }
.ui-avatar-plus[data-size="xl"] { width: 36px; height: 36px; font-size: 26px; right: 6px; bottom: 6px; }
.ui-avatar-pane { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-3); }
.ui-avatar-big { display: flex; justify-content: center; position: relative; padding: var(--space-2) 0; }
/* «Поделиться профилем»: the arrow beside the big circle, as on Instagram */
.ui-avatar-share-box { position: absolute; top: var(--space-2); right: 0; display: flex; flex-direction: column; align-items: flex-end; }
.ui-avatar-share { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--color-gold); cursor: pointer; font: inherit; }
.ui-avatar-share-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--color-gold-edge); background: var(--color-raised); box-shadow: var(--shadow-key); transition: transform .15s ease; }
.ui-avatar-share:active .ui-avatar-share-icon { transform: scale(.92); }
.ui-avatar-share-icon svg { width: 24px; height: 24px; stroke-width: 1.9; }
.ui-avatar-share-word { font: var(--font-caption); font-size: 11px; color: var(--color-text-secondary); }

/* First-time hints (shared/ui/coach-hint.js): a bubble with a pointer, and a soft pulse on what it is about */
.ui-coach { position: absolute; z-index: 5; width: max-content; max-width: min(230px, 70vw); padding: 10px 12px; border-radius: 12px; background: var(--color-gold-soft); color: var(--color-text-on-gold-soft); font: var(--font-caption); line-height: 1.35; text-align: left; text-transform: none; letter-spacing: 0; box-shadow: var(--shadow-dialog); animation: ui-coach-in .35s cubic-bezier(.2, .8, .2, 1) .25s both; pointer-events: none; }
.ui-coach::before { content: ''; position: absolute; top: -6px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.ui-coach--below { top: calc(100% + 10px); left: 50%; translate: -50% 0; }
.ui-coach--below::before { left: calc(50% - 6px); }
.ui-coach--below-end { top: calc(100% + 10px); right: 0; }
.ui-coach--below-end::before { right: 18px; }
.ui-coach--out { opacity: 0; transition: opacity .2s ease; }
@keyframes ui-coach-in { from { opacity: 0; transform: translateY(6px); } }
.ui-hint-anchor { position: relative; display: inline-flex; }
[data-hint-pulse]::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--color-gold-soft); animation: ui-hint-pulse 1.6s ease-out infinite; pointer-events: none; }
.ui-avatar-share[data-hint-pulse]::after { inset: -4px auto auto 50%; width: 56px; height: 56px; margin-left: -28px; }
@keyframes ui-hint-pulse { from { opacity: .9; transform: scale(.94); } to { opacity: 0; transform: scale(1.22); } }
@media (prefers-reduced-motion: reduce) { [data-hint-pulse]::after, .ui-coach { animation: none; } }
.ui-avatar-why { margin: 0; text-align: center; }
.ui-avatar-drop { color: var(--color-danger); }
.ui-avatar-slot { display: flex; align-items: center; gap: var(--space-3); }
.ui-avatar-slot-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ui-avatar-slot-title { font-weight: 600; }
.ui-avatar-slot-act { min-height: var(--touch); padding: 0; border: 0; background: none; color: var(--color-gold); font: inherit; font-weight: 600; cursor: pointer; }
/* «Кружок»: a square of the photo; outside the circle dimmed, as it will be cut */
.ui-avatar-edit .ui-avatar-frame { position: relative; width: min(100%, 320px, 46vh); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: var(--radius-card);
  background-color: var(--color-field); background-repeat: no-repeat; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ui-avatar-edit .ui-avatar-mask { position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle closest-side at 50% 50%, transparent calc(100% - 1px), color-mix(in srgb, var(--color-bg) 62%, transparent) 100%); }
.ui-avatar-edit .ui-avatar-mask::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--color-gold-soft); }
.ui-avatar-edit .ui-avatar-preview-row { display: flex; align-items: center; gap: var(--space-3); }
.ui-avatar-edit .ui-avatar-preview-row > .ui-avatar-me { flex: 0 0 auto; } /* never squeezed into an oval */
.ui-avatar-edit .ui-avatar-another { align-self: center; display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch); padding: 0 var(--space-4); }
.ui-avatar-edit .ui-avatar-another-icon { display: inline-flex; }
.ui-avatar-edit .ui-avatar-another-icon svg { width: 20px; height: 20px; }
.ui-avatar-edit .ui-avatar-preview-row .ui-place-hint { text-align: start; }
/* Instagram's sizes (owner 2026-11-17): people in lists 54, a card's head (a post's) 36; the curtain keeps its 34 */
.ui-live-person .ui-live-avatar { width: 54px; height: 54px; font-size: 18px; }
.ui-live-card-head .ui-live-avatar { width: 36px; height: 36px; font-size: 13px; }
.ui-live-other { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 44px; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; }
.ui-live-actions { display: flex; gap: var(--space-2); padding-bottom: var(--space-2); }
.ui-live-act { flex: 1 1 0; min-height: 44px; }
.ui-live-caption { margin: 0; }
.ui-live-food { display: flex; flex-direction: column; }
.ui-live-food-row { padding: var(--space-2) 0; border-top: 1px solid var(--color-divider); }
.ui-live-food-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); min-width: 0; }
.ui-live-food-name { font-weight: 600; color: var(--color-text); overflow-wrap: anywhere; min-width: 0; }
.ui-live-food-kcal { flex: 0 0 auto; font-weight: 700; color: var(--color-text); }
.ui-live-food-sub { display: flex; flex-wrap: wrap; gap: 4px var(--space-3); margin-top: 2px; color: var(--color-text-secondary); font-size: 13px; }
.ui-live-food-total { display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-2) 0; border-top: 1px solid var(--color-divider); font-weight: 700; color: var(--color-text); }
.ui-live-summary { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--color-divider); color: var(--color-text-secondary); }
.ui-live-summary b { color: var(--color-text); font-size: 16px; }
.ui-live-btn { position: relative; }
.ui-live-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--color-gold); color: var(--color-text-on-gold); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
/* The full-screen LIVE (shared/ui/live-space.js): over the working screen (which stays mounted underneath), under sheets and
   dialogs. A row of avatars — one per person, the same ring meaning as everywhere: training now = accent with a glow, food
   recently = success, the rest neutral; the chosen one is outlined, the others dim — and one shared feed under it. */
.ui-live-space {
  position: fixed; inset: 0; z-index: 38; display: flex; flex-direction: column;
  background: var(--color-bg); color: var(--color-text);
  padding-top: env(safe-area-inset-top); opacity: 0; transform: translateY(16px);
  transition: opacity 0.24s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ui-live-space--in { opacity: 1; transform: none; }
.ui-live-top { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2) 0 var(--screen-pad); }
.ui-live-title { flex: 1; margin: 0; font: var(--font-title); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.ui-live-strip { display: flex; gap: var(--space-2); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: var(--space-2) var(--space-3) var(--space-1); scrollbar-width: none; flex: 0 0 auto; }
.ui-live-strip::-webkit-scrollbar { display: none; }
.ui-live-who { flex: 0 0 76px; scroll-snap-align: start; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 44px; padding: 4px 0 8px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; transition: opacity 0.2s ease; }
.ui-live-who:first-child { position: sticky; left: 0; z-index: 1; background: var(--color-bg); }
.ui-live-strip { scroll-padding-inline-start: calc(76px + var(--space-2)); } /* a snapped avatar stops beside the pinned «Все», never under it */
.ui-live-who[data-dim] { opacity: 0.55; }
.ui-live-who-ava { position: relative; display: grid; place-items: center; width: 64px; height: 64px; box-sizing: border-box; border-radius: 50%;
  background: var(--color-surface); border: 1.5px solid var(--color-divider); color: var(--color-text); font-weight: 700; font-size: 20px; } /* as Instagram's stories: 64 */
.ui-live-who-all { display: grid; place-items: center; width: 28px; height: 28px; color: var(--color-text-secondary); }
.ui-live-who-all svg { width: 28px; height: 28px; }
.ui-live-who[data-selected] .ui-live-who-ava { outline: 2px solid var(--color-text); outline-offset: 3px; }
.ui-live-who[data-selected]::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 24px; height: 3px; margin-left: -12px; border-radius: 2px; background: var(--color-text); }
.ui-live-who-name { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--color-text); }
/* the stories' rings (owner 2026-11-17, from Instagram): training now — gold into red, a soft pulse and «LIVE» under the photo;
   something new not seen yet — a gold ring; all seen — a thin grey one. A thin gap of the page's colour between ring and photo */
.ui-live-who[data-ring] .ui-live-who-ava { border: 3px solid transparent; background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box, var(--color-divider) border-box; }
.ui-live-who[data-ring] .ui-live-who-ava > .ui-live-face { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.ui-live-who[data-ring="live"] .ui-live-who-ava { background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box, conic-gradient(from 200deg, var(--color-gold), var(--color-danger), var(--color-gold-soft), var(--color-gold)) border-box; }
.ui-live-who[data-ring="new"] .ui-live-who-ava { background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box, conic-gradient(from 200deg, var(--color-gold-soft), var(--color-gold), var(--color-gold-soft)) border-box; }
.ui-live-who[data-ring="seen"] .ui-live-who-ava { border-width: 1.5px; background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box, var(--color-text-secondary) border-box; opacity: 0.85; }
.ui-live-who[data-ring="seen"] .ui-live-who-ava > .ui-live-face { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.ui-live-who-badge { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); padding: 1px 5px; border-radius: 4px; border: 2px solid var(--color-bg);
  background: var(--color-danger-fill); color: var(--color-text-on-danger); font-size: 9px; line-height: 11px; font-weight: 800; letter-spacing: 0.06em; }
.ui-live-who[data-ring="live"] .ui-live-who-name { margin-top: 4px; } /* room for «LIVE» */
.ui-live-who-status { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--color-text-secondary); }
.ui-live-who[data-kind="training"] .ui-live-who-status { color: var(--color-gold); }
.ui-live-who[data-kind="food"] .ui-live-who-status { color: var(--color-success); }
.ui-live-filter { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-2) 0 var(--screen-pad); border-bottom: 1px solid var(--color-divider); flex: 0 0 auto; }
.ui-live-filter-text { margin: 0; }
.ui-live-filter-text b { color: var(--color-text); }
.ui-live-filter-btn { min-height: 44px; }
.ui-live-feedwrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ui-live-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: var(--space-2) var(--space-3) calc(env(safe-area-inset-bottom) + 96px); }
.ui-live-new { position: absolute; top: var(--space-2); left: 50%; transform: translateX(-50%); z-index: 1; display: block; margin: 0; min-height: 36px; padding: 0 var(--space-4); border: 0; border-radius: 18px; background: var(--color-gold); color: var(--color-text-on-gold); font: inherit; font-size: 13px; font-weight: 700; box-shadow: var(--shadow-floating); }
.ui-live-new[hidden], .ui-live-pill[hidden] { display: none; }
.ui-live-feed { display: flex; flex-direction: column; gap: var(--space-2); }
.ui-live-empty { margin: var(--space-5) 0; text-align: center; }
.ui-live-card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-card); overflow: hidden; }
.ui-live-card[data-kind="live"] { border-color: color-mix(in srgb, var(--color-gold) 55%, var(--color-divider)); box-shadow: inset 3px 0 0 var(--color-gold); }
.ui-live-card-head { display: flex; align-items: flex-start; gap: var(--space-2); width: 100%; min-height: 44px; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ui-live-card-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px var(--space-2); }
.ui-live-card-who { color: var(--color-text); }
.ui-live-card-top .ui-live-when { margin-left: auto; }
.ui-live-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--color-text-secondary); }
.ui-live-tag[data-tag="live"] { color: var(--color-gold); }
.ui-live-tag[data-tag="food"] { color: var(--color-success); }
.ui-live-tag[data-tag="body"] { color: var(--color-gold-soft); } /* «Вес и замеры» */
.ui-live-chev { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 8px; color: var(--color-text-secondary); transform: rotate(90deg); transition: transform 0.2s ease; }
.ui-live-chev svg { width: 16px; height: 16px; }
.ui-live-card[data-open] .ui-live-chev { transform: rotate(-90deg); }
.ui-live-details { display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--space-3) var(--space-1); }
.ui-live-pill {
  position: absolute; left: var(--space-3); right: var(--space-3); bottom: calc(env(safe-area-inset-bottom) + var(--space-3));
  display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: 0 var(--space-4);
  border: 1px solid var(--color-gold); border-radius: 28px; background: var(--color-surface); color: var(--color-text); font: inherit; text-align: left;
  box-shadow: var(--shadow-floating); cursor: pointer;
}
.ui-live-pill-time { font-size: 20px; font-weight: 700; color: var(--color-gold); }
.ui-live-pill-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--color-text-secondary); }
.ui-live-pill-go { flex: 0 0 auto; font-size: 12px; font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
/* LIVE simplified (2026-11-17): the search on top of the full-screen LIVE, requests answered there, «Сейчас тренируются» as its own
   section, a profile created in one sheet on the way to «Подписаться»; a dot on the LIVE button while someone trains; the first
   curtain says once that it opens downwards. */
.ui-live-top[hidden] { display: none; }
.ui-live-searchbar { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2) 0 var(--screen-pad); }
.ui-live-searchbar[hidden] { display: none; }
.ui-live-search { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.ui-live-search-cancel { flex: 0 0 auto; min-height: var(--touch); padding: 0 var(--space-2); border: 0; background: none; color: var(--color-gold); font: inherit; font-weight: 600; cursor: pointer; }
.ui-live-search-icon { position: absolute; left: var(--space-3); top: 50%; display: grid; place-items: center; width: 20px; height: 20px; margin-top: -10px; color: var(--color-text-secondary); pointer-events: none; }
.ui-live-search-icon svg { width: 18px; height: 18px; }
.ui-live-search-input {
  width: 100%; min-height: var(--touch); padding: 0 var(--touch) 0 calc(var(--space-3) + 28px);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-row); background: var(--color-field); box-shadow: var(--shadow-field);
  color: var(--color-text); font: var(--font-body); -webkit-appearance: none; appearance: none;
}
.ui-live-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.ui-live-search-input:focus { outline: none; border-color: var(--color-gold-soft); box-shadow: var(--shadow-field), var(--gold-glow); }
.ui-live-search-clear { position: absolute; right: 0; top: 50%; margin-top: calc(var(--touch) / -2); color: var(--color-text-secondary); }
.ui-live-search-clear[hidden], .ui-live-strip[hidden], .ui-live-filter[hidden], .ui-live-scroll[hidden], .ui-live-requests[hidden], .ui-live-hint[hidden] { display: none; }
.ui-live-section { margin: var(--space-2) 0 0; font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-live-section[data-live-section="now"] { color: var(--color-gold); }
.ui-live-section:first-child { margin-top: 0; }
.ui-live-requests { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-divider); }
.ui-live-results { display: flex; flex-direction: column; gap: var(--space-1); }
/* LIVE tabs: «Лента», «Подписки · N», «Подписчики · N» under the search (owner 2026-11-17) */
.ui-live-tabs { flex: 0 0 auto; display: flex; padding: 0 var(--space-3); border-bottom: 1px solid var(--color-divider); }
.ui-live-tabs[hidden] { display: none; }
.ui-live-tab { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: var(--touch); padding: 0 var(--space-1);
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--color-text-secondary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ui-live-tab[aria-selected="true"] { color: var(--color-text); border-bottom-color: var(--color-gold); }
.ui-live-tab-n { font-size: 12px; font-weight: 700; color: var(--color-text-secondary); }
@media (max-width: 359px) { .ui-live-tabs { padding: 0 var(--space-2); } .ui-live-tab { font-size: 13px; gap: 4px; padding: 0 2px; } }
.ui-live-tab[aria-selected="true"] .ui-live-tab-n { color: var(--color-gold); }
.ui-live-relbtn { flex: 0 0 auto; min-height: var(--touch); padding: 0 var(--space-2); border: 0; background: none; font: inherit; font-size: 13px; color: var(--color-success); cursor: pointer; white-space: nowrap; }
.ui-live-relbtn[data-relation="requested"] { color: var(--color-text-secondary); }
.ui-live-now-line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-gold); }
.ui-live-now-line .ui-live-dot { display: inline-block; margin-inline-end: 6px; vertical-align: 1px; }
.ui-live-empty-act { align-self: center; min-height: var(--touch); }
.ui-live-person { display: flex; align-items: center; gap: var(--space-2); min-height: 56px; min-width: 0; }
.ui-live-person-open { flex: 1 1 auto; display: flex; align-items: center; gap: var(--space-2); min-width: 0; min-height: 44px; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ui-live-person-text { display: flex; flex-direction: column; min-width: 0; }
.ui-live-person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--color-text); }
.ui-live-person-text .ui-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* «Подписаться» / «Принять» in a row (owner 2026-11-18: the big red theme button looked heavy): a small calm pill in every theme —
   the theme's accent as a tint, not a slab; 34 px drawn, 44 px to the finger */
.ui-live-follow { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 var(--space-4);
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--color-gold-soft) 55%, transparent); background: color-mix(in srgb, var(--color-gold-soft) 14%, transparent);
  color: var(--color-gold-soft); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease); }
.ui-live-follow::after { content: ""; position: absolute; inset: -5px -2px; }
.ui-live-follow:active { transform: scale(.97); background: color-mix(in srgb, var(--color-gold-soft) 24%, transparent); }
.ui-live-follow:disabled { opacity: .55; cursor: default; }
.ui-live-follow:focus-visible { outline: 2px solid var(--color-gold-soft); outline-offset: 2px; }
@media (max-width: 359px) { .ui-live-follow { padding: 0 var(--space-3); font-size: 13px; } } /* the name keeps room on a 320 px phone */
.ui-live-rel { flex: 0 0 auto; font-size: 13px; }
.ui-live-rel[data-relation="following"] { color: var(--color-success); }
.ui-live-req-acts { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-1); }
.ui-live-field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }
.ui-live-field .ui-input { margin: 0; }
.ui-live-handle { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.ui-live-handle .ui-input { flex: 1 1 auto; min-width: 0; }
.ui-live-at { font-weight: 700; color: var(--color-text-secondary); }
.ui-live-why { margin: 0; }
.ui-live-why[data-bad] { color: var(--color-danger); }
.ui-live-join-title { margin: var(--space-2) 0 var(--space-1); font: var(--font-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.ui-live-join-cats { display: flex; flex-direction: column; margin-bottom: var(--space-2); }
.ui-live-join .ui-btn--block { margin-top: var(--space-3); }
.ui-live-hint { margin: 2px 0 0; padding: 0 var(--space-3); font-size: 12px; color: var(--color-gold); }
.ui-live-island[data-state="open"] .ui-live-hint, .ui-live-island[data-state="full"] .ui-live-hint { display: none; }
.ui-live-btn[data-live-now]::after { content: ""; position: absolute; left: 6px; bottom: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-gold); box-shadow: 0 0 6px var(--color-gold); animation: ui-live-pulse 1.6s ease-in-out infinite; }
.ui-live-who[data-kind="training"] .ui-live-who-ava::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--color-gold); opacity: 0; animation: ui-live-ring 2.2s ease-out infinite; }
@keyframes ui-live-ring { 0% { opacity: 0.6; transform: scale(0.92); } 100% { opacity: 0; transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .ui-live-island, .ui-live-body, .ui-live-space, .ui-live-chev, .ui-live-who { transition: none; }
  .ui-live-dot, .ui-live-btn[data-live-now]::after, .ui-live-who[data-kind="training"] .ui-live-who-ava::before { animation: none; }
  .ui-live-glint[data-fresh="shine"], .ui-live-food-row[data-fresh="shine"], .ui-live-items li[data-fresh="shine"] { animation: none; background-image: none; }
}

/* The profile photo in its own frame (owner 2026-11-18: «рамочка с закруглёнными краями, не уходит за экран, больше места»), every theme,
   «Моя тема» too since the owner liked it (2026-11-18): its medallion and glass card give way to the same frame. «ПРОФИЛЬ», the themes and the gear stand on the page above it; the photo is a card inset from
   the screen's edges, rounded, with a fine edge in the theme's colour; the face, the name and the slogan lie on its lower part, and the
   summary strip over its lower edge. The theme's own fog and flashes stay off here: the photo is the picture. */
.scr-profile .scr-profile-frame { display: none; }
:root[data-theme] .scr-profile .scr-profile-hero {
  height: calc(env(safe-area-inset-top) + 500px); overflow: visible; border-radius: 0; box-shadow: none;
  background: var(--color-bg); background-image: none;
}
:root[data-theme] .scr-profile .scr-profile-hero::before,
:root[data-theme] .scr-profile .scr-profile-hero::after { display: none; animation: none; }
:root[data-theme] .scr-profile .scr-profile-frame {
  display: block; position: absolute; z-index: 0; top: calc(env(safe-area-inset-top) + 66px); left: 12px; right: 12px; bottom: 0;
  border-radius: 28px; overflow: hidden; background-color: var(--color-surface);
  background-image: linear-gradient(to bottom, transparent 52%, var(--hero-fade-profile) 84%, var(--hero-fade-profile) 100%), var(--hero-profile);
  background-size: cover, var(--hero-own-size, cover);
  background-position: center, var(--hero-own-pos, var(--hero-profile-pos));
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px var(--color-gold-edge), 0 26px 50px -30px var(--color-gold-edge), var(--shadow-card);
}
:root[data-theme] .scr-profile .scr-profile-hero-text { padding: 0 28px calc(var(--space-3) + 38px); }
:root[data-theme] .scr-profile .scr-profile-photo-btn { top: calc(env(safe-area-inset-top) + 80px); left: 26px; }
:root[data-theme] .scr-profile .scr-profile-first { position: relative; z-index: 2; margin-top: -42px; }
:root[data-theme] .scr-profile .scr-profile-stats { margin: 0 6px; }
:root[data-theme] .scr-profile .scr-profile-hero-text { width: auto; margin: 0; border: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }

/* LIVE is soft (owner 2026-11-18): the square red theme buttons stay with the working screens (sets, reps, drugs); in LIVE — its
   screens, the LIVE sheet, the island over the workout, its own sheets — every button is a calm pill: primary a tint of the theme's
   accent, secondary a quiet outline, ghost just words. One rule for every theme (it outranks the themes' :root[data-theme=x] .ui-btn). */
:root[data-theme] :is(.scr-live, .ui-live-space, .ui-live-join, .ui-live-sheet, .ui-live-island) .ui-btn {
  position: relative; min-height: 44px; padding: 0 var(--space-4); border-radius: 999px; border: 1px solid var(--color-divider);
  background: color-mix(in srgb, var(--color-text) 5%, transparent); color: var(--color-text); box-shadow: none; animation: none;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; overflow: visible;
}
:root[data-theme] :is(.scr-live, .ui-live-space, .ui-live-join, .ui-live-sheet, .ui-live-island) .ui-btn::after { content: none; }
:root[data-theme] :is(.scr-live, .ui-live-space, .ui-live-join, .ui-live-sheet, .ui-live-island) .ui-btn--primary {
  border-color: color-mix(in srgb, var(--color-gold-soft) 55%, transparent); background: color-mix(in srgb, var(--color-gold-soft) 15%, transparent); color: var(--color-gold-soft);
}
:root[data-theme] :is(.scr-live, .ui-live-space, .ui-live-join, .ui-live-sheet, .ui-live-island) .ui-btn--primary:active { background: color-mix(in srgb, var(--color-gold-soft) 25%, transparent); }
:root[data-theme] :is(.scr-live, .ui-live-space, .ui-live-join, .ui-live-sheet, .ui-live-island) .ui-btn--ghost { border-color: transparent; background: transparent; color: var(--color-gold-soft); }
:root[data-theme] :is(.scr-live, .ui-live-space, .ui-live-join, .ui-live-sheet, .ui-live-island) .ui-btn:active { transform: scale(.98); }
:root[data-theme] :is(.scr-live, .ui-live-space, .ui-live-join, .ui-live-sheet, .ui-live-island) .ui-btn:disabled { opacity: .5; }
:root[data-theme] :is(.scr-live, .ui-live-space, .ui-live-join, .ui-live-sheet, .ui-live-island) .ui-btn[data-tone="danger"],
:root[data-theme] .scr-live .scr-live-block { color: var(--color-danger); }

/* the island's actions: one line each, sized by their words («Провести такую же» never breaks in two) */
:root[data-theme] .ui-live-island .ui-live-actions { flex-wrap: wrap; }
:root[data-theme] .ui-live-island .ui-btn.ui-live-act { flex: 1 1 auto; min-height: 40px; padding: 0 var(--space-3); font-size: 14px; white-space: nowrap; }

/* «♥» and «💬» in LIVE (owner 2026-11-18, shared/ui/live-like.js, live-comments.js): a thin row of two small icons with their numbers;
   the heart fills in the theme's accent with a short pop. 40 px to the finger, 18 px to the eye. */
.ui-reacts { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.ui-like { display: inline-flex; align-items: center; color: var(--color-text-secondary); }
.ui-react { display: inline-flex; align-items: center; gap: 4px; min-width: 40px; height: 36px; padding: 0 6px; border: 0; border-radius: 999px; background: none;
  color: var(--color-text-secondary); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s var(--ease); }
.ui-react:active { background: color-mix(in srgb, var(--color-text) 8%, transparent); }
.ui-react:focus-visible, .ui-react-count--btn:focus-visible { outline: 2px solid var(--color-gold-soft); outline-offset: 0; }
.ui-react-icon { display: grid; place-items: center; transition: transform .18s var(--ease); }
.ui-react-icon svg { width: 19px; height: 19px; stroke-width: 1.8; transition: fill .18s var(--ease); }
.ui-react--like { min-width: 36px; padding-right: 2px; color: inherit; }
.ui-react-count { font-size: 13px; font-weight: 600; line-height: 1; color: inherit; }
.ui-react-count--btn { height: 36px; padding: 0 8px 0 2px; border: 0; background: none; color: inherit; cursor: pointer; }
.ui-like[data-mine] { color: var(--color-gold-soft); }
.ui-like[data-mine] .ui-react-icon svg { fill: currentColor; }
.ui-like[data-pop] .ui-react-icon { animation: ui-like-pop .42s var(--ease); }
@keyframes ui-like-pop { from { transform: scale(.55); } }
/* the big ♥ over a message when it is liked (screens/messages) */
@keyframes ui-dm-burst { 0% { transform: scale(.2); opacity: 0; } 22% { transform: scale(1.18); opacity: 1; } 40% { transform: scale(.94); } 62% { transform: scale(1); opacity: 1; } 100% { transform: translateY(-12px) scale(1.04); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ui-like[data-pop] .ui-react-icon { animation: none; } .ui-react-icon, .ui-react-icon svg { transition: none; } }
/* the feed card: the row under the text, aligned with it (after the avatar) */
.ui-live-card-foot { margin: -6px 0 2px; padding: 0 var(--space-2) 0 calc(var(--space-3) + 36px + var(--space-2) - 6px); }
/* who liked */
.ui-likers { display: flex; flex-direction: column; }
.ui-likers-row { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-1) 0; border: 0; border-bottom: 1px solid var(--color-divider); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ui-likers-row:last-child { border-bottom: 0; }
.ui-likers-row .ui-live-avatar { width: 40px; height: 40px; font-size: 14px; flex: none; }
.ui-likers-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ui-likers-name { font-weight: 600; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-likers-heart { display: grid; color: var(--color-gold-soft); }
.ui-likers-heart svg { width: 18px; height: 18px; fill: currentColor; }
/* «💬» the comments sheet: the talk above, the field at the bottom (shared/ui/live-comments.js) */
.ui-comments { display: flex; flex-direction: column; gap: var(--space-3); max-height: 52vh; overflow-y: auto; padding: var(--space-1) 0 var(--space-3); overscroll-behavior: contain; }
.ui-comments-empty { margin: var(--space-3) 0; text-align: center; }
/* Discussion has one vertical list and a separate composer. Horizontal drags must
   neither scroll a long author line nor pan the LIVE screen underneath it. */
.ui-comments-sheet { height: 85vh; height: 85dvh; max-height: min(85dvh, var(--sheet-available-height, 85dvh)); overflow: hidden; touch-action: pan-y; overscroll-behavior-x: none; }
.ui-comments-sheet .ui-sheet__head { flex: none; min-width: 0; }
.ui-comments-sheet .ui-sheet__title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ui-comments-sheet .ui-sheet__head > button { flex: none; }
/* one scroll, as in Instagram (owner 2026-11-23): the record, who liked and the talk move together; the field stays at the bottom */
.ui-comments-sheet .ui-sheet__body { display: flex; flex: 1; flex-direction: column; min-width: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.ui-comments-sheet .ui-comments { flex: 1 0 auto; min-width: 0; max-width: 100%; max-height: none; overflow: visible; touch-action: pan-y; }
.ui-comments-sheet .ui-comment-context { flex: none; max-width: 100%; max-height: none; overflow: visible; overflow-wrap: anywhere; touch-action: pan-y; }
.ui-comments-sheet .ui-comment-bar { position: sticky; bottom: 0; z-index: 1; flex: none; min-width: 0; max-width: 100%; margin-top: auto; padding-bottom: var(--space-1);
  /* the sheet's own gradient, its bottom slice: the bar is the sheet itself, opaque over the talk that scrolls behind it */
  background: var(--color-floating); background-color: var(--color-surface); background-size: 100% 85dvh; background-position: center bottom; } /* the sheet already keeps the home bar's room */
.ui-comments-sheet .ui-comment { flex-shrink: 0; max-width: 100%; }
.ui-comments-sheet .ui-comment-like { margin-right: 0; }
.ui-comment-context { margin-bottom: var(--space-3); max-height: 32vh; overflow-y: auto; overscroll-behavior: contain; }
.ui-comment-context > .ui-live-card { padding: var(--space-3); }
.ui-comment-context .ui-live-details { border-top: 0; padding: var(--space-2) 0; }
/* the comment «Отклики» led to: it glows for a moment and becomes like the others — no frame, no shift (owner 2026-11-23) */
.ui-comment[data-comment-target] { border-radius: 12px; animation: ui-comment-found 4.2s ease-out 1 both; } /* lit once in sight (live-comments.js) */
@keyframes ui-comment-found {
  0%, 55% { background: color-mix(in srgb, var(--color-gold) 16%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-gold) 16%, transparent); }
  100% { background: transparent; box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) { .ui-comment[data-comment-target] { animation-duration: 3s; } }
.ui-comment { display: flex; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.ui-comment-face { width: 32px; height: 32px; padding: 0; border: 0; font-size: 12px; flex: none; cursor: pointer; }
.ui-comment-main { flex: 1 1 auto; min-width: 0; }
.ui-comment-top { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-2); row-gap: 2px; margin: 0; min-width: 0; }
.ui-comment-who { flex: 1 1 100px; min-width: 0; color: var(--color-text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-comment-when { flex: 0 1 auto; max-width: 100%; overflow-wrap: anywhere; font-size: 12px; }
.ui-comment-remove { margin-left: auto; padding: 4px 0 4px 8px; border: 0; background: none; color: var(--color-text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.ui-comment-text { margin: 2px 0 0; color: var(--color-text); font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.ui-comment-bar { position: sticky; bottom: 0; padding: var(--space-3) 0 calc(env(safe-area-inset-bottom) + var(--space-1)); background: var(--color-surface); border-top: 1px solid var(--color-gold-edge); }
/* one pill, as in a messenger: the words, and the send button inside it at the right, centred on the last line */
.ui-comment-box { display: flex; align-items: flex-end; gap: var(--space-1); min-height: 48px; padding: 4px 4px 4px 16px; border-radius: 24px;
  border: 1px solid var(--color-gold-edge); background: var(--color-field, var(--color-surface)); background-color: var(--color-surface); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.ui-comment-box:focus-within { border-color: color-mix(in srgb, var(--color-gold-soft) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-gold-soft) 14%, transparent); }
.ui-comment-field { flex: 1 1 auto; display: block; min-width: 0; height: 38px; max-height: 112px; margin: 0 0 1px; padding: 9px 0; border: 0; outline: 0; background: none; resize: none; overflow-y: auto;
  color: var(--color-text); font: inherit; font-size: 16px; line-height: 20px; -webkit-appearance: none; appearance: none; }
.ui-comment-field::placeholder { color: var(--color-text-secondary); opacity: 1; }
.ui-comment-send { flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--color-text) 10%, var(--color-surface)); color: var(--color-text-secondary); -webkit-tap-highlight-color: transparent;
  transition: background .2s var(--ease), color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease); }
.ui-comment-send svg { width: 18px; height: 18px; stroke-width: 2; transform: translate(-1px, 1px); }
.ui-comment-send:disabled { cursor: default; opacity: .55; }
/* words in the field: the button lights up in the theme's accent, the plane lifts a little */
.ui-comment-box[data-ready] .ui-comment-send { opacity: 1; background: var(--color-gold-gradient, var(--color-gold-soft)); color: var(--color-text-on-gold, var(--color-bg)); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--color-gold-soft) 70%, transparent); animation: ui-send-ready .28s var(--ease); }
@keyframes ui-send-ready { from { transform: scale(.8); } }
.ui-comment-box[data-ready] .ui-comment-send:active { transform: scale(.92); }
@media (prefers-reduced-motion: reduce) { .ui-comment-box[data-ready] .ui-comment-send { animation: none; } }
/* «♥» on a comment, as in Instagram: small, at the right, its number under it */
.ui-comment-like { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; width: 36px; min-height: 40px; margin: -4px -6px 0 0; padding: 6px 0 0;
  border: 0; background: none; color: var(--color-text-secondary); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ui-comment-like .ui-react-icon svg { width: 15px; height: 15px; stroke-width: 1.9; }
.ui-comment-like[data-mine] { color: var(--color-gold-soft); }
.ui-comment-like[data-mine] .ui-react-icon svg { fill: currentColor; }
.ui-comment-like[data-pop] .ui-react-icon { animation: ui-like-pop .42s var(--ease); }
.ui-comment-like:disabled { cursor: default; opacity: .8; }
.ui-comment-like-n { min-height: 14px; font-size: 11px; font-weight: 600; line-height: 14px; }
@media (prefers-reduced-motion: reduce) { .ui-comment-like[data-pop] .ui-react-icon { animation: none; } }
.ui-comment-like[hidden] { display: none; }
/* «Отклики» in the LIVE sheet (owner 2026-11-18): the heart in the header with the number of new ones; the list of who liked and wrote */
.ui-live-inbox-btn { position: relative; }
.ui-live-inbox-icon { display: grid; place-items: center; }
.ui-live-inbox-icon svg { width: 22px; height: 22px; }
.ui-live-inbox-btn[data-new] { color: var(--color-gold-soft); }
.ui-live-inbox-btn[data-new] .ui-live-inbox-icon svg { fill: currentColor; }
.ui-live-inbox-btn[data-action="live-messages"][data-new] .ui-live-inbox-icon svg { fill: none; } /* the paper plane stays an outline (messages, 2026-11-24) */
.ui-live-inbox-n { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--color-danger); color: var(--color-text-on-danger);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--color-bg); }
.ui-inbox { display: flex; flex-direction: column; gap: 2px; }
.ui-inbox-section { margin: var(--space-3) var(--space-2) var(--space-1); }
.ui-inbox-section:first-child { margin-top: var(--space-1); }
.ui-inbox-row { position: relative; display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 64px; padding: var(--space-2) var(--space-3); border: 0; border-radius: 16px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s var(--ease); }
.ui-inbox-row[data-new] { background: color-mix(in srgb, var(--color-gold-soft) 8%, transparent); }
.ui-inbox-row:active { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
/* the faces: one, or up to three overlapping for likes; the sign of what happened at the bottom right */
.ui-inbox-faces { position: relative; flex: none; display: flex; width: 46px; height: 46px; }
.ui-inbox-face { width: 46px; height: 46px; font-size: 15px; }
.ui-inbox-faces--stack .ui-inbox-face { position: absolute; width: 34px; height: 34px; font-size: 11px; background: var(--color-surface); box-shadow: 0 0 0 2px var(--color-bg); overflow: hidden; }
.ui-inbox-faces--stack .ui-inbox-face:nth-child(1) { left: 0; top: 0; z-index: 2; } /* the newest on top, its letter whole */
.ui-inbox-faces--stack .ui-inbox-face:nth-child(2) { left: 12px; top: 12px; z-index: 1; }
.ui-inbox-kind { position: absolute; right: -4px; bottom: -4px; z-index: 4; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-gold-soft); color: var(--color-bg); box-shadow: 0 0 0 2px var(--color-bg); }
.ui-inbox-kind[data-kind="talk"] { background: var(--color-surface); color: var(--color-gold-soft); }
.ui-inbox-kind svg { width: 12px; height: 12px; fill: currentColor; stroke-width: 1.5; }
.ui-inbox-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ui-inbox-line { color: var(--color-text); font-size: 15px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.ui-inbox-line b { font-weight: 700; }
.ui-inbox-quote { color: var(--color-text); opacity: .92; }
.ui-inbox-what { color: var(--color-gold-soft); font-weight: 600; }
.ui-inbox-sub { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-inbox-reply { align-self: flex-start; margin-top: 1px; font-size: 12.5px; font-weight: 700; color: var(--color-gold-soft); }
/* the event at the right: a small tile with its sign — a dumbbell, a plate, a cup */
.ui-inbox-thumb { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--color-divider);
  background: color-mix(in srgb, var(--color-gold-soft) 10%, var(--color-surface)); color: var(--color-gold-soft); }
.ui-inbox-thumb svg { width: 20px; height: 20px; }
.ui-inbox-dot { position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--color-gold-soft); }
/* nothing yet: a calm heart, a title, the words */
.ui-inbox-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-6) var(--space-4); text-align: center; }
.ui-inbox-empty-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--color-gold-soft) 60%, transparent); color: var(--color-gold-soft); }
.ui-inbox-empty-icon svg { width: 32px; height: 32px; }
.ui-inbox-empty-title { margin: var(--space-1) 0 0; font-size: 17px; font-weight: 700; color: var(--color-text); }
.ui-inbox-empty .ui-meta { margin: 0; max-width: 300px; line-height: 1.45; }
/* «Вы» in the strip: one's own circle, a thin accent ring */
.ui-live-who[data-me] .ui-live-who-ava { box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-gold-soft) 70%, transparent); }
.ui-live-feedwrap[hidden], .ui-inbox-scroll[hidden] { display: none; } /* «Отклики» replace the feed, not sit under it */
/* LIVE on one's own screens (shared/ui/live-own.js): a small gold line on a meal's tile, a row «В LIVE · ♡ · 💬» under a meal / in «Сегодня» */
.ui-own-react { display: inline-flex; align-items: center; justify-content: center; gap: 3px; margin-top: 2px; font-size: 11.5px; font-weight: 700; line-height: 1; color: var(--color-gold-soft); }
.ui-own-react-icon { display: inline-grid; place-items: center; margin-left: 3px; }
.ui-own-react-icon:first-child { margin-left: 0; }
.ui-own-react-icon svg { width: 12px; height: 12px; fill: currentColor; stroke-width: 1.6; }
.ui-own-live { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; margin-top: var(--space-1); padding: 2px 0 0; border-top: 1px solid var(--color-divider); }
.ui-own-live-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--color-text-secondary); }
.ui-own-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-gold-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-gold-soft) 22%, transparent); }
.ui-own-live .ui-reacts { margin-right: -6px; }
/* the LIVE feed by days: the day's name sticks at the top while its events scroll under it */
.ui-live-day { position: sticky; top: calc(-1 * var(--space-2)); z-index: 2; margin: var(--space-3) calc(-1 * var(--space-3)) var(--space-1); padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--color-bg) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ui-live-day::first-letter { text-transform: uppercase; }
/* ♡ · 💬 of one exercise (owner 2026-11-19): small, at the right of its name in the LIVE sheet and the island */
.ui-live-ex-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.ui-live-ex-top .ui-live-ex-name { flex: 1 1 auto; min-width: 0; }
.ui-ex-reacts { flex: none; margin: -8px -6px -8px 0; }
.ui-ex-reacts .ui-react { min-width: 32px; height: 32px; padding: 0 4px; }
.ui-ex-reacts .ui-react-icon svg { width: 16px; height: 16px; }
.ui-ex-reacts .ui-react-count, .ui-ex-reacts .ui-react-count--btn { font-size: 12px; height: 32px; }

:root[data-theme] .ui-live-space .ui-btn.ui-live-act { flex: 1 1 auto; min-height: 40px; padding: 0 var(--space-3); font-size: 14px; white-space: nowrap; } /* one line in the sheet too */
@media (prefers-reduced-motion: reduce) { .ui-update-bar { animation: none; } }

/* «Как POVTOR подбирает совет» (shared/ui/coach-advice.js): the person's case in numbered steps, then the science */
.ui-advice { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-advice-lead { margin: 0; color: var(--color-text); font-size: 15px; line-height: 1.45; }
.ui-advice-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.ui-advice-step { display: flex; gap: var(--space-3); align-items: flex-start; }
.ui-advice-step-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--color-gold-soft) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-gold-soft) 55%, transparent); color: var(--color-gold-soft); font-weight: 800; font-size: 13px; }
.ui-advice-step-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ui-advice-step-title { margin: 3px 0 0; font-weight: 700; color: var(--color-text); }
.ui-advice-step-text { margin: 0; color: var(--color-text-secondary); font-size: 14px; line-height: 1.45; }
.ui-advice-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ui-advice-group { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--color-divider); font-size: 12.5px; color: var(--color-text); }
.ui-advice-group small { color: var(--color-text-secondary); font-size: 12px; }
.ui-advice-group-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); }
.ui-advice-group.is-rest .ui-advice-group-dot { background: var(--color-text-secondary); opacity: .6; }
.ui-advice-targets { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ui-advice-targets li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--space-2); padding-bottom: 8px; border-bottom: 1px solid var(--color-divider); }
.ui-advice-targets li:last-child { border-bottom: 0; padding-bottom: 0; }
.ui-advice-target-name { color: var(--color-text); font-weight: 600; }
.ui-advice-target-set { text-align: right; color: var(--color-text); }
.ui-advice-target-set b { color: var(--color-gold-soft); }
.ui-advice-targets li .ui-meta { grid-column: 1 / -1; font-size: 12.5px; }
.ui-advice-science { border-top: 1px solid var(--color-divider); padding-top: var(--space-2); }
.ui-advice-science summary { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 700; color: var(--color-gold-soft); cursor: pointer; list-style: none; }
.ui-advice-science summary::-webkit-details-marker { display: none; }
.ui-advice-science-icon { display: grid; place-items: center; }
.ui-advice-science-icon svg { width: 18px; height: 18px; }
.ui-advice-sources { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.4; color: var(--color-text-secondary); }
.ui-advice-sources a { color: var(--color-text-secondary); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-gold-soft) 50%, transparent); text-underline-offset: 2px; }
.ui-advice-note { margin: 0; font-size: 12.5px; line-height: 1.4; }

/* «Живой фон тренировки» off (lib/motion.js, owner 2026-11-23): the workout scene stands still in every theme — no layers over the
   photo (fog, flashes, crowd, leaves, sparks), no moving steam or glow; Atlas breathing stops in shared/ui/atlas-breathing.js. */
:root[data-motion="off"] .scr-workout .scr-workout-stage { display: none; }
:root[data-motion="off"] .scr-workout *, :root[data-motion="off"] .scr-workout *::before, :root[data-motion="off"] .scr-workout *::after { animation: none !important; }
:root[data-motion="off"] .scr-workout .scr-workout-card--beam::after { display: none; } /* the active card's beam (workout/screen.css): with motion off, the frame only */

/* «Запись» (shared/ui/live-comments.js likersStrip, owner 2026-11-23): who put «♥», under the record and above the talk — up to three
   overlapping faces, the names, a chevron that opens the whole list in place */
.ui-post-likers { flex: none; margin: 0 0 var(--space-2); border-bottom: 1px solid var(--color-divider); }
.ui-post-likers-head { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 48px; padding: var(--space-1) 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ui-post-likers-faces { display: inline-flex; flex: none; }
.ui-post-likers-faces .ui-live-avatar { width: 28px; height: 28px; font-size: 11px; box-shadow: 0 0 0 2px var(--color-bg-elevated, var(--color-surface)); }
.ui-post-likers-faces .ui-live-avatar + .ui-live-avatar { margin-left: -9px; }
.ui-post-likers-words { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; }
.ui-post-likers-words > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-post-likers-heart { display: inline-flex; flex: none; width: 15px; height: 15px; color: var(--color-gold-soft); }
.ui-post-likers-heart svg { width: 100%; height: 100%; fill: currentColor; }
.ui-post-likers-head .ui-chevron { flex: none; transition: transform 0.2s ease; }
.ui-post-likers-head[aria-expanded="true"] .ui-chevron { transform: rotate(90deg); }
.ui-post-likers-list { padding-bottom: var(--space-1); } /* flows in the sheet's one scroll, no box scrolling inside a box */
.ui-post-likers-list[hidden] { display: none; }
/* one's own row with something new since it was last opened: the new kind glows, a small dot beside it (live-like.js freshOf) */
.ui-reacts[data-fresh] { position: relative; }
.ui-reacts[data-fresh="like"] .ui-react--like, .ui-reacts[data-fresh="comment"] .ui-react--comment { color: var(--color-gold-soft); }
.ui-reacts[data-fresh="like"] .ui-like .ui-react-icon svg { fill: currentColor; }
.ui-reacts[data-fresh]::after { content: ""; position: absolute; top: 4px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-gold-soft); box-shadow: 0 0 0 2px var(--color-surface, transparent); animation: ui-fresh-dot 1.6s ease-in-out 3; }
@keyframes ui-fresh-dot { 50% { transform: scale(1.45); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .ui-reacts[data-fresh]::after { animation: none; } }

/* Who trains right now (shared/ui/live-presence.js drawNow, owner 2026-11-23): round faces beside the LIVE button, overlapping, each
   with the «training now» ring; a tap opens that person's curtain, the face of the one on show stands out */
.ui-live-now { position: relative; z-index: 2; display: inline-flex; flex: none; align-items: center; align-self: center; margin: 0 4px 0 2px; padding-left: 3px; }
.ui-live-now[hidden] { display: none; }
.ui-live-now-face { position: relative; display: inline-flex; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ui-live-now-face + .ui-live-now-face { margin-left: -10px; }
.ui-live-now-face .ui-live-avatar { width: 32px; height: 32px; font-size: 12px; box-shadow: 0 0 0 2px var(--color-bg, #000), 0 0 0 3.5px var(--color-gold-soft); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.ui-live-now-face:first-child .ui-live-avatar { animation: ui-live-now-ring 2.4s ease-in-out infinite; }
.ui-live-now-face[aria-pressed="true"] { z-index: 1; }
.ui-live-now-face[aria-pressed="true"] .ui-live-avatar { transform: scale(1.12); box-shadow: 0 0 0 2px var(--color-bg, #000), 0 0 0 4px var(--color-gold), 0 0 12px var(--color-gold-soft); animation: none; }
.ui-live-now-more { min-width: 32px; height: 32px; margin-left: -10px; padding: 0 6px; border: 0; border-radius: 16px; background: var(--color-surface); color: var(--color-text); font-size: 12px; font-weight: 700; box-shadow: 0 0 0 2px var(--color-bg, #000); cursor: pointer; }
@keyframes ui-live-now-ring { 50% { box-shadow: 0 0 0 2px var(--color-bg, #000), 0 0 0 3.5px var(--color-gold-soft), 0 0 10px var(--color-gold-soft); } }
@media (prefers-reduced-motion: reduce) { .ui-live-now-face .ui-live-avatar { animation: none !important; transition: none; } }
:root[data-motion="off"] .ui-live-now-face .ui-live-avatar { animation: none; }

/* «Запись», as in Instagram (shared/ui/live-comments.js, owner 2026-11-23: «сделать более красивее»): the record on its own card,
   «Комментарии · n» under it, each comment the face, the name over the words, a quiet line of the time, «Ответить», «Удалить» */
.ui-comments-sheet .ui-comment-context { margin-bottom: var(--space-3); }
.ui-comments-sheet .ui-comment-context > .ui-live-card { border-radius: 18px; padding: var(--space-3) var(--space-3) var(--space-2); }
.ui-comments-sheet .ui-comment-context .ui-live-ex-name { font-size: 17px; font-weight: 700; letter-spacing: 0; }
.ui-comments-head { flex: none; display: flex; align-items: baseline; gap: 2px; margin: 0 0 var(--space-2); color: var(--color-text-secondary); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.ui-comments-sheet .ui-comments { gap: var(--space-4); padding-top: var(--space-1); }
.ui-comments-sheet .ui-comment-face { width: 36px; height: 36px; font-size: 13px; }
.ui-comments-sheet .ui-comment-who { flex: 0 1 auto; max-width: 100%; font-size: 14px; font-weight: 700; }
.ui-comments-sheet .ui-comment-text { margin-top: 1px; font-size: 15px; line-height: 1.38; }
.ui-comment-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-3); margin: 4px 0 0; color: var(--color-text-secondary); font-size: 12px; }
.ui-comment-acts .ui-comment-when { font-size: 12px; }
.ui-comment-act { margin: 0; padding: 2px 0; border: 0; background: none; color: var(--color-text-secondary); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ui-comment-act:active { opacity: 0.6; }
.ui-comment-acts .ui-comment-remove { margin-left: 0; padding: 2px 0; }
.ui-comments-sheet .ui-comment-like { align-self: flex-start; margin-top: 6px; }
.ui-comments-sheet .ui-comment-bar { border-top: 1px solid var(--color-divider); }

/* the active exercise's beam of light (workout/screen.css .scr-workout-card--beam): an angle that animates round the frame */
@property --ui-beam { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes ui-card-beam { 0% { --ui-beam: 0deg; opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { --ui-beam: 540deg; opacity: 0; } }

/* LIVE, one person picked: the food of each day under its title (shared/ui/live-space.js dayFood, owner 2026-11-23) — the calories
   large, the meals count, a thin bar of protein / fat / carbs calories, the grams; the colours of «Питание» */
.ui-live-dayfood { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-2); padding: 10px var(--space-3); border-radius: var(--radius-row); background: var(--color-surface-gradient, var(--color-surface)); border: 1px solid var(--color-gold-edge); }
.ui-live-dayfood-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ui-live-dayfood-top { display: flex; flex-direction: column; gap: 1px; }
.ui-live-dayfood:not([data-goal]) .ui-live-dayfood-top { flex-direction: row; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
/* the goal: a ring that fills as the day is eaten, the share in it; over the goal by more than 5 % it turns crimson */
.ui-live-dayfood-ring { position: relative; flex: none; width: 60px; height: 60px; display: inline-flex; align-items: center; justify-content: center; }
.ui-live-dayfood-ring svg { position: absolute; inset: 0; }
.ui-live-dayfood-ring-bg { fill: none; stroke: var(--color-divider); stroke-width: 6; }
.ui-live-dayfood-ring-fg { fill: none; stroke: var(--color-gold); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.ui-live-dayfood-ring[data-over] .ui-live-dayfood-ring-fg { stroke: var(--color-crimson); }
.ui-live-dayfood-ring b { position: relative; font-size: 13px; font-weight: 800; color: var(--color-text); }
.ui-live-dayfood-kcal { font-size: 14px; color: var(--color-text-secondary); }
.ui-live-dayfood-kcal b { font-size: 22px; font-weight: 800; color: var(--color-text); letter-spacing: -0.01em; }
.ui-live-dayfood-meals { font-size: 12px; }
.ui-live-dayfood:not([data-goal]) .ui-live-dayfood-meals { text-align: right; }
.ui-live-dayfood-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; }
.ui-live-dayfood-bar span { flex-basis: 0; border-radius: 3px; }
.ui-live-dayfood-bar [data-macro="p"], .ui-live-dayfood-macros [data-macro="p"] .ui-live-dayfood-m::before { background: var(--color-gold-soft); }
.ui-live-dayfood-bar [data-macro="f"], .ui-live-dayfood-macros [data-macro="f"] .ui-live-dayfood-m::before { background: var(--color-crimson); }
.ui-live-dayfood-bar [data-macro="c"], .ui-live-dayfood-macros [data-macro="c"] .ui-live-dayfood-m::before { background: var(--color-success); }
.ui-live-dayfood-macros { display: flex; gap: var(--space-4); font-size: 12.5px; color: var(--color-text-secondary); }
.ui-live-dayfood-macros > span { display: flex; flex-direction: column; gap: 0; line-height: 1.2; }
.ui-live-dayfood-m { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ui-live-dayfood-m::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.ui-live-dayfood-macros small { padding-left: 10px; font-size: 11px; color: var(--color-text-secondary); white-space: nowrap; }
.ui-live-dayfood-macros b { color: var(--color-text); font-weight: 700; }

/* a new profile photo or background in the LIVE feed (owner 2026-11-24): the picture itself, a tap opens the profile */
.ui-live-photo { display: block; padding: 0; border: 0; background: transparent; cursor: pointer; margin: var(--space-2) 0; }
.ui-live-photo img { display: block; }
.ui-live-photo--avatar img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--color-gold-soft); }
.ui-live-photo--cover { width: 100%; }
.ui-live-photo--cover img { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-row); object-fit: cover; }

/* «Сообщения»: one paper plane, fixed in the top right corner of every tab (owner 2026-11-25, shared/ui/dm-plane.js). It stands where
   the first icon of a tab's header stands (12 px from the top, the screen's side margin from the right); the headers of the tabs leave
   that place free, so ⚙ of «Профиль» and LIVE of «Тренировка» stand just left of it. Scrolled down, it gets a soft round backing. */
.ui-dm-plane { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top) + var(--space-5)); right: var(--screen-pad); /* + the -8 px margin of .ui-icon-btn = exactly where the header icons stand */ color: var(--color-text); transition: background-color .2s, box-shadow .2s; }
.ui-dm-plane[hidden] { display: none; }
.ui-dm-plane__icon { display: inline-flex; }
.ui-dm-plane__icon svg { width: 24px; height: 24px; }
.ui-dm-plane[data-new] { color: var(--color-gold-soft); }
.ui-dm-plane.is-floating { border-radius: 50%; background: color-mix(in srgb, var(--color-surface) 82%, transparent); box-shadow: 0 0 0 1px var(--color-divider), var(--shadow-card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ui-dm-plane__n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--color-danger); color: var(--color-text-on-danger, #fff); font-size: 11px; font-weight: 700; line-height: 1; pointer-events: none; }
.ui-dm-plane__n[hidden] { display: none; }
html.has-dm-plane .ui-view .ui-header:not(.ui-header--nested) { padding-right: calc(var(--screen-pad) + 44px); }
/* the tabs' titles beside the paper plane: the plane's room already clears the corner accent; a narrow phone gets a smaller title,
   never a word broken in two («ПРОГРАММ / Ы» at 320 px) */
html.has-dm-plane .ui-view .ui-header:not(.ui-header--nested) .ui-header__titles { padding-right: 0; }
@media (max-width: 380px) {
  html.has-dm-plane .ui-view .ui-header:not(.ui-header--nested) .ui-header__title { font-size: 8.2vw; overflow-wrap: normal; word-break: keep-all; }
}

/* «Загружаем…» and empty placeholder cards (owner 2026-11-25: «не должно быть таких моментов»): invisible for the first 450 ms, so a
   quick answer replaces them before they are ever seen; only a slow network shows them, softly */
.ui-wait { animation: ui-wait-in .2s ease .45s both; }
@keyframes ui-wait-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ui-wait { animation-duration: .01s; } }


/* Per-person activity announcements: quiet controls, shared by LIVE curtain and profile. */
.ui-activity-notices .ui-sheet__title { min-width: 0; overflow-wrap: anywhere; }
.ui-activity-notices .ui-activity-notices-options { margin: var(--space-3) 0; }
.ui-activity-notices .ui-activity-notices-action { display: block; width: 100%; min-height: 44px; padding: var(--space-2) 0; border: 0; border-top: 1px solid var(--color-divider); background: transparent; color: var(--color-text-secondary); text-align: left; font: var(--font-label); cursor: pointer; }
.ui-activity-notices .ui-activity-notices-action:disabled { opacity: .45; cursor: default; }
.ui-live-notices { flex: 0 0 auto; color: var(--color-text-secondary); }

.ui-activity-notices .ui-toggle + .ui-toggle { margin-top: var(--space-2); }
.ui-activity-notices .ui-activity-notices-person { margin: 0 0 var(--space-2); }

.ui-live-head-tools { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; }
.ui-live-island[data-state="compact"] .ui-live-notices { display: none; }

/* Result publication composer. Its controls and preview do not change the underlying screens. */
.ui-share-sheet .ui-sheet__body { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); }
.ui-share-sheet .ui-sheet__title { font-size: 20px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.ui-share-result { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-share-result .ui-share-formats .ui-segmented { width: fit-content; min-width: 220px; max-width: 100%; margin: 0 auto; }
:root[data-theme] .ui-share-result .ui-segmented { border: 0; background: transparent; box-shadow: none; }
:root[data-theme] .ui-share-result .ui-segmented__item { min-height: 44px; border-radius: 999px; font-size: 14px; letter-spacing: 0; text-transform: none; }
:root[data-theme] .ui-share-result .ui-segmented__item[aria-selected="true"] { background: var(--color-raised); color: var(--color-gold-soft); box-shadow: inset 0 0 0 1px var(--color-divider); }
.ui-share-result .ui-share-preview { width: min(100%, 190px); aspect-ratio: 9 / 16; margin: 0 auto; overflow: hidden; border-radius: var(--radius-card); background: var(--color-bg); box-shadow: var(--shadow-card); }
.ui-share-result .ui-share-preview canvas, .ui-share-result .ui-share-preview video { display: block; width: 100%; height: 100%; object-fit: contain; }
.ui-share-result .ui-share-status { min-height: 1.3em; margin: 0; color: var(--color-text-secondary); font: var(--font-caption); text-align: center; }
.ui-share-result .ui-share-settings { border-top: 1px solid var(--color-divider); }
.ui-share-result .ui-share-settings summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); list-style: none; color: var(--color-text-secondary); font: var(--font-label); cursor: pointer; }
.ui-share-result .ui-share-settings summary::-webkit-details-marker { display: none; }
.ui-share-result .ui-share-settings summary::after { content: '+'; font-size: 22px; }
.ui-share-result .ui-share-settings[open] summary::after { content: '−'; }
.ui-share-result .ui-share-settings-body { display: grid; gap: var(--space-2); padding-bottom: var(--space-2); }
.ui-share-result .ui-share-photo-row { display: flex; align-items: center; gap: var(--space-2); }
.ui-share-result .ui-share-photo { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--color-text-secondary); font: var(--font-label); cursor: pointer; }
.ui-share-result .ui-share-photo svg { width: 20px; height: 20px; }
.ui-share-result .ui-share-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-1); }
.ui-share-result .ui-share-actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 64px; padding: var(--space-2) var(--space-1); border: 0; border-radius: var(--radius-row); background: transparent; color: var(--color-text-secondary); font: var(--font-caption); line-height: 1.3; cursor: pointer; }
.ui-share-result .ui-share-actions svg { display: block; width: 22px; height: 22px; }
.ui-share-result .ui-share-actions .ui-share-send { color: var(--color-gold-soft); }
.ui-share-result .ui-share-actions button:active { background: var(--color-pressed); }
.ui-share-result button:focus-visible { outline: 2px solid var(--color-gold-soft); outline-offset: 2px; }
.ui-share-result button:disabled { opacity: .45; cursor: default; }
.ui-share-result .ui-share-note { margin: 0; color: var(--color-text-secondary); font: var(--font-caption); text-align: center; }
.ui-share-result .ui-share-preview[data-layout="sticker"] { width: min(100%, 340px); aspect-ratio: auto; border-radius: var(--radius-card); background-color: var(--color-bg); background-image: conic-gradient(var(--color-divider) 25%, transparent 0 50%, var(--color-divider) 0 75%, transparent 0); background-size: 16px 16px; box-shadow: none; }
.ui-share-result .ui-share-preview[data-layout="sticker"] canvas { height: auto; }
.ui-share-result .ui-share-actions button[hidden] { display: none; }
.ui-share-result .ui-share-preview[data-layout="composition"] { width: min(100%, 160px); aspect-ratio: 9 / 16; border-radius: var(--radius-card); }
.ui-share-result .ui-share-help { color: var(--color-text-secondary); font: var(--font-caption); }
.ui-share-result .ui-share-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.ui-share-result .ui-share-help-body { display: grid; gap: var(--space-2); }
.ui-share-result .ui-share-help ol { margin: 0; padding-left: 20px; line-height: 1.5; }
.ui-share-result .ui-share-help li + li { margin-top: var(--space-1); }
.ui-share-result .ui-share-help p { margin: 0; line-height: 1.5; }
.ui-share-result .ui-share-actions .ui-share-save { color: var(--color-gold-soft); }
.ui-share-result .ui-share-actions .ui-share-send { color: var(--color-text-secondary); }
.ui-share-sheet { height: min(88svh, var(--sheet-available-height, 88svh)); max-height: calc(var(--sheet-available-height, 100svh) - 16px); }
.ui-share-sheet .ui-sheet__body { display: flex; flex: 1; overflow: hidden; }
.ui-share-result { flex: 1; min-height: 0; min-width: 0; }
.ui-share-result .ui-share-scroll { display: flex; flex-direction: column; gap: var(--space-3); flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-inline: 2px; }
.ui-share-result .ui-share-footer { flex: none; border-top: 1px solid var(--color-divider); padding-top: var(--space-1); }
.ui-share-result .ui-share-instagram-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-gold-soft); text-decoration: none; }
.ui-share-result .ui-share-scroll > * { flex-shrink: 0; }

/* In an expanded meal the product list owns the names; the compact header alone previews them. */
.ui-live-island[data-kind="meal"][data-state="open"] .ui-live-sub, .ui-live-island[data-kind="meal"][data-state="full"] .ui-live-sub { display: none; }

/* «Что нового» after an update (lib/whats-new.js, owner 2026-11-30: «чтобы она замигала, подсветилась»): the tab glows with a pulsing dot;
   on the screen the new control shines and breathes, a bubble says «Новое…» */
.ui-nav__tab--new { position: relative; }
.ui-nav__tab--new::after { content: ""; position: absolute; top: 6px; left: calc(50% + 10px); width: 9px; height: 9px; border-radius: 50%; background: var(--color-gold-soft); box-shadow: 0 0 0 2px var(--color-bg), 0 0 10px 2px var(--color-gold-soft); animation: ui-news-dot 1.4s ease-in-out infinite; }
@keyframes ui-news-dot { 50% { transform: scale(1.35); box-shadow: 0 0 0 2px var(--color-bg), 0 0 16px 5px var(--color-gold-soft); } }
[data-news-glow] { position: relative; animation: ui-news-glow 1.6s ease-in-out infinite; }
@keyframes ui-news-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-gold-soft) 0%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-gold-soft) 35%, transparent), 0 0 18px 2px color-mix(in srgb, var(--color-gold-soft) 55%, transparent); } }
.ui-news-anchor { max-width: 100%; }
.ui-news-anchor > .ui-coach--below { left: 0; translate: none; }
.ui-news-anchor > .ui-coach--below::before { left: 22px; }
.ui-coach--news b { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .ui-nav__tab--new::after, [data-news-glow] { animation: none; } }
.ui-news-anchor > .ui-coach--above { bottom: calc(100% + 10px); left: 0; z-index: 30; }
.ui-news-anchor > .ui-coach--above::before { top: auto; bottom: -6px; left: 22px; }

/* The coach connection sheet (shared/ui/coach-connect.js, owner 2026-11-30): the coach, the category switches (the app's own toggles) */
.ui-coach-connect-sheet .ui-coach-connect { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-coach-connect-sheet .ui-coach-connect-who { display: flex; align-items: center; gap: var(--space-3); }
.ui-coach-connect-sheet .ui-coach-connect-who b { font: var(--font-label); font-weight: 700; }
.ui-coach-connect-sheet .ui-coach-connect-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.ui-coach-switches { display: flex; flex-direction: column; }
.ui-coach-switches .ui-toggle + .ui-toggle { border-top: 1px solid var(--color-divider); }
.ui-coach-connect-sheet .ui-coach-connect-live { display: flex; flex-direction: column; gap: var(--space-2); }
.ui-coach-connect-sheet .ui-coach-connect-handle { display: flex; align-items: center; gap: var(--space-1); }
.ui-coach-connect-sheet .ui-coach-connect-handle .ui-input { flex: 1; min-width: 0; }
.ui-coach-connect-sheet .ui-coach-connect-why { min-height: 1.2em; margin: 0; color: var(--color-danger); }

/* A light sign-in row (owner 2026-11-30: «не наляписто… Telegram самолётик голубой, Яндекс красная иконка… премиально»): a quiet
   surface with a hairline edge, the service's own coloured mark on the left, plain words — never the theme's heavy primary button */
.ui-auth-btn {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 54px; padding: 0 var(--space-4) 0 var(--space-2);
  border: 1px solid var(--color-divider); border-radius: 14px; background: color-mix(in srgb, var(--color-surface) 82%, transparent);
  color: var(--color-text); font: var(--font-label); font-weight: 600; letter-spacing: 0; text-transform: none; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.ui-auth-btn:hover { border-color: var(--color-gold-edge); }
.ui-auth-btn:active { background: var(--color-pressed); transform: scale(.99); }
.ui-auth-btn:disabled { opacity: .55; cursor: default; }
.ui-auth-btn__mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #FFFFFF; }
.ui-auth-btn__mark svg { width: 20px; height: 20px; }
.ui-auth-btn--tg .ui-auth-btn__mark { background: var(--color-telegram, #2AABEE); }
.ui-auth-btn--tg .ui-auth-btn__mark svg { margin-left: -2px; }
.ui-auth-btn--ya .ui-auth-btn__mark { background: var(--color-yandex, #FC3F1D); }
.ui-auth-btn--ya .ui-auth-btn__mark svg { width: 18px; height: 18px; }
.ui-auth-btn__text { flex: 1; min-width: 0; }
.ui-auth-btn__chev { flex: none; display: inline-flex; color: var(--color-text-secondary); opacity: .7; }
.ui-auth-btn__chev svg { width: 18px; height: 18px; }
.ui-auth-btns { display: flex; flex-direction: column; gap: var(--space-2); }
/* a quiet secondary action in the coach screens: text with a hairline, not a heavy block */
.ui-btn-quiet { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; min-height: 48px; padding: 0 var(--space-4);
  border: 1px solid var(--color-divider); border-radius: 14px; background: transparent; color: var(--color-gold-soft); font: var(--font-label); font-weight: 600;
  letter-spacing: 0; text-transform: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ui-btn-quiet:active { background: var(--color-pressed); }
.ui-btn-quiet:disabled { opacity: .55; cursor: default; }

/* The tap / hold flash of the rest ring wins over a theme's own endless ring animation (Old School gleam, Cyberpunk pulse, Dark Side
   pulse) for its 500 ms, then the theme's animation goes on — before, a pause on Old School showed no flash at all */
:root[data-theme] .scr-workout .scr-workout-ring[data-action="ring"].scr-workout-ring--flash { animation: ui-ring-flash 500ms ease-out 1; }
