/* Кабинет Secret Voicer. Цвет — это голос: выбранный голос красит сцену озвучки,
   и тот же цвет метит его файл в плеере, истории и каталоге. Остальное — тихая баклажановая база. */
:root {
  --ink: #1b0d2b;
  --ink-2: #261540;
  --cream: #fff3d6;
  --yellow: #ffd400;
  --red: #ff4a1c;
  --blue: #2a3cff;
  --pink: #ffb4dc;
  --green: #0a7a50;
  --violet: #7a2bff;
  --mute: rgb(255 243 214 / .66);
  --line: rgb(255 243 214 / .18);
  --gutter: clamp(16px, 2.6vw, 36px);
  --cap: 60px;
  --cap-top: 14px;
  --head: calc(var(--cap) + var(--cap-top) * 2);
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --text: "Golos Text", system-ui, sans-serif;
  /* голос по умолчанию, app.js ставит цвет выбранного */
  --a: var(--yellow); --b: var(--ink); --t: var(--ink); --dim: #5a3d73;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--head) + 12px); background: var(--ink); }
/* i18n.js прячет страницу, пока тексты не переведены и скрипты не запущены (доли секунды) */
html.i18n-wait body { visibility: hidden; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 17px/1.45 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; min-height: 100vh; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 60; background: var(--yellow); color: var(--ink); padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }
.num { font-variant-numeric: tabular-nums; }
.proto { font-size: 14px; line-height: 1.4; color: var(--mute); max-width: 70ch; }
.mute { color: var(--mute); }

/* Кнопки и ссылки как на главной */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 999px;
  background: var(--yellow); color: var(--ink); font-weight: 600; font-size: 18px; text-decoration: none; white-space: nowrap;
  transition: transform .18s, background-color .18s, opacity .18s;
}
.btn:not(:disabled):hover { transform: translateY(-2px) rotate(-1deg); }
.btn:disabled { opacity: .45; }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 16px; }
.btn--ghost { background: none; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn--cream { background: var(--cream); color: var(--ink); }
.link { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:disabled { opacity: .5; text-decoration: none; }
.link--arrow { text-decoration: none; display: inline-flex; gap: 8px; border-bottom: 2px solid currentColor; padding-bottom: 2px; font-weight: 500; }
.link--arrow::after { content: "→"; transition: transform .18s; }
.link--arrow:hover::after { transform: translateX(4px); }
.back { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 500; min-height: 44px; }
.back::before { content: "←"; transition: transform .18s; }
.back:hover::before { transform: translateX(-4px); }

/* Шапка: капсула главной, одна на все страницы кабинета */
.bar {
  position: fixed; left: var(--gutter); right: var(--gutter); top: var(--cap-top); z-index: 40;
  height: var(--cap); padding-block: 0; padding-inline: 24px 8px; border-radius: 999px;
  display: flex; align-items: center; gap: 24px; background: var(--cream); color: var(--ink);
}
.logo { font: 900 30px/1 var(--display); text-decoration: none; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: rgb(27 13 43 / .08); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.bar__end { margin-inline-start: auto; display: flex; align-items: center; gap: 18px; }
.bal { text-decoration: none; white-space: nowrap; line-height: 1.1; text-align: end; }
.bal b { font: 900 24px/1 var(--display); }
.bal span { display: block; font-size: 12px; opacity: .72; }
.lang select { background: none; border: 0; cursor: pointer; font-weight: 500; min-height: 44px; color: var(--ink); max-width: 8.5em; }
.lang option { color: var(--ink); }
.bar__out { text-decoration: none; font-weight: 500; white-space: nowrap; }
.bar__out:hover, .bal:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.bar__menu { display: none; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--cream); }
.menu { display: none; }

main { padding-top: var(--head); }
.page { padding: 28px var(--gutter) 80px; }
.page__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px 32px; align-items: end; margin: 8px 0 40px; }
.page__head h1 { font: 900 clamp(60px, 8vw, 128px)/.86 var(--display); color: var(--yellow); }
.page__head p { font-size: 18px; max-width: 34em; }
h2.h { font: 900 clamp(40px, 4.6vw, 68px)/.92 var(--display); margin-bottom: 18px; }
h3.h { font: 800 clamp(26px, 2.4vw, 34px)/1 var(--display); margin-bottom: 10px; }
.block { border-top: 2px solid var(--line); padding: 28px 0 44px; }
.cols { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 32px; }
.lead { font-size: 18px; max-width: 36em; }

/* ---------- Озвучка: сцена в цвет голоса, композиция демо с главной ---------- */
/* Три колонки: текст крупно, клякса голоса и есть кнопка, справа статус и готовый файл */
.scene { position: relative; background: var(--a); color: var(--t); padding: 26px var(--gutter) 48px; overflow-x: clip; transition: background-color .45s, color .45s; }
.stage { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; align-items: start; }
.stage__col, .stage__text, .stage__opts { position: relative; z-index: 1; min-width: 0; }
.lab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 500; font-size: 16px; margin-bottom: 10px; }
.lab .is-over { font-weight: 700; text-decoration: underline wavy; text-underline-offset: 4px; }
.lab--modes { margin: 24px 0 8px; }

