/* Creatly — Apple HIG / iOS 26 look in a warm neutral palette.
   System font (SF Pro on Apple devices, Inter elsewhere), Large Titles that collapse into a glass nav bar,
   inset grouped lists, iOS switches and segmented controls, pill buttons, sheets with a grabber,
   glass materials for floating chrome. The caption colours stay content options; the UI accent is sand. */

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: dark;
  --f: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-d: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-r: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, Inter, system-ui, sans-serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);

  --tab-h: 64px;
  --tab-gap: max(10px, calc(var(--sa-bottom) - 4px));
  --sa-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-sa-top, 0px)) + var(--tg-csa-top, 0px));
  --sa-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--tg-sa-bottom, 0px)) + var(--tg-csa-bottom, 0px));
  --sa-left: max(env(safe-area-inset-left, 0px), var(--tg-sa-left, 0px));
  --sa-right: max(env(safe-area-inset-right, 0px), var(--tg-sa-right, 0px));

  /* dark (default) */
  --bg: #0f0d0b;
  --bg-2: #1c1915;
  --bg-3: #27231e;
  --fill: rgba(235, 214, 186, 0.09);
  --fill-2: rgba(235, 214, 186, 0.15);
  --label: #f6f1e9;
  --label-2: rgba(246, 241, 233, 0.64);
  --label-3: rgba(246, 241, 233, 0.46);
  --sep: rgba(246, 230, 205, 0.13);
  --dash: rgba(246, 230, 205, 0.18);
  --accent: #d8ba8c;
  --accent-fill: rgba(216, 186, 140, 0.16);
  --accent-text: #e2c79f;
  --on-accent: #1d160e;
  --tile-bg: rgba(216, 186, 140, 0.15);
  --green: #32d74b;
  --green-fill: rgba(50, 215, 75, 0.15);
  --red: #ff453a;
  --red-text: #ff7a70;
  --red-fill: rgba(255, 69, 58, 0.14);
  --orange: #ff9f0a;
  --seg-bg: rgba(160, 140, 115, 0.2);
  --seg-thumb: #5a5047;
  --switch-off: rgba(160, 140, 115, 0.3);
  --glass: rgba(34, 30, 26, 0.7);
  --glass-strong: rgba(30, 27, 23, 0.86);
  --glass-solid: #221e1a;
  --glass-line: rgba(255, 244, 228, 0.1);
  --glass-hi: rgba(255, 250, 240, 0.08);
  --sheet-bg: rgba(28, 25, 21, 0.94);
  --scrim: rgba(0, 0, 0, 0.5);
  --shadow-2: 0 12px 34px rgba(0, 0, 0, 0.4);
  --ti: #3a352f;
  --ti-hi: #736a60;
  --ti-lo: #1b1815;
  --chart-u: rgba(216, 186, 140, 0.36);
  --bubble-out: rgba(216, 186, 140, 0.21);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3efe9;
  --bg-2: #ffffff;
  --bg-3: #f8f5f0;
  --fill: rgba(120, 92, 60, 0.08);
  --fill-2: rgba(120, 92, 60, 0.14);
  --label: #1d1813;
  --label-2: rgba(29, 24, 19, 0.62);
  --label-3: rgba(29, 24, 19, 0.52);
  --sep: rgba(70, 50, 30, 0.14);
  --dash: rgba(70, 50, 30, 0.2);
  --accent: #d6b583;
  --accent-fill: rgba(168, 131, 79, 0.14);
  --accent-text: #8a6635;
  --on-accent: #1d160e;
  --tile-bg: rgba(168, 131, 79, 0.13);
  --green: #1e7a34;
  --green-fill: rgba(36, 138, 61, 0.12);
  --red: #d70015;
  --red-text: #c4000f;
  --red-fill: rgba(215, 0, 21, 0.09);
  --orange: #c93400;
  --seg-bg: rgba(118, 100, 80, 0.12);
  --seg-thumb: #ffffff;
  --switch-off: #e6e0d7;
  --glass: rgba(253, 250, 245, 0.72);
  --glass-strong: rgba(253, 250, 245, 0.88);
  --glass-solid: #fbf8f3;
  --glass-line: rgba(60, 40, 20, 0.1);
  --glass-hi: rgba(255, 255, 255, 0.7);
  --sheet-bg: rgba(250, 247, 242, 0.96);
  --scrim: rgba(25, 18, 10, 0.3);
  --shadow-2: 0 12px 34px rgba(70, 50, 30, 0.16);
  --ti: #b8b0a3;
  --ti-hi: #ebe5db;
  --ti-lo: #8c8478;
  --chart-u: rgba(168, 131, 79, 0.3);
  --bubble-out: rgba(214, 181, 131, 0.3);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f3efe9;
    --bg-2: #ffffff;
    --label: #1d1813;
    --label-2: rgba(29, 24, 19, 0.62);
  }
}

/* ------------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--label);
  font: 400 17px/1.3 var(--f);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  touch-action: manipulation;
  text-align: inherit;
}
button:disabled { cursor: default; }
a { color: inherit; }
p, h1, h2, h3 { margin: 0; }
img, video, svg { display: block; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--label-3); }

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.i { width: 22px; height: 22px; flex: none; }

/* -------------------------------------------------------------- the view */

.view {
  max-width: 520px;
  margin: 0 auto;
  padding:
    calc(var(--sa-top) + 6px)
    calc(16px + var(--sa-right))
    calc(var(--tab-gap) + var(--tab-h) + 34px)
    calc(16px + var(--sa-left));
}
body[data-route="studio"] .view { padding-bottom: calc(var(--tab-gap) + var(--tab-h) + 112px); }
body[data-route="consent"] .view { padding-bottom: calc(var(--sa-bottom) + 12px); }

/* Large Title, collapsing into the glass nav bar */
.lt {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 0 6px;
}
.lt__title { font: 700 34px/41px var(--f-d); letter-spacing: -0.026em; }
.lt__trail { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }

.navbar {
  position: fixed;
  z-index: 45;
  top: 0;
  left: 0;
  right: 0;
  padding-top: var(--sa-top);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 0.5px solid var(--sep);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.navbar.is-on { opacity: 1; transform: none; pointer-events: auto; }
.navbar__in {
  max-width: 520px;
  height: 48px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.navbar__title { grid-column: 2; font: 600 17px/22px var(--f); }
.navbar__trail { grid-column: 3; justify-self: end; }
.navbar .bpill { height: 30px; }

.bpill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label);
  font: 600 15px/1 var(--f);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: transform 0.25s var(--spring);
}
.bpill::before { content: ""; position: absolute; inset: -6px -4px; }
.bpill:active { transform: scale(0.95); }
.bpill .i { width: 18px; height: 18px; color: var(--accent-text); }

/* ------------------------------------------------------------- tab bar */

.tabbar {
  position: fixed;
  z-index: 40;
  left: calc(10px + var(--sa-left));
  right: calc(10px + var(--sa-right));
  bottom: var(--tab-gap);
  max-width: 500px;
  height: var(--tab-h);
  margin: 0 auto;
  border-radius: 32px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 0.5px solid var(--glass-line);
  box-shadow: var(--shadow-2), inset 0 0.5px 0 var(--glass-hi);
}
.tabbar__in { display: grid; grid-template-columns: repeat(5, 1fr); height: 100%; padding: 4px; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  border-radius: 28px;
  color: var(--label-2);
  text-decoration: none;
  transition: color 0.2s, background 0.3s var(--ease);
}
.tab__icon { position: relative; display: grid; place-items: center; }
.tab .i { width: 25px; height: 25px; }
.tab__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 10.5px/13px var(--f); letter-spacing: 0; }
.tab[aria-current="page"] { color: var(--accent-text); background: var(--fill); }
.tab:active .tab__icon { transform: scale(0.9); transition: transform 0.15s; }
.badge {
  position: absolute;
  top: -5px;
  left: 15px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font: 700 11px/18px var(--f);
  font-style: normal;
  text-align: center;
}

/* -------------------------------------------------------------- buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label);
  font: 600 17px/22px var(--f);
  letter-spacing: -0.014em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.28s var(--spring), background 0.2s, opacity 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; }
.btn .i { width: 20px; height: 20px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--tinted { background: var(--accent-fill); color: var(--accent-text); }
.btn--plain { background: transparent; color: var(--accent-text); }
.btn--glass { background: rgba(255, 255, 255, 0.16); color: #fff; }
.btn--block { display: flex; width: 100%; }
.btn--lg { min-height: 54px; }
.btn--sm { min-height: 38px; padding: 0 15px; font-size: 15px; }
.btn--sm::before { content: ""; position: absolute; inset: -3px -2px; }
.btn--sm .i { width: 17px; height: 17px; }

.iconbtn {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--label-3);
  --ic-cut: var(--bg-2);
}
.iconbtn .i { width: 24px; height: 24px; }
.iconbtn--danger { color: var(--red); --ic-cut: #fff; }
.iconbtn:active { opacity: 0.6; }

.info-btn {
  width: 44px;
  height: 44px;
  flex: none;
  margin: -10px -10px -10px 0;
  display: grid;
  place-items: center;
  color: var(--accent-text);
}
.info-btn .i { width: 22px; height: 22px; }
.info-btn--sm .i { width: 20px; height: 20px; }
.info-btn:active { opacity: 0.55; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--accent-text);
  font: 600 15px/20px var(--f);
  text-decoration: none;
  cursor: pointer;
}
.link .i { width: 18px; height: 18px; }
.link--muted { color: var(--label-2); font-weight: 500; }
.link-inline { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; padding: 0; font: inherit; }

/* ---------------------------------------------------------- segmented control */

.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  padding: 2px;
  border-radius: 12px;
  background: var(--seg-bg);
  isolation: isolate;
}
.seg--none .seg__thumb { opacity: 0; }
.seg__thumb {
  position: absolute;
  z-index: 0;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / var(--n));
  border-radius: 10px;
  background: var(--seg-thumb);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform 0.34s var(--ease);
}
.seg__opt {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 6px;
  border-radius: 10px;
  color: var(--label);
  font: 500 14px/18px var(--f);
  white-space: nowrap;
}
.seg__opt[aria-checked="true"] { font-weight: 600; }
.seg__opt .i { width: 15px; height: 15px; flex: none; }
.seg__l { overflow: hidden; text-overflow: ellipsis; }
.seg__n {
  flex: none;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 11.5px/15px var(--f);
}
.seg--lg { border-radius: 14px; }
.seg--lg .seg__thumb { border-radius: 12px; }
.seg--lg .seg__opt { min-height: 46px; font-size: 17px; }
.seg--sm { width: 116px; flex: none; }
.seg--sm .seg__opt { min-height: 36px; font-size: 14px; }
.seg--3 .seg__opt { font-size: 14px; padding: 0 4px; }
.seg--4 .seg__opt { font-size: 13px; padding: 0 2px; letter-spacing: -0.01em; }
@media (max-width: 389px) { .seg--4 .seg__opt { font-size: 12px; letter-spacing: -0.02em; } } /* «Зарубежные» in a quarter of a 360 px phone */

/* ------------------------------------------------------------------ switch */

.switch {
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
  border-radius: 16px;
  background: var(--switch-off);
  transition: background 0.25s ease;
}
.switch::before { content: ""; position: absolute; inset: -7px -4px; }
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 0.34s var(--spring);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ------------------------------------------------------ cards, groups, lists */

.card { background: var(--bg-2); border-radius: 22px; }
.rows > * + * { border-top: 0.5px solid var(--sep); }
.grp { margin-top: 26px; }
.grp__head { display: flex; align-items: center; gap: 8px; min-height: 24px; margin: 0 4px 10px; }
.grp__title { flex: 1; min-width: 0; font: 600 17px/22px var(--f); letter-spacing: -0.016em; }
.grp__value { font: 400 15px/20px var(--f); color: var(--label-2); white-space: nowrap; }
.grp__foot { margin: 8px 4px 0; font: 400 13px/18px var(--f); color: var(--label-2); }
.grp__lead { margin: -2px 4px 12px; font: 400 13px/18px var(--f); color: var(--label-2); }

.list {
  --sep-left: 58px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  background: var(--bg-2);
  border-radius: 22px;
  overflow: hidden;
}
.grp > .list { margin-top: 0; }
.grp > .card + .list { margin-top: 12px; }
.list > li { position: relative; }
.list > li + li::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: var(--sep-left);
  right: 0;
  height: 0.5px;
  background: var(--sep);
}
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 16px 8px 14px;
  color: var(--label);
  text-decoration: none;
  text-align: left;
}
.row--link { transition: background 0.15s; }
.row--link:active { background: var(--fill); }
.row__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row__title { font: 400 17px/22px var(--f); letter-spacing: -0.016em; }
.row__sub { font: 400 13px/17px var(--f); color: var(--label-2); }
.row__value { color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row__end { width: 14px; height: 14px; color: var(--label-3); }
.row--param .row__text { cursor: pointer; }
/* «Цветокор» → «Свой кадр» (app.js gradeMineHTML): the person's frame through the chosen look, nothing over it */
.grade-mine__open { margin: 6px 4px 0; }
.room__own { padding-top: 0; }
.room__note { margin: 0; padding: 0 16px 10px; font: 13px/18px var(--f); color: var(--label-2); }
.room__pv { display: grid; gap: 8px; justify-items: center; padding: 0 12px 12px; }
.room__img { width: min(100%, 240px); aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; display: block; }
.room__wait { padding: 12px; font: 500 13px/18px var(--f); color: var(--label-2); text-align: center; }
.grade-mine { display: grid; gap: 8px; justify-items: center; padding: 12px; margin-top: 10px; }
.grade-mine__frame { width: min(100%, 240px); aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--fill-2); display: grid; place-items: center; }
.grade-mine__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grade-mine__wait { padding: 12px; font: 500 13px/18px var(--f); color: var(--label-2); text-align: center; }
.grade-mine__note { margin: 0; font: 13px/18px var(--f); color: var(--label-2); text-align: center; }
.grade-mine__foot { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.grades.is-mine .gcard__img { object-position: 50% 30%; }
/* «Фото-вставки» / «Видео-вставки»: Выкл · Стоки · ИИ under the row's title (imagegen.js choiceHTML); «Медиа-карточки»:
   Выкл · Обычная · Продвинутая the same way (app.js mediaRowHTML) */
.gen__choice, .media__choice { flex-wrap: wrap; row-gap: 8px; padding-bottom: 12px; }
.gen__choice .row__text, .media__choice .row__text { cursor: default; }
.gen__choice .gen__seg, .media__choice .media__seg { flex: 1 0 100%; }
.row .seg--sm { margin-left: auto; }

.tile {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--tile-bg);
  color: var(--accent-text);
}
.tile .i { width: 19px; height: 19px; }
.tile--sm { width: 28px; height: 28px; border-radius: 50%; }
.tile--sm .i { width: 15px; height: 15px; }
.tile--ok { background: var(--green-fill); color: var(--green); }
.tile--lg { width: 40px; height: 40px; border-radius: 12px; }
.tile--lg .i { width: 22px; height: 22px; }

.srow { display: grid; gap: 8px; padding: 12px 12px 12px; }
.srow__l { padding: 0 4px; font: 500 13px/16px var(--f); color: var(--label-2); }
.srow__l--help { display: flex; align-items: center; gap: 2px; }
.srow__l--help .info-btn { width: 32px; height: 32px; margin: -8px -6px; }

.frow { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 2px 16px; }
.frow__l { flex: none; max-width: 48%; font: 400 17px/22px var(--f); }
/* «Язык речи»: a native list in a row (app.js speechHTML) */
.frow--select { position: relative; }
.frow__sel { flex: 1; min-width: 0; padding: 12px 22px 12px 0; border: 0; background: transparent; color: var(--label); font: 400 17px/22px var(--f);
  text-align: right; text-align-last: right; -webkit-appearance: none; appearance: none; cursor: pointer; }
.frow__sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.frow__chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--label-3); pointer-events: none; }
.frow__chev .i { width: 14px; height: 14px; }
.frow__in {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--label);
  font: 400 17px/22px var(--f);
  text-align: right;
  -webkit-appearance: none;
  appearance: none;
}
.frow__in:focus-visible { outline: none; }
.frow:focus-within { box-shadow: inset 0 0 0 2px var(--accent-fill); border-radius: inherit; }

.textarea {
  display: block;
  width: 100%;
  min-height: 116px;
  padding: 14px 16px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--label);
  font: 400 17px/23px var(--f);
  resize: vertical;
}
.textarea--short { min-height: 64px; }
.textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-fill); }

.tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 4px 0;
  font: 400 13px/18px var(--f);
  color: var(--label-2);
}
.tip .i { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--accent-text); --ic-cut: var(--bg-2); }
.tip--inline { margin: 0; }
.tip.is-warn, .tip.is-warn .i { color: var(--orange); }

.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  font: 400 15px/20px var(--f);
}
.note .i { width: 20px; height: 20px; flex: none; }
.note--err { background: var(--red-fill); color: var(--red-text); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label-2);
  font: 600 12.5px/1 var(--f);
  white-space: nowrap;
}
.pill .i { width: 13px; height: 13px; }
.pill--ok { background: var(--green-fill); color: var(--green); }
.pill--err { background: var(--red-fill); color: var(--red-text); }
.badge-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 11px/1 var(--f);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.quiet { padding: 16px; font: 400 15px/21px var(--f); color: var(--label-2); }
.loading { padding: 32px 0; text-align: center; font: 400 15px/20px var(--f); color: var(--label-2); }
.foot { margin-top: 26px; text-align: center; font: 400 13px/18px var(--f); color: var(--label-2); }
.spinner {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2.5px solid var(--fill-2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================================== studio */

.mode { margin-top: 6px; }
.mode__row { display: flex; align-items: center; gap: 6px; }
.mode__row .seg { flex: 1; }
.mode__row .info-btn { margin: 0 -10px 0 0; }
.mode__desc { margin: 10px 4px 0; font: 400 15px/20px var(--f); color: var(--label-2); }
.mode__desc b { color: var(--label); font-weight: 600; white-space: nowrap; }

.step { margin-top: 30px; }
.step__head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.step__num {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 15px/1 var(--f-r);
  transition: background 0.3s;
}
.step__num.is-done { background: var(--green); color: #fff; }
.step__num .i { width: 15px; height: 15px; }
.step__title { font: 700 22px/28px var(--f-d); letter-spacing: -0.022em; }

/* upload card */
.upl__card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 24px 18px 18px;
  border-radius: 28px;
  border: 1.5px dashed var(--dash);
  background: var(--bg-2);
  text-align: center;
  cursor: pointer;
  transition: transform 0.28s var(--spring), border-color 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.upl__card:active { transform: scale(0.985); }
.upl__card.is-flash { animation: flash 0.9s ease-out 2; }
/* files dragged in from the computer: the zones that take them, the one under the pointer lit */
body.is-dragging :is(#source, #grp-photos, #grp-broll, #grp-story-clips) { border-radius: 24px; outline: 1.5px dashed var(--sep); outline-offset: 6px; transition: outline-color 0.15s, background 0.15s; }
body.is-dragging :is(#source, #grp-photos, #grp-broll, #grp-story-clips).is-drop { outline: 2px dashed var(--accent); background: var(--accent-fill); }
body.is-dragging :is(#source, #grp-photos, #grp-broll, #grp-story-clips) * { pointer-events: none; }
@keyframes flash { 30% { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-fill); } }
.upl__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--accent-fill);
  color: var(--accent-text);
}
.upl__icon .i { width: 34px; height: 34px; }
.upl__title { font: 700 20px/25px var(--f-d); letter-spacing: -0.02em; }
.upl__sub { font: 400 15px/20px var(--f); color: var(--label-2); }
.upl__btn { margin-top: 10px; min-width: 210px; pointer-events: none; }
.upl__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 12px;
  font: 400 13px/18px var(--f);
  color: var(--label-2);
}
.upl__chips span { display: inline-flex; align-items: center; gap: 4px; }
.upl__chips .i { width: 13px; height: 13px; color: var(--green); }
.upl__links { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 4px 0; }

/* uploaded file */
.filecard { padding: 12px 8px 12px 12px; }
.file { display: grid; grid-template-columns: 58px minmax(0, 1fr) 44px; gap: 12px; align-items: center; }
.file__thumb { position: relative; width: 58px; height: 78px; overflow: hidden; border-radius: 12px; background: #2a2018; }
.file__thumb video, .file__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file__ph { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, 0.6); background: linear-gradient(160deg, #4a3a2a, #1c1611); }
.file__dur {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 600 10.5px/14px var(--f);
  font-variant-numeric: tabular-nums;
}
.file__info { display: grid; gap: 3px; min-width: 0; }
.file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/21px var(--f); }
.file__meta { font: 400 13px/18px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.file__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 4px 0 0;
  padding-top: 8px;
  border-top: 0.5px solid var(--sep);
}
.file__foot .tip { flex: 1; }
.bar { display: block; height: 4px; margin-top: 6px; overflow: hidden; border-radius: 2px; background: var(--fill-2); }
.bar > i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); border-radius: inherit; background: var(--accent); transition: width 0.3s linear; }
.bar--thin { margin: 8px 0 0 58px; }

/* font carousel with live samples */
.fonts {
  display: flex;
  gap: 10px;
  margin: 0 -16px;
  padding: 4px 16px 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
}
.fonts::-webkit-scrollbar { display: none; }
.fcard { flex: none; width: 112px; display: grid; gap: 7px; scroll-snap-align: start; text-align: center; }
.fcard__tile {
  height: 68px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(130% 120% at 25% 15%, #5a4632, #1d1611 72%);
  color: #fff;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.2s, transform 0.28s var(--spring);
}
.fcard__s { max-width: 100%; font-size: calc(12px * var(--fbs, 1)); line-height: 1.16; color: var(--c-base, #fff); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.fcard__s em { font-size: calc(1em * min(var(--fas, 1), 1.4)); color: var(--c-acc); }
.fcard__s[data-treat="pill"] em { padding: 0 0.18em; border-radius: 0.2em; background: var(--c-acc); color: var(--c-ink); }
.fcard__n { font: 500 13px/16px var(--f); color: var(--label-2); }
.fcard:active .fcard__tile { transform: scale(0.95); }
.fcard[aria-checked="true"] .fcard__tile { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--accent); }
.fcard[aria-checked="true"] .fcard__n { color: var(--label); font-weight: 600; }

/* «Super Pro» (admins): the styles in the font carousel's scroller, the hooks in a grid — a 9:16 preview each, the chosen
   one playing, where it was seen under it */
.sp { margin-top: 10px; }
.sp__label { margin: 14px 0 8px; font: 600 13px/18px var(--f); color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; }
.sp__hooks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spcard { display: grid; gap: 5px; text-align: center; min-width: 0; }
.spcard--style { flex: none; width: 112px; scroll-snap-align: start; }
.spcard__media {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: var(--fill);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.2s, transform 0.28s var(--spring);
}
.spcard__media--auto { display: grid; place-items: center; color: var(--accent); }
.spcard__media--auto .i { width: 30px; height: 30px; }
.spcard__name { font: 500 13px/16px var(--f); color: var(--label-2); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.spcard__ref { font: 400 11px/14px var(--f); color: var(--label-3, var(--label-2)); opacity: 0.8; }
.spcard:active .spcard__media { transform: scale(0.96); }
.spcard[aria-checked="true"] .spcard__media { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--accent); }
.spcard[aria-checked="true"] .spcard__name { color: var(--label); font-weight: 600; }
/* the board's second pass: a story without a preview shows its acts on the card; themes and characters are chips */
.spcard__media--acts { display: grid; align-content: center; gap: 4px; padding: 10px 8px; text-align: left; font: 500 10.5px/13px var(--f); color: var(--label-2); }
.spcard__media--acts span { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.spchips { display: flex; flex-wrap: wrap; gap: 8px; }
.spchip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 18px; background: var(--fill); color: var(--label-2);
  font: 500 14px/18px var(--f); transition: box-shadow 0.2s, transform 0.2s var(--spring); }
.spchip .i { width: 16px; height: 16px; color: var(--accent); }
.spchip:active { transform: scale(0.96); }
.spchip[aria-checked="true"] { color: var(--label); font-weight: 600; box-shadow: inset 0 0 0 2px var(--accent); }
.spchip__dots { display: inline-flex; }
.spchip__dots i { width: 12px; height: 12px; border-radius: 50%; margin-left: -3px; box-shadow: 0 0 0 1.5px var(--bg-2, var(--bg)); }
.spchip__dots i:first-child { margin-left: 0; }
.sp__about { margin: 12px 2px 0; font: 400 13px/18px var(--f); color: var(--label-2); }
/* Super Pro «Настроить вручную» (superpro.js): the line under «Какой ролик нужен?» on a card of its own, the detailed rows
   slide open under it as the sound's panel does; the rows that scroll still reach the screen's edges inside it */
.sp__manual { margin-top: 14px; }
.sp__manual > .sfx__more { padding-left: 16px; padding-right: 16px; border-radius: 16px; background: var(--bg-2); }
.sp__manual .sfx__in { margin: 0 -16px; padding: 0 16px; }
.sp__about b { color: var(--label); font-weight: 600; }
.sp__seen { display: block; margin-top: 4px; opacity: 0.85; }

/* «Цветокор»: the looks on the same frame, a card each (the font carousel's scroller) */
.grades { gap: 8px; }
.gcard { flex: none; width: 76px; display: grid; gap: 7px; scroll-snap-align: start; text-align: center; }
.gcard__tile {
  display: block;
  height: 101px;
  overflow: hidden;
  border-radius: 14px;
  background: #1d1611;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.2s, transform 0.28s var(--spring);
}
.gcard__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gcard:active .gcard__tile { transform: scale(0.95); }
.gcard[aria-checked="true"] .gcard__tile { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--accent); }
.gcard[aria-checked="true"] .fcard__n { color: var(--label); font-weight: 600; }
#grp-grade .list { margin-top: 12px; }

/* caption colour dots */
/* caption palettes: «Aa» as the accent is set — a coloured letter on the palette's dark, or ink on the colour */
.dots { display: grid; grid-template-columns: repeat(auto-fit, minmax(36px, 1fr)); justify-items: center; gap: 8px 4px; padding: 4px 0 0; }
.cdot {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-stroke);
  color: var(--c-acc);
  font: 700 14px/1 var(--f-d);
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 0.5px rgba(127, 127, 127, 0.35);
  transition: transform 0.28s var(--spring), box-shadow 0.2s;
}
.cdot[data-treat="pill"] { background: var(--c-acc); color: var(--c-ink); }
/* «Пользовательские»: the bloggers' palettes — one row under the house colours, its sheet a list of dots and names */
.ownpick { grid-column: 1 / -1; justify-self: stretch; display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 6px;
  padding: 6px 12px 6px 8px; border-radius: 14px; background: var(--bg-2); text-align: left; transition: transform 0.15s, box-shadow 0.2s; }
.ownpick:active { transform: scale(0.98); }
.ownpick[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--label); }
.ownpick__ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--fill); color: var(--label-2); }
.ownpick__ic .i { width: 18px; height: 18px; }
.ownpick__dot { pointer-events: none; }
.ownpick__l { flex: 1; min-width: 0; font: 500 16px/21px var(--f); }
.ownpick__v { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 15px/20px var(--f); color: var(--label-2); }
.ownpick__chev { width: 12px; height: 12px; flex: none; color: var(--label-3); }
.ownlist { margin-top: 12px; }
.ownrow { gap: 12px; }
.ownrow .cdot { pointer-events: none; }
.ownrow__on { width: 18px; height: 18px; flex: none; color: var(--accent-text); }
/* «Свои» (own.js): the rows under the font cards and the colour dots, their sheets, the pair's and the palette's editors */
.ownpick--font { width: 100%; margin-top: 10px; }
.ownpick__aa { width: 36px; height: 36px; flex: none; display: flex; align-items: baseline; justify-content: center; padding-top: 7px; overflow: hidden;
  border-radius: 50%; background: radial-gradient(130% 120% at 25% 15%, #5a4632, #1d1611 72%); color: var(--c-base, #fff); font-size: 16px; line-height: 1;
  pointer-events: none; }
.ownpick__aa em { color: var(--c-acc); font-size: 1.05em; }
.ownpick__aa[data-treat="pill"] em { padding: 0 0.12em; border-radius: 0.2em; background: var(--c-acc); color: var(--c-ink); }
.ownh { display: flex; align-items: baseline; gap: 6px; margin: 22px 4px 8px; font: 600 13px/18px var(--f); color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; }
.ownh__n { font-weight: 500; color: var(--label-3); }
.ownli { display: flex; align-items: center; }
.ownli > .row { flex: 1; min-width: 0; }
.ownli__edit { flex: none; width: 44px; height: 44px; margin-right: 4px; color: var(--label-2); }
.ownli__edit .i { width: 20px; height: 20px; }
.ownrow--pair { gap: 12px; }
.ownpair { width: 104px; height: 56px; flex: none; display: grid; place-items: center; padding: 0 6px; overflow: hidden; border-radius: 12px;
  background: radial-gradient(130% 120% at 25% 15%, #5a4632, #1d1611 72%); color: #fff; pointer-events: none; }
.ownpair .fcard__s { font-size: calc(8.5px * var(--fbs, 1)); }
.ownrow__chev { width: 12px; height: 12px; flex: none; color: var(--label-3); }
.ownfont { gap: 12px; }
.ownfont__aa { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--fill); font-size: 19px; line-height: 1; color: var(--label); }
.ownfont__warn { color: var(--orange); }
.ownfont__del { flex: none; min-height: 34px; padding: 0 10px; color: var(--red); }
.ownfont__del [data-sure-label] { display: none; }
.ownfont__del.is-sure [data-sure-label] { display: inline; }
.ownfont__del.is-sure .i { display: none; }
.sheet--own .btn.is-sure { color: var(--red); }
.sheet--own .addrow { width: 100%; border: 0; text-align: left; color: var(--label); font: inherit; cursor: pointer; }
.sheet--own .addrow .row__text { gap: 0; }
.sheet--own .tip { margin: 12px 4px 4px; }
.sheet--own .list { --sep-left: 16px; }
/* the previews: the line on dark footage and on bright footage, as the video will have it */
.ownpv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 14px; }
.ownpv__tile { min-width: 0; height: 104px; display: grid; place-items: center; padding: 0 10px; overflow: hidden; border-radius: 16px;
  background: radial-gradient(130% 120% at 25% 15%, #5a4632, #1d1611 72%); color: #fff; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12); }
.ownpv__tile--light { background: radial-gradient(130% 120% at 30% 20%, #efe6d6, #b8a487 78%); }
/* the slight soft shadow under every caption letter, as the video has it (looks.ts SHADOW) */
.ownpv__s { font-size: calc(16px * var(--fbs, 1)); text-align: center; -webkit-line-clamp: 3; text-shadow: var(--outline); }
/* «Свой цвет» → «Эффекты»: a switch per effect, its level under it while it is on */
.ownfx__row .switch { margin-left: auto; }
.ownfx__lv { gap: 14px; }
.ownfx__range { flex: 1; min-width: 0; height: 28px; margin: 0; accent-color: var(--accent); }
.ownfx__n { flex: none; min-width: 2.4em; text-align: right; font: 500 15px/1 var(--f); font-variant-numeric: tabular-nums; color: var(--label-2); }
.ownslots { margin-top: 10px; }
.ownslot { width: 100%; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.ownslot__v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 18px; color: var(--label); }
.ownslot__chev { width: 12px; height: 12px; flex: none; color: var(--label-3); }
.ownslot__l2 { display: grid; gap: 1px; max-width: 70%; }
.ownslot__l2 small { font: 400 13px/17px var(--f); color: var(--label-2); }
.ownslots .switch { margin-left: auto; flex: none; }
.ownslot__size { flex-wrap: wrap; row-gap: 8px; padding-block: 12px; }
.ownslot__size .frow__l { flex: 1 1 100%; max-width: none; }
.ownslot__size .seg { flex: 1 1 100%; min-width: 0; }
.sheet--own .card + .card, .sheet--own .card + .seg, .sheet--own .seg + .card, .sheet--own .seg + [data-el] { margin-top: 10px; }
.sheet--own .tip.is-warn { margin: 8px 4px 0; }
/* choosing a face: each name in its face */
.own-tabs { margin: 0 0 12px; }
.ownpane .search { margin: 0; }
.ownface { gap: 10px; }
.ownface__n { font-size: 21px; line-height: 1.25; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ownface:disabled { opacity: 1; cursor: default; }
.gfont .row { gap: 10px; }
.gvars { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px; }
.gvars .chip--pick { height: 34px; font-weight: 400; font-size: 16px; }
.ownupload { margin-top: 0; }
.ownupload.is-busy { opacity: 0.6; pointer-events: none; }
/* a palette: the swatches, any colour, the codes */
.ownlead { margin: 4px 4px 10px; }
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); justify-items: center; gap: 10px 4px; padding: 2px 0 12px; }
.swatch { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 0.5px rgba(127, 127, 127, 0.45);
  transition: transform 0.25s var(--spring), box-shadow 0.2s; }
.swatch::before { content: ""; position: absolute; inset: -4px; }
.swatch:active { transform: scale(0.9); }
.swatch[aria-checked="true"], .swatch--any.is-on { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--label); }
.swatch--any { overflow: visible; cursor: pointer; background:
  radial-gradient(circle at center, var(--sw) 0 38%, transparent 40%),
  conic-gradient(#ff3b30, #ffcc00, #34c759, #00c7be, #007aff, #af52de, #ff2d55, #ff3b30); }
.swatch--any input, .owncolor__chip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.owncolor { gap: 10px; }
.owncolor .frow__l { flex: 1; max-width: none; }
.owncolor__chip { position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(127, 127, 127, 0.5); }
.owncolor__hex { flex: none; width: 92px; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.own-mode, .own-treat { margin: 0 0 10px; }
.own-treat { margin-top: 10px; }
.cdot::before { content: ""; position: absolute; inset: -4px; }
.cdot:active { transform: scale(0.9); }
.cdot .i { width: 18px; height: 18px; opacity: 0; transform: scale(0.4); transition: opacity 0.2s, transform 0.3s var(--spring); }
.cdot[aria-checked="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--label); }
.cdot[aria-checked="true"] .i { opacity: 1; transform: none; }

/* Pro look card */
.look {
  position: relative;
  min-height: 236px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 28px;
  background: #2a1810;
  color: #fff;
  isolation: isolate;
}
.look__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.look::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 6, 4, 0.08), rgba(10, 6, 4, 0.6) 42%, rgba(10, 6, 4, 0.9)); }
.look__body { display: grid; gap: 9px; padding: 18px; }
.look__kicker { display: inline-flex; align-items: center; gap: 6px; font: 700 13px/18px var(--f); color: #f2d9b0; letter-spacing: 0.02em; text-transform: uppercase; }
.look__kicker .i { width: 16px; height: 16px; }
.look__text { font: 400 15px/21px var(--f); color: rgba(255, 250, 244, 0.92); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font: 600 13px/1 var(--f);
}

/* B-roll */
#brolls { --sep-left: 70px; }
/* Lite «Генерация фото» — admins only (imagegen.js): the switch's mark and the step «Чем генерировать» */
.gen__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.badge-pill--quiet { height: 18px; padding: 0 7px; background: var(--accent-fill); color: var(--accent-text); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.step__head .badge-pill--quiet { margin-left: auto; }
.gen__list { --sep-left: 58px; }
.gen__opt { align-items: flex-start; min-height: 64px; padding-top: 11px; padding-bottom: 11px; cursor: pointer; transition: background 0.15s; }
.gen__opt:active { background: var(--fill); }
.gen__opt .tile { margin-top: 1px; }
.gen__opt.is-off { cursor: default; }
.gen__opt.is-off:active { background: none; }
.gen__opt.is-off .tile, .gen__opt.is-off .row__title, .gen__opt.is-off .row__sub { opacity: 0.55; }
.gen__state { margin-top: 3px; font: 600 13px/17px var(--f); }
.gen__state.is-ok { color: var(--green); }
.gen__state.is-bad { color: var(--orange); }
.gen__state.is-wait { color: var(--label-3); font-weight: 500; }
.gen__radio { width: 22px; height: 22px; flex: none; display: grid; place-items: center; margin-top: 4px; color: var(--accent-text); }
.gen__radio .i { width: 18px; height: 18px; }
.gen__foot { display: grid; gap: 2px; margin: 12px 4px 0; }
.gen__foot .link { justify-self: start; }
.gen__above { margin: 12px 4px 0; }
/* «Генерация видео» (imagegen.js): Kling's row is a fact, not a choice; «Что показать» — the admin's wishes */
.gen__opt--fixed, .gen__opt--fixed:active { cursor: default; background: none; }
.gen__wish { margin-top: 18px; }
.grp__foot + .gen__amount { margin-top: 16px; } /* «Где» under the line of «Сколько» */
.gen__label { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 8px; font: 600 15px/20px var(--f); color: var(--label); }
.gen__hint { font: 400 13px/18px var(--f); color: var(--label-3); }
.gen__wishes { min-height: 104px; max-height: 300px; field-sizing: content; font-size: 16px; line-height: 21px; resize: none; }
.gen__wish .tip { margin: 8px 4px 0; }
/* Lite «Водяной знак» (mark.js): the switch, the line with its text under it, the lock on the free video */
.mark__field .frow { min-height: 48px; padding-left: 56px; }
.mark__hint { margin: -6px 16px 0 56px; padding-bottom: 12px; font: 400 13px/17px var(--f); color: var(--label-2); }
.mark__hint.is-warn { color: var(--orange); }
.mark__lock { display: inline-flex; align-items: center; gap: 4px; }
.mark__lock .i { width: 13px; height: 13px; flex: none; color: var(--accent-text); }
.mark.is-locked .switch { opacity: 0.45; }
/* «Звуковые эффекты» → «Настроить» (sound.js): a line under the switch, at the column of the rows' text, opens a panel
   in place — «Звук слов» (segments and a note on what the choice does) and the switches of the groups of sounds. It
   slides open (grid rows 0fr → 1fr); closed, it is inert. With the switch off the line is hidden. */
.sfx__more {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 20px 8px 56px;
  transition: background 0.15s;
}
.sfx__more:active { background: var(--fill); }
.sfx__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sfx__label { color: var(--accent-text); font: 400 17px/22px var(--f); letter-spacing: -0.016em; }
.sfx__sum { color: var(--label-2); font: 400 13px/17px var(--f); }
.sfx__chev { width: 14px; height: 14px; flex: none; color: var(--accent-text); transition: transform 0.32s var(--ease); }
.sfx__more[aria-expanded="true"] .sfx__chev { transform: rotate(180deg); }
.sfx__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s var(--ease);
  scroll-margin-bottom: calc(var(--tab-gap) + var(--tab-h) + 96px); /* opened, it comes into view above the render button */
}
.sfx__panel.is-open { grid-template-rows: 1fr; }
.sfx__in { min-height: 0; overflow: hidden; }
.sfx__words { display: grid; gap: 8px; padding: 2px 16px 12px 56px; }
.sfx__words .srow__l { padding: 0; }
.seg--sfx .seg__opt { min-height: 34px; padding: 0 4px; font-size: 13px; }
/* «Хук в начале» → «Настроить» → «Тренд-слово»: «Выкл» and its materials, four in a row */
.trend-looks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.trend-look { min-width: 0; min-height: 34px; padding: 0 4px; border-radius: 10px; background: var(--seg-bg); font: 600 13px/1.1 var(--f); color: inherit;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.trend-look[aria-checked="true"] { background: var(--seg-thumb); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
.sfx__note { color: var(--label-2); font: 400 13px/17px var(--f); }
/* «Цензура» → «Настроить» (censor.js): the list of stop words in the same panel, a field on a light fill; «Вернуть список»
   shows once the list differs from the default */
.censor__in { min-height: 64px; max-height: 220px; padding: 10px 12px; border-radius: 14px; background: var(--fill); field-sizing: content;
  font-size: 16px; line-height: 21px; resize: none; }
.censor__reset { justify-self: start; margin: 0; }
/* «Свой трек» in the music panel (music.js) */
.own { display: grid; gap: 10px; padding: 0 16px 14px 56px; }
.own__add { display: inline-flex; align-items: center; gap: 8px; justify-self: start; color: var(--accent-text); font: 600 15px/20px var(--f); cursor: pointer; }
.own__add .i { width: 20px; height: 20px; }
.own__row { display: flex; align-items: center; gap: 10px; }
.own__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.own__name { font: 500 15px/20px var(--f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.own__meta { font: 400 13px/17px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.own__meta.is-err { color: var(--red-text); }
.own__start { display: grid; gap: 6px; }
.own__start b { font-weight: 600; color: var(--label); font-variant-numeric: tabular-nums; }
.own__range { width: 100%; margin: 0; accent-color: var(--accent); }
.mtrack__start { margin-top: 12px; }
.mtrack__starttop { display: flex; align-items: center; gap: 8px; }
.mtrack__starttop .srow__l { flex: 1; min-width: 0; }
.own .bar { margin-top: 0; }
/* «Трек» (tracks.js): the music library — «Авто» first, a ▶ and a check on each track, the list scrolls on its own */
.mtrack { display: grid; gap: 8px; padding: 0 16px 14px 56px; }
.mtrack .srow__l { padding: 0; }
.mtrack__list { list-style: none; margin: 0; padding: 0; max-height: 312px; overflow-y: auto; overscroll-behavior: contain; border-radius: 12px; background: var(--fill); }
.mtrack__row { position: relative; display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 4px 10px 4px 6px; }
.mtrack__row + .mtrack__row::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: 0.5px; background: var(--sep); }
.mtrack__auto { width: 40px; height: 40px; margin: 0 2px; }
.mtrack__play[aria-busy="true"] { opacity: 0.5; }
.mtrack__pick { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 6px 0; text-align: left; cursor: pointer; }
.mtrack__name { font: 500 15px/20px var(--f); color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtrack__sub { font: 400 12.5px/16px var(--f); color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtrack__check { flex: none; width: 22px; height: 22px; color: var(--accent-text); }
.mtrack__check .i { width: 22px; height: 22px; }
.mtrack__row.is-on .mtrack__name { color: var(--accent-text); font-weight: 600; }
.sfx__part { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px 8px 56px; }
.sfx__part::before { content: ""; position: absolute; top: 0; left: var(--sep-left); right: 0; height: 0.5px; background: var(--sep); }
.sfx__part .row__text { cursor: pointer; }

.broll { padding: 10px 6px 12px 12px; }
.broll__row { display: grid; grid-template-columns: 46px minmax(0, 1fr) 44px; gap: 12px; align-items: center; }
.broll__thumb {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--fill);
  color: var(--label-2);
}
.broll__thumb img, .broll__thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.broll__badge { position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; }
.broll__badge .i { width: 9px; height: 9px; }
.broll__info { display: grid; min-width: 0; }
.broll__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 15px/20px var(--f); }
.broll__meta { font: 400 13px/17px var(--f); color: var(--label-2); }
.broll.is-error .broll__meta { color: var(--red-text); }
.broll__desc {
  display: block;
  width: calc(100% - 6px);
  min-height: 42px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  color: var(--label);
  font: 400 16px/21px var(--f);
  resize: none;
  overflow: hidden;
  field-sizing: content;
}
.broll__desc:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-fill); }
/* «Фото и видео» → «Как показать»: three small tabs under the caption, as wide as it (photos.js). */
.photo__show { width: calc(100% - 6px); margin-top: 8px; }
.seg--show { border-radius: 10px; }
.seg--show .seg__thumb { border-radius: 8px; }
.seg--show .seg__opt { min-height: 32px; padding: 0 4px; font-size: 13px; }
/* «Когда показать»: its label beside two tabs; «По тексту» brings the field for the words under them */
.photo__when { display: flex; align-items: center; gap: 10px; width: calc(100% - 6px); margin: 8px 0 0; }
.photo__when-l { flex: none; font: 400 13px/18px var(--f); color: var(--label-2); }
.photo__when .seg { flex: 1; }
.photo__at { margin-top: 8px; }
.addrow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 10px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--bg-2);
  color: var(--accent-text);
  font: 400 17px/22px var(--f);
  cursor: pointer;
  transition: background 0.15s;
}
.addrow:active { background: var(--fill); }
.addrow .i { width: 24px; height: 24px; color: var(--accent); --ic-cut: var(--on-accent); }

/* ------------------------------------------------------------ sticky CTA */

.cta {
  position: fixed;
  z-index: 38;
  left: 0;
  right: 0;
  bottom: calc(var(--tab-gap) + var(--tab-h) + 8px);
  padding: 0 calc(10px + var(--sa-right)) 0 calc(10px + var(--sa-left));
  pointer-events: none;
}
.cta__tray {
  max-width: 500px;
  margin: 0 auto;
  padding: 5px;
  border-radius: 34px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 0.5px solid var(--glass-line);
  box-shadow: var(--shadow-2), inset 0 0.5px 0 var(--glass-hi);
  pointer-events: auto;
}
.cta__btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 7px 7px 7px 22px;
  overflow: hidden;
  border-radius: 29px;
  background: var(--accent);
  color: var(--on-accent);
  text-align: left;
  isolation: isolate;
  transition: transform 0.3s var(--spring), background 0.25s, color 0.25s;
}
.cta__btn:active { transform: scale(0.98); }
.cta__btn.is-off { background: var(--fill-2); color: var(--label); }
.cta__fill { position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: calc(var(--p, 0) * 1%); background: var(--accent-fill); transition: width 0.3s linear; }
.cta__text { flex: 1; min-width: 0; display: grid; }
.cta__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 17px/22px var(--f); letter-spacing: -0.016em; }
.cta__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px/17px var(--f); opacity: 0.72; }
.cta__btn.is-off .cta__sub { color: var(--label-2); opacity: 1; }
.cta__btn.is-short .cta__sub { opacity: 1; color: #7a2e06; }
.cta__go {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--on-accent);
  color: var(--accent);
  transition: background 0.25s, color 0.25s;
}
.cta__go .i { width: 20px; height: 20px; }
.cta__btn.is-off .cta__go { background: var(--fill-2); color: var(--label-3); }
.cta__btn.is-clap .cta__go { animation: clap 0.42s var(--spring); }
.cta__btn[aria-busy="true"] .cta__go .i { animation: spin 1s linear infinite; }
@keyframes clap { 30% { transform: scale(0.8) rotate(-14deg); } 65% { transform: scale(1.14) rotate(6deg); } }

/* ============================================================ iPhone preview */

.pv { display: grid; justify-items: center; gap: 14px; margin: 6px 0 4px; }
/* Kept in sight while Lite's font, accent colour and captions are picked under it (the owner, 07.10.2026: «хочется
   менять шрифт и видеть изменение»): smaller, under the nav bar until the captions' settings end; «Крупнее» — the full
   size again, scrolling with the page. The settings pass beneath it on the page's own background. */
.pvzone > .pv {
  position: sticky;
  z-index: 6;
  top: calc(var(--sa-top) + 48px);
  gap: 10px;
  margin: 0 calc(-16px - var(--sa-right)) 0 calc(-16px - var(--sa-left));
  padding: 8px calc(16px + var(--sa-right)) 10px calc(16px + var(--sa-left));
  background: var(--bg);
}
.pvzone > .pv::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 14px;
  background: linear-gradient(var(--bg), transparent);
  pointer-events: none;
}
/* Sized by the screen's height: under the kept preview at least ~220 px of settings stay in sight above the
   «Смонтировать» button and the tab bar (≈ 152 px) — Telegram's own header takes part of the screen. */
.pvzone > .pv .ip { --w: clamp(112px, calc((var(--tg-viewport-stable-height, 100vh) - var(--sa-top) - 438px) / 2.08), min(150px, 40vw)); }
/* the pause and «Крупнее» beside the phone, not under it: the kept preview is no taller than the phone */
.pvzone > .pv .pv__ctl { position: absolute; right: calc(16px + var(--sa-right)); bottom: 10px; flex-direction: column; gap: 8px; }
.pvzone > .pv .pv__label { display: none; }
.pvzone > .pv .pv__ctl:has(.seg--pv) { position: static; flex-direction: row; }
/* what the browser scrolls to by itself (focus) comes out under the kept preview, not behind it */
#style-top :is(.grp, button, [tabindex]) { scroll-margin-top: calc(var(--sa-top) + 48px + 340px); }
.pvzone > .pv.pv--big { position: relative; }
.pvzone > .pv.pv--big .ip { --w: min(212px, 56vw); }
/* a short screen (an iPhone SE in Telegram): no room to keep it — it scrolls with the page, small, the fonts right under */
@media (max-height: 669px) {
  .pvzone > .pv { position: relative; }
  .pvzone > .pv:not(.pv--big) .ip { --w: min(150px, 40vw); }
}
.pv__zoom[aria-pressed="true"] { background: var(--fill-2); }
.ip {
  --w: min(212px, 56vw);
  --u: calc(var(--w) / 100);
  position: relative;
  width: var(--w);
  aspect-ratio: 70.6 / 146.6;
  margin: 0;
}
.ip__frame {
  position: absolute;
  inset: 0;
  padding: calc(var(--u) * 1.15);
  border-radius: calc(var(--u) * 17);
  background: linear-gradient(145deg, var(--ti-hi), var(--ti) 22%, var(--ti-lo) 50%, var(--ti) 78%, var(--ti-hi));
  box-shadow:
    0 calc(var(--u) * 12) calc(var(--u) * 20) calc(var(--u) * -8) rgba(0, 0, 0, 0.5),
    0 0 0 0.5px rgba(0, 0, 0, 0.35),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.28);
}
.ip__glass { height: 100%; padding: calc(var(--u) * 3.2); border-radius: calc(var(--u) * 15.85); background: #050505; }
.ip__screen { position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--u) * 12.6); background: #000; isolation: isolate; }
.ip__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 9;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 32%);
  pointer-events: none;
}
.ip__btn { position: absolute; width: calc(var(--u) * 1.1); border-radius: 2px; background: linear-gradient(90deg, var(--ti-lo), var(--ti-hi)); }
.ip__btn--act { left: calc(var(--u) * -0.8); top: 17%; height: 4.4%; }
.ip__btn--up { left: calc(var(--u) * -0.8); top: 24.5%; height: 7.6%; }
.ip__btn--down { left: calc(var(--u) * -0.8); top: 33.6%; height: 7.6%; }
.ip__btn--pwr { right: calc(var(--u) * -0.8); top: 27%; height: 11.5%; }
.ip__island {
  position: absolute;
  z-index: 8;
  top: calc(var(--u) * 3);
  left: 50%;
  width: calc(var(--u) * 31);
  height: calc(var(--u) * 9);
  margin-left: calc(var(--u) * -15.5);
  border-radius: 999px;
  background: #000;
}
.ip__island::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16%;
  width: calc(var(--u) * 3.2);
  height: calc(var(--u) * 3.2);
  margin-top: calc(var(--u) * -1.6);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3550, #0a0c12 60%);
}
.ip__status {
  position: absolute;
  z-index: 8;
  top: calc(var(--u) * 4.1);
  left: calc(var(--u) * 9);
  right: calc(var(--u) * 7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font: 600 calc(var(--u) * 6.4)/1 var(--f);
  letter-spacing: -0.01em;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}
.ip__icons { display: inline-flex; align-items: center; gap: calc(var(--u) * 1.4); }
.ip__icons .i { width: calc(var(--u) * 6); height: calc(var(--u) * 6); }
.ip__icons .ip__bat { width: calc(var(--u) * 9.6); }
.ip__home {
  position: absolute;
  z-index: 8;
  bottom: calc(var(--u) * 2.1);
  left: 50%;
  width: calc(var(--u) * 36);
  height: calc(var(--u) * 1.4);
  margin-left: calc(var(--u) * -18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.pv__ctl { display: flex; align-items: center; gap: 10px; max-width: 320px; }
.pv__play {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fill);
  color: var(--label);
}
.pv__play::before { content: ""; position: absolute; inset: -4px; }
.pv__play .i { width: 15px; height: 15px; }
.pv__label { font: 400 13px/17px var(--f); color: var(--label-2); }
.seg--pv { width: 220px; }
.seg--pv .seg__opt { min-height: 34px; font-size: 13.5px; }

/* the screen — the engine's 1080×1920 frame as a phone shows it, filling the screen's height (198.95 u) and cut at the
   sides: `--px` is one of its pixels, so the sizes below are the engine's own (lite.tsx, blocks.tsx, live.tsx,
   FlatCaption.tsx) and the words keep their size against the picture they are burnt into */
.scr { --px: calc(var(--u) * 0.10362); position: absolute; inset: 0; overflow: hidden; color: #fff; background: #120d09; }
.scr__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.scr__img.is-in { opacity: 1; }
.scr__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scr__kb { position: absolute; inset: 0; will-change: transform; }
.scr__kb--slow { animation: kb 12s ease-in-out infinite alternate; }
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.12) translate3d(-2%, -1.5%, 0); } }
.pv.is-paused .scr, .pv.is-paused .scr * { animation-play-state: paused !important; }
.pv.is-still .scr, .pv.is-still .scr * { animation: none !important; transition: none !important; }