/* Поле растёт по тексту, пустой жёлтой зоны под ним нет */
.script {
  display: block; width: 100%; min-height: 1.92em; resize: none; border: 0; outline: 0; padding: 0; margin: 0; background: none; color: inherit; overflow: hidden;
  font: 900 var(--fs, 76px)/.96 var(--display); caret-color: currentColor; overflow-wrap: anywhere; white-space: pre-wrap;
}
.script[data-fit="l"] { --fs: clamp(44px, 5vw, 76px); }
.script[data-fit="m"] { --fs: clamp(34px, 3.4vw, 50px); }
.script[data-fit="s"] { --fs: clamp(24px, 2.2vw, 32px); line-height: 1.04; }
/* длинный текст: читаем, а не любуемся; поле не уходит в бесконечность */
.script[data-fit="long"] { font: 400 18px/1.55 var(--text); max-height: min(62vh, 620px); overflow-y: auto; }
.script::placeholder { color: inherit; opacity: .45; }
.script::selection { background: var(--t); color: var(--a); }
.script:focus-visible { outline: 0; }
.editor__rule { height: 3px; background: currentColor; transform: scaleX(.12); transform-origin: left; transition: transform .35s; margin-top: 12px; }
.stage__text:focus-within > .editor__rule { transform: scaleX(1); }
.editor__tools { display: flex; gap: 6px 22px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 16px; min-height: 8px; }
.editor__tools button { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; min-height: 36px; }

/* Режимы — чипы, как в демо; настройки свёрнуты */
.modes { display: flex; flex-wrap: wrap; gap: 4px; }
.mode { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 500; font-size: 16px; white-space: nowrap; }
.mode small { font-size: 12px; font-weight: 500; opacity: .75; }
.mode:hover:not([aria-checked="true"]):not([aria-disabled="true"]) { background: color-mix(in srgb, currentColor 10%, transparent); }
.mode[aria-checked="true"] { background: var(--t); color: var(--a); }
.mode[aria-disabled="true"] { opacity: .5; cursor: default; }
.mode__hint { font-size: 15px; margin-top: 10px; max-width: 30em; }
.mode__hint button { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tune { margin-top: 16px; border-top: 2px solid color-mix(in srgb, currentColor 26%, transparent); }
.tune summary { display: flex; align-items: center; gap: 12px; min-height: 50px; cursor: pointer; list-style: none; font-weight: 600; font-size: 16px; }
.tune summary::-webkit-details-marker { display: none; }
.tune summary::after { content: ""; width: 10px; height: 10px; margin: -4px 4px 0 0; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); transition: transform .2s; flex: none; }
.tune[open] summary::after { transform: translateY(4px) rotate(-135deg); }
.tune__sum { margin-inline-start: auto; font-weight: 400; font-size: 14px; opacity: .78; text-align: end; }
.tune summary:focus-visible { outline-offset: 2px; }
.knobs { display: grid; gap: 12px; padding: 2px 0 10px; }
.knob { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; font-size: 15px; }
.knob output { font-weight: 600; font-variant-numeric: tabular-nums; }
.knob small { grid-column: 1 / -1; font-size: 13px; opacity: .75; }
.knob input { grid-column: 1 / -1; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: none; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, currentColor var(--f, 50%), color-mix(in srgb, currentColor 22%, transparent) 0); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: currentColor; border: 4px solid var(--a); box-shadow: 0 0 0 2px currentColor; }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: color-mix(in srgb, currentColor 22%, transparent); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: currentColor; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: currentColor; border: 4px solid var(--a); }
.knobs__reset { justify-self: start; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

/* Кнопка-клякса «Озвучить»: форма голоса, внешняя — цвет текста, внутренняя — цвет сцены */
.go { display: grid; justify-items: center; gap: 8px; text-align: center; }
.gob { position: relative; display: grid; place-items: center; width: 100%; max-width: 400px; aspect-ratio: 1; margin-top: -10px; color: var(--t); border-radius: 50%; }
.gob svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gob .o, .gob .i { transform-box: view-box; transform-origin: 50% 50%; }
.gob span { position: relative; z-index: 1; font: 900 clamp(38px, 4vw, 60px)/1 var(--display); }
.gob:hover span { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.gob:focus-visible { outline: 3px solid currentColor; outline-offset: -2px; }
.gob:disabled { opacity: .45; }
.gob[aria-disabled="true"] { cursor: progress; }
.gob[aria-disabled="true"]:hover span { text-decoration: none; }
.scene[data-state="work"] .gob .o { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.go__count { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; }
.go__msg { font-size: 15px; min-height: 1.45em; max-width: 26em; overflow-wrap: anywhere; }
.go__msg:empty { min-height: 0; }
.go__msg a, .go__msg button { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.go__msg.is-error { font-weight: 600; }
.limit { display: grid; gap: 10px; text-align: start; width: 100%; max-width: 400px; padding: 20px 0; }
.limit strong { font: 900 40px/.95 var(--display); }
.limit ul { font-size: 15px; display: grid; gap: 4px; }
.limit li::before { content: "— "; }
.limit .btn { background: var(--t); color: var(--a); justify-self: start; }

/* Голос под кнопкой, как переключатель голосов в демо */
.vbox { width: 100%; max-width: 400px; margin: 14px auto 0; border-top: 2px solid color-mix(in srgb, currentColor 26%, transparent); padding-top: 14px; }
.voice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.voice .play { width: 60px; height: 60px; }
.voice__name { font: 900 clamp(30px, 2.5vw, 40px)/.92 var(--display); overflow-wrap: anywhere; }
.voice__desc { font-size: 15px; margin-top: 4px; }
.voice__meta { font-size: 14px; opacity: .78; margin-top: 2px; }
.voice__row { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.voice__row button { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; min-height: 40px; }
.voice__note { font-size: 14px; margin-top: 4px; }
.fav { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.fav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform .18s; }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.fav:hover svg { transform: scale(1.12); }

/* ---------- Статус и готовый файл ---------- */
.job__status { font: 900 clamp(52px, 5.8vw, 96px)/.9 var(--display); overflow-wrap: anywhere; }
.job__note { margin-top: 10px; font-size: 16px; max-width: 30em; overflow-wrap: anywhere; }
.job__note:empty { display: none; }
.job__note button, .job__note a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 36px; }
.job__frag { margin-top: 10px; padding-inline-start: 14px; border-inline-start: 3px solid currentColor; font-size: 16px; }
/* Карточка файла — тёмное сообщение, как копия в Telegram на главной */
.card { margin-top: 22px; background: var(--ink); color: var(--cream); border-radius: 22px 22px 22px 6px; padding: 18px 20px 20px; }
.card--ghost { background: none; color: inherit; box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 30%, transparent); font-size: 15px; padding: 18px 20px; max-width: 30em; }
.card__who { font-size: 14px; opacity: .8; margin-bottom: 8px; overflow-wrap: anywhere; }
.card__file { display: block; font-weight: 600; }
.card__frag { font-size: 16px; margin: 4px 0 14px; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.files { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin-top: 14px; }
.card .btn { background: var(--vc, var(--yellow)); color: var(--ink); }
.files__sub { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 14px; }
.files__sub a { font-weight: 500; text-underline-offset: 3px; }
.files__sub span { color: var(--mute); }
.rate { margin-top: 18px; display: grid; gap: 12px; }
.rate__row { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; font-size: 15px; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 500; box-shadow: inset 0 0 0 2px var(--line); }
.pill:hover { box-shadow: inset 0 0 0 2px var(--cream); }
.pill[aria-pressed="true"] { background: var(--cream); color: var(--ink); box-shadow: none; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); font-size: 15px; cursor: pointer; }
.check input:checked + span { background: var(--cream); color: var(--ink); box-shadow: none; }
.check input:focus-visible + span { outline: 3px solid var(--cream); outline-offset: 2px; }
.invite { margin-top: 18px; font-size: 15px; max-width: 30em; }
.invite .link { white-space: nowrap; }

/* Плеер: кнопка — клякса голоса, волна из настоящего файла */
.player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.play { position: relative; width: 72px; height: 72px; flex: none; display: grid; place-items: center; color: var(--pa, var(--ink)); }
.play svg { grid-area: 1 / 1; width: 100%; height: 100%; color: var(--pt, var(--yellow)); overflow: visible; transition: transform .1s linear; }
.play::after { grid-area: 1 / 1; z-index: 1; content: ""; width: 32%; aspect-ratio: 1; background: currentColor; clip-path: polygon(14% 0, 100% 50%, 14% 100%); margin-left: 5%; }
.play.is-playing::after { clip-path: polygon(8% 0, 38% 0, 38% 100%, 8% 100%, 8% 0, 62% 0, 92% 0, 92% 100%, 62% 100%, 62% 0); margin-left: 0; }
.play.is-loading::after { width: 38%; background: none; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; clip-path: none; margin: 0; animation: rot .8s linear infinite; }
.play:disabled { opacity: .4; }
.play:not(:disabled):hover svg { transform: scale(1.06); }
@keyframes rot { to { transform: rotate(360deg); } }
.play--s { width: 48px; height: 48px; }
.play--xs { width: 40px; height: 40px; }
.card .play { width: 56px; height: 56px; }
.wave { position: relative; height: 56px; cursor: pointer; touch-action: none; color: var(--vc, var(--yellow)); }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave:focus-visible { outline-offset: 4px; }
.time { font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }

/* ---------- Недавние и история ---------- */
.recent { padding: 34px var(--gutter) 70px; }
.recent__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.rows { border-bottom: 2px solid var(--line); }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px 20px; align-items: center; padding: 14px 0; border-top: 2px solid var(--line); }
.row__text { font: 800 clamp(22px, 1.9vw, 28px)/1.05 var(--display); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.row__meta { font-size: 14px; color: var(--mute); margin-top: 4px; }
.row__meta .bad { color: var(--pink); font-weight: 600; }
.row__when { font-size: 14px; color: var(--mute); white-space: nowrap; text-align: end; }
.row__acts { display: flex; gap: 4px 16px; flex-wrap: wrap; justify-content: flex-end; font-size: 15px; }
.row__acts a, .row__acts button { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; min-height: 36px; display: inline-flex; align-items: center; white-space: nowrap; }
.row__acts details { position: relative; }
.row__acts summary { list-style: none; cursor: pointer; font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; min-height: 36px; display: inline-flex; align-items: center; }
.row__acts summary::-webkit-details-marker { display: none; }
.row__acts details[open] > div { position: absolute; inset-inline-end: 0; top: 100%; z-index: 5; background: var(--cream); color: var(--ink); border-radius: 16px; padding: 10px 16px; display: grid; gap: 2px; min-width: 200px; box-shadow: 0 14px 40px rgb(0 0 0 / .4); }
.row__acts details[open] > div a { text-decoration: none; }
.row__acts details[open] > div small { display: block; font-size: 13px; opacity: .7; margin-top: -6px; margin-bottom: 4px; }
.row .play { --pa: var(--ink); --pt: var(--vc); }
.tools { display: flex; gap: 12px 24px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.field { display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.input { width: 100%; min-height: 52px; padding: 0 18px; border-radius: 16px; border: 2px solid var(--line); background: rgb(255 243 214 / .06); color: var(--cream); font-size: 17px; font-weight: 400; }
.input:focus { outline: 0; border-color: var(--cream); }
.input::placeholder { color: rgb(255 243 214 / .45); }
textarea.input { padding: 14px 18px; min-height: 96px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--pink); }
.err { color: var(--pink); font-size: 14px; font-weight: 500; min-height: 0; }
.search { max-width: 420px; flex: 1 1 260px; }
.empty { padding: 34px 0 10px; max-width: 40em; }
.empty h3 { font: 900 clamp(34px, 3.4vw, 48px)/.95 var(--display); margin-bottom: 8px; }
.empty p { margin-bottom: 18px; }
.more { margin-top: 22px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.skel { height: 64px; border-top: 2px solid var(--line); background: linear-gradient(90deg, transparent, rgb(255 243 214 / .06), transparent) 0 0 / 50% 100% no-repeat; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---------- Подписка, API, партнёрам ---------- */
.big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.big b { display: block; font: 900 clamp(64px, 8vw, 128px)/.86 var(--display); color: var(--yellow); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.big b.is-text { font-size: clamp(48px, 5.6vw, 88px); }
.big strong { display: block; font-weight: 600; margin-top: 8px; }
.big p { color: var(--mute); max-width: 30em; margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; }
.stats b { display: block; font: 900 clamp(44px, 4.8vw, 72px)/.9 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.stats span { font-size: 15px; color: var(--mute); }
.list { display: grid; gap: 6px; }
.list li { padding-inline-start: 22px; position: relative; }
.list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 10px; height: 3px; background: var(--yellow); }
.offer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 40px; align-items: start; }
.price { font: 900 clamp(72px, 9vw, 140px)/.84 var(--display); color: var(--yellow); }
.price small { font: 600 20px/1.2 var(--text); color: var(--cream); margin-inline-start: 8px; }
.pay { border-bottom: 2px solid var(--line); }
.pay__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: center; padding: 16px 0; border-top: 2px solid var(--line); }
.pay__row strong { display: block; font: 800 28px/1 var(--display); }
.pay__row span { font-size: 15px; color: var(--mute); }
.pay__email { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.pay__email .field { flex: 1 1 240px; }
.note { border-inline-start: 4px solid var(--yellow); padding-block: 4px; padding-inline: 18px 0; max-width: 46em; }
.note strong { display: block; margin-bottom: 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th { text-align: start; font-weight: 400; font-size: 14px; color: var(--mute); padding-block: 0 10px; padding-inline: 0 16px; white-space: nowrap; }
.table td { padding-block: 12px; padding-inline: 0 16px; border-top: 2px solid var(--line); vertical-align: baseline; }
.table td:first-child { white-space: nowrap; }
.table .r { text-align: end; padding-inline-end: 0; }
.table b { font: 900 30px/1 var(--display); }
.table .acts { display: flex; gap: 6px 16px; justify-content: flex-end; flex-wrap: wrap; }
.table .acts a { font-weight: 500; text-underline-offset: 3px; white-space: nowrap; }
.scroll-x { overflow-x: auto; margin-inline-end: calc(var(--gutter) * -1); padding-inline-end: var(--gutter); }
.key { display: flex; gap: 12px 20px; flex-wrap: wrap; align-items: center; }
.key code { font: 500 18px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em; padding: 16px 18px; border-radius: 14px; background: rgb(255 243 214 / .08); }
.ok { color: #8fe3b8; font-weight: 600; }
.code { position: relative; margin: 14px 0 0; padding: 18px 20px; border-radius: 18px; background: #12081f; color: var(--cream); font: 400 14px/1.6 ui-monospace, Menlo, monospace; overflow-x: auto; white-space: pre; }
.code-wrap { position: relative; }
.code-wrap .copy { position: absolute; inset-inline-end: 10px; top: 24px; }
.copy { font: 500 14px/1 var(--text); min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--cream); color: var(--ink); }
.refbox { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.refbox .input { flex: 1 1 320px; font-family: ui-monospace, Menlo, monospace; font-size: 15px; }
.funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.funnel div { border-top: 6px solid var(--yellow); padding-block: 12px 0; padding-inline: 0 12px; }
.funnel div:nth-child(2) { border-color: var(--pink); }
.funnel div:nth-child(3) { border-color: var(--red); }
.funnel div:nth-child(4) { border-color: #8fe3b8; }
.funnel b { display: block; font: 900 48px/.9 var(--display); }
.funnel span { font-size: 15px; color: var(--mute); }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); }
.seg button { min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 500; font-size: 15px; white-space: nowrap; }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--cream); color: var(--ink); }
.promo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.promo article { border-top: 2px solid var(--line); padding-top: 14px; display: grid; gap: 12px; align-content: start; }
.promo p { font-size: 16px; white-space: pre-line; }
.promo .copy { justify-self: start; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
.steps li { border-top: 2px solid var(--cream); padding-top: 12px; }
.steps strong { display: block; font: 800 28px/1 var(--display); margin-bottom: 6px; }
.form { display: grid; gap: 14px; max-width: 560px; }
.form__row { display: flex; gap: 10px; flex-wrap: wrap; }
.docs dt { font: 800 24px/1.1 var(--display); margin-top: 18px; }
.docs dd { color: var(--mute); max-width: 52em; margin-top: 4px; }
.docs code, .inline-code { font: 500 .92em ui-monospace, Menlo, monospace; background: rgb(255 243 214 / .1); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }

/* ---------- Окна ---------- */
dialog { padding: 0; border: 0; color: var(--cream); background: var(--ink-2); border-radius: 28px; max-width: min(640px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px); box-shadow: 0 30px 80px rgb(0 0 0 / .5); }
dialog::backdrop { background: rgb(12 5 22 / .72); }
dialog[open] { display: flex; flex-direction: column; animation: pop .24s cubic-bezier(.2, .9, .25, 1.1); }
@keyframes pop { from { transform: translateY(18px) scale(.98); opacity: 0; } }
.dlg__head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding-block: 24px 8px; padding-inline: 28px 24px; }
.dlg__head h2 { font: 900 clamp(38px, 4vw, 56px)/.9 var(--display); }
.dlg__body { padding: 8px 28px 28px; overflow-y: auto; display: grid; gap: 16px; }
.dlg__foot { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; padding: 0 28px 26px; }
.x { width: 44px; height: 44px; flex: none; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 2px var(--line); }
.x::before, .x::after { content: ""; position: absolute; left: 12px; right: 12px; top: 21px; height: 2px; background: currentColor; transform: rotate(45deg); }
.x::after { transform: rotate(-45deg); }
.x:hover { box-shadow: inset 0 0 0 2px var(--cream); }

/* Каталог голосов: большое окно со списком, как библиотека */
.vm { max-width: min(1180px, calc(100vw - 24px)); height: calc(100dvh - 48px); }
.vm__top { display: grid; gap: 12px; padding: 0 28px 14px; border-bottom: 2px solid var(--line); }
.vm__filters { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.vm__filters select { min-height: 44px; border-radius: 999px; border: 0; padding: 0 34px 0 16px; background: rgb(255 243 214 / .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23fff3d6' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; font-size: 15px; cursor: pointer; }
.vm__filters select option { background: var(--ink-2); }
.tog { min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 500; font-size: 15px; background: rgb(255 243 214 / .08); white-space: nowrap; }
.tog[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.vm__reset { font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.vm__main { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 0; flex: 1; }
.langs { overflow-y: auto; padding-block: 12px 20px; padding-inline: 20px 10px; border-inline-end: 2px solid var(--line); }
.langs button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 12px; text-align: start; font-size: 15px; }
.langs button span { color: var(--mute); font-variant-numeric: tabular-nums; }
.langs button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.langs button[aria-pressed="true"] span { color: inherit; }
.langs button:hover:not([aria-pressed="true"]) { background: rgb(255 243 214 / .08); }
.vlist { overflow-y: auto; padding: 4px 28px 24px; min-height: 0; }
.vlist__info { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; color: var(--mute); padding: 12px 0 6px; }
.vrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: center; padding: 10px 12px; margin: 0 -12px; border-radius: 18px; }
.vrow + .vrow { box-shadow: 0 -2px 0 var(--line); }
.vrow:hover { background: rgb(255 243 214 / .05); }
.vrow.is-current { background: var(--a); color: var(--t); box-shadow: none; }
.vrow.is-current + .vrow { box-shadow: none; }
.vrow .play { --pa: var(--ink); --pt: var(--vc); }
.vrow.is-current .play { --pa: var(--a); --pt: var(--t); }
.vrow__pick { text-align: start; min-width: 0; min-height: 52px; }
.vrow__name { font: 800 24px/1 var(--display); overflow-wrap: anywhere; }
.vrow__desc { font-size: 15px; overflow-wrap: anywhere; }
.vrow__meta { font-size: 13px; opacity: .72; margin-top: 2px; }
.vrow__tag { font-weight: 600; }
.vrow__cur { font-size: 14px; font-weight: 600; white-space: nowrap; }
.vrow__del { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; min-height: 36px; }
.vrow > span:empty { display: none; }
.vrow > .fav { grid-column: -2; grid-row: 1; }
.addid { border-top: 2px solid var(--line); margin-top: 18px; padding-top: 6px; }
.addid summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; }
.addid .form { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: end; }

.tags { display: grid; gap: 14px; }
.tags h3 { font: 800 22px/1 var(--display); margin-bottom: 8px; }
.tags div div { display: flex; flex-wrap: wrap; gap: 6px; }
.tags button { min-height: 40px; padding: 0 12px; border-radius: 12px; background: rgb(255 243 214 / .08); font: 500 15px/1 ui-monospace, Menlo, monospace; }
.tags button:hover { background: var(--cream); color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; background: var(--cream); color: var(--ink); border-radius: 999px; padding: 14px 22px; font-weight: 500; transition: transform .3s cubic-bezier(.2, .9, .25, 1.1); max-width: calc(100vw - 32px); box-shadow: 0 14px 40px rgb(0 0 0 / .4); }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }

.foot { display: flex; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; padding: 28px var(--gutter) 40px; border-top: 2px solid var(--line); font-size: 15px; color: var(--mute); }
.foot a { color: var(--cream); text-underline-offset: 3px; }
.foot nav { display: flex; gap: 8px 22px; flex-wrap: wrap; }

@media (max-width: 1180px) {
  .nav a { padding: 0 10px; }
  .bar { gap: 14px; }
  .lang { display: none; }
}
@media (max-width: 1023px) {
  .nav, .bar__out { display: none; }
  .bar__menu { display: inline-flex; align-items: center; }
  .menu { position: fixed; left: var(--gutter); right: var(--gutter); top: calc(var(--cap-top) + var(--cap) + 8px); z-index: 39; background: var(--cream); color: var(--ink); border-radius: 26px; padding: 14px 22px 20px; box-shadow: 0 14px 40px rgb(0 0 0 / .45); }
  .menu.is-open { display: grid; gap: 2px; }
  .menu a { font: 800 30px/1.15 var(--display); text-decoration: none; padding: 4px 0; }
  .menu a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
  .menu__end { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; border-top: 2px solid rgb(27 13 43 / .14); margin-top: 10px; padding-top: 12px; }
  .menu__end a { font: 500 17px/1.4 var(--text); }
  .menu__end select { background: none; border: 0; color: var(--ink); font-weight: 500; min-height: 44px; }
  .stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job { grid-column: 1 / -1; }
  .cols, .offer, .page__head { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo, .steps { grid-template-columns: minmax(0, 1fr); }
  .vm__main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .langs { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; border-inline-end: 0; padding: 10px 20px; scrollbar-width: none; }
  .langs button { flex: none; width: auto; gap: 8px; }
  .addid .form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  :root { --cap: 56px; --cap-top: 10px; }
  body { font-size: 16px; }
  .bar { padding-block: 0; padding-inline: 16px 6px; gap: 8px; }
  .logo { font-size: 22px; }
  .bal b { font-size: 20px; }
  .bal span { font-size: 11px; }
  .bar__end { gap: 10px; }
  .bar__menu { padding: 0 14px; }
  .page { padding-top: 16px; }
  .page__head { margin-bottom: 28px; }
  .page__head h1 { font-size: 17vw; }
  .scene { padding-top: 16px; }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  /* На телефоне сразу за текстом кнопка и голос, качество и настройки ниже */
  .stage__left { display: contents; }
  .stage__text { order: 1; }
  .stage__mid { order: 2; }
  .stage__opts { order: 3; }
  .job { order: 4; }
  .lab--modes { margin-top: 4px; }
  .mode { padding: 0 12px; font-size: 15px; }
  .script[data-fit="l"] { --fs: 11.5vw; }
  .script[data-fit="m"] { --fs: 8.6vw; }
  .script[data-fit="s"] { --fs: 7vw; }
  .script[data-fit="long"] { font-size: 17px; }
  .gob { width: min(100%, 300px); margin-top: 0; }
  .wave { height: 48px; }
  .play { width: 60px; height: 60px; }
  .row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .row__when { grid-column: 2; text-align: start; grid-row: 2; margin-top: -4px; }
  .row__acts { grid-column: 1 / -1; justify-content: flex-start; }
  .row__acts details[open] > div { inset-inline-start: 0; inset-inline-end: auto; }
  .big { grid-template-columns: minmax(0, 1fr); }
  .big b { font-size: 22vw; }
  .big b.is-text { font-size: 15vw; }
  .stats b { font-size: 13vw; }
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .price { font-size: 24vw; }
  .pay__row { grid-template-columns: minmax(0, 1fr); }
  .pay__row .btn { width: 100%; }
  dialog { border-radius: 24px 24px 0 0; max-width: 100vw; margin: auto 0 0; max-height: 92dvh; }
  .vm { height: 92dvh; }
  .dlg__head { padding-block: 18px 6px; padding-inline: 20px 16px; }
  .dlg__body { padding: 6px 20px 22px; }
  .dlg__foot { padding: 0 20px 22px; }
  .vm__top { padding: 0 16px 12px; }
  .vm__filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .vm__filters select, .vm__filters .tog, .vm__reset { flex: none; }
  .langs { padding: 10px 16px; }
  .vlist { padding: 0 16px 20px; }
  .vrow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .vrow__cur, .vrow__del { grid-column: 2; justify-self: start; }
  .vrow__name { font-size: 22px; }
  .code-wrap .copy { position: static; margin-top: 8px; }
  .table--stack thead { display: none; }
  .table--stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; border-top: 2px solid var(--line); padding: 12px 0; }
  .table--stack td { border: 0; padding: 0; }
  .table--stack td.wide { grid-column: 1 / -1; }
  .table--stack .acts { justify-content: flex-start; }
  .tools .seg { overflow-x: auto; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Оформление подписки (язык блока цен главной design-v7) ---------- */
.voice__row a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; min-height: 40px; display: inline-flex; align-items: center; }
.sub__active { margin: -12px 0 32px; }
.pricing { --D: min(52vw, 760px); overflow: hidden; }
.pricing__h { min-height: 2.1em; max-width: 22em; }
.pricing__h em { font-style: normal; color: var(--yellow); }
.price__stage, .price__row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 5fr); gap: 16px; }
.price__stage { height: clamp(220px, 26vw, 380px); margin-top: 12px; border-bottom: 2px solid var(--line); overflow-y: clip; overflow-x: visible; }
.price__cell { position: relative; height: 100%; }
.price__cell:nth-child(1) { z-index: 2; }
.price__cell:nth-child(2) { z-index: 1; }
.price__cell svg { position: absolute; left: 50%; bottom: 0; width: var(--D); height: var(--D); margin-left: calc(var(--D) / -2); overflow: visible; transform-origin: 50% 100%; transform: scale(var(--k, 0)); transition: transform .35s cubic-bezier(.2, .9, .25, 1.1); }
.price__row { margin: 14px 0 28px; }
.price__row b { display: block; font: 900 clamp(52px, 6.4vw, 104px)/.86 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.price__row > div:first-child b { color: var(--yellow); }
.price__row span { display: block; font-weight: 600; }
.price__row small { display: block; font-size: 15px; color: var(--mute); }
.rail { --th: 64px; }
.rail input[type="range"] { display: block; width: 100%; height: var(--th); border-radius: 999px; cursor: grab; color: var(--cream); background: linear-gradient(to right, var(--yellow) calc(var(--th) / 2 + var(--f, .5) * (100% - var(--th))), rgb(255 243 214 / .14) 0); }
.rail input[type="range"]:active { cursor: grabbing; }
.rail input[type="range"]::-webkit-slider-runnable-track { height: var(--th); background: none; }
.rail input[type="range"]::-webkit-slider-thumb { width: var(--th); height: var(--th); margin-top: 0; border-radius: 50%; background: var(--cream); border: 6px solid var(--ink); box-shadow: 0 0 0 2px var(--cream); }
.rail input[type="range"]::-moz-range-track { height: var(--th); background: none; }
.rail input[type="range"]::-moz-range-progress { background: none; }
.rail input[type="range"]::-moz-range-thumb { box-sizing: border-box; width: var(--th); height: var(--th); border-radius: 50%; background: var(--cream); border: 6px solid var(--ink); }
.rail input[type="range"]:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
.rail__marks { position: relative; height: 26px; margin-top: 10px; font-size: 15px; color: var(--mute); }
.rail__marks span { position: absolute; inset-inline-start: calc(var(--th) / 2 + var(--i) / 4 * (100% - var(--th))); transform: translateX(-50%); white-space: nowrap; }
.sub__notes { font-size: 16px; line-height: 1.5; max-width: 40em; }
.sub__notes p + p { margin-top: 12px; }
.methods { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 640px; }
.method { position: relative; display: block; cursor: pointer; }
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method > span { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 14px; align-items: center; padding: 16px 20px; border-radius: 20px; box-shadow: inset 0 0 0 2px var(--line); transition: background .15s, box-shadow .15s; }
.method > span::before { content: ""; grid-row: 1 / 3; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; }
.method strong { font: 800 28px/1 var(--display); }
.method small { grid-column: 2; font-size: 15px; color: var(--mute); }
.method:hover > span { box-shadow: inset 0 0 0 2px rgb(255 243 214 / .45); }
.method input:checked + span { background: var(--cream); color: var(--ink); box-shadow: none; }
.method input:checked + span::before { box-shadow: inset 0 0 0 7px var(--ink); }
.method input:checked + span small { color: rgb(27 13 43 / .7); }
.method input:focus-visible + span { outline: 3px solid var(--cream); outline-offset: 3px; }
#pay-form .field { max-width: 640px; }
#pay-form .form__row { align-items: center; gap: 12px 20px; }
#pay-sum { font: 800 28px/1 var(--display); color: var(--cream); }

/* ---------- Мои голоса ---------- */
.mvrow { grid-template-columns: auto minmax(0, 1fr) auto auto; margin: 0; padding: 12px 14px; }
.mvrow .vrow__pick { display: grid; align-content: center; }
.mvrow .vrow__meta { overflow-wrap: anywhere; }
.mvrow.is-current .vrow__del { color: inherit; }
.mv__form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); max-width: none; align-items: end; }
.mv__form .form__row { grid-column: 1 / -1; }

@media (max-width: 1023px) {
  .mv__form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .pricing { --D: 96vw; }
  .pricing__h { min-height: 3.4em; }
  .price__stage, .price__row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 4fr); gap: 8px; }
  .price__stage { height: 58vw; }
  .price__row b { font-size: 12vw; }
  .price__row span { font-size: 14px; line-height: 1.2; }
  .price__row small { font-size: 13px; }
  .rail { --th: 52px; }
  .rail__marks { font-size: 12px; }
  .method > span { padding: 14px 16px; }
  .method strong { font-size: 24px; }
  #pay-form .btn { width: 100%; }
  #pay-sum { order: -1; }
  .mvrow { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 14px; padding: 12px 0; }
  .mvrow .vrow__pick { grid-column: 2 / -1; }
  .mvrow > .btn, .mvrow > .vrow__cur { grid-column: 2; grid-row: 2; justify-self: start; }
  .mvrow > .vrow__del { grid-column: 3; grid-row: 2; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  .price__cell svg { transition: none; }
}

/* ---------- Языки (i18n.js): шрифты для письменностей, которых нет в Sofia Sans и Golos Text ---------- */
/* Арабский и деванагари: Noto Sans в узкой ширине (ось wdth 62.5) и тяжёлом весе — заголовки остаются плотными и высокими,
   как Sofia Sans Extra Condensed; латиница и цифры по-прежнему из Sofia и Golos. Японский: Noto Sans JP 800–900.
   Вьетнамский: у Golos и Sofia нет вьетнамских букв с двумя диакритиками, поэтому целиком Noto Sans (узкий для заголовков). */
:root:lang(ar) { --display: "Sofia Sans Extra Condensed", "Noto Sans Arabic", sans-serif; --text: "Golos Text", "Noto Sans Arabic", system-ui, sans-serif; }
:root:lang(hi) { --display: "Sofia Sans Extra Condensed", "Noto Sans Devanagari", sans-serif; --text: "Golos Text", "Noto Sans Devanagari", system-ui, sans-serif; }
:root:lang(ja) { --display: "Sofia Sans Extra Condensed", "Noto Sans JP", sans-serif; --text: "Golos Text", "Noto Sans JP", system-ui, sans-serif; }
:root:lang(vi) { --display: "Noto Sans", "Arial Narrow", sans-serif; --text: "Noto Sans", system-ui, sans-serif; }
:is(:lang(ar), :lang(hi), :lang(vi)) :is(.logo, .page__head h1, h2.h, h3.h, .script, .gob span, .limit strong, .voice__name, .job__status, .row__text, .empty h3, .big b, .stats b, .price, .pay__row strong, .table b, .funnel b, .steps strong, .docs dt, .dlg__head h2, .vrow__name, .tags h3, .menu a, .method strong, #pay-sum, .price__row b, .bal b) { font-variation-settings: "wdth" 62.5; }
:lang(ar) .script[data-fit="long"], :lang(hi) .script[data-fit="long"], :lang(vi) .script[data-fit="long"] { font-variation-settings: normal; }
/* Надстрочные знаки деванагари и арабские точки не помещаются в межстрочный .86–.96 латиницы */
:is(:lang(ar), :lang(hi)) :is(.page__head h1, h2.h, h3.h, .script:not([data-fit="long"]), .gob span, .limit strong, .voice__name, .job__status, .row__text, .empty h3, .big b.is-text, .dlg__head h2, .vrow__name, .menu a, .method strong, .steps strong, .docs dt, .pay__row strong) { line-height: 1.22; }
:lang(vi) :is(.page__head h1, h2.h, .script:not([data-fit="long"]), .job__status, .empty h3, .big b.is-text, .dlg__head h2) { line-height: 1.08; }
:lang(ja) :is(.page__head h1, h2.h, .script:not([data-fit="long"]), .job__status, .empty h3, .big b.is-text, .dlg__head h2, .limit strong) { line-height: 1.12; }
/* Иероглифы и кана вдвое шире узкой латиницы: крупные заголовки японского интерфейса мельче */
:lang(ja) .page__head h1 { font-size: clamp(44px, 5.6vw, 88px); }
:lang(ja) h2.h { font-size: clamp(30px, 3.2vw, 48px); }
:lang(ja) .job__status { font-size: clamp(38px, 3.9vw, 64px); }
:lang(ja) .gob span { font-size: clamp(28px, 2.7vw, 42px); }
:lang(ja) .empty h3, :lang(ja) .dlg__head h2 { font-size: clamp(28px, 2.6vw, 40px); }
:lang(ja) .big b.is-text { font-size: clamp(38px, 4vw, 64px); }
:lang(ja) .limit strong { font-size: 30px; }
:lang(ja) .script[data-fit="l"] { --fs: clamp(32px, 3.5vw, 54px); }
:lang(ja) .script[data-fit="m"] { --fs: clamp(26px, 2.6vw, 38px); }
:lang(ja) .script[data-fit="s"] { --fs: clamp(20px, 1.8vw, 26px); }
/* Длинные немецкие слова и т. п.: перенос по слогам там, где язык это умеет */
:is(:lang(de), :lang(fr), :lang(es), :lang(pt), :lang(id)) :is(.page__head h1, h2.h, .job__status, .empty h3, .dlg__head h2, .gob span, .limit strong, .method strong, .steps strong) { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
:lang(ja) :is(.page__head h1, h2.h, .job__status, .empty h3, .dlg__head h2) { word-break: auto-phrase; }
/* Подпись в кляксе не выходит за внутреннее кольцо: длинные слова переносятся внутри него (русская версия не меняется) */
:root:not(:lang(ru)) .gob span { max-width: 54%; text-align: center; }

/* ---------- Письмо справа налево (ar) ---------- */
/* Код, ключи, адреса и плеер остаются слева направо; кляксы и значок play не зеркалятся */
code, .inline-code, .code, .key code, .refbox .input, input[type="email"], input[name="id"], input[name="wallet"], .player { direction: ltr; unicode-bidi: isolate; }
.code { text-align: left; }
[dir="rtl"] .refbox .input, [dir="rtl"] input[type="email"], [dir="rtl"] input[name="id"], [dir="rtl"] input[name="wallet"] { text-align: right; }
[dir="rtl"] .link--arrow::after { content: "←"; }
[dir="rtl"] .link--arrow:hover::after { transform: translateX(-4px); }
[dir="rtl"] .back::before { content: "→"; }
[dir="rtl"] .back:hover::before { transform: translateX(4px); }
[dir="rtl"] .editor__rule { transform-origin: right; }
[dir="rtl"] input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(to left, currentColor var(--f, 50%), color-mix(in srgb, currentColor 22%, transparent) 0); }
[dir="rtl"] .rail input[type="range"] { background: linear-gradient(to left, var(--yellow) calc(var(--th) / 2 + var(--f, .5) * (100% - var(--th))), rgb(255 243 214 / .14) 0); }
[dir="rtl"] .rail input[type="range"]::-webkit-slider-runnable-track { background: none; }
[dir="rtl"] .rail__marks span { transform: translateX(50%); }
[dir="rtl"] .card { border-radius: 22px 22px 6px 22px; }
[dir="rtl"] .vm__filters select { padding: 0 16px 0 34px; background-position: left 14px center; }
[dir="rtl"] .tune summary::after { margin: -4px 0 0 4px; }