/* The camera (preview.js shotOf): the frame — and over the hook the speaker cut out of it — under the same moves: hard
   cuts between the close crop and the held wide shot, the push-in at the start, the hook's slow push, a punch on the
   big word (scaled around her face: SPEAKER.face, 41.2 % of the picture), a slow drift while the close shot holds. */
.cam, .cam__punch, .cam__kb { position: absolute; inset: 0; }
.cam { z-index: 1; transform-origin: 50% 50%; will-change: transform; }
.cam.is-push { transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1); }
.cam.is-slow { transition: transform 2.8s cubic-bezier(0.37, 0, 0.63, 1); }
.cam__punch { transform-origin: 50% 41.2%; }
.scr.is-punch .cam__punch { animation: punch 1.2s both; }
@keyframes punch {
  0% { transform: scale(1); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  17% { transform: scale(1.15); animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
  100% { transform: scale(1); }
}
.scr[data-camera="1"][data-shot^="close"] .cam__kb { animation: drift 6s ease-in-out both; }
.scr--story .cam__kb { animation: kb 9s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.035) translate3d(0.6%, -0.4%, 0); } }
/* the cut-out is there only under the hook (not drawn the rest of the loop: a phone's memory) */
.cam--cut { z-index: 3; visibility: hidden; pointer-events: none; }
.scr.is-hook .cam--cut { visibility: visible; }
.scr__shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0) 13%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, 0.4));
}

/* Reels chrome, for scale: quiet, out of the captions' way */
.reels { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.reels__side {
  position: absolute;
  right: calc(var(--u) * 3.2);
  bottom: 12.5%;
  display: grid;
  gap: calc(var(--u) * 4.4);
  opacity: 0.85;
}
.reels__side .i { width: calc(var(--u) * 6.4); height: calc(var(--u) * 6.4); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); }
.reels__user {
  position: absolute;
  left: calc(var(--u) * 5);
  bottom: 6.4%;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 2);
  font: 600 calc(var(--u) * 4.2)/1 var(--f);
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.reels__user i { width: calc(var(--u) * 6.2); height: calc(var(--u) * 6.2); border-radius: 50%; background: linear-gradient(135deg, #e8d3ad, #8a6635); box-shadow: 0 0 0 1px #fff; }

/* The hook behind the speaker (blocks.tsx HookTitle in the cover): a thin line in the pair's base face tight on the big
   words in its accent face and colour, letter after letter popping up; between the picture and the cut-out, so her
   hair lies over the foot of the letters (preview.js setHook sets the size and the line it stands on). */
.hook {
  position: absolute;
  z-index: 2;
  left: 4%;
  right: 4%;
  bottom: 71%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--c-base, #fff);
  text-shadow: var(--outline);
  opacity: 0;
  pointer-events: none;
}
.scr.is-hook .hook { opacity: 1; transition: opacity 0.18s ease; }
.scr.is-hook .hook.is-out { opacity: 0; transition: opacity 0.24s ease; }
.hook__s {
  display: block;
  position: relative;
  z-index: 1;
  margin-bottom: 0.16em;
  font-size: calc(var(--px) * 50 * var(--fbs, 1));
  line-height: 1;
  white-space: nowrap;
  text-box: trim-both cap alphabetic;
  animation: hook-s 0.5s var(--spring) 0.06s both, fade-in 0.16s ease-out 0.06s both;
}
.hook__k {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 0.12em;
  position: relative;
  z-index: 2;
  font-size: calc(var(--px) * var(--hk, 140));
  line-height: 1;
  color: var(--c-acc);
}
.hook__r { display: block; white-space: nowrap; text-box: trim-both var(--kedge, cap) alphabetic; }
/* the letters rise on a spring; their opacity on a plain curve — an opacity eased past 1 by the spring's overshoot
   dropped single letters in Chrome's compositor */
.hook__ch { display: inline-block; white-space: pre; animation: hook-ch 0.5s var(--spring) both, fade-in 0.16s ease-out both; animation-delay: calc(0.14s + var(--i) * 0.03s); }
@keyframes hook-s { from { transform: translateY(calc(var(--px) * 30)); } }
@keyframes hook-ch { from { transform: translateY(calc(var(--px) * 40)); } }
.scr[data-script="1"] .hook__s { margin-bottom: calc(var(--px) * var(--hk, 140) * -0.04); }
.scr[data-script="1"] .hook__k { row-gap: -0.02em; }
.hook[data-treat="pill"] .hook__s { margin-bottom: 0.3em; }
.hook[data-treat="pill"] .hook__k {
  row-gap: 0.16em;
  padding: 0.16em 0.26em 0.14em;
  border-radius: 0.18em;
  background: var(--c-acc);
  color: var(--c-ink);
  text-shadow: none;
  box-shadow: 0 0.08em 0 var(--c-edge, transparent);
}

/* The blocks (live.tsx and blocks.tsx), one at a time in the held wide shot — Glass: frosted panes, white letters, the
   accent's light colour; Editorial: printed paper, an ink edge, a hard shadow. Their titles in the pair's sturdy face
   (`--ft`, preview.js titleVars). */
.pplate, .pmedia, .pnote, .pphoto { position: absolute; z-index: 5; box-sizing: border-box; pointer-events: none; opacity: 0; }
.pplate, .pmedia {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.14));
  -webkit-backdrop-filter: blur(calc(var(--px) * 22)) saturate(1.5);
  backdrop-filter: blur(calc(var(--px) * 22)) saturate(1.5);
  border: max(1px, calc(var(--px) * 1.5)) solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 calc(var(--px) * 22) calc(var(--px) * 50) rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.fx-lite .pplate, .fx-lite .pmedia { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(48, 42, 36, 0.62); }
/* a plate: the key phrase or number on a pane, in the band over the head (SLOT_Y top 250) */
.pplate {
  left: 50%;
  top: 13.02%;
  padding: 0.26em 0.62em 0.24em;
  border-radius: 0.62em;
  font-family: var(--ft, var(--fb));
  font-weight: var(--ftw, 800);
  text-transform: var(--ftt, none);
  letter-spacing: var(--ftl, -0.01em);
  font-size: calc(var(--px) * 88);
  line-height: 1;
  white-space: nowrap;
  color: var(--c-txt, #fff);
  transform: translateX(-50%) translateY(calc(var(--px) * 60)) scale(0.86);
  transition: opacity 0.18s ease, transform 0.5s var(--spring);
}
.scr.is-plate .pplate { opacity: 1; transform: translateX(-50%); }
.scr.is-leaving .pplate { opacity: 0; transform: translateX(-50%) translateY(calc(var(--px) * 20)) scale(0.96); transition: opacity 0.22s ease-in, transform 0.22s ease-in; }
.scr[data-theme="editorial"] .pplate {
  padding: calc(var(--px) * 18) calc(var(--px) * 34) calc(var(--px) * 16);
  border-radius: 0;
  font-size: calc(var(--px) * 96);
  color: var(--c-ink);
  background: var(--c-acc);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: calc(var(--px) * 4) solid #141210;
  box-shadow: calc(var(--px) * 12) calc(var(--px) * 12) 0 rgba(0, 0, 0, 0.55);
  text-shadow: none;
  transform: translateX(-50%) rotate(-2.5deg) scale(0.55);
  transition: opacity 0.12s ease, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.scr[data-theme="editorial"].is-plate .pplate { transform: translateX(-50%) rotate(-2.5deg); }
.scr[data-theme="editorial"].is-leaving .pplate { opacity: 0; transform: translateX(-50%) rotate(-2.5deg) scale(0.9); }
/* a media card: the thing named, beside the speaker, a short slide from its side — at her shoulder: the engine's y 860
   is beside a face that is smaller in most videos, here it covered her cheek */
.pmedia {
  top: 55%;
  left: 4.5%;
  width: calc(var(--px) * 300);
  padding: calc(var(--px) * 26) calc(var(--px) * 22) calc(var(--px) * 20);
  display: grid;
  justify-items: center;
  gap: calc(var(--px) * 12);
  border-radius: calc(var(--px) * 40);
  text-align: center;
  transform: translateX(calc(var(--px) * -120)) scale(0.86);
  transition: opacity 0.2s ease, transform 0.5s var(--spring);
}
.pmedia__pic { position: relative; width: calc(var(--px) * 170); height: calc(var(--px) * 170); }
.pmedia__img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.3s ease; }
.pmedia__img.is-in { opacity: 1; }
.pmedia__l { font-family: var(--ft, var(--fb)); font-weight: var(--ftw, 800); text-transform: var(--ftt, none); letter-spacing: var(--ftl, -0.01em); font-size: calc(var(--px) * 38); line-height: 1.08; white-space: nowrap; }
.scr.is-media .pmedia { opacity: 1; transform: none; }
.scr.is-leaving .pmedia { opacity: 0; transform: translateY(calc(var(--px) * 20)) scale(0.96); transition: opacity 0.22s ease-in, transform 0.22s ease-in; }
.scr[data-theme="editorial"] .pmedia {
  padding: calc(var(--px) * 22) calc(var(--px) * 22) calc(var(--px) * 18);
  gap: calc(var(--px) * 12);
  border-radius: 0;
  color: #141210;
  background: #f6f1e7;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: calc(var(--px) * 4) solid #141210;
  box-shadow: calc(var(--px) * 12) calc(var(--px) * 12) 0 rgba(0, 0, 0, 0.5);
  text-shadow: none;
  transform: translateX(calc(var(--px) * -300)) rotate(-25deg);
  transition: opacity 0.12s ease, transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.scr[data-theme="editorial"] .pmedia__pic { width: 100%; height: calc(var(--px) * 230); display: grid; place-items: center; background: #ebe3d4; border-bottom: calc(var(--px) * 4) solid var(--c-acc); }
.scr[data-theme="editorial"] .pmedia__img { inset: 12%; width: 76%; height: 76%; margin: auto; }
.scr[data-theme="editorial"].is-media .pmedia { transform: rotate(-5deg); }
/* «Живые элементы»: an iPhone notification told from the speech, dropping in under the status bar */
.pnote {
  top: 8%;
  left: 50%;
  width: min(calc(var(--px) * 860), 93%);
  display: flex;
  align-items: center;
  gap: calc(var(--px) * 26);
  padding: calc(var(--px) * 26) calc(var(--px) * 30);
  border-radius: calc(var(--px) * 46);
  background: rgba(246, 245, 243, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 calc(var(--px) * 18) calc(var(--px) * 44) rgba(0, 0, 0, 0.3);
  color: #141210;
  text-transform: none;
  transform: translateX(-50%) translateY(calc(var(--px) * -230)) scale(0.9);
  transition: opacity 0.2s ease, transform 0.55s cubic-bezier(0.34, 1.35, 0.64, 1);
}
.pnote__ic { flex: none; display: grid; place-items: center; width: calc(var(--px) * 96); height: calc(var(--px) * 96); border-radius: calc(var(--px) * 24); background: var(--c-acc); color: var(--c-ink); }
.pnote__ic .i { width: calc(var(--px) * 58); height: calc(var(--px) * 58); }
.pnote__b { flex: 1; display: grid; min-width: 0; }
.pnote__app { display: flex; justify-content: space-between; gap: calc(var(--px) * 16); font-family: var(--fb); font-weight: 400; font-size: calc(var(--px) * 26); line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(20, 18, 16, 0.55); }
.pnote b { margin-top: calc(var(--px) * 6); overflow: hidden; font-family: var(--ft, var(--fb)); font-weight: var(--ftw, 800); text-transform: var(--ftt, none); letter-spacing: var(--ftl, -0.01em); font-size: calc(var(--px) * 40); line-height: 1.12; white-space: nowrap; }
.pnote__msg { margin-top: calc(var(--px) * 4); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-family: var(--fb); font-weight: 400; font-size: calc(var(--px) * 34); line-height: 1.22; text-transform: var(--fbt, none); color: rgba(20, 18, 16, 0.86); }
.scr.is-note .pnote { opacity: 1; transform: translateX(-50%); }
.scr.is-leaving .pnote { opacity: 0; transform: translateX(-50%) translateY(calc(var(--px) * -260)); transition: opacity 0.3s ease-in, transform 0.3s ease-in; }
.scr[data-theme="editorial"] .pnote { border-radius: calc(var(--px) * 18); background: #f6f1e7; border: calc(var(--px) * 3) solid #141210; box-shadow: calc(var(--px) * 10) calc(var(--px) * 12) 0 rgba(0, 0, 0, 0.5); }
.scr[data-theme="editorial"] .pnote__ic { box-shadow: 0 0 0 calc(var(--px) * 3) #141210; }
/* «Живые элементы»: the growth chart where the speaker states growth with a number (live.tsx GrowthChart) — what grows,
   the number counting up in the accent, a badge, a line drawing itself; smoked glass or paper, over the hair */
.pchart {
  position: absolute;
  z-index: 5;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  left: 50%;
  top: 7.8%;
  width: min(calc(var(--px) * 760), 90%);
  padding: calc(var(--px) * 30) calc(var(--px) * 40) calc(var(--px) * 26);
  border-radius: calc(var(--px) * 44);
  color: #fff;
  background: linear-gradient(180deg, rgba(30, 28, 26, 0.66), rgba(30, 28, 26, 0.52));
  border: max(1px, calc(var(--px) * 1.5)) solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 calc(var(--px) * 22) calc(var(--px) * 50) rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%) translateY(calc(var(--px) * 90)) scale(0.86);
  transition: opacity 0.2s ease, transform 0.5s var(--spring);
}
.pchart__head { display: flex; align-items: flex-start; justify-content: space-between; gap: calc(var(--px) * 20); }
.pchart__t { display: grid; min-width: 0; }
.pchart__title { font-family: var(--fb); font-weight: 400; font-size: calc(var(--px) * 34); line-height: 1.2; text-transform: var(--fbt, none); white-space: nowrap; opacity: 0.78; }
.pchart__v { font-family: var(--ft, var(--fb)); font-weight: var(--ftw, 800); text-transform: var(--ftt, none); letter-spacing: var(--ftl, -0.01em); font-size: calc(var(--px) * 100); line-height: 1.04; white-space: nowrap; color: var(--c-txt, #fff); font-variant-numeric: tabular-nums; }
.pchart__badge {
  flex: none;
  margin-top: calc(var(--px) * 6);
  padding: calc(var(--px) * 10) calc(var(--px) * 22);
  border-radius: 999px;
  font-family: var(--ft, var(--fb));
  font-weight: var(--ftw, 800);
  font-size: calc(var(--px) * 40);
  line-height: 1.1;
  color: var(--c-ink);
  background: var(--c-acc);
  text-shadow: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease 0.8s, transform 0.45s var(--spring) 0.8s;
}
.pchart__g { display: block; width: 100%; height: auto; margin-top: calc(var(--px) * 16); overflow: visible; }
.pchart__g line { stroke: rgba(255, 255, 255, 0.16); stroke-width: 2; }
.pchart__area { fill: var(--c-txt, #fff); opacity: 0.16; clip-path: inset(0 100% 0 0); transition: clip-path 0.87s cubic-bezier(0.65, 0, 0.35, 1) 0.2s; }
.pchart__line { fill: none; stroke: var(--c-txt, #fff); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.87s cubic-bezier(0.65, 0, 0.35, 1) 0.2s; }
.pchart__dot { fill: #fff; stroke: var(--c-txt, #fff); stroke-width: 4; opacity: 0; transition: opacity 0.2s ease 1.05s; }
.scr.is-chart .pchart { opacity: 1; transform: translateX(-50%); }
.scr.is-chart .pchart__badge, .scr.is-chart .pchart__dot { opacity: 1; transform: none; }
.scr.is-chart .pchart__area { clip-path: inset(0 0 0 0); }
.scr.is-chart .pchart__line { stroke-dashoffset: 0; }
.scr.is-leaving .pchart { opacity: 0; transform: translateX(-50%) translateY(calc(var(--px) * 20)) scale(0.96); transition: opacity 0.22s ease-in, transform 0.22s ease-in; }
.scr[data-theme="editorial"] .pchart { border-radius: 0; color: #141210; background: #f6f1e7; border: calc(var(--px) * 4) solid #141210; box-shadow: calc(var(--px) * 14) calc(var(--px) * 14) 0 rgba(0, 0, 0, 0.5); text-shadow: none; transform: translateX(-50%) translateY(calc(var(--px) * 140)) rotate(-1deg); transition: opacity 0.12s ease, transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1); }
.scr[data-theme="editorial"].is-chart .pchart { transform: translateX(-50%) rotate(-1deg); }
.scr[data-theme="editorial"] .pchart__v { color: #141210; }
.scr[data-theme="editorial"] .pchart__badge { border-radius: calc(var(--px) * 8); box-shadow: 0 0 0 calc(var(--px) * 3) #141210; }
.scr[data-theme="editorial"] .pchart__g line { stroke: rgba(20, 18, 16, 0.14); }
.scr[data-theme="editorial"] .pchart__area { fill: var(--c-acc); opacity: 0.55; }
.scr[data-theme="editorial"] .pchart__line { stroke: #141210; }
.scr[data-theme="editorial"] .pchart__dot { fill: #141210; stroke: #f6f1e7; }
/* «Фото и видео»: the photo the phrase is about — a big card over the dimmed frame (PhotoCenter), its caption under it */
.pdim {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 45%, rgba(18, 15, 13, 0.42), rgba(10, 8, 7, 0.78));
  opacity: 0;
  transition: opacity 0.27s ease;
}
.scr.is-photo .pdim { opacity: 1; }
.scr.is-photo.is-leaving .pdim { opacity: 0; }
.pphoto {
  left: 50%;
  top: 36.46%;
  width: min(calc(var(--px) * 900), 90%);
  padding: calc(var(--px) * 14) calc(var(--px) * 14) 0;
  border-radius: calc(var(--px) * 32);
  background: rgba(250, 248, 245, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 calc(var(--px) * 40) calc(var(--px) * 110) rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%) translateY(calc(var(--px) * 1100)) rotate(-9deg) scale(0.92);
  transition: opacity 0.15s ease, transform 0.62s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.pphoto__pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: calc(var(--px) * 22); background: #1a1714; }
.pphoto__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.pphoto__img.is-in { opacity: 1; }
.scr.is-photo .pphoto__img { animation: kb 6s ease-in-out infinite alternate; }
.pphoto__c {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--px) * 62);
  font-family: var(--ft, var(--fb));
  font-weight: var(--ftw, 800);
  text-transform: var(--ftt, none);
  letter-spacing: var(--ftl, -0.01em);
  font-size: calc(var(--px) * 34);
  line-height: 1;
  white-space: nowrap;
  color: #1d1a17;
}
.scr[data-script="1"] .pphoto__c { font-family: var(--fa); font-weight: var(--faw); font-style: var(--fai, normal); text-transform: var(--fat, none); font-size: calc(var(--px) * 44); }
.scr.is-photo .pphoto { opacity: 1; transform: translate(-50%, -50%) rotate(-1.4deg); }
.scr.is-leaving .pphoto { opacity: 0; transform: translate(-50%, -50%) translateY(calc(var(--px) * -60)) rotate(-1.4deg); transition: opacity 0.26s ease-in, transform 0.26s ease-in; }
.scr[data-theme="editorial"] .pphoto { padding: calc(var(--px) * 16) calc(var(--px) * 16) 0; border-radius: 0; background: #f6f1e7; border: calc(var(--px) * 3) solid #141210; box-shadow: calc(var(--px) * 16) calc(var(--px) * 18) 0 rgba(0, 0, 0, 0.55); }
.scr[data-theme="editorial"] .pphoto__pic { border-radius: 0; }
.scr[data-theme="editorial"] .pphoto__c { color: var(--c-stroke, #141210); }
/* «Водяной знак»: the user's mark across the middle at 60 % of the height — where the worker draws it, no edge or
   corner to crop it away with (media.mark_geometry: white at 60 %, a hairline outline, a light shadow) */
.pmark {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 60%;
  display: flex;
  justify-content: center;
  transform: translateY(-50%);
  font: 700 calc(var(--u) * 4.3)/1 var(--f);
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.6);
  -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.18);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.scr[data-mark="1"] .pmark { opacity: 1; }
/* the big word underlined by hand, drawn on left to right in the accent (on a pill — in the line's colour) */
.cap .w.k { position: relative; }
.cap .w.k::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  top: calc(100% + 0.08em);
  height: 0.2em;
  background: var(--c-acc);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M1 8 C 30 3, 62 11, 99 4' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M1 8 C 30 3, 62 11, 99 4' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.cap[data-treat="pill"] .w.k::after { background: var(--c-base, #fff); top: calc(100% + 0.16em); }
.cap.is-mark .w.k::after { clip-path: inset(0 0 0 0); }

/* caption faces (shared by the font cards, the hook and the caption) */
@font-face {
  font-family: 'Bebas Neue Cyr';
  src: url('assets/fonts/BebasNeueCyr-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue Cyr';
  src: url('assets/fonts/BebasNeueCyr-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
/* a pair's faces from its variables (app.js pairVars): the running words, then the accent word */
.ff { font-family: var(--fb, var(--f-d)); font-weight: var(--fbw, 700); text-transform: var(--fbt, none); letter-spacing: -0.005em; }
.ff em, .ff .k { font-family: var(--fa, var(--f-d)); font-weight: var(--faw, 700); font-style: var(--fai, normal); text-transform: var(--fat, none); }
/* clean letters as they are (the owner's references): no glow, no outline — only a slight dark shadow under them */
.ff, .cap--ed { --outline: 0 0.02em 0.05em rgba(0, 0, 0, 0.4), 0 0.06em 0.22em rgba(0, 0, 0, 0.3); }
/* a person's palette «Эффекты» (app.js fxVars) come in --outline; a pill's letters stay clean, as in the video */
.ff[data-treat="pill"] em, .cap[data-treat="pill"] .w.k, .hook[data-treat="pill"] .hook__k { text-shadow: none; }
/* The captions at the engine's sizes (FlatCaption: the small line 54 px, a plain line 70, the big word up to 150 — times
   «Размер» `--sz` (looks.ts SIZES), the pair's own scales `--fbs`/`--fak`, and `--kfit`, what the room of 820 px holds:
   preview.js fitCap) in the engine's zones (Montage: the low one centred at y 1330, the middle, over the head). */
.cap {
  --sz: 1;
  --ks: calc(var(--px) * 150 * var(--sz) * var(--fak, 1) * var(--kfit, 1));
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  width: max-content;
  max-width: calc(var(--px) * 820);
  margin-inline: auto;
  color: var(--c-base, #fff);
  font-size: calc(var(--px) * 70 * var(--sz) * var(--fbs, 1));
  line-height: 1.1;
  text-align: center;
  word-spacing: 0.05em;
  text-shadow: var(--outline);
  transition: opacity 0.14s ease, translate 0.14s ease;
}
.cap[data-size="s"] { --sz: 0.8; }
.cap[data-size="l"] { --sz: 1.25; }
.cap[data-pos="auto"], .cap[data-pos="bottom"] { top: 69.27%; transform: translateY(-50%); }
.cap[data-pos="center"] { top: 50%; transform: translateY(-50%); }
.cap[data-pos="top"] { top: 9.5%; }
.cap.is-out { opacity: 0; translate: 0 calc(var(--px) * -18); }
.cap.is-gone { opacity: 0; transition: none; }
.cap .w { display: inline-block; transition: opacity 0.1s ease, color 0.12s; }
.cap .w.k { color: var(--c-acc); font-size: calc(1em * var(--fas, 1)); line-height: 1; text-shadow: var(--kshadow, var(--outline)); }
/* a group with its accent word: the line lighter beside it (presets.FONTS base `keyed`: 400 beside a 700 accent; a plain line keeps 500) */
.cap:has(.w.k) .w:not(.k) { font-weight: var(--fbwk, var(--fbw, 500)); }
.cap[data-treat="pill"] .w.k { padding: 0.04em 0.22em 0.08em; border-radius: 0.2em; background: var(--c-acc); color: var(--c-ink); text-shadow: none; box-shadow: 0 0.08em 0 var(--c-edge, transparent); }
.cap .w__emo { color: initial; text-shadow: none; margin-left: 0.12em; font-size: 0.92em; }
/* the big word's emoji: a little smaller than its letters (FlatCaption: 0.62 of the big size) */
.cap[data-design="dynamic"] .w.k .w__emo { margin-left: 0.1em; font-size: 0.62em; vertical-align: 0.1em; }
/* a word lights up with a small pop as it is said */
.cap .w.now { animation: word-pop 0.3s ease-out; }
@keyframes word-pop { 40% { transform: scale(1.08); } }
/* «dynamic»: the engine's group — rows of words trimmed to their letters (text-box), the small line tight on the big
   word, which lies over it where they meet; the layout turns from group to group; unsaid words wait dimmed */
.cap[data-design="dynamic"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: calc(var(--px) * 54 * var(--sz) * var(--fbs, 1));
  line-height: 1;
}
.cap[data-design="dynamic"][data-compose="lean-left"], .cap[data-design="dynamic"][data-compose="side"] { align-items: flex-start; }
.cap[data-design="dynamic"][data-compose="lean-right"] { align-items: flex-end; }
.cap__row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 0.26em; row-gap: 0.32em; max-width: calc(var(--px) * 820); }
.cap__row--before { margin-bottom: calc(0.12em + var(--kreach, 0px)); } /* clear of the big word's loops (preview.js reachCap) */
.cap__row--after { margin-top: 0.22em; }
.cap[data-treat="pill"] .cap__row--before { margin-bottom: calc(0.26em + var(--kreach, 0px) * 0.5); }
.cap[data-treat="pill"] .cap__row--after { margin-top: 0.28em; }
.cap__row--lead { flex-wrap: nowrap; }
.cap__side { display: flex; align-items: baseline; column-gap: 0.28em; }
.cap[data-compose="lean-left"] .cap__row--after, .cap[data-compose="side"] .cap__row--after { align-self: flex-end; }
.cap[data-compose="lean-right"] .cap__row--after { align-self: flex-start; }
.cap[data-design="dynamic"] .w { display: block; text-box: trim-both cap alphabetic; opacity: 0.38; }
.cap[data-design="dynamic"] .w.on { opacity: 1; }
.cap[data-design="dynamic"] .w.k { position: relative; z-index: 2; font-size: var(--ks); white-space: nowrap; text-box: trim-both var(--kedge, cap) alphabetic; }
.cap[data-design="dynamic"] .w.k.on { animation: key-pop 0.45s var(--spring) both; }
@keyframes key-pop { from { transform: scale(0.94); } 45% { transform: scale(1.04); } }
.cap[data-compose="lean-left"] .w.k { margin-left: var(--step, 0.5em); }
.cap[data-compose="lean-right"] .w.k { margin-right: var(--step, 0.5em); }
.cap[data-design="dynamic"][data-treat="pill"] .w.k { padding: 0.14em 0.24em; }
/* a script's big word is written in whole, left to right */
.cap[data-design="dynamic"][data-script="1"] .w.k { opacity: 1; clip-path: inset(-0.9em 104% -0.6em -0.3em); }
.cap[data-design="dynamic"][data-script="1"] .w.k.on { clip-path: inset(-0.9em -8% -0.6em -0.3em); transition: clip-path 0.36s cubic-bezier(0.16, 1, 0.3, 1); animation: none; }
/* «Спокойное» and «Выделение: Нет»: one line; «Появление»: lit word by word over it, or one word at a time */
.cap[data-design="calm"] .w { transition: none; }
.cap[data-design="calm"][data-play="build"] .w { opacity: 0.38; transition: opacity 0.12s ease; }
.cap[data-design="calm"][data-play="build"] .w.on { opacity: 1; }
.cap[data-play="word"] .w:not(.now) { display: none; }
.cap.off { opacity: 0; }

/* Pro: the editorial cover, then a torn-paper strip */
.scr--pro { background: #1a0f0b; }
.pa, .pb { position: absolute; inset: 0; transition: opacity 0.28s ease; }
.pb { opacity: 0; }
.scr--pro.is-b .pa { opacity: 0; }
.scr--pro.is-b .pb { opacity: 1; }
.pa__head {
  position: absolute;
  z-index: 1;
  left: 7%;
  right: 4%;
  top: 16%;
  display: grid;
  justify-items: start;
  color: #fff;
  font-family: 'Oswald', var(--f-d);
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.pa__l1, .pa__l2 { font-size: calc(var(--u) * 15.5); opacity: 0; transform: translateY(26%); transition: opacity 0.35s ease, transform 0.6s var(--spring); }
.pa__l2 { transition-delay: 0.12s; }
.pa__rule { width: 0; height: calc(var(--u) * 2.2); margin-top: calc(var(--u) * 2.2); background: #e2311d; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s; }
.scr--pro.is-on .pa__l1, .scr--pro.is-on .pa__l2 { opacity: 1; transform: none; }
.scr--pro.is-on .pa__rule { width: 66%; }
.pa__person {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  /* the cut-out of Lite's frame (preview-lite.jpg): lower, under the headline, as a cover sets her */
  transform: translateY(9%) scale(1.04);
  transform-origin: 50% 0;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}
.pa__person.is-in { opacity: 1; }
.pb__strip {
  position: absolute;
  z-index: 2;
  left: -4%;
  right: 8%;
  top: 19%;
  padding: calc(var(--u) * 3) calc(var(--u) * 5) calc(var(--u) * 3) calc(var(--u) * 10);
  background: #f4efe6;
  color: #15110c;
  font: 700 calc(var(--u) * 7)/1 'Oswald', var(--f-d);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  box-shadow: 0 calc(var(--u) * 1.5) calc(var(--u) * 4) rgba(0, 0, 0, 0.3);
  transform: translateX(-112%) rotate(-3deg);
  transition: transform 0.55s var(--spring);
  clip-path: polygon(0 10%, 5% 0, 13% 8%, 22% 1%, 31% 9%, 42% 2%, 51% 8%, 61% 0, 70% 9%, 79% 2%, 88% 9%, 96% 1%, 100% 12%, 98% 50%, 100% 90%, 94% 100%, 85% 92%, 75% 99%, 64% 91%, 53% 100%, 42% 92%, 31% 99%, 21% 91%, 11% 100%, 3% 90%, 0 55%);
}
.pb__strip span { background: linear-gradient(transparent 64%, rgba(226, 49, 29, 0.85) 64%, rgba(226, 49, 29, 0.85) 90%, transparent 90%); }
.scr--pro.is-strip .pb__strip { transform: rotate(-3deg); }
.cap--ed {
  --accent: #ff4a33;
  top: 69%;
  max-width: 84%;
  font-family: 'Oswald', var(--f-d);
  font-size: calc(var(--u) * 8.8);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.cap--ed .w { opacity: 0; transform: translateY(0.18em) scale(0.84); }
.cap--ed .w.on { opacity: 1; transform: none; }
.cap--ed .w.now { color: var(--accent); transform: scale(1.1); }
.cap--ed { --c-stroke: #141210; --c-base: #fff; --fbs: 1; }

/* ================================================================== sheets */

.sheet { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet__scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade-in 0.28s ease-out; transition: opacity 0.26s; }
.sheet__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: var(--sheet-bg);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  padding-bottom: calc(var(--sa-bottom) + 8px);
  animation: sheet-in 0.46s var(--ease);
  transition: height 0.4s var(--ease), transform 0.4s var(--ease);
}
.sheet__panel:focus { outline: none; }
.sheet__panel.is-dragging { transition: none; }
.sheet.is-closing .sheet__panel { transform: translateY(105%) !important; transition: transform 0.26s cubic-bezier(0.4, 0, 1, 1); }
.sheet.is-closing .sheet__scrim { opacity: 0; }
.sheet__grab { flex: none; display: grid; place-items: center; height: 20px; touch-action: none; cursor: grab; }
.sheet__grab i { width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); }
.sheet__head { flex: none; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 0 10px 8px; touch-action: none; }
.sheet__title { grid-column: 2; text-align: center; font: 600 17px/22px var(--f); }
.sheet__x {
  position: relative;
  grid-column: 3;
  justify-self: center;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--label-2);
}
.sheet__x::before { content: ""; position: absolute; inset: -7px; }
.sheet__x .i { width: 13px; height: 13px; }
.sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 10px; }
.sheet__foot { flex: none; display: grid; gap: 6px; padding: 10px 20px 4px; }
.sheet__text { margin: 0 0 14px; font: 400 16px/23px var(--f); color: var(--label-2); }
.sheet-hero { display: grid; place-items: center; margin: 2px 0 14px; }
.sheet-hero__ic {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--accent-fill);
  color: var(--accent-text);
}
.sheet-hero__ic .i { width: 32px; height: 32px; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }

.info { display: grid; justify-items: center; gap: 12px; }
.info__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 2px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--accent-fill);
  color: var(--accent-text);
}
.info__icon .i { width: 32px; height: 32px; }
.info__text { justify-self: stretch; font: 400 17px/24px var(--f); }
.info__ex { justify-self: stretch; padding: 12px 14px; border-radius: 16px; background: var(--fill); }
.info__ex-l { font: 600 13px/18px var(--f); color: var(--label-2); }
.info__ex p { margin-top: 3px; font: 400 15px/21px var(--f); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; font: 400 16px/22px var(--f); }
.checks .i { width: 24px; height: 24px; --ic-cut: #fff; }
.checks .is-ok .i { color: var(--green); }
.checks .is-bad .i { color: var(--red); }

.tips__fig { margin: 0 0 14px; overflow: hidden; border-radius: 22px; aspect-ratio: 6 / 5; background: var(--fill); }
.tips__fig img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.tips__item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.tips__item .tile { width: 40px; height: 40px; border-radius: 12px; }
.tips__item .tile .i { width: 22px; height: 22px; }
.tips__t { display: block; font: 600 17px/22px var(--f); }
.tips__x { margin-top: 2px; font: 400 15px/21px var(--f); color: var(--label-2); }

.waitrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--fill);
  font: 500 15px/20px var(--f);
}
.waitrow__clock { margin-left: auto; color: var(--label-2); font-variant-numeric: tabular-nums; }

/* ================================================================= banners */

.banners {
  position: fixed;
  z-index: 90;
  top: calc(var(--sa-top) + 8px);
  left: 0;
  right: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0 10px;
  pointer-events: none;
}
.banner {
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 24px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 0.5px solid var(--glass-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  touch-action: none;
  animation: banner-in 0.55s var(--spring);
}
.banner.is-out { animation: banner-out 0.26s ease-in forwards; }
.banner__icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
}
.banner__icon .i { width: 20px; height: 20px; }
.banner--ok .banner__icon { background: var(--green); color: #fff; }
.banner--error .banner__icon { background: var(--red); color: #fff; }
.banner__body { min-width: 0; display: grid; gap: 1px; }
.banner__act {
  margin-left: auto;
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--accent-text);
  font: 600 15px/20px var(--f);
  cursor: pointer;
}
.banner__title { font: 600 15px/20px var(--f); }
.banner__text { font: 400 15px/20px var(--f); color: var(--label-2); }
@keyframes banner-in { from { transform: translateY(-130%); opacity: 0; } }
@keyframes banner-out { to { transform: translateY(-130%); opacity: 0; } }

/* ============================================================= coach marks */

.coach { position: fixed; inset: 0; z-index: 95; }
.coach.is-out { opacity: 0; transition: opacity 0.2s; }
.coach__hole {
  position: fixed;
  border-radius: 22px;
  box-shadow: 0 0 0 200vmax rgba(8, 6, 4, 0.64);
  pointer-events: none;
  transition: left 0.4s var(--ease), top 0.4s var(--ease), width 0.4s var(--ease), height 0.4s var(--ease), border-radius 0.4s;
}
.coach__hole::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--accent);
  animation: coach-pulse 1.8s ease-out infinite;
}
@keyframes coach-pulse { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }
.coach__tip {
  position: fixed;
  left: 16px;
  right: 16px;
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 16px 12px;
  border-radius: 24px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 0.5px solid var(--glass-line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.4s var(--spring), top 0.4s var(--ease);
}
.coach.is-ready .coach__tip { opacity: 1; transform: none; }
.coach__tip:focus, .coach__tip:focus-visible { outline: none; }
.coach__arrow {
  position: absolute;
  left: var(--ax, 50%);
  width: 18px;
  height: 18px;
  margin-left: -9px;
  background: var(--glass-strong);
  transform: rotate(45deg);
}
.coach__tip[data-side="below"] .coach__arrow { top: -9px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.coach__tip[data-side="above"] .coach__arrow { bottom: -9px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.coach__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.coach__title { font: 700 17px/22px var(--f); }
.coach__of { font: 500 13px/1 var(--f); color: var(--label-2); white-space: nowrap; }
.coach__text { margin: 6px 0 12px; font: 400 15px/21px var(--f); color: var(--label-2); }
.coach__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ==================================================================== jobs */

/* release phase (config.slow_notice): one calm sand card above the list */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 14px;
  padding: 12px 14px 13px 12px;
  border-radius: 20px;
  background: var(--accent-fill);
}
.notice__ic {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--tile-bg);
  color: var(--accent-text);
}
.notice__ic .i { width: 18px; height: 18px; }
.notice__x { margin: 0; padding-top: 1px; font: 400 14px/19px var(--f); color: var(--label); }
.notice__x b { font-weight: 600; }

.seg--tabs { margin-top: 6px; }
.seg--tabs .seg__opt { font-size: 13.5px; padding: 0 4px; gap: 4px; }
.jcards { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.jcard {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 14px;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 12px 14px 12px 12px;
  border-radius: 24px;
  background: var(--bg-2);
  text-align: left;
  transition: transform 0.28s var(--spring);
}
.jcard:active { transform: scale(0.985); }
.jcard__poster { position: relative; width: 76px; height: 124px; overflow: hidden; border-radius: 15px; background: #2a2018; }
.jcard__poster img { width: 100%; height: 100%; object-fit: cover; }
.jcard__ph { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, 0.6); background: linear-gradient(160deg, #4a3a2a, #1c1611); }
.jcard__dur {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 600 11px/14px var(--f);
  font-variant-numeric: tabular-nums;
}
.jcard__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
}
.jcard__play .i { width: 14px; height: 14px; margin-left: 2px; }
.jcard__body { min-width: 0; display: grid; gap: 3px; }
.jcard__title { font: 600 17px/22px var(--f); letter-spacing: -0.016em; }
.jcard__meta { font: 400 13px/17px var(--f); color: var(--label-2); }
.jcard__status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.jcard__hint { flex-basis: 100%; font: 400 13px/18px var(--f); color: var(--label-2); }
.jcard__hint b { font-weight: 600; color: var(--label); }
.jcard__hint.is-soon { color: var(--orange); }
.pill--edit { background: var(--accent-fill); color: var(--accent-text); }
.pill--edit .i { width: 13px; height: 13px; }
.pill--share { background: var(--fill-2); color: var(--label); }
.pill--share .i { width: 13px; height: 13px; }
.share__link { padding: 12px 14px; }
.share__url { font: 500 14px/20px var(--f); color: var(--label); word-break: break-all; user-select: all; }
.share__people { font: 400 15px/21px var(--f); color: var(--label); margin: 0 0 4px; }
.jcard__chev .i { width: 14px; height: 14px; color: var(--label-3); }
.jstage { display: flex; align-items: center; gap: 8px; }
.jstage__t { font: 400 15px/20px var(--f); font-variant-numeric: tabular-nums; }
.jstage__t b { font-weight: 600; }
.ring { flex: none; }
.ring__bg { fill: none; stroke: var(--fill-2); stroke-width: 3.6; }
.ring__fg { fill: none; stroke: var(--accent); stroke-width: 3.6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.6s var(--ease); }

.empty { display: grid; justify-items: center; gap: 8px; padding: 26px 12px 8px; text-align: center; }
.empty__img { width: 172px; height: 172px; margin-bottom: 10px; object-fit: cover; border-radius: 38px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.35); }
.empty__t { font: 700 22px/28px var(--f-d); letter-spacing: -0.02em; }
.empty__x { max-width: 300px; margin-bottom: 10px; font: 400 15px/21px var(--f); color: var(--label-2); }

/* job detail sheet */
.player {
  position: relative;
  width: min(250px, 68%);
  aspect-ratio: 9 / 16;
  margin: 2px auto 16px;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
}
.player__poster, .player__video { width: 100%; height: 100%; object-fit: cover; }
.player__ph { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, 0.5); }
.player__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  color: #fff;
  transition: transform 0.28s var(--spring);
}
.player__play:active { transform: scale(0.92); }
.player__play .i { width: 26px; height: 26px; margin-left: 4px; }
.player__dur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 600 12px/16px var(--f);
}
.jsheet__meta { display: grid; justify-items: start; gap: 4px; margin-bottom: 14px; }
.jsheet__title { font: 700 20px/25px var(--f-d); letter-spacing: -0.02em; }
.jsheet__sub { font: 400 15px/20px var(--f); color: var(--label-2); }
.jsheet__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.qnote { display: flex; align-items: flex-start; gap: 8px; margin: -2px 4px 16px; font: 400 15px/20px var(--f); color: var(--label-2); }
.qnote .i { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--accent-text); }
.qnote b { font-weight: 600; color: var(--label); }
.jsheet .grp__title { display: block; margin: 0 4px 10px; }
.jsheet .card { background: var(--fill); }
.stages { list-style: none; margin: 0; padding: 4px 14px; display: grid; }
.stages__i { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; padding: 10px 0; }
.stages__i + .stages__i { border-top: 0.5px solid var(--sep); }
.stages__dot { width: 22px; height: 22px; display: grid; place-items: center; margin-top: 1px; border-radius: 50%; background: var(--fill-2); }
.stages__dot .i { width: 13px; height: 13px; }
.stages__i.is-done .stages__dot { background: var(--green); color: #fff; }
.stages__i.is-now .stages__dot { background: transparent; }
.stages__i b { display: block; font: 600 16px/21px var(--f); }
.stages__i small { display: block; font: 400 13px/18px var(--f); color: var(--label-2); }
.stages__i.is-next b { color: var(--label-2); font-weight: 500; }

/* ================================================================== wallet */

.bcard {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 20px 20px 18px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #5f4731 0%, #2c2118 55%, #17120d 100%);
  color: #f8f1e6;
  box-shadow: 0 18px 40px -18px rgba(40, 25, 10, 0.6);
  isolation: isolate;
}
.bcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), transparent 42%); }
.bcard__glow {
  position: absolute;
  z-index: -1;
  top: -50%;
  right: -18%;
  width: 72%;
  height: 150%;
  background: radial-gradient(closest-side, rgba(226, 199, 159, 0.55), transparent);
}
.bcard__label { display: flex; align-items: center; gap: 6px; font: 600 13px/18px var(--f); color: rgba(248, 241, 230, 0.75); }
.bcard__label .i { width: 16px; height: 16px; }
.bcard__value { display: flex; align-items: baseline; gap: 8px; }
.bcard__value b { font: 700 54px/1 var(--f-r); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.bcard__value span { font: 600 17px/1 var(--f); color: rgba(248, 241, 230, 0.82); }
.bcard__hint { font: 400 15px/20px var(--f); color: rgba(248, 241, 230, 0.82); }
.pkgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pkgs--sheet { margin-bottom: 6px; }
.pkgs--sheet .pkg { background: var(--fill); }
.pkg { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; border-radius: 22px; background: var(--bg-2); }
.pkg.is-popular { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pkg__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pkg__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 700 17px/22px var(--f); }
.pkg__meta { font: 400 15px/20px var(--f); }
.pkg__per { font: 400 13px/17px var(--f); color: var(--label-2); }
.pkg__buy { flex: none; min-width: 94px; font-variant-numeric: tabular-nums; }
.pkg__buy .star { color: inherit; }
.btn--tinted .star { color: #f5b301; }
/* PURCHASE_MODE=request: the price sits by the name, «Оставить заявку» spans the card under the text */
.pkg--req { flex-wrap: wrap; padding: 16px 18px; }
.pkg--req .pkg__buy { flex: 1 1 100%; }
.pkg__price { margin-left: auto; font: 600 17px/22px var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* A price for this person (the first purchase, a promo code): the full one struck through, what is saved in a pill */
.pkg__buy:has(.pkg__was) { flex-direction: column; gap: 0; min-height: 46px; padding-top: 4px; padding-bottom: 5px; line-height: 1.1; }
.pkg__was { font: 500 12px/14px var(--f); opacity: 0.6; text-decoration-thickness: 1px; }
.pkg__price .pkg__was { margin-right: 6px; font-size: 13px; vertical-align: 2px; } /* requests: by the name */
.pkg__old { color: var(--label-3); text-decoration-thickness: 1px; }
.pkg__off { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--accent);
  color: var(--accent-ink, #1d1b18); font: 700 11px/15px var(--f); vertical-align: 1px; font-variant-numeric: tabular-nums; }
/* «Есть промокод?» and the code put in, above the packages */
.promo { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 10px; padding: 12px 14px; border: 0;
  border-radius: 18px; background: var(--bg-2); color: var(--label); font: 500 15px/20px var(--f); text-align: left; }
.promo > .i { width: 20px; height: 20px; flex: none; color: var(--accent-text); --ic-cut: var(--bg-2); }
.promo--add { cursor: pointer; }
.promo--add > span { flex: 1; }
.promo--add > .i:last-child { width: 16px; height: 16px; color: var(--label-3); }
.promo__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.promo__text b { font: 700 15px/20px var(--f); letter-spacing: 0.02em; }
.promo__text span { font: 400 13px/17px var(--f); color: var(--label-2); }
.promo.is-on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.promo.is-bad > .i { color: var(--orange); }
.promo.is-bad .promo__text span { color: var(--orange); }
.tip--gift { margin: 0 4px 10px; color: var(--label); font-weight: 500; }
/* «Догрев» (platform nurture.py): the personal bonus on top of the wallet — its countdown — and the studio's line to it */
.entry { margin: 0 0 12px; padding: 12px; border-radius: 26px; background: color-mix(in srgb, var(--accent) 14%, var(--bg-2)); display: grid; gap: 8px; }
.entry .pkg { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--accent); }
.entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 6px; font: 700 15px/20px var(--f); color: var(--label); }
.entry__head > .i { width: 18px; height: 18px; color: var(--accent-text); }
.entry__usd { margin-left: auto; font: 500 13px/17px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.entry__timer { display: flex; align-items: center; gap: 6px; margin: 0 6px; font: 600 13px/17px var(--f); color: var(--orange);
  font-variant-numeric: tabular-nums; }
.entry__timer > .i { width: 15px; height: 15px; }
.entrytip { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 12px 14px; border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-2)); color: var(--label); font: 500 15px/20px var(--f); text-decoration: none; }
.entrytip > span { flex: 1; min-width: 0; }
.entrytip > .i { width: 18px; height: 18px; flex: none; color: var(--accent-text); }
.entrytip > .i:last-child { width: 14px; height: 14px; color: var(--label-3); }
.entrytip__left { font: 700 15px/20px var(--f); color: var(--orange); font-variant-numeric: tabular-nums; }
.ledger__d { flex: none; font: 600 17px/1 var(--f); font-variant-numeric: tabular-nums; }
.ledger__d.is-plus { color: var(--green); }

/* ================================================================== invite */

.share {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 22px 18px 18px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(150deg, #6c5139, #2b2017 58%, #1a140f);
  color: #fbf5ec;
  isolation: isolate;
}
.share__glow { position: absolute; z-index: -1; top: -40%; left: -20%; width: 80%; height: 120%; background: radial-gradient(closest-side, rgba(226, 199, 159, 0.4), transparent); }
.share__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}
.share__icon .i { width: 26px; height: 26px; }
.share__title { font: 700 24px/29px var(--f-d); letter-spacing: -0.022em; }
.share__text { font: 400 15px/21px var(--f); color: rgba(251, 245, 236, 0.82); }
.share__link {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.24);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
}
.share__label { font: 500 12px/16px var(--f); color: rgba(251, 245, 236, 0.66); }
.share__url { font: 600 15px/20px ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; }
/* the card is dark in both themes: its link light (the shared video's sheet sets .share__url to the label colour) */
.share .share__url { color: #fbf5ec; }
.share__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.share__actions .btn { padding: 0 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stat { display: grid; gap: 2px; padding: 14px 16px; border-radius: 22px; background: var(--bg-2); }
.stat__v { font: 700 30px/36px var(--f-r); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__l { font: 400 13px/17px var(--f); color: var(--label-2); }
.chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 168px; padding: 14px 14px 0; }
.chart__col { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; min-height: 0; }
.chart__n { min-height: 14px; font: 600 12px/14px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.chart__bar { width: 100%; max-width: 24px; display: flex; align-items: flex-end; min-height: 0; }
.chart__stack { width: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: 7px; min-height: 0; }
.chart__stack i { display: block; flex-basis: 0; min-height: 4px; }
.chart__stack .j { background: var(--fill-2); }
.chart__stack .p { background: var(--accent); }
.chart__x { padding-bottom: 12px; font: 500 12px/14px var(--f); color: var(--label-2); }
.chart__col.is-today .chart__x { color: var(--label); font-weight: 700; }
.legend { display: flex; gap: 16px; padding: 0 16px 14px; font: 400 13px/1 var(--f); color: var(--label-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend .j { background: var(--fill-2); }
.legend .p { background: var(--accent); }
.partner { display: grid; gap: 12px; margin-top: 26px; padding: 16px; }
/* the admin's «Партнёры» (20.10.2026) */
.apts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.apt { display: grid; gap: 8px; padding: 14px 16px; }
.apt.is-done { opacity: 0.72; }
.apt__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.apt__who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/21px var(--f); color: var(--label); text-align: left; }
.apt__at { flex: none; font: 400 13px/18px var(--f); color: var(--label-3); }
.apt__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.apt__line { display: flex; align-items: flex-start; gap: 7px; margin: 0; font: 400 14px/19px var(--f); color: var(--label-2); overflow-wrap: anywhere; }
.apt__line .i { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--label-3); }
.apt__msg { margin: 0; font: 400 14px/20px var(--f); color: var(--label); white-space: pre-wrap; overflow-wrap: anywhere; }
.apt__money { display: flex; align-items: baseline; gap: 8px; }
.apt__money b { font: 700 24px/1.1 var(--f-d); font-variant-numeric: tabular-nums; }
.apt__money span:not(.pill) { font: 400 14px/18px var(--f); color: var(--label-2); }
.apt__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
/* the admin's «API-клиенты» (21.10.2026): a client's name, the message with its key to send it */
.cl-new { margin-top: 12px; }
.apt__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/21px var(--f); color: var(--label); }
.apt__line code { font: 500 13px/19px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--label); }
.clmsg { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--fill); color: var(--label-2);
  font: 400 13px/19px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.partner__wait { display: flex; align-items: flex-start; gap: 8px; margin: 0; font: 500 14px/20px var(--f); color: var(--label-2); }
.partner__wait .i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-text); }
/* «Кабинет партнёра» (20.10.2026): the dark card of «Друзья» with the balance, then the numbers and «Вывести» */
.share--partner { background: linear-gradient(150deg, #4c5a3a, #1f2a1a 58%, #121810); }
.share--partner + .share { margin-top: 14px; }
.proom__top { display: flex; align-items: center; gap: 12px; }
.proom__top .share__title { flex: 1; min-width: 0; }
.proom__pct { flex: none; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); font: 700 14px/1 var(--f); font-variant-numeric: tabular-nums; }
.proom__bal { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.proom__bal b { font: 700 38px/1.05 var(--f-d); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.proom__bal span { font: 500 15px/20px var(--f); color: rgba(251, 245, 236, 0.7); }
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats--3 .stat__v { font-size: 20px; overflow-wrap: anywhere; }
.pout { display: grid; gap: 10px; margin-top: 10px; padding: 14px 16px; }
.pout__x { margin: 0; font: 400 13px/18px var(--f); color: var(--label-2); text-align: center; }
.pout + .share { margin-top: 26px; }
.pform__h { margin: 16px 2px 8px; font: 600 13px/1.2 var(--f); color: var(--label-2); text-transform: uppercase; letter-spacing: 0.03em; }
.pform__chips .chip--pick { height: 38px; font-weight: 500; }
.pform__rows { margin-top: 16px; }
.pform__rows .frow__l { min-width: 64px; }
.partner__top { display: flex; align-items: center; gap: 12px; }
.partner__t { font: 700 17px/22px var(--f); }
.partner__x { font: 400 15px/21px var(--f); color: var(--label-2); }

/* ================================================================= profile */

.me { display: flex; align-items: center; gap: 14px; margin-top: 4px; padding: 16px; }
.avatar {
  width: 60px;
  height: 60px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #e6cca1, #8a6635);
  color: #1d160e;
  font: 700 22px/1 var(--f-r);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me__text { min-width: 0; display: grid; gap: 1px; }
.me__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 700 22px/27px var(--f-d); letter-spacing: -0.022em; }
.me__user { font: 400 15px/20px var(--f); color: var(--label-2); }
.me__count { font: 400 13px/18px var(--f); color: var(--label-2); }

/* =============================================================== welcome */

.welcome { display: flex; flex-direction: column; min-height: calc(100dvh - var(--sa-top) - var(--sa-bottom) - 18px); padding-top: 26px; }
.welcome__top { display: grid; justify-items: center; gap: 10px; text-align: center; }
.welcome__icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.45); }
.welcome__title { max-width: 340px; margin-top: 10px; font: 800 34px/40px var(--f-d); letter-spacing: -0.028em; }
.welcome__lead { max-width: 330px; font: 400 17px/23px var(--f); color: var(--label-2); }
.welcome__list { list-style: none; margin: 34px 0 0; padding: 0 4px; display: grid; gap: 24px; }
.feat { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.feat__ic { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent-text); }
.feat__ic .i { width: 34px; height: 34px; }
.feat__t { display: block; font: 600 17px/22px var(--f); }
.feat__x { margin-top: 2px; font: 400 15px/21px var(--f); color: var(--label-2); }
.sub__list { margin-top: 30px; }
.welcome__foot { position: sticky; bottom: 0; margin-top: auto; padding: 28px 0 8px; background: linear-gradient(transparent, var(--bg) 26%); }
.welcome__legal { margin: 0 8px 12px; text-align: center; font: 400 13px/18px var(--f); color: var(--label-2); }

/* =========================================================== state screens */

.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 80dvh; padding: 24px 8px; text-align: center; }
.state__icon { width: 84px; height: 84px; margin-bottom: 8px; border-radius: 20px; box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.45); }
.state__t { font: 700 26px/32px var(--f-d); letter-spacing: -0.022em; }
.state__x { max-width: 320px; font: 400 17px/23px var(--f); color: var(--label-2); }
.state__actions { width: 100%; max-width: 340px; display: grid; gap: 8px; margin-top: 18px; }

/* the site's main page (a browser outside Telegram): the hero, the profile's lists, the seller at the foot */
.home { padding: 8px 0 4px; }
/* The site's bar: the app icon and the name, top left */
.home__bar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 30px; padding: 6px 2px 0; }
.home__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--label); text-decoration: none; font: 800 21px/1 var(--f); letter-spacing: -0.02em; }
.home__brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.home__err { width: 100%; max-width: 420px; text-align: left; }
.home__wait { color: var(--label); font-weight: 500; }
.home__note a { color: var(--accent-text); text-decoration: none; }
.home__rights { margin-top: 12px; color: var(--label-3); }
@media (min-width: 1100px) { /* a wide window: the logo in its own top-left corner, the page's column stays centred */
  .home__brand { position: absolute; top: 24px; left: 32px; }
  .home__bar { height: 46px; margin-bottom: 18px; }
}
.home__hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.home__x { max-width: 420px; }
.home__note { max-width: 340px; margin-top: 4px; font: 400 13px/18px var(--f); color: var(--label-2); }
.home__legal { margin-top: 34px; display: grid; gap: 3px; text-align: center; font: 400 13px/18px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.home__seller { font-weight: 600; color: var(--label); }
.home__lang { display: flex; justify-content: center; gap: 16px; margin-top: 14px; }
.home__lang a { font-weight: 600; letter-spacing: 0.04em; color: var(--label-3); text-decoration: none; }
.home__lang a[aria-current] { color: var(--label); }
.splash { display: grid; place-items: center; align-content: center; gap: 22px; min-height: 80dvh; }
.splash__icon { width: 72px; height: 72px; border-radius: 17px; }

/* ================================================================== admin */
/* The admin panel (admin.js): a hub, then sections with a back link above their Large Title. Same materials as
   the rest: grouped lists, cards, the warm hero card of the Wallet, pills, the iOS search field. */

.lt__main { flex: 1; min-width: 0; display: grid; }
.lt--sub .lt__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back {
  position: relative;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  min-height: 30px;
  margin: 0 0 0 -7px;
  padding: 0 8px 0 0;
  color: var(--accent-text);
  font: 400 17px/22px var(--f);
}
.back::before { content: ""; position: absolute; inset: -7px -6px; }
.back .i { width: 22px; height: 22px; }
.back:active { opacity: 0.55; }
.roundbtn {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fill);
  color: var(--label);
}
.roundbtn::before { content: ""; position: absolute; inset: -5px; }
.roundbtn .i { width: 18px; height: 18px; }
.roundbtn.is-busy .i { animation: spin 0.8s linear infinite; }
.roundbtn:active { transform: scale(0.92); }
.flip { transform: rotate(180deg); }

/* the hub: what is being edited now, today's numbers, the sections */
.alive {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 16px 18px 18px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #5f4731 0%, #2c2118 55%, #17120d 100%);
  color: #f8f1e6;
  text-align: left;
  box-shadow: 0 18px 40px -18px rgba(40, 25, 10, 0.6);
  isolation: isolate;
  transition: transform 0.28s var(--spring);
}
.alive::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), transparent 42%); }
.alive:active { transform: scale(0.985); }
.alive__glow { position: absolute; z-index: -1; top: -50%; right: -18%; width: 72%; height: 150%; background: radial-gradient(closest-side, rgba(226, 199, 159, 0.5), transparent); }
.alive__top { display: flex; align-items: center; gap: 8px; font: 600 13px/18px var(--f); letter-spacing: 0.04em; text-transform: uppercase; color: rgba(248, 241, 230, 0.78); }
.alive__dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: rgba(248, 241, 230, 0.4); }
.alive__dot.is-on { background: #3ddc68; box-shadow: 0 0 0 0 rgba(61, 220, 104, 0.5); animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 104, 0.5); } 100% { box-shadow: 0 0 0 9px rgba(61, 220, 104, 0); } }
.alive__chev { width: 14px; height: 14px; margin-left: auto; opacity: 0.7; }
.alive__line { font: 700 24px/29px var(--f-d); letter-spacing: -0.022em; }
.alive__job { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.24); border: 0.5px solid rgba(255, 255, 255, 0.13); }
.alive__job .ring__bg { stroke: rgba(255, 255, 255, 0.18); }
.alive__job .ring__fg { stroke: #f2d9b0; }
.alive__jt { min-width: 0; display: grid; gap: 1px; }
.alive__jt b { font: 600 15px/20px var(--f); font-variant-numeric: tabular-nums; }
.alive__jt > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px/18px var(--f); color: rgba(248, 241, 230, 0.78); font-variant-numeric: tabular-nums; }
.alive__hint { font: 400 15px/20px var(--f); color: rgba(248, 241, 230, 0.82); }
.grp--tight { margin-top: 22px; }
.grp--first { margin-top: 14px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.stat--a { align-content: start; gap: 1px; padding: 12px 14px 13px; }
.stat--a .stat__v { font-size: 28px; line-height: 34px; }
.stat--a .stat__l { color: var(--label-2); }
.stat__s { font: 400 12px/16px var(--f); color: var(--label-3); font-variant-numeric: tabular-nums; }
.stat--err .stat__v { color: var(--red-text); }

/* a row of a card: label (and a small line) on the left, the value on the right */
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 9px 16px; text-align: left; }
.kv__l { min-width: 0; display: grid; gap: 1px; font: 400 16px/21px var(--f); color: var(--label); }
.kv__l small { font: 400 13px/17px var(--f); color: var(--label-2); }
.kv__v { flex: none; max-width: 62%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; column-gap: 6px; font: 600 16px/21px var(--f); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.kv__v b { font-weight: 600; }
.kv__v small { flex-basis: 100%; font: 400 12.5px/16px var(--f); color: var(--label-2); }
.kv--ok .kv__v { color: var(--green); }
.kv--err .kv__v { color: var(--red-text); }
.kv--warn .kv__v { color: var(--orange); }
.kv--col { display: block; padding: 0; }
.kv--link { transition: background 0.15s; }
.kv--link:active { background: var(--fill); }
.kv__chev { width: 12px; height: 12px; color: var(--label-3); }
.sdot { width: 12px; height: 12px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(127, 127, 127, 0.45); }
.schips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
.schip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--fill); color: var(--label-3); font: 500 12.5px/1 var(--f); }
.schip .i { width: 12px; height: 12px; }
.schip.is-on { background: var(--accent-fill); color: var(--accent-text); }

.pill--mode { background: var(--fill); color: var(--label-2); }
.pill--pro { background: var(--accent-fill); color: var(--accent-text); }
.pill--run { background: var(--accent-fill); color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* now: the running jobs as cards, the queue as a list */
.acards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acard { display: grid; grid-template-columns: 48px minmax(0, 1fr) 14px; gap: 14px; align-items: center; width: 100%; padding: 14px; border-radius: 22px; background: var(--bg-2); text-align: left; transition: transform 0.28s var(--spring); }
.acard:active { transform: scale(0.985); }
.acard__ring { position: relative; width: 48px; height: 48px; display: grid; place-items: center; }
.acard__ring .ring { position: absolute; inset: 0; }
.acard__ring b { position: relative; font: 700 12.5px/1 var(--f-r); font-variant-numeric: tabular-nums; }
.acard__body { min-width: 0; display: grid; gap: 2px; }
.acard__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 600 17px/22px var(--f); }
.acard__user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 14px/19px var(--f); }
.acard__user span { color: var(--label-2); }
.acard__stage { font: 400 13px/18px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.acard__meta { font: 400 12.5px/17px var(--f); color: var(--label-3); font-variant-numeric: tabular-nums; }
.acard__stage b { font-weight: 600; color: var(--accent-text); }
.acard__chev { width: 14px; height: 14px; color: var(--label-3); }
.acard__title .pill, .list--queue .pill, .arow__title .pill { height: 20px; padding: 0 8px; font-size: 11.5px; }
.list--queue { --sep-left: 56px; }
.list--queue .row__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.qpos { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--fill); color: var(--label-2); font: 700 14px/1 var(--f-r); }
.list--queue li:first-child .qpos { background: var(--accent-fill); color: var(--accent-text); }
.qwait { flex: none; display: grid; justify-items: end; font: 400 12px/15px var(--f); color: var(--label-3); }
.qwait b { font: 600 15px/20px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }

/* jobs: compact cards with the poster or the state */
.seg--5 .seg__opt { padding: 0 2px; font-size: 13px; }
.alist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.arow { display: grid; grid-template-columns: 52px minmax(0, 1fr) 14px; gap: 12px; align-items: center; width: 100%; padding: 10px 14px 10px 10px; border-radius: 20px; background: var(--bg-2); text-align: left; transition: transform 0.28s var(--spring); }
.arow:active { transform: scale(0.985); }
.arow[aria-busy="true"], .row[aria-busy="true"], .acard[aria-busy="true"] { opacity: 0.6; }
.arow__thumb { width: 52px; height: 68px; overflow: hidden; border-radius: 12px; background: #2a2018; }
.arow__thumb img { width: 100%; height: 100%; object-fit: cover; }
.arow__ph { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, 0.62); background: linear-gradient(160deg, #4a3a2a, #1c1611); }
.arow__ph .i { width: 22px; height: 22px; }
.arow__ph--err { color: #ff8f86; background: linear-gradient(160deg, #4d2b26, #1d1210); }
.arow__ph--run .ring__bg { stroke: rgba(255, 255, 255, 0.16); }
.arow__body { min-width: 0; display: grid; gap: 2px; }
.arow__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 15px/20px var(--f); letter-spacing: -0.01em; }
.arow__no { color: var(--label-2); font-weight: 500; }
.arow__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13.5px/18px var(--f); }
.arow__sub span { color: var(--label-2); }
.arow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font: 400 12.5px/17px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.arow__meta .pill { height: 22px; padding: 0 8px; font-size: 12px; }
.arow__chev { width: 14px; height: 14px; color: var(--label-3); }
.arow--sm { grid-template-columns: 40px minmax(0, 1fr) 14px; padding: 8px 12px 8px 8px; background: var(--fill); }
.arow--sm .arow__thumb { width: 40px; height: 52px; border-radius: 10px; }
.alist--sheet { margin-top: 0; }
.adm__more { margin-top: 12px; }
.adm__count { margin: 16px 4px 8px; }

/* the iOS search field */
.search { display: flex; align-items: center; gap: 7px; height: 40px; margin-top: 4px; padding: 0 4px 0 11px; border-radius: 12px; background: var(--seg-bg); color: var(--label-2); }
.search > .i { width: 18px; height: 18px; flex: none; }
.search__in { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--label); font: 400 17px/22px var(--f); -webkit-appearance: none; appearance: none; }
.search__in:focus-visible { outline: none; }
.search__in::-webkit-search-cancel-button { display: none; }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--accent-fill); }
.search__x { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--label-3); --ic-cut: var(--bg); }
.search__x .i { width: 18px; height: 18px; }

/* people: users and conversations */
.list--people { --sep-left: 64px; }
.prow { align-items: center; padding: 10px 14px; }
.ava { width: 38px; height: 38px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(135deg, #e6cca1, #8a6635); color: #1d160e; font: 700 14px/1 var(--f-r); letter-spacing: 0; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava--t1 { background: linear-gradient(135deg, #ecc6a8, #9b5b3b); }
.ava--t2 { background: linear-gradient(135deg, #dcd6a6, #7b7442); }
.ava--t3 { background: linear-gradient(135deg, #e6bfba, #8f4f57); }
.ava--t4 { background: linear-gradient(135deg, #cfc8bc, #6c6358); }
.ava--lg { width: 64px; height: 64px; font-size: 22px; }
.prow__top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.prow__top .row__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__top .badge-pill, .prow__top .pill { flex: none; height: 18px; padding: 0 7px; font-size: 10.5px; }
.prow .row__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__last b { font-weight: 600; color: var(--label-2); }
.prow__facts { font: 400 12.5px/17px var(--f); color: var(--label-3); font-variant-numeric: tabular-nums; }
.prow__facts b { font-weight: 600; color: var(--orange); }
.prow__facts b.prow__red, .prow__blocked { color: var(--red-text); }
.prow__blocked { display: flex; align-items: center; gap: 4px; font-weight: 500; }
.prow__blocked .i { width: 14px; height: 14px; flex: none; }
.prow__when { flex: none; align-self: flex-start; display: grid; justify-items: end; gap: 4px; padding-top: 2px; font: 400 13px/17px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.prow__when small { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--fill); font: 600 11px/18px var(--f); text-align: center; }

/* a conversation */
.chathead { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 12px 12px 12px 14px; }
.chathead__t { flex: 1; min-width: 0; display: grid; }
.chathead__n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 17px/22px var(--f); }
.chathead__s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px/18px var(--f); color: var(--label-2); }
.chathead__b { display: flex; margin-top: 4px; }
.chathead__b .pill, .uhead__b .pill--err { height: 22px; padding: 0 8px; font-size: 11.5px; }
/* «Написать» under a conversation (a message from the bot to the person) */
.adm__write { margin-top: 16px; }
.note.adm__write { display: flex; align-items: flex-start; gap: 8px; }
.note.adm__write .i { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.wbox { margin-top: 12px; }
.wbox .textarea { min-height: 150px; font-size: 16px; line-height: 21px; }
.adm__earlier { min-height: 40px; margin-top: 8px; font-size: 15px; }
.msgs { display: grid; gap: 8px; margin-top: 12px; }
.msgday { display: flex; justify-content: center; margin: 8px 0 2px; }
.msgday span { padding: 3px 10px; border-radius: 999px; background: var(--fill); font: 600 12px/16px var(--f); color: var(--label-2); }
.msg { display: grid; justify-items: start; gap: 4px; max-width: 86%; min-width: 0; }
.msg--out { justify-self: end; justify-items: end; }
.msg--sys { justify-self: center; justify-items: center; max-width: 94%; }
.bub { display: grid; gap: 6px; max-width: 100%; padding: 9px 12px; border-radius: 18px 18px 18px 6px; background: var(--bg-2); color: var(--label); font: 400 15px/20px var(--f); overflow-wrap: anywhere; }
.msg--out .bub { border-radius: 18px 18px 6px 18px; background: var(--bubble-out); }
.bub__x { white-space: pre-wrap; }
.bub__cmd { font: 600 14px/19px ui-monospace, "SF Mono", Menlo, monospace; color: var(--accent-text); }
.bub__muted { font-style: italic; color: var(--label-2); }
.bub--tap { display: flex; align-items: center; gap: 6px; background: transparent; box-shadow: inset 0 0 0 1px var(--dash); color: var(--label-2); }
.bub--tap .i { width: 17px; height: 17px; color: var(--accent-text); }
.bub__ed { font: 500 11.5px/14px var(--f); color: var(--label-3); }
.fchip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fchip > .i { width: 34px; height: 34px; padding: 7px; flex: none; border-radius: 10px; background: var(--tile-bg); color: var(--accent-text); }
.fchip__t { min-width: 0; display: grid; }
.fchip__t b { font: 600 14px/19px var(--f); overflow-wrap: anywhere; }
.fchip__t b small { font-weight: 500; color: var(--label-3); }
.fchip__t > small { font: 400 12.5px/16px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.kbd { justify-self: stretch; display: grid; gap: 4px; min-width: 0; }
.kbd__row { display: flex; gap: 4px; }
.kbd__b { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 32px; padding: 4px 10px; border-radius: 10px; background: var(--fill-2); color: var(--label); font: 500 13px/17px var(--f); text-align: center; }
.kbd__b .i { width: 13px; height: 13px; flex: none; opacity: 0.7; }
.refusal { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 159, 10, 0.16); color: var(--orange); font: 600 12px/16px var(--f); }
.refusal .i { width: 13px; height: 13px; }
.msg.is-refusal .bub { box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.4); }
.bmark { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--accent-fill); color: var(--accent-text); font: 600 12px/16px var(--f); }
.msg--in > .bmark { justify-self: start; }
.bmark .i { width: 13px; height: 13px; }
/* support in the bot (support.py): the question, the answer… and the menu under the input field (menu.py) */
.smark { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--green-fill); color: var(--green); font: 600 12px/16px var(--f); }
.smark .i { width: 13px; height: 13px; }
.msg.is-question .bub { box-shadow: inset 0 0 0 1px var(--green-fill), inset 0 0 0 2px var(--green-fill); }
.kbd--menu { gap: 5px; padding: 6px; border-radius: 14px; background: var(--fill); }
.kbd__cap { justify-self: start; padding: 0 4px; font: 500 11.5px/14px var(--f); color: var(--label-3); }
.kbd__b--menu { background: var(--bg-2); }
.grp--sup .grp__value { color: var(--orange); font-weight: 600; }
.msg.is-failed .bub { opacity: 0.72; }
.msg__err { display: inline-flex; align-items: flex-start; gap: 4px; font: 500 12px/16px var(--f); color: var(--red-text); }
.msg__err .i { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.msg__t { padding: 0 4px; font: 400 11.5px/14px var(--f); color: var(--label-3); font-variant-numeric: tabular-nums; }
.sys { display: inline-flex; align-items: flex-start; gap: 6px; padding: 6px 12px; border-radius: 14px; background: var(--fill); font: 400 13px/18px var(--f); color: var(--label-2); }
.sys .i { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--accent-text); }
.sys b { font-weight: 600; color: var(--label); }
.sys--blocked { background: var(--red-fill); }
.sys--blocked .i, .sys--blocked b { color: var(--red-text); }
.sys--unblocked .i { color: var(--green); }

/* stats: the 14 days */
.achart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; height: 156px; padding: 16px 10px 0; }
.achart__col { display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 6px; min-height: 0; }
.achart__bars { width: 100%; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.achart__bars i { width: min(8px, 42%); min-height: 3px; border-radius: 3px 3px 1px 1px; }
.achart__bars .u { background: var(--chart-u); }
.achart__bars .j { background: var(--accent); }
.achart__bars .is-zero { height: 3px !important; opacity: 0.4; }
.achart__x { padding-bottom: 12px; font: 500 11px/13px var(--f); color: var(--label-2); font-variant-numeric: tabular-nums; }
.achart__col.is-today .achart__x { color: var(--label); font-weight: 700; }
.legend--adm { flex-wrap: wrap; gap: 6px 16px; }
.legend--adm .u { background: var(--chart-u); }
.legend--adm .j { background: var(--accent); }

.empty--adm { padding-top: 36px; }
.empty__ic { width: 64px; height: 64px; margin-bottom: 8px; display: grid; place-items: center; border-radius: 20px; background: var(--green-fill); color: var(--green); }
.empty__ic .i { width: 30px; height: 30px; }
.empty--sm { padding: 30px 12px 8px; }
.empty--sm .empty__ic { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-fill); color: var(--accent-text); }
.empty--sm .empty__ic .i { width: 26px; height: 26px; }

/* sheets of a job and of a user */
.asheet .card, .asheet .list { background: var(--fill); }
.asheet .grp__head .grp__title { margin: 0; }
.grp--sheet { margin-top: 20px; }
.grp--sheet .grp__head { margin-bottom: 8px; }
.list--sheet { margin: 0 0 12px; }
.asheet .note { margin-top: 2px; }
.adm__tip { margin: -2px 4px 14px; }
.adm__notes { padding: 12px 16px; white-space: pre-wrap; }
.uhead { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 2px 0 16px; }
.uhead__t { min-width: 0; display: grid; gap: 2px; }
.uhead__n { font: 700 20px/25px var(--f-d); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.uhead__s { font: 400 14px/19px var(--f); color: var(--label-2); overflow-wrap: anywhere; }
.uhead__b { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.uhead__b:empty { display: none; }
.uhead__bal { display: grid; justify-items: end; gap: 2px; }
.uhead__bal b { font: 700 28px/1 var(--f-r); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.uhead__bal span { font: 500 12px/16px var(--f); color: var(--label-2); }
.logbox { margin-top: 18px; overflow: hidden; border-radius: 16px; background: var(--fill); }
.logbox summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; font: 600 15px/20px var(--f); list-style: none; cursor: pointer; }
.logbox summary::-webkit-details-marker { display: none; }
.logbox summary small { margin-left: auto; font: 400 12.5px/16px var(--f); color: var(--label-2); }
.logbox__chev { width: 12px; height: 12px; color: var(--label-3); transition: transform 0.2s; }
.logbox[open] .logbox__chev { transform: rotate(90deg); }
.logbox pre { max-height: 46vh; margin: 0; padding: 0 14px 14px; overflow: auto; font: 400 11.5px/16px ui-monospace, "SF Mono", Menlo, monospace; color: var(--label-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* «Начислить токены» */
.grantbox { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 12px 16px; background: var(--fill); cursor: text; }
.grantbox:focus-within { box-shadow: inset 0 0 0 2px var(--accent-fill); }
.grantbox__in { width: 5ch; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--label); font: 700 44px/1.15 var(--f-r); letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; }
.grantbox__in:focus-visible { outline: none; }
.grantbox__u { font: 600 17px/22px var(--f); color: var(--label-2); }
.presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 2px; }
.chip--pick { height: 36px; padding: 0 14px; background: var(--accent-fill); color: var(--accent-text); -webkit-backdrop-filter: none; backdrop-filter: none; font: 600 15px/1 var(--f); font-variant-numeric: tabular-nums; transition: transform 0.25s var(--spring); }
.chip--pick:active { transform: scale(0.94); }
.adm__confirm { text-align: center; }
.adm__confirm b { color: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 374px) {
  .seg--5 .seg__opt { font-size: 12px; }
  .alive__line { font-size: 22px; line-height: 27px; }
  .stat--a .stat__v { font-size: 25px; line-height: 31px; }
  .stat--a { padding: 11px 12px 12px; }
  .uhead { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; }
  .uhead .ava--lg { width: 56px; height: 56px; font-size: 20px; }
  .msg { max-width: 90%; }
}

/* ===================================================== lighter glass, a11y */

.fx-lite .navbar, .fx-lite .tabbar, .fx-lite .cta__tray, .fx-lite .banner, .fx-lite .sheet__panel, .fx-lite .coach__tip, .fx-lite .chip, .fx-lite .player__play, .fx-lite .jcard__play {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.fx-lite .navbar, .fx-lite .tabbar, .fx-lite .cta__tray, .fx-lite .banner, .fx-lite .coach__tip, .fx-lite .coach__arrow { background: var(--glass-solid); }
.fx-lite .sheet__panel { background: var(--bg-2); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .navbar, .tabbar, .cta__tray, .banner, .coach__tip, .coach__arrow { background: var(--glass-solid); }
  .sheet__panel { background: var(--bg-2); }
}

@media (max-width: 374px) {
  .lt__title { font-size: 31px; line-height: 38px; }
  .seg--tabs .seg__opt { font-size: 12.5px; }
  .seg--3 .seg__opt { font-size: 13px; }
  .tab__label { font-size: 10px; }
  .cdot { width: 36px; height: 36px; }
  .jcard { grid-template-columns: 68px minmax(0, 1fr) 12px; gap: 12px; }
  .jcard__poster { width: 68px; height: 112px; }
  .upl__btn { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* «Несколько видео» (takes.js): the switch over step 2, the recordings in the video's order — drag by the grip (pointer
   events, touch-action off on the grip only, so the page still scrolls), «Ракурс» marks another camera angle. */
.srcmode { margin: 0 0 14px; }
.takes { display: grid; gap: 12px; }
.takes__list { list-style: none; margin: 0; padding: 0; display: grid; background: var(--bg-2); border-radius: 22px; }
.take {
  display: grid;
  grid-template-columns: 30px 46px minmax(0, 1fr) auto 36px;
  gap: 10px;
  align-items: center;
  padding: 10px 6px;
  background: var(--bg-2);
  border-radius: 22px;
  transition: box-shadow 0.2s, transform 0.2s var(--spring);
}
.take + .take { border-top-left-radius: 0; border-top-right-radius: 0; box-shadow: inset 0 0.5px 0 var(--sep); }
.take.is-drag { position: relative; z-index: 2; border-radius: 18px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); transform: scale(1.02); }
.take__grip {
  width: 30px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--label-2);
  touch-action: none;
  cursor: grab;
}
.take.is-drag .take__grip { cursor: grabbing; color: var(--accent-text); }
.take__grip .i { width: 18px; height: 18px; }
.take__thumb {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--fill);
  color: var(--label-2);
}
.take__thumb video, .take__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.take__n {
  position: absolute;
  left: 3px;
  top: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 600 11px/18px var(--f);
}
.take__n .i { width: 11px; height: 11px; }
.take__info { display: grid; gap: 2px; min-width: 0; }
.take__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 15px/20px var(--f); }
.take__meta { font: 400 13px/17px var(--f); color: var(--label-2); }
.take.is-error .take__meta { color: var(--red-text); }
.take.is-angle .take__name { color: var(--accent-text); }
.take__angle {
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 15px;
  background: var(--fill);
  color: var(--label-2);
  font: 600 13px/30px var(--f);
  white-space: nowrap;
}
.take__angle[aria-pressed="true"] { background: var(--accent-fill); color: var(--accent-text); }
.upl__card--slim { grid-template-columns: auto 1fr; justify-items: start; gap: 2px 12px; padding: 14px 16px; border-radius: 22px; text-align: left; }
.upl__card--slim .upl__icon { grid-row: span 2; width: 44px; height: 44px; margin: 0; border-radius: 14px; }
.takes__sum { margin: 0 4px; font: 400 13px/18px var(--f); color: var(--label-2); }
.note--warn { background: var(--accent-fill); color: var(--accent-text); }

/* ===================================================== «Сюжет» (story.js, admins) */
/* The voice-over's card: a mic on the warm fill where a video shows its first frame. */
.file__thumb--voice { display: grid; place-items: center; background: linear-gradient(160deg, #3a2a1d, #1f1711); color: #f2d9b0; }
.file__thumb--voice .i { width: 26px; height: 26px; }
/* A clip's number in the list: the order they came in (the director may use them in any order). */
.story-clip .broll__badge { width: 18px; height: 18px; font: 700 10px/1 var(--f); }
/* The preview's place chip: a pin and the place, top-left, as story.tsx PlaceChip draws it — glass or printed paper. */
.pplace {
  position: absolute;
  z-index: 4;
  top: 13%;
  left: 5.5%;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.8);
  padding: calc(var(--u) * 1.8) calc(var(--u) * 3.2) calc(var(--u) * 1.8) calc(var(--u) * 2);
  border-radius: calc(var(--u) * 3.4);
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.14));
  -webkit-backdrop-filter: blur(calc(var(--u) * 2.4)) saturate(1.5);
  backdrop-filter: blur(calc(var(--u) * 2.4)) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 calc(var(--u) * 2) calc(var(--u) * 5) rgba(0, 0, 0, 0.26);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.pplace__pin { display: grid; place-items: center; color: var(--c-txt, #fff); }
.pplace__pin .i { width: calc(var(--u) * 6.4); height: calc(var(--u) * 6.4); }
.pplace__b { display: grid; text-transform: none; }
.pplace b { font-family: var(--fb); font-weight: 800; font-size: calc(var(--u) * 5.2); line-height: 1.05; text-transform: var(--fbt, none); }
.pplace__b span { font-family: var(--fb); font-weight: 800; font-size: calc(var(--u) * 3.1); line-height: 1.2; opacity: 0.8; text-transform: var(--fbt, none); }
.scr[data-theme="editorial"] .pplace {
  border-radius: 0;
  color: #141210;
  background: #f6f1e7;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 0 0 1.5px #141210, calc(var(--u) * 1.2) calc(var(--u) * 1.4) 0 rgba(0, 0, 0, 0.5);
  text-shadow: none;
}
.scr[data-theme="editorial"] .pplace__pin { color: var(--c-acc); }

/* The admin's «Серверы» (admin.js serversHTML): a card a machine — its state, the pool switch, the numbers, the day */
.srv__lead { margin: 4px 4px 0; }
.srv { margin-top: 16px; }
.srv__card { overflow: hidden; }
.srv__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 14px 16px 0; }
.srv__name { margin-right: 2px; font: 700 19px/24px var(--f); letter-spacing: -0.02em; }
.srv__sub { margin: 3px 16px 0; font: 400 13px/18px var(--f); color: var(--label-2); }
.srv__switch { padding: 12px 16px 6px; }
.srv__seg { width: 100%; }
.srv__note { margin: 8px 16px 6px; font: 400 13px/18px var(--f); color: var(--label-2); }
.srv__pool { display: flex; flex-direction: column; gap: 6px; padding: 8px 16px 4px; }
.srv__k { font: 400 13px/18px var(--f); color: var(--label-2); }
.seg--5 .seg__opt { font-size: 14px; padding: 0 2px; }
.srv.is-off .srv__name, .srv.is-off .rows, .srv.is-off .spark { opacity: 0.6; }
.pill--warn { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.spark { padding: 6px 16px 0; border-top: 0.5px solid var(--sep); }
.spark__svg { display: block; width: 100%; height: 64px; margin-top: 8px; overflow: visible; }
.spark__svg path { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark__steal { stroke: var(--red); }
.spark__speed { stroke: var(--accent); }
.spark__limit { stroke: var(--red); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.35; vector-effect: non-scaling-stroke; }
.spark__busy rect { fill: var(--label-3); }
.spark__x { display: flex; justify-content: space-between; margin-top: 4px; font: 500 11px/13px var(--f); color: var(--label-2); }
.legend--srv { flex-wrap: wrap; gap: 6px 14px; padding: 10px 0 14px; }
.legend--srv .steal { background: var(--red); }
.legend--srv .speed { background: var(--accent); }
.legend--srv .busy { height: 4px; border-radius: 1px; background: var(--label-3); }

/* The admin's «Палитры»: a caption line in each palette's colours, the people it is given to; the form's live sample */
/* «Рассылки» (admin.js): the list with how far each went, the sheet's conditions as rows of chips */
.abc { align-items: flex-start; }
.abc__title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.abc__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abc__counts { color: var(--label); }
.abc__bar { display: block; margin-top: 6px; }
.abc > .btn { flex: none; align-self: center; }
.pill--live { background: var(--accent-fill); color: var(--accent-text); }
.bctpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 4px; }
.bctpls .chip--pick { height: auto; min-height: 42px; padding: 8px 10px; justify-content: center; text-align: center; white-space: normal;
  font-size: 14px; line-height: 1.2; }
.abc__stop { justify-self: start; margin: 6px 0 0 -12px; }
.tile--emoji { font-size: 19px; line-height: 1; }
.bcans__text { color: var(--label); white-space: pre-wrap; overflow-wrap: anywhere; }
.bcwhom { display: grid; gap: 12px; padding: 14px 14px 12px; }
.bcrow { display: grid; gap: 6px; }
.bcrow__l { font: 600 13px/16px var(--f); color: var(--label-2); }
.bcrow__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bcchip { height: 32px; padding: 0 12px; font-size: 14px; }
.bccount { display: grid; gap: 2px; margin: 10px 4px 0; }
.bccount__n { font: 600 17px/22px var(--f); color: var(--label); }
.bccount__s { font: 400 13px/18px var(--f); color: var(--label-2); }
.sheet--bc .bc-kind { margin: 0 0 10px; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 6px 4px 2px; padding: 0; border: 0; background: none;
  color: var(--accent-text); font: 500 15px/20px var(--f); cursor: pointer; }
.linkbtn .i { width: 16px; height: 16px; }
.sheet--bc .card.rows { margin-top: 10px; }
.apal { align-items: flex-start; flex-wrap: wrap; row-gap: 6px; }
.apal .row__text { flex: 1 1 0; min-width: 0; }
.apal .row__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.apal.is-off .row__text { opacity: 0.55; }
.apal__acts { display: flex; align-items: center; gap: 4px; flex: 1 1 100%; margin: -4px 0 -2px -8px; }
.apal__sample { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 4px 0 2px; padding: 6px 10px; border-radius: 10px;
  background: linear-gradient(135deg, #3a3f46, #1c1f24); font: 800 14px/1.15 var(--f); text-transform: uppercase; letter-spacing: 0.01em;
  -webkit-text-stroke: 0.6px var(--pal-stroke); paint-order: stroke fill; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.apal__sample b { font-weight: 900; }
.apal__sample b.is-pill { padding: 1px 6px 2px; border-radius: 6px; -webkit-text-stroke: 0; text-shadow: none; }
.apal__sample--big { font-size: 22px; padding: 18px 16px; border-radius: 16px; }
.apal__stage { display: flex; justify-content: center; margin-top: 14px; }
.apal__chip { width: 22px; height: 22px; flex: none; margin-right: 10px; border-radius: 7px; box-shadow: inset 0 0 0 0.5px rgba(127, 127, 127, 0.5); }
.apal__hex { font-variant-numeric: tabular-nums; text-transform: uppercase; }
.apal__colors { margin-top: 12px; }

/* The admin's «Промокоды»: a code, its terms and purchases; copy and on/off on the right */
.apromo { align-items: flex-start; flex-wrap: wrap; row-gap: 4px; }
.apromo .tile { margin-top: 2px; }
.apromo .row__text { flex: 1 1 0; min-width: 0; }
.apromo__code { font-weight: 700; letter-spacing: 0.02em; }
.apromo .row__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.apromo__acts { display: flex; align-items: center; gap: 4px; flex: 1 1 100%; padding-left: 50px; margin: -4px 0 -2px -8px; }
.apromo.is-off .row__text, .apromo.is-off .tile { opacity: 0.55; }
/* «Источники» (admin.js): the link a tag makes, and a row per source */
.asrc__link { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px 6px 16px; }
.asrc__url { flex: 1 1 0; min-width: 0; font: 500 15px/20px var(--f); color: var(--accent-text); overflow-wrap: anywhere; }
.asrc__url.is-empty { color: var(--label-3); }
.asrc .row__text { flex: 1 1 0; min-width: 0; }
.asrc__money { color: var(--green); }
.chip--pick[aria-checked="true"] { background: var(--accent); color: var(--accent-ink, #1d1b18); }
/* «Свои кадры» (imagegen.js): the user's own pictures to generate — a card each */
.mine { margin-top: 20px; }
.mine__title { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 2px; font: 700 17px/22px var(--f); color: var(--label); }
.mine__count { font: 500 13px/18px var(--f); color: var(--label-3); }
.mine__list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.mine__item { display: grid; gap: 4px; padding: 12px; }
.mine__item .srow { padding: 6px 0 0; }
.mine__head { display: flex; align-items: flex-start; gap: 8px; }
.mine__num { flex: none; width: 26px; height: 26px; margin-top: 9px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font: 700 13px/1 var(--f); color: var(--label-2); }
.mine__prompt { flex: 1; min-width: 0; min-height: 66px; }
.mine__head .iconbtn { margin-top: 4px; }
.mine__addref { margin: 6px 2px 2px; }
.mine__refrow { display: flex; align-items: center; gap: 10px; padding: 6px 2px 0; }
.mine__thumb { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: cover; }
.mine__at { width: 100%; margin-top: 4px; }
.mine__add { margin: 14px 4px 0; }
/* «Надписи на фото» at the very bottom of the AI pictures' step, apart from «Свои кадры» */
.gen__text { margin-top: 26px; }
/* «Как показать» of a photo (photos.js): the preset chosen as a button, the presets as tiles with a picture of the frame */
.showpic { width: 27px; height: 48px; flex: none; color: var(--label-2); }
.showpic .frame { fill: var(--fill); stroke: var(--sep, rgba(255,255,255,.18)); stroke-width: 1; }
.showpic .acc { fill: var(--accent); }
.photo__preset { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 0; border-radius: 16px;
  background: var(--fill); color: var(--label); text-align: left; cursor: pointer; }
.photo__preset > .i { width: 16px; height: 16px; flex: none; color: var(--label-3); }
.photo__preset-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.photo__preset-l { font: 400 12px/16px var(--f); color: var(--label-2); }
.photo__preset-text b { font: 600 15px/20px var(--f); }
.presets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 4px; }
.preset { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: start;
  min-height: 76px; padding: 10px 10px 10px 8px; border: 0; border-radius: 16px; background: var(--fill); color: var(--label); text-align: left;
  cursor: pointer; transition: transform .12s ease; }
.preset .showpic { grid-row: 1 / 3; width: 32px; height: 57px; align-self: center; }
.preset__name { font: 600 15px/19px var(--f); }
.preset__d { font: 400 12px/15px var(--f); color: var(--label-2); }
.preset.is-on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-fill); }
.preset:active { transform: scale(0.97); }
/* The player's way out (ui.js startVideo): the video did not start loading — open it outside */
.player__open { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; padding: 12px 18px; border: 0;
  border-radius: 999px; background: rgba(20, 18, 16, 0.82); color: #fff; font: 600 15px/20px var(--f); cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); }
/* «Ожидают оплаты» in the Kassa (app.js pendingHTML): pay the same page again or cancel */
.pend { flex-wrap: wrap; row-gap: 8px; }
.pend .row__text { flex: 1 1 180px; } /* a phone: the buttons below the text, not the text squeezed into a column */
.pend__acts { display: flex; gap: 8px; flex: none; margin-left: auto; }

/* «API» (Профиль → API, apikeys.js): the person's keys for their own automations */
.apikeys { display: flex; flex-direction: column; gap: 14px; }
.apikeys .muted { margin: 0; color: var(--label-2); }
.apikeys__lead { margin: 0; color: var(--label-2); font: 400 15px/21px var(--f); }
.apikeys__h { margin: 6px 0 -6px; padding: 0 16px; font: 600 13px/18px var(--f); letter-spacing: 0.02em; text-transform: uppercase; color: var(--label-2); }
.apikeys code { font: 500 0.92em/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.apikeys__new { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; }
.apikeys__new .btn { width: auto; margin: 0 12px; }
.apikey { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 8px; }
.apikey + .apikey { border-top: 0.5px solid var(--sep); }
.apikey__acts { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -15px; }
.btn--danger { background: var(--red-fill); color: var(--red-text); }
.apinew { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--accent-fill); }
.apinew__t { margin: 0; font: 600 15px/20px var(--f); color: var(--label); }
.apinew__key { display: block; padding: 10px 12px; border-radius: 12px; background: var(--bg); color: var(--label); word-break: break-all;
  font: 500 14px/20px ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; -webkit-user-select: all; }
.apinew__warn { margin: 0; font: 400 14px/19px var(--f); color: var(--accent-text); }

/* ------------------------------------------------------------- «Редактор» (editor.js) */
/* A phone held in one hand: the preview on top (always in sight), the strip, the tabs, the rows, the re-render at the
   bottom. While a field is typed in (.is-typing) the screen is what is above the keyboard: the preview, smaller, and the
   field (--vvh: the height seen, editor.js fit()). */

body[data-route="editor"] .view { padding: 0; max-width: none; }
body[data-route="editor"] .navbar { display: none; }
.ed {
  --stage-h: clamp(180px, calc(var(--vvh, 100vh) * 0.37), 440px); /* a small phone keeps room for the rows */
  --cap-c: #7a9eff;
  --ins-c: #46c484;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: var(--vvh, 100%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--bg);
  padding: calc(var(--sa-top) + 2px) var(--sa-right) calc(var(--sa-bottom) + 6px) var(--sa-left);
  -webkit-user-select: none;
  user-select: none;
}
.ed .spinner--sm { width: 16px; height: 16px; border-width: 2px; }
.ed-top { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 40px; padding: 0 4px; }
.ed-top__back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 8px 0 4px; border: 0; background: none; color: var(--accent-text); font: 400 16px/1 var(--f); }
.ed-top__back .i { width: 18px; height: 18px; }
.ed-top__t { font: 600 16px/1.2 var(--f); white-space: nowrap; }
.ed-top__help { justify-self: end; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--accent-text); }
.ed-top__help .i { width: 20px; height: 20px; }

/* the preview, the clock on its left, «В движении» on its right (the room a 9:16 frame leaves on a phone) */
.ed-stage { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 0 10px 8px; }
.ed-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ed-side--l { align-items: flex-end; text-align: right; }
.ed-side--r { align-items: flex-start; }
.ed-clock { display: flex; flex-direction: column; gap: 3px; font-variant-numeric: tabular-nums; }
.ed-clock b { font: 600 19px/1 var(--f); color: var(--label); }
.ed-clock small { font: 500 12px/1 var(--f); color: var(--label-3); }
.ed-round { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--fill); color: var(--label); }
.ed-round .i { width: 22px; height: 22px; }
.ed-side__b {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 84px; max-width: 100%; padding: 11px 6px 10px; border: 0; border-radius: 16px;
  background: var(--accent-fill); color: var(--accent-text);
  font: 600 13px/1.15 var(--f); text-align: center;
}
.ed-side__b .i { width: 22px; height: 22px; }
.ed-side__b:disabled { background: var(--fill); color: var(--label-3); }
.ed-side__tip { max-width: 96px; font: 400 11.5px/1.3 var(--f); color: var(--label-3); }
.ed-frame {
  position: relative;
  height: var(--stage-h);
  aspect-ratio: 9 / 16;
  max-width: calc(100vw - 188px);
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-2);
  touch-action: none; /* a press on the preview may carry a block («Перенести») */
  -webkit-touch-callout: none;
  transition: height 0.22s var(--ease);
}
/* «Перенести»: the block's copy under the finger, a dashed mark where it stood, the guides */
.ed-ghost { position: absolute; z-index: 6; background-repeat: no-repeat; border-radius: 6px; outline: 2px solid var(--accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); pointer-events: none; will-change: transform; }
.ed-spot { position: absolute; z-index: 5; border: 1.5px dashed rgba(255, 255, 255, 0.75); border-radius: 6px; background: rgba(0, 0, 0, 0.3); pointer-events: none; }
.ed-guides { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.ed-guides i { position: absolute; display: block; }
.ed-guides__mid { left: 50%; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--accent); opacity: 0; }
.ed-guides__mid.is-on { opacity: 1; }
.ed-guides__low { left: 0; right: 0; height: 0; border-top: 1px dashed rgba(255, 255, 255, 0.55); }
.ed-guides__side { bottom: 0; width: 0; border-left: 1px dashed rgba(255, 255, 255, 0.55); }
.ed-frame.is-moving .ed-badge { opacity: 0; }
.ed-video, .ed-still, .ed-motion { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ed-still { z-index: 1; }
.ed-motion { z-index: 2; background: #000; }
.ed-badge {
  position: absolute; z-index: 4; left: 6px; top: 6px; max-width: calc(100% - 40px);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font: 600 11px/1 var(--f); white-space: nowrap;
  pointer-events: none;
}
.ed-badge .i { width: 12px; height: 12px; }
.ed-badge--will, .ed-badge--motion { background: var(--accent); color: var(--on-accent); }
.ed-badge--now { background: rgba(0, 0, 0, 0.45); color: rgba(255, 255, 255, 0.82); }
.ed-badge--move, .ed-badge--load { background: rgba(0, 0, 0, 0.58); white-space: normal; line-height: 1.2; border-radius: 10px; }
.ed-badge .spinner { width: 11px; height: 11px; border-width: 2px; border-color: rgba(255, 255, 255, 0.3); border-top-color: #fff; }
.ed-wait { position: absolute; z-index: 4; right: 8px; top: 7px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); }
.ed-mwait {
  position: absolute; z-index: 5; left: 8px; right: 8px; bottom: 8px;
  display: flex; flex-direction: column; gap: 7px;
  padding: 9px 10px 10px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.66); color: #fff; font: 600 12px/1.25 var(--f);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ed-mwait__bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.ed-mwait__bar i { display: block; height: 100%; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left center; }
.ed-mstop { position: absolute; z-index: 5; right: 6px; top: 6px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; }
.ed-mstop .i { width: 14px; height: 14px; }
.ed-sound {
  position: absolute; z-index: 5; left: 50%; bottom: 10px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px;
  background: rgba(0, 0, 0, 0.62); color: #fff; font: 600 12px/1 var(--f); white-space: nowrap;
}
.ed-sound .i { width: 15px; height: 15px; }

/* the strip: scrolled to scrub, the playhead in the middle; the marks of the tab's blocks under it */
.ed-scrub { flex: none; position: relative; padding-bottom: 8px; }
.ed-tl { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
.ed-tl::-webkit-scrollbar { display: none; }
@media (hover: hover) and (pointer: fine) { .ed-tl { cursor: grab; } } /* a mouse grabs the strip (editor.js onGrab) */
.ed-tl.is-grabbing { cursor: grabbing; user-select: none; }
.ed-tl__in { position: relative; width: var(--w); padding: 0 var(--pad, 50vw); box-sizing: content-box; }
.ed-strip { position: relative; height: 40px; border-radius: 8px; background-color: var(--bg-3); background-repeat: no-repeat; background-position: left center; }
.ed-when__tip { display: flex; align-items: center; gap: 7px; margin: 2px 2px 0; font: 400 12.5px/1.3 var(--f); color: var(--label-2); }
.ed-when__tip .i { flex: none; width: 15px; height: 15px; color: var(--accent-text); }
/* the open block's band: dragged along the strip to move it */
.ed-drag {
  position: absolute; top: 0; height: 100%; box-sizing: border-box; min-width: 18px;
  border-radius: 8px; box-shadow: inset 0 0 0 2.5px var(--accent); background: color-mix(in srgb, var(--accent) 24%, transparent);
  touch-action: none; cursor: grab;
}
.ed-drag i { position: absolute; left: 50%; top: 50%; width: 14px; height: 16px; transform: translate(-50%, -50%);
  background: linear-gradient(90deg, var(--on-accent) 0 2px, transparent 2px 6px, var(--on-accent) 6px 8px, transparent 8px 12px, var(--on-accent) 12px 14px);
  border-radius: 1px; opacity: 0.9; }
.ed-drag.is-moving { background: color-mix(in srgb, var(--accent) 42%, transparent); cursor: grabbing; }
.ed-marks { position: relative; display: grid; gap: 3px; margin-top: 4px; }
.ed-lane { position: relative; height: 6px; }
.ed-lane--text { height: 4px; } /* the plates and cards under the tab's own blocks (20.10.2026) */
.ed-lane--text .ed-mark { opacity: 0.55; }
.ed-dot { position: absolute; z-index: 1; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--label);
  box-shadow: 0 0 0 1.5px var(--bg); pointer-events: none; }
.ed-dot.is-miss { background: var(--red); }
.ed-mark { position: absolute; top: 0; height: 100%; border-radius: 3px; background: var(--accent); opacity: 0.38; }
.ed-mark--cap { background: var(--cap-c); }
.ed-mark--insert { background: var(--ins-c); }
.ed-mark.is-changed { opacity: 1; }
.ed-mark.is-off { opacity: 0.2; }
.ed-mark.is-sel { opacity: 1; box-shadow: 0 0 0 1.5px var(--label); }
.ed-head {
  position: absolute; z-index: 2; top: -3px; bottom: 4px; left: 50%;
  width: 2px; margin-left: -1px; border-radius: 1px;
  background: var(--label); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.ed-tabs { flex: none; display: flex; gap: 2px; margin: 0 10px; padding: 3px; border-radius: 12px; background: var(--seg-bg); }
.ed-tab {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 34px; padding: 0 3px; border: 0; border-radius: 9px;
  background: none; color: var(--label-2); font: 600 13px/1 var(--f); white-space: nowrap;
}
.ed-tab > span { overflow: hidden; text-overflow: ellipsis; }
.ed-tab.is-on { background: var(--seg-thumb); color: var(--label); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.ed-tab__n { flex: none; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--accent); color: var(--on-accent); font: 700 10px/16px var(--f); font-style: normal; }
.ed-tab__n--dot { min-width: 7px; width: 7px; height: 7px; padding: 0; }
.ed.is-open .ed-tabs { display: none; }

.ed-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 10px 10px 14px; }
.ed-lead { margin: 2px 6px 8px; font: 400 13px/1.35 var(--f); color: var(--label-3); }
.ed-none { margin: 18px 8px; font: 400 15px/1.4 var(--f); color: var(--label-2); text-align: center; }
.ed-rows { display: flex; flex-direction: column; gap: 2px; }
.ed-r {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 8px 10px 8px 6px; box-sizing: border-box;
  border: 0; border-radius: 14px; background: none; color: var(--label); text-align: left;
  transition: background-color 0.15s ease;
}
.ed-r:active { background: var(--fill); }
.ed-r.is-now { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.ed-r--cap.is-now { background: color-mix(in srgb, var(--cap-c) 13%, transparent); }
.ed-r__time { flex: none; width: 34px; font: 600 12.5px/1 var(--f); color: var(--label-3); font-variant-numeric: tabular-nums; text-align: right; }
.ed-r__img { flex: none; width: 30px; height: 44px; border-radius: 7px; object-fit: cover; background: var(--fill); }
.ed-r__ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--tile-bg); color: var(--accent-text); }
.ed-r__ic .i { width: 16px; height: 16px; }
.ed-r__b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ed-r__b small { display: flex; gap: 6px; font: 500 12px/1.2 var(--f); color: var(--label-3); }
.ed-r__b em { font-style: normal; font-weight: 600; color: var(--accent-text); }
.ed-r__b em.is-off { color: var(--red-text); }
.ed-r__b em.is-warn { color: var(--red-text); font-weight: 500; }
/* a list card: when it shows, its items' moments (20.10.2026) */
.ed-miss { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 10px; padding: 10px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--red) 11%, transparent); font: 500 13.5px/1.35 var(--f); color: var(--label); }
.ed-miss > .i { flex: none; width: 17px; height: 17px; color: var(--red-text); }
.ed-miss > span { flex: 1; min-width: 160px; }
.ed-miss .btn { flex: none; }
.ed-item { display: flex; flex-direction: column; margin-bottom: 14px; }
.ed-item .ed-fl { margin-bottom: 6px; }
.ed-item__del { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin: 8px 2px 0; font: 500 13.5px/1.2 var(--f); color: var(--red-text); }
.ed-item__del .i { width: 15px; height: 15px; }
.ed-tick { display: flex; flex-direction: column; gap: 8px; padding: 9px 10px 10px; border-radius: 13px; background: var(--fill); }
.ed-tick__s { display: flex; align-items: center; gap: 7px; font: 500 13px/1.3 var(--f); color: var(--label-2); }
.ed-tick__s .i { flex: none; width: 15px; height: 15px; color: var(--accent-text); }
.ed-tick--never .ed-tick__s { color: var(--red-text); }
.ed-tick--never .ed-tick__s .i { color: var(--red-text); }
.ed-tick__b { display: flex; gap: 6px; }
.ed-tick__b .ed-step { flex: none; min-width: 52px; height: 36px; }
.ed-tick__here { flex: 1; min-width: 0; height: 36px; }
.ed-tick__here span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-lmode .ed-chip { flex: 1; justify-content: center; }
.ed-r__t { font: 500 15px/1.3 var(--f); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.ed-r--cap .ed-r__t { font-size: 15.5px; }
.ed-r.is-off .ed-r__t { text-decoration: line-through; color: var(--label-3); }
.ed-r mark { background: none; color: var(--accent-text); font-weight: 650; }
.ed-r > .i { flex: none; width: 14px; height: 14px; color: var(--label-3); }
.ed-r__only { flex: none; max-width: 72px; font: 400 11.5px/1.2 var(--f); color: var(--label-3); text-align: right; }
.ed-addrow {
  display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box;
  margin-bottom: 8px; padding: 12px 14px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 16px;
  background: var(--accent-fill); color: var(--accent-text); text-align: left;
}
.ed-addrow > .i { flex: none; width: 28px; height: 28px; }
.ed-addrow b { display: block; font: 600 15px/1.25 var(--f); }
.ed-addrow small { display: block; margin-top: 2px; font: 400 12.5px/1.3 var(--f); color: var(--label-2); }
.ed-addrow:disabled { opacity: 0.6; }
.ed-r__pic { flex: none; width: 30px; height: 30px; object-fit: contain; }

.ed-start__go { align-items: center; }
.ed-start__go small { flex: 1; min-width: 140px; font: 400 12px/1.3 var(--f); color: var(--label-2); }

/* «Добавить сюда», «Заменить на»: the kinds of block */
.ed-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ed-kind {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px;
  border: 0; border-radius: 14px; background: var(--fill); color: var(--label); text-align: left; font: 500 13.5px/1.2 var(--f);
}
.ed-kind > .i { flex: none; width: 20px; height: 20px; color: var(--accent-text); }
.ed-kind > span { min-width: 0; }
.ed-kind--big { align-items: flex-start; padding: 12px; }
.ed-kind--big > .i { width: 24px; height: 24px; margin-top: 1px; }
.ed-kind b { display: block; font: 600 14.5px/1.2 var(--f); }
.ed-kind small { display: block; margin-top: 3px; font: 400 12px/1.3 var(--f); color: var(--label-2); }
.ed-kinds--small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 8px; }
.ed-kinds--small .ed-kind { padding: 9px 11px; font-size: 13px; }

/* a media card's picture, an object */
.ed-pics { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 14px; }
.ed-pics__one { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; }
.ed-pics__one img { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; }
.ed-pics__one--big { width: 84px; }
.ed-pics__one--big img { width: 72px; height: 72px; }
.ed-pics__none { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 12px; border: 1.5px dashed var(--dash); color: var(--label-3); }
.ed-pics__one small { max-width: 100%; font: 500 11.5px/1.2 var(--f); color: var(--label-2); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-pics__b { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

/* the sheets that choose a picture */
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ed-grid--named { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.ed-pick {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; aspect-ratio: 1;
  padding: 8px; border: 0; border-radius: 14px; background: var(--fill); color: var(--label-2);
}
.ed-grid--named .ed-pick { aspect-ratio: auto; padding: 10px 6px 8px; }
.ed-pick img { width: 100%; max-width: 52px; aspect-ratio: 1; object-fit: contain; }
.ed-pick small { max-width: 100%; font: 500 11.5px/1.2 var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-pick.is-on { background: var(--accent-fill); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ed-pick:disabled { opacity: 0.35; }
.ed-pick__site { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--tile-bg); color: var(--accent-text); }
.ed-pick__site .i { width: 22px; height: 22px; }
.ed-lrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ed-lchip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 4px 0 6px; border-radius: 12px; background: var(--accent-fill); color: var(--accent-text); font: 600 13.5px/1 var(--f); }
.ed-lchip img { width: 28px; height: 28px; object-fit: contain; border-radius: 7px; }
.ed-lchip button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 9px; background: none; color: inherit; }
.ed-lchip button .i { width: 13px; height: 13px; }
.ed-search { position: relative; display: block; margin-bottom: 10px; }
.ed-search > .i { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--label-3); }
.ed-search .ed-in { padding-left: 38px; }
.ed-site { display: flex; gap: 8px; margin-bottom: 10px; }
.ed-site .ed-in { flex: 1; min-width: 0; }
.sheet.is-busy .ed-site, .sheet.is-busy .ed-grid { opacity: 0.55; pointer-events: none; }
.ed-found { display: flex; flex-direction: column; gap: 6px; }
.ed-found .ed-note { align-items: center; margin-top: 4px; }
.ed-hit { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border: 0; border-radius: 13px; background: var(--fill); color: var(--label); text-align: left; }
.ed-hit b { font: 600 14px/1.3 var(--f); }
.ed-hit small { font: 400 12px/1.2 var(--f); color: var(--label-3); }
.ed-hit.is-on { background: var(--accent-fill); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* a block open under the preview */
.ed-sh { display: flex; align-items: center; gap: 6px; margin: -2px 0 12px; }
.ed-sh__back { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 12px 0 6px; border: 0; border-radius: 11px; background: var(--fill); color: var(--accent-text); font: 600 14px/1 var(--f); }
.ed-sh__back .i { width: 15px; height: 15px; }
.ed-sh__t { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ed-sh__t b { max-width: 100%; font: 600 15px/1.15 var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-sh__t small { font: 500 12px/1 var(--f); color: var(--label-3); font-variant-numeric: tabular-nums; }
.ed-sh__nav { flex: none; display: flex; gap: 4px; }
.ed-sh__step { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 11px; background: var(--fill); color: var(--label); }
.ed-sh__step .i { width: 15px; height: 15px; }
.ed-sh__step:disabled { opacity: 0.32; }
.ed-ed { padding: 0 2px; }
.ed-h { margin: 14px 2px 8px; font: 600 13px/1.2 var(--f); color: var(--label-2); text-transform: uppercase; letter-spacing: 0.03em; }
.ed-ed > .ed-h:first-child { margin-top: 2px; }
.ed-fl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ed-fl__l { display: flex; justify-content: space-between; gap: 10px; font: 500 13px/1.2 var(--f); color: var(--label-2); }
.ed-fl__n { font-style: normal; color: var(--label-3); font-variant-numeric: tabular-nums; }
.ed-fl__n.is-bad { color: var(--red-text); font-weight: 600; }
.ed-in {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border: 1.5px solid transparent; border-radius: 13px;
  background: var(--fill); color: var(--label);
  font: 500 17px/1.3 var(--f); /* 16 px and more: iOS does not zoom in on the field */
  outline: none; -webkit-user-select: text; user-select: text;
}
.ed-in:focus { border-color: var(--accent); background: var(--bg-2); }
.ed-in--area { resize: none; min-height: 76px; }
.ed-wmap { display: flex; flex-wrap: wrap; gap: 5px; margin: -2px 0 12px; }
.ed-w { padding: 6px 9px; border-radius: 9px; background: var(--fill); color: var(--label-2); font: 500 14px/1.1 var(--f); }
.ed-w.is-changed { background: var(--accent-fill); color: var(--accent-text); font-weight: 600; }
.ed-wmap__bad { margin: 0; font: 500 13px/1.35 var(--f); color: var(--red-text); }
.ed-note { display: flex; gap: 8px; margin: 0 0 12px; font: 400 13px/1.4 var(--f); color: var(--label-2); }
.ed-note .i { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--accent-text); }
.ed-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ed-del { color: var(--red-text); }
.ed-ins { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.ed-ins__pic { flex: none; display: grid; place-items: center; width: 56px; height: 99px; border-radius: 11px; overflow: hidden; background: var(--fill); color: var(--label-3); }
.ed-ins__pic img { width: 100%; height: 100%; object-fit: cover; }
.ed-ins__b { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.ed-ins__s { font: 500 13px/1.2 var(--f); color: var(--label-3); }
.ed-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ed-mode {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0;
  padding: 10px 2px 9px; border: 0; border-radius: 13px;
  background: var(--fill); color: var(--label-2); font: 500 12px/1.1 var(--f); text-align: center;
}
.ed-mode span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ed-mode.is-on { background: var(--accent-fill); color: var(--accent-text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ed-mpic { width: 20px; height: 34px; fill: currentColor; }
.ed-mpic__f { fill: none; stroke: currentColor; stroke-width: 1.2; opacity: 0.55; }
.ed-when { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 15px; background: var(--fill); }
.ed-when__row { display: flex; align-items: center; gap: 8px; }
.ed-when__row > span:first-child { flex: 1; font: 500 14px/1.2 var(--f); color: var(--label-2); }
.ed-when__row b { min-width: 58px; text-align: center; font: 600 15px/1 var(--f); font-variant-numeric: tabular-nums; }
.ed-step { min-width: 52px; height: 40px; border: 0; border-radius: 11px; background: var(--bg-2); color: var(--label); font: 600 14px/1 var(--f); font-variant-numeric: tabular-nums; }
.ed-here { align-self: stretch; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 0; border-radius: 11px; background: var(--bg-2); color: var(--accent-text); font: 600 14px/1 var(--f); font-variant-numeric: tabular-nums; }
.ed-here .i { width: 16px; height: 16px; }
.ed-lens { display: flex; gap: 5px; }
.ed-len { min-width: 40px; height: 36px; padding: 0 6px; border: 0; border-radius: 10px; background: var(--bg-2); color: var(--label); font: 500 14px/1 var(--f); font-variant-numeric: tabular-nums; }
.ed-len.is-on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.ed-len:disabled { opacity: 0.32; }

/* «Вырезать оговорку»: the phrase's voice as a wave, the slip marked on it */
.ed-mark--cut { background: var(--red); opacity: 0.9; height: 100%; }
.ed-r s { color: var(--red-text); text-decoration-thickness: 2px; }
.ed-r__cut { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font: 600 12px/1.2 var(--f); color: var(--red-text); }
.ed-r__cut .i { width: 13px; height: 13px; }
.ed-cutbox { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 0.5px solid var(--sep); }
.ed-cutrow { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 12px; border-radius: 12px; background: var(--red-fill); color: var(--red-text); font: 600 14px/1.2 var(--f); font-variant-numeric: tabular-nums; }
.ed-cutrow > span { flex: 1; min-width: 0; }
.ed-cutrow .i { flex: none; width: 16px; height: 16px; }
.ed-cutopen { width: 100%; }
.ed-wave { position: relative; height: 112px; margin-bottom: 10px; border-radius: 14px; overflow: hidden; background: var(--fill); }
.ed-wave canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: col-resize; }
.ed-wave__wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font: 500 13px/1 var(--f); color: var(--label-3); }
.ed-cutwords { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ed-cw { padding: 8px 11px; border: 0; border-radius: 10px; background: var(--fill); color: var(--label); font: 500 15px/1.1 var(--f); }
.ed-cw.is-on { background: var(--red-fill); color: var(--red-text); box-shadow: inset 0 0 0 1.5px var(--red); }
.ed-cw.is-gone { color: var(--label-3); text-decoration: line-through; }
.ed-cutsel { margin: 0 2px 10px; font: 600 14px/1.3 var(--f); color: var(--label); font-variant-numeric: tabular-nums; }
.ed-cutnudge { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ed-cutedge { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 13px; background: var(--fill); }
.ed-cutedge > span { flex: 1; min-width: 0; font: 500 13px/1 var(--f); color: var(--label-2); }
.ed-cutedge .ed-step { min-width: 40px; height: 36px; }
.ed-cutedge .ed-step:disabled { opacity: 0.35; }
.ed.is-cutting { --stage-h: clamp(140px, calc(var(--vvh, 100vh) * 0.25), 250px); }
.ed.is-cutting .ed-scrub, .ed.is-cutting .ed-side__tip { display: none; }
.ed-cutlisten { display: flex; gap: 8px; margin-bottom: 10px; }
.ed-cutlisten .btn { flex: 1; }
.ed-cutgo { margin-bottom: 12px; }
.ed-badge--cut { background: var(--red); color: #fff; }

/* the hook's place: «Выше / Ниже», «За головой» */
.ed-hpos { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ed-hpos .ed-step { flex: none; display: inline-flex; align-items: center; gap: 6px; min-width: 104px; height: 44px; padding: 0 14px; background: var(--fill); }
.ed-hpos .ed-step .i { width: 15px; height: 15px; }
.ed-hpos .ed-step .ed-up { transform: rotate(180deg); }
.ed-hpos .ed-step:disabled { opacity: 0.35; }
.ed-hpos b { flex: 1; min-width: 0; text-align: center; font: 600 14px/1.2 var(--f); color: var(--label-2); }

/* «Звук»: the music's track, level and listen; the montage's sounds */
.ed-tabs { overflow-x: auto; scrollbar-width: none; }
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tab { flex: 1 0 auto; padding: 0 8px; }
.ed-track { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--fill); }
.ed-track.is-off { opacity: 0.75; }
.ed-track__ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tile-bg); color: var(--accent-text); }
.ed-track__ic .i { width: 20px; height: 20px; }
.ed-track__b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ed-track__b b { font: 600 15px/1.25 var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-track__b small { font: 400 12.5px/1.3 var(--f); color: var(--label-3); }
.ed-vol { margin-top: 14px; padding: 12px 14px 8px; border-radius: 16px; background: var(--fill); }
.ed-vol__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font: 500 14px/1.2 var(--f); color: var(--label-2); }
.ed-vol__top b { font-weight: 600; color: var(--label); font-variant-numeric: tabular-nums; }
.ed-vol__in { width: 100%; height: 32px; margin: 0; accent-color: var(--accent); touch-action: pan-y; }
.ed-vol__marks { position: relative; height: 14px; margin: 0 10px; font: 500 11px/1 var(--f); color: var(--label-3); }
.ed-vol__marks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ed-listen { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; }
.ed-listen__go { flex: none; }
.ed-listen__at { font: 500 13px/1.2 var(--f); color: var(--label-3); font-variant-numeric: tabular-nums; }
.ed-switch { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 2px; }
.ed-switch > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font: 500 15px/1.25 var(--f); color: var(--label); }
.ed-switch > span small { font: 400 12.5px/1.3 var(--f); color: var(--label-3); }
.ed-switch .switch:disabled { opacity: 0.4; }
.ed-sfxwords { display: flex; flex-direction: column; gap: 8px; margin: 6px 2px 14px; font: 500 15px/1.25 var(--f); color: var(--label); }
.ed-tr-own { margin-bottom: 12px; }
.ed-tr-moods { margin-bottom: 10px; }
.ed-trs { list-style: none; margin: 0; padding: 0; }
.ed-tr { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.ed-tr + .ed-tr { border-top: 0.5px solid var(--sep); }
.ed-tr__play { flex: none; background: var(--fill); border-radius: 50%; }
.ed-tr__b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ed-tr__b b { font: 600 15px/1.25 var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-tr__b small { font: 400 12.5px/1.3 var(--f); color: var(--label-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* «Весь ролик»: apart from the rest — it changes every caption and text */
.ed-warn { display: flex; gap: 10px; margin: 0 0 4px; padding: 12px 14px; border-radius: 15px; background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--label); font: 500 14px/1.38 var(--f); }
.ed-warn .i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--orange); }
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill); color: var(--label); font: 500 14px/1 var(--f); }
.ed-chip.is-on { background: var(--accent); color: var(--on-accent); }
.ed-chip i { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px var(--sep); }
.ed-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.ed-check { position: relative; display: grid; place-items: center; aspect-ratio: 9 / 16; max-width: 100%; padding: 0; border: 0; border-radius: 11px; overflow: hidden; background: var(--fill); }
.ed-check img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.2s ease; }
.ed-check.is-ready img { opacity: 1; }
.ed-check.is-ready .spinner { display: none; }
.ed-check b { position: absolute; left: 6px; bottom: 6px; padding: 3px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.58); color: #fff; font: 600 11px/1 var(--f); font-variant-numeric: tabular-nums; }
.ed-never { margin: 0 0 12px; padding: 0 0 0 20px; color: var(--label-2); font: 400 14px/1.5 var(--f); }
.ed-never li + li { margin-top: 4px; }
.ed-help { margin: 0; padding: 0 0 0 20px; font: 400 15px/1.45 var(--f); color: var(--label); }
.ed-help li + li { margin-top: 8px; }

.ed-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; border-top: 0.5px solid var(--sep); }
.ed-fbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 50px; min-width: 50px; padding: 0 12px; box-sizing: border-box; border: 0; border-radius: 15px; background: var(--fill); color: var(--label); font: 600 14px/1 var(--f); }
.ed-fbtn .i { width: 20px; height: 20px; }
.ed-fbtn:disabled { opacity: 0.38; }
.ed-fbtn--n b { min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 700 12px/20px var(--f); }
.ed-fbtn--n:disabled b { background: var(--label-3); }
.ed-go { flex: 1; min-width: 0; min-height: 50px; flex-direction: column; gap: 3px; padding: 4px 10px; }
.ed-go__l { display: inline-flex; align-items: center; gap: 7px; }
.ed-go small { font: 500 11.5px/1 var(--f); opacity: 0.78; }
.ed-list .ed-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; border: 0; background: none; color: var(--label); text-align: left; }
.ed-list .ed-row + .ed-row { border-top: 0.5px solid var(--sep); }
.ed-row__t { flex: 1; min-width: 0; font: 500 15px/1.25 var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-row__s { flex: none; max-width: 45%; font: 400 13px/1.2 var(--f); color: var(--label-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-row .i { width: 15px; height: 15px; color: var(--label-3); }
.ed-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 90px 24px; text-align: center; color: var(--label-2); }

/* typing: the preview smaller and the field above the keyboard — nothing else */
.ed.is-typing { --stage-h: clamp(130px, calc(var(--vvh, 100vh) - 205px), 360px); padding-bottom: 4px; }
.ed.is-typing .ed-badge span { display: none; } /* a small frame: the badge's sign alone */
.ed.is-typing .ed-top, .ed.is-typing .ed-scrub, .ed.is-typing .ed-tabs, .ed.is-typing .ed-foot,
.ed.is-typing .ed-side__tip, .ed.is-typing .ed-note, .ed.is-typing .ed-acts, .ed.is-typing .ed-lead { display: none; }
.ed.is-typing .ed-stage { padding-top: 6px; }
@media (min-width: 640px) { /* the site on a computer: the editor a phone's width, the strip the window's */
  .ed-top, .ed-stage, .ed-body, .ed-foot { width: 100%; max-width: 600px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
  .ed-tabs { width: calc(100% - 20px); max-width: 580px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
}
@media (max-width: 359px) {
  .ed-side__b { width: 72px; font-size: 12px; }
  .ed-tab { font-size: 12px; }
  .ed-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* «Сила фильтра» (the owner, 16.10.2026): the slider under the looks; the previews lay the look's picture over the plain
   one at that strength (the engine's cube mixes them the same way) — last in the file, over each image's own `.is-in` */
.grade-k { display: grid; gap: 6px; margin: 4px 2px 12px; }
.grade-k__top { display: flex; justify-content: space-between; align-items: baseline; font: 500 14px/18px var(--f); color: var(--label-2); }
.grade-k__top b { font: 600 15px/18px var(--f); color: var(--label); font-variant-numeric: tabular-nums; }
.grade-k__in { width: 100%; margin: 0; accent-color: var(--accent); }
.grade-k__marks { display: flex; justify-content: space-between; font: 400 12px/16px var(--f); color: var(--label-3); }
.grade-mine__frame > .grade-mine__img { grid-area: 1 / 1; }
.look-top.is-in { opacity: var(--look-k, 1); }
/* «Догрев» in the admin panel (admin.js nurtureHTML): a step's delay and its texts under it */
.nurow { align-items: flex-start; }
.nurow__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.nurow__after { display: inline-flex; align-items: center; gap: 8px; font: 400 14px/18px var(--f); color: var(--label-2); }
.nurow__after .frow__in { width: 64px; flex: none; padding: 6px 8px; border-radius: 10px; background: var(--fill); text-align: center; }
.nuwave { display: grid; gap: 10px; margin-top: 10px; }
.nuword { white-space: pre-wrap; color: var(--label); }
/* «Путь людей» in the admin panel (admin.js journeyHTML): the funnel's bars, the person's way */
.jrchips { margin-bottom: 8px; }
.jrstep { align-items: center; }
.jrstep__right { display: grid; justify-items: end; gap: 4px; flex: none; }
.jrstep__n { font: 700 20px/24px var(--f); font-variant-numeric: tabular-nums; }
.jrbar { display: block; height: 6px; margin: 6px 0 4px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.jrbar > i { display: block; height: 100%; width: calc(var(--p) * 1%); border-radius: inherit; background: var(--accent); }
.jrsub { color: var(--label-2); font-weight: 400; }
.jrcode { white-space: normal; }
.jrpath__d { white-space: normal; word-break: break-word; }
.jrpath__at { font: 400 12px/16px var(--f); color: var(--label-2); white-space: nowrap; }
.jrpath--bot .row__title { color: var(--label-2); }
/* «Оплаты» in the admin panel (admin.js paymentsHTML) */
.paysum { font-variant-numeric: tabular-nums; white-space: nowrap; }
.paysum s { color: var(--label-3); font-size: 12px; }
.paysum.is-paid { color: var(--green); font-weight: 600; }

/* «Редактор» of a «Сюжет» (storyedit.js): the video on top, the scenes as rows with their frames, a scene's tools under it */
.sted { display: flex; flex-direction: column; gap: 14px; }
.sted__video { width: 100%; max-height: 38vh; border-radius: 16px; background: #000; object-fit: contain; }
.sted__h { margin: 6px 2px 0; font-size: 15px; font-weight: 700; }
.sted__thumb { flex: none; width: 44px; height: 78px; border-radius: 8px; background: var(--fill, rgba(127,127,127,0.18)) center / cover no-repeat; }
.sted__row { gap: 12px; cursor: pointer; }
.sted__row.is-open { background: var(--fill, rgba(127,127,127,0.12)); }
.sted__words { opacity: 0.7; font-style: italic; }
.sted__tools { display: flex; flex-direction: column; gap: 10px; padding: 8px 4px 14px; }
.sted__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sted__btns .btn { justify-content: center; }
.sted__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sted__clip { display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.sted__clip .sted__thumb { width: 100%; height: auto; aspect-ratio: 9 / 16; }
.sted__clip.is-on .sted__thumb { outline: 3px solid var(--accent, #3b82f6); outline-offset: 2px; }
.sted__cap { font-size: 12px; opacity: 0.75; text-align: center; }

/* What one uploads, looked at (viewer.js; the owner, 01.11.2026: «предпросмотр для загружаемых роликов при нажатии, чтобы
   посмотреть, а также чтобы превью было»): a thumbnail with a still opens its file on a tap — a small ▶ over a recording's */
[data-preview] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[data-preview]:active { transform: scale(0.96); transition: transform 0.12s ease; }
[data-preview]:focus-visible { outline: 2px solid var(--accent, #c9a46a); outline-offset: 2px; }
.thumbplay { position: absolute; left: 50%; top: 50%; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.42); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.thumbplay .i { width: 12px; height: 12px; margin-left: 2px; }
.broll__thumb .thumbplay, .take__thumb .thumbplay { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.broll__thumb .thumbplay .i, .take__thumb .thumbplay .i { width: 10px; height: 10px; }
.viewer { display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: #0f0c09; }
.viewer video, .viewer img { display: block; width: 100%; max-height: min(72vh, 720px); object-fit: contain; background: #0f0c09; }
.viewer--image { background: transparent; }

/* «Аватар» (avatar.js): the three narrators, the topic, the keyword */
.avn-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.avn { display: grid; justify-items: center; gap: 4px; padding: 10px 6px 12px; border: 0; border-radius: 22px; background: var(--bg-2); color: inherit; font: inherit; text-align: center; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.avn:active { transform: scale(0.97); }
.avn.is-on { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--accent); }
.avn__pic { width: 100%; max-width: 120px; aspect-ratio: 1; height: auto; border-radius: 16px; object-fit: cover; background: #f6f0e8; }
.avn__name { font-weight: 700; font-size: 15px; margin-top: 4px; }
.avn__who { font-size: 12px; line-height: 1.25; color: var(--label-2); }
.avkey { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; width: 100%; box-sizing: border-box; }
.avgo { display: grid; gap: 10px; margin: 8px 0 28px; }
.avgo .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.seg--lg[style*="--n:5"] .seg__opt { font-size: 13px; letter-spacing: -0.015em; padding-left: 1px; padding-right: 1px; white-space: nowrap; } /* the admins' five modes (Аватар) */
