/* Universal Music Tools — «Студия». Токены взяты из окна подписи в Telegram. */

:root {
  --bg: #0A0A0A;
  --card: #141414;
  --raised: #1C1C1C;
  --hover: #181818;
  --border: #252525;
  --divider: #1E1E1E;
  --line: #333333;
  --sidebar-line: #1C1C1C;
  --text: #FFFFFF;
  --light: #BDBDBD;
  --mid: #8A8A8A;
  --dim: #666666;
  --danger: #E5534B;
  --ok: #9BC48A;


  --r-card: 16px;
  --r-btn: 10px;
  --sidebar-w: 248px;
  /* Высота самой панели, её отступ от края и суммарное занятое место снизу.
     Панель плавающая, поэтому это разные величины. */
  --tabbar-h: 56px;
  --tabbar-gap: 10px;
  --tabbar-space: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  /* Высота панели Telegram в полноэкранном режиме. Ставится из telegram.js,
     в браузере остаётся нулём. */
  --tg-top: 0px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--light); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
svg { flex-shrink: 0; display: block; }
[hidden] { display: none !important; }
/* Текст только для читалок экрана: не виден, но объявляется голосом.
   display:none её бы тоже скрыл — от читалки в том числе. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.mid { color: var(--mid); }
.light { color: var(--light); }
.grow { flex-grow: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { height: 46px; width: auto; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ─── Каркас ─────────────────────────────────────────────────────────────── */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  width: var(--sidebar-w); flex-shrink: 0;
  padding: 22px 14px; border-right: 1px solid var(--sidebar-line);
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 8px 22px; }
.brand img { height: 30px; width: auto; }
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--dim); }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; color: var(--mid);
}
.nav-item:hover { color: var(--text); background: var(--hover); }
.nav-item.active { background: #161616; border-color: var(--border); color: var(--text); font-weight: 600; }
.nav-badge { font-family: var(--mono); font-size: 11px; background: var(--text); color: var(--bg); border-radius: 6px; padding: 1px 6px; }
.nav-count { font-family: var(--mono); font-size: 11px; color: var(--dim); }

.side-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px;
  background: #111111; display: flex; flex-direction: column; gap: 8px;
}
.side-card-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mid); }

.main { flex-grow: 1; min-width: 0; padding: 28px 32px 48px; }
.main.with-player { padding-bottom: 110px; }

.tabbar { display: none; }

/* ─── Заголовок страницы ─────────────────────────────────────────────────── */

.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; animation: rise .25s ease-out; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.page-sub { font-size: 13px; color: var(--dim); margin-top: 4px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 12px -6px; min-height: 36px; font-size: 14px; color: var(--light); }
.back-link:hover { color: var(--text); }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }

/* ─── Карточки и строки ──────────────────────────────────────────────────── */

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); animation: rise .25s ease-out; }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; flex-wrap: wrap; }
.card-title { font-size: 16px; font-weight: 700; }
.card-count { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.card-link { font-size: 13px; color: var(--mid); margin-left: auto; }
.card-body { padding: 0 20px; }
.card-foot { padding: 12px 20px 16px; }
.card-note { padding: 14px 20px 18px; color: var(--dim); font-size: 13px; }

.row {
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 10px 0;
  border-top: 1px solid var(--divider);
}
.row:first-child { border-top: none; }
.row-title { font-size: 14px; font-weight: 600; }
.row-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.row-link { cursor: pointer; }
.row-link:hover .row-title { color: var(--light); }
/* Отклик в момент касания, а не когда откроется следующий экран: у пальца
   нет наведения, и без этого кажется, что нажатие не сработало */
.row-link:active, .table-row:active, .m-row:active { background: var(--hover); transition: none; }
.row-icon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--raised);
  display: grid; place-items: center; flex-shrink: 0; color: var(--text);
}
.kv { display: flex; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--divider); font-size: 14px; }
.kv:first-child { border-top: none; }
.kv-key { color: var(--mid); flex-grow: 1; }
.kv-val { font-weight: 600; text-align: right; }

.table-head, .table-row {
  display: grid; gap: 12px; align-items: center; padding: 0 20px;
  /* Второй стороне нужно место под два кружка и имя: с прежней долей
     имя обрезалось до одной буквы */
  grid-template-columns: 64px minmax(0, 1.2fr) minmax(150px, 1.1fr) 96px 96px 150px;
}
.table-head { height: 34px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; border-top: 1px solid var(--divider); }
.table-row { min-height: 50px; font-size: 14px; border-top: 1px solid var(--divider); cursor: pointer; }
.table-row:hover { background: var(--hover); }
.table-row .cell-num { font-family: var(--mono); font-size: 13px; color: var(--mid); }
.table-row .cell-title { font-weight: 600; }
.table-row .cell-dim { color: var(--light); }
.table-row .cell-price { font-family: var(--mono); font-size: 13px; text-align: right; }
.table-row.muted .cell-title, .table-row.muted .cell-dim, .table-row.muted .cell-price { color: var(--dim); }
.t-right { text-align: right; }
.table-mobile { display: none; }
.sticky-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-foot .btn.grow { flex: 1 1 0; }

.empty { padding: 36px 20px; text-align: center; color: var(--dim); font-size: 14px; }
.empty-title { color: var(--light); font-weight: 600; margin-bottom: 4px; }

/* ─── Пилюли ─────────────────────────────────────────────────────────────── */

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); white-space: nowrap; }
.pill-solid { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.pill-muted { color: var(--dim); border-color: var(--border); font-weight: 500; }
.pill-dashed { color: var(--dim); border-style: dashed; font-weight: 500; }
.pill-danger { color: var(--danger); border-color: #4a2523; }

/* ─── Кнопки ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: var(--r-btn);
  border: 1px solid var(--line); background: transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s, transform .1s;
}
.btn:hover { background: var(--hover); border-color: #444; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.btn-primary:hover { background: #E6E6E6; border-color: #E6E6E6; }
.btn-ghost { border-color: transparent; color: var(--light); }
.btn-ghost:hover { background: var(--hover); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--danger); border-color: #4a2523; }
.btn-danger:hover { background: #1f1111; border-color: #6b2f2b; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 52px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn .spinner { width: 14px; height: 14px; }

/* flex-shrink: 0 обязателен: внутри строки-флекса кружок сжимался по
   ширине и ехал овалом */
.spinner {
  width: 18px; height: 18px; flex: 0 0 18px; box-sizing: border-box;
  border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; display: inline-block;
}

.play {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.play:hover { border-color: #555; }
.play.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.play:disabled { opacity: .35; cursor: default; }

/* ─── Поля ───────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; color: var(--mid); }
.field-hint { font-size: 12px; color: var(--dim); }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--bg); border: 1px solid #2A2A2A; border-radius: 12px;
  font-size: 15px; outline: none; transition: border-color .15s;
}
.textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--text); }
.input::placeholder { color: var(--dim); }
.input.invalid { border-color: var(--danger); }
.input.valid { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.input.invalid:focus { box-shadow: 0 0 0 1px var(--danger); }
.pro-old { display: block; font-size: 12px; color: var(--dim); text-decoration: line-through; text-decoration-thickness: 1px; text-align: right; }
.pro-fine.pro-promo-ok { color: var(--ok); }
.pro-fine.pro-promo-bad { color: var(--danger); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mid) 50%), linear-gradient(135deg, var(--mid) 50%, transparent 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input-mono { font-family: var(--mono); }
.search { position: relative; }
.search .input { padding-left: 40px; height: 42px; background: var(--card); border-color: var(--border); border-radius: 10px; font-size: 14px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.form-error { background: #1f1111; border: 1px solid #4a2523; color: #F2A09B; border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.notice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 8px 8px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text); flex-shrink: 0; }

/* Переключатель в одну строку. Раньше стоял flex-wrap: wrap, и на телефоне
   четвёртый фильтр уезжал на вторую строку — панель разъезжалась. Теперь
   лишнее уходит за край, а полоса прокручивается пальцем. */
.seg { display: inline-flex; gap: 4px; background: #0F0F0F; border: 1px solid #222; border-radius: 10px; padding: 3px; flex-wrap: nowrap; }
.seg button { flex-shrink: 0; }
/* Обёртка, которая и прокручивается. Полосу прокрутки прячем: она тут
   только мешает, а край обрезанной кнопки и так подсказывает, что есть ещё. */
.seg-scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
/* Шапка карточки тоже бывает прокручиваемой — полосу прячем и там,
   иначе под переключателем появляется серая рейка во всю ширину */
.seg-scroll::-webkit-scrollbar,
.card-head::-webkit-scrollbar { display: none; }
.card-head { scrollbar-width: none; }
.seg button { border: 0; background: transparent; color: var(--mid); padding: 6px 12px; border-radius: 7px; font-size: 13px; cursor: pointer; min-height: 32px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--border); color: var(--text); font-weight: 600; }
.seg-count { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: 4px; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice {
  min-height: 60px; padding: 10px 14px; border-radius: 12px; border: 1px solid #2A2A2A;
  background: transparent; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.choice:hover { border-color: #444; }
.choice.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.choice-title { font-size: 14px; font-weight: 700; }
.choice-sub { font-family: var(--mono); font-size: 12px; color: var(--mid); }
.choice.on .choice-sub { color: #333; }

.check {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid #444; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--bg);
}
.check.on { background: var(--text); border-color: var(--text); }

.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #2A2A2A; border: 0; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--mid); transition: transform .2s, background .2s; }
.switch.on { background: var(--text); }
.switch.on::after { transform: translateX(18px); background: var(--bg); }

/* ─── Подпись ────────────────────────────────────────────────────────────── */

.sig-box { background: var(--raised); border: 1px solid var(--border); border-bottom: none; border-radius: 10px 10px 0 0; aspect-ratio: 8 / 3; display: grid; place-items: center; overflow: hidden; }
.sig-box img { width: 100%; height: 100%; object-fit: contain; filter: invert(1); }
.sig-line { height: 1px; background: #404040; }
.sig-pad { width: 100%; aspect-ratio: 8 / 3; display: block; touch-action: none; cursor: crosshair; background: var(--raised); border: 1px solid var(--border); border-bottom: none; border-radius: 10px 10px 0 0; }
.sig-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sig-slot { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sig-slot.pending { border-style: dashed; border-color: var(--line); }
.sig-slot .sig-box { aspect-ratio: auto; height: 64px; }

/* ─── Шторка и диалог ────────────────────────────────────────────────────── */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .62);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .18s ease-out;
  /* Жест, начатый на подложке, дальше не идёт: на странице свайпов он
     доставался карточке, и она уезжала из-под открытой шторки */
  touch-action: none;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 520px; max-height: min(88vh, 900px);
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
  animation: pop .2s cubic-bezier(.2, .9, .3, 1.1);
}
.sheet-wide { max-width: 680px; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
/* Закрытие — тот же путь в обратную сторону. Шторку снизу на телефоне
   ведёт пружина (ui.js, класс js-motion), CSS-анимации ей не мешают */
.sheet-backdrop.closing { pointer-events: none; }
.sheet-backdrop.closing:not(.js-motion) { animation: fade-out .18s ease-in forwards; }
.sheet-backdrop.closing:not(.js-motion) .sheet { animation: pop-out-sheet .18s ease-in forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-out-sheet { to { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet-backdrop.js-motion, .sheet-backdrop.js-motion .sheet { animation: none; }
.sheet-grab { display: none; }
/* Тянем за шапку, подвал или ползунок — страница под шторкой стоит.
   На саму .sheet такой запрет ставить нельзя: он накрыл бы и
   прокрутку содержимого, которая здесь нужна */
.sheet-head, .sheet-foot, .range, .range-in { touch-action: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 18px 12px 8px 22px; }
.sheet-title { font-size: 20px; font-weight: 700; flex-grow: 1; }
.sheet-body { padding: 8px 22px 22px; overflow-y: auto; overscroll-behavior: contain;
  /* Внутри шторки вертикаль нужна: содержимое длиннее экрана */
  touch-action: pan-y; }
.sheet-foot { padding: 14px 22px 22px; border-top: 1px solid var(--divider); display: flex; gap: 10px; flex-wrap: wrap; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; padding: 12px 16px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: rise .2s ease-out; text-align: center; pointer-events: auto; cursor: pointer; }
.toast.error { background: #2a1414; color: #F7B7B2; border: 1px solid #4a2523; }
.toast.leaving { animation: toast-out .2s ease-in forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ─── Плеер ──────────────────────────────────────────────────────────────── */

.player {
  position: fixed; z-index: 40; bottom: 16px;
  left: calc(var(--sidebar-w) + 32px); right: 32px;
  padding: 8px 10px 10px; overflow: hidden;
  background: rgba(24, 24, 24, .92);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid #2A2A2A; border-radius: 16px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .7); animation: rise .2s ease-out;
}
.player-top { display: flex; align-items: center; gap: 12px; }
.player-info { min-width: 0; flex-grow: 1; }
.player-info .row-title { font-size: 14px; }
.player-time { font-size: 11px; margin-top: 1px; }

/* Обложка и кнопка воспроизведения — один элемент: значок лежит поверх
   картинки. Отдельный кружок рядом занимал место и означал то же самое. */
.player-cover {
  position: relative; width: 46px; height: 46px; flex-shrink: 0; padding: 0;
  border-radius: 10px; overflow: hidden; cursor: pointer;
  background: var(--raised); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text);
  transition: transform .1s ease, border-color .15s;
}
.player-cover:hover { border-color: #444; }
.player-cover:active { transform: scale(.95); }
.player-cover.has-image { border-color: transparent; }
.player-art { position: absolute; inset: 0; display: grid; place-items: center; }
.player-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Значок поверх картинки. Затемнение — чтобы белый значок читался на
   любой обложке, включая светлую. */
.player-glyph {
  position: relative; z-index: 1;
  width: 100%; height: 100%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .42);
  transition: background .15s;
}
.player-cover:hover .player-glyph { background: rgba(0, 0, 0, .55); }
/* Без обложки затемнять нечего — там и так тёмная плашка */
.player-cover:not(.has-image) .player-glyph { background: transparent; }

/* Полоса перемотки. Высота области касания заметно больше видимой линии:
   пальцем в две точки не попасть, а промах ощущается как «не работает». */
.player-seek {
  position: relative; height: 22px; cursor: pointer;
  touch-action: none;            /* иначе жест уводит в прокрутку страницы */
  flex-shrink: 0;
}
.player-seek::before {
  content: ""; position: absolute; left: 0; right: 0; top: 10px;
  height: 3px; background: #3A3A3A; border-radius: 2px;
}
.player-seek-fill {
  position: absolute; left: 0; top: 10px; height: 3px; width: 0;
  background: var(--text); border-radius: 2px;
}
.player-seek-knob {
  position: absolute; top: 5px; left: 0; width: 13px; height: 13px;
  margin-left: -6.5px; border-radius: 50%; background: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
  transition: transform .12s ease;
}
.player-seek:hover .player-seek-knob,
.player-seek.dragging .player-seek-knob { transform: scale(1.25); }
.player-seek:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
/* Длительность ещё не пришла — тянуть нечего, и это видно */
.player-seek.waiting { opacity: .4; pointer-events: none; }
.player-seek.waiting .player-seek-knob { display: none; }

/* ─── Вход и создание профиля ────────────────────────────────────────────── */

.center-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px calc(32px + var(--safe-b)); }
.login-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.login-card img.logo { height: 64px; width: auto; }
.login-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.login-text { color: var(--mid); font-size: 15px; max-width: 340px; }
.tg-slot { min-height: 48px; display: grid; place-items: center; }
.onboard { width: 100%; max-width: 560px; padding: 32px 16px calc(48px + var(--safe-b)); margin: 0 auto; }
.role-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.onboard { position: relative; }
.onboard > :not(.onboard-scene) { position: relative; z-index: 1; }
.onboard-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.onboard-scene .sc { position: absolute; object-fit: contain; }
.onboard-scene .sc-a { width: min(40vw, 380px); right: -9vw; top: 8vh; opacity: .85; filter: blur(2px); animation: sc-float 11s ease-in-out infinite; }
.onboard-scene .sc-b { width: min(34vw, 300px); left: -8vw; bottom: 8vh; opacity: .55; filter: blur(9px); animation: sc-float 13s ease-in-out -4s infinite; }
.onboard-scene .sc-c { width: min(22vw, 200px); right: 14vw; bottom: -4vh; opacity: .4; filter: blur(16px); animation: sc-float 15s ease-in-out -8s infinite; }
@keyframes sc-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@media (max-width: 560px) { .onboard-scene .sc-a { width: 40vw; right: -12vw; top: 1vh; opacity: .35; filter: blur(5px); } .onboard-scene .sc-b { width: 44vw; left: -16vw; bottom: 2vh; opacity: .3; } .onboard-scene .sc-c { display: none; }
  .role-card { background: radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, .05), transparent 62%), rgba(18, 18, 18, .97); }
  .onboard-title, .onboard-sub, .onboard-note { position: relative; z-index: 2; } }
.onboard-title { margin: 0 0 10px; font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -.03em; line-height: 1.05; }
.onboard-sub { margin: 0 0 24px; color: var(--mid); font-size: 15px; line-height: 1.55; max-width: 44ch; }
.onboard-note { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--mid); }
.role-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; text-align: left; cursor: pointer; outline: none;
  padding: 22px 20px 20px; border-radius: 22px; border: 1px solid var(--border); color: var(--text);
  background: radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, .06), transparent 62%), rgba(20, 20, 20, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  font-family: var(--font); transition: border-color .2s, background .2s, transform .12s;
  animation: role-in .5s cubic-bezier(.2, .7, .2, 1) both;
}
.role-card:nth-child(2) { animation-delay: .08s; }
@keyframes role-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.role-card:hover { border-color: #4a4a4a; transform: translateY(-3px); }
.role-card:focus-visible { border-color: var(--text); }
.role-card.press, .role-card:active { transform: scale(.985); border-color: #555; }
.role-ic { width: 52px; height: 52px; border-radius: 15px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text); margin-bottom: 4px; }
.role-title { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.role-promise { font-size: 14.5px; line-height: 1.4; color: var(--light); }
.role-points { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.role-points li { position: relative; padding-left: 18px; font-size: 13.5px; line-height: 1.4; color: var(--mid); }
.role-points li::before { content: "–"; position: absolute; left: 0; color: var(--dim); }
.role-cta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14.5px; font-weight: 700; transition: background .2s; }
.role-card:hover .role-cta { background: #E6E6E6; }
.role-card.on { border-color: var(--text); }
.role-card.on .role-cta { background: #E6E6E6; }
.role-cards.is-busy .role-card:not(.on) { opacity: .4; pointer-events: none; }
@media (min-width: 900px) { .onboard { max-width: 720px; } }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .role-card, .onboard-scene .sc { animation: none; } }
@media (max-width: 560px) { .role-cards { grid-template-columns: minmax(0, 1fr); } .onboard-title { font-size: 28px; } }

/* ─── Обучалка при первом заходе ─────────────────────────────────────────── */

.tour-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.tour-body { min-height: 268px; display: flex; flex-direction: column; align-items: flex-start; }
.tour-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--raised); border: 1px solid var(--border); color: var(--text); margin-bottom: 16px;
}
.tour-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 10px; }
.tour-text { font-size: 15px; line-height: 1.55; color: var(--light); margin: 0 0 16px; }
.tour-hint {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono);
  font-size: 12px; color: var(--mid); background: var(--raised);
  border: 1px solid var(--border); border-radius: var(--r-btn); padding: 7px 10px;
}
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.tour-dot { width: 22px; height: 3px; border-radius: 2px; background: var(--line); transition: background .2s; }
.tour-dot.on { background: var(--text); }

/* Первый экран артиста: одна главная плитка и две второстепенные */
.fs-list { display: flex; flex-direction: column; gap: 10px; }
.fs-tile {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  transition: transform .15s var(--ease-out, ease-out), border-color .15s;
}
.fs-tile:active { transform: scale(.98); }
.fs-tile.main { background: #e9e9e9; color: #0a0a0a; border-color: transparent; padding: 20px 16px; }
.fs-art { width: 56px; height: 56px; object-fit: contain; flex: none; }
.fs-tile.main .fs-art { width: 72px; height: 72px; }
.fs-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.fs-title { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.fs-tile.main .fs-title { font-size: 19px; }
.fs-sub { font-size: 13.5px; line-height: 1.4; color: var(--mid); }
.fs-tile.main .fs-sub { color: #444; }
.fs-pill { margin-top: 6px; font: 600 11px var(--body); padding: 4px 10px; border-radius: 999px; background: #0a0a0a; color: #fff; }
@media (hover: hover) and (pointer: fine) { .fs-tile:hover { border-color: #3a3a3a; } }
@media (prefers-reduced-motion: reduce) { .fs-tile { transition: none; } }

@media (max-width: 560px) {
  .tour-body { min-height: 300px; }
  .tour-title { font-size: 19px; }
}

/* ─── Колесо фортуны ─────────────────────────────────────────────────────── */

/* Аркадный автомат: корпус — снимок, экран живой. Всё внутри экрана свёрстано
   в координатах снимка (сцена 580×895, экран 402×278 в точке 85;167), а на
   странице сцена масштабируется целиком — так разметка совпадает с картинкой
   при любой ширине и не рассыпается на телефоне.

   Цвета здесь нет вовсе — только свет. Приз выделяется тем, что он ярче
   и чище остального: холодный белый на графите. Золото пробовали, и оно
   сразу превращало кабинет в игровой клуб. */

.arcade-room {
  --lit: #EEF1F4;
  --lit-dim: rgba(238, 241, 244, .16);
  /* Автомат вертикальный: шире 560 он перестаёт помещаться в экран целиком,
     а разглядывать его по частям незачем */
  max-width: 560px; margin: 0 auto;
}

.arcade { position: relative; width: 100%; aspect-ratio: 580 / 895; }
.arcade-stage {
  position: absolute; top: 0; left: 0;
  width: 580px; height: 895px;
  transform-origin: top left;
}
.arcade-img { display: block; width: 580px; height: 895px; user-select: none; }

/* Экран — ровно на месте зелёной заливки снимка */
.arcade-screen {
  /* На пару пикселей шире вырезанного экрана: иначе по краю видно рамку
     корпуса, а не наш экран */
  position: absolute; left: 83px; top: 165px; width: 406px; height: 282px;
  overflow: hidden; border-radius: 4px;
  background: radial-gradient(120% 90% at 50% 40%, #14171A 0%, #090B0D 70%, #050607 100%);
  box-shadow: 0 0 70px rgba(238, 241, 244, .05);
}
/* Строчная сетка и блик стекла: без них экран читается наклейкой */
.arcade-scan {
  position: absolute; inset: -100%; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(180deg,
    rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px);
  /* Сетка еле заметно ползёт вниз — от этого экран кажется живым,
     а не картинкой. Три секунды на проход: быстрее начинает рябить */
  animation: scan-drift 3s linear infinite;
}
@keyframes scan-drift {
  from { transform: translateY(0); }
  to { transform: translateY(3px); }
}

/* Экран включается, когда раздел открыли: вспышка и разворот по вертикали,
   как у кинескопа. Один раз при входе — не украшение, а ответ на действие */
@keyframes crt-on {
  0% { transform: scaleY(.004) scaleX(.9); filter: brightness(4); opacity: 0; }
  45% { transform: scaleY(.02) scaleX(1); filter: brightness(3); opacity: 1; }
  100% { transform: none; filter: none; opacity: 1; }
}
.arcade-screen { animation: crt-on .5s cubic-bezier(.2, .8, .3, 1) both; }
.arcade-glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .07) 0%, transparent 42%),
    radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .75) 100%);
}

/* Шкала свайпов — строкой поверх экрана, как индикатор в игре */
.arcade-hud {
  position: relative; z-index: 1; height: 32px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border-bottom: 1px solid rgba(238, 241, 244, .12);
  background: linear-gradient(180deg, rgba(238, 241, 244, .05), transparent);
}
.hud-label { font-size: 10px; letter-spacing: .04em; color: #8E8A7A; white-space: nowrap; }
.hud-bar {
  flex: 1; height: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(0, 0, 0, .6); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .9);
}
.hud-bar-fill {
  height: 100%; border-radius: 999px; transition: width .4s ease;
  background: linear-gradient(90deg, #6E747B, var(--lit));
  box-shadow: 0 0 10px rgba(238, 241, 244, .35);
}
.hud-count { font-family: var(--mono); font-size: 11px; color: var(--lit); }

/* Барабан */
.reel { position: relative; height: 250px; }
.reel-window {
  height: 250px; overflow: hidden;
  /* Края уводим в темноту: строка сверху и снизу «заворачивается» за барабан */
  -webkit-mask-image: linear-gradient(180deg, transparent 1%, #000 30%, #000 70%, transparent 99%);
  mask-image: linear-gradient(180deg, transparent 1%, #000 30%, #000 70%, transparent 99%);
}
.reel-strip { will-change: transform; }
/* На ходу строки смазаны: без этого лента читается как быстрый список,
   а не как разогнанный барабан */
.arcade-screen.spinning .reel-strip { filter: blur(1.4px); }
.arcade-screen.landed .reel-strip { animation: reel-land .3s ease-out; }
@keyframes reel-land {
  0% { transform: translateY(var(--land-y)); }
  55% { transform: translateY(calc(var(--land-y) + 5px)); }
  100% { transform: translateY(var(--land-y)); }
}
.reel-item {
  height: 82px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; padding: 0 16px;
  /* Дальние строки мельче и глуше — лента читается как цилиндр, а не список.
     Какая из них в середине, знает только JS: лента сдвинута произвольно */
  transform: scale(.84); opacity: .4;
  transition: transform .25s ease, opacity .25s ease;
}
.reel-item.on { transform: none; opacity: 1; }
.arcade-screen.spinning .reel-item { transition: none; }
.reel-title {
  font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: #F2EFE6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  text-shadow: 0 0 16px rgba(238, 241, 244, .2);
}
.reel-sub { font-size: 11px; color: #85806F; }
.reel-item.miss .reel-title { color: #4A4A42; font-weight: 600; text-shadow: none; }
.reel-item.miss .reel-sub { color: #35322C; }

/* Средняя строка — выбранная */
.reel-slot {
  position: absolute; left: 0; right: 0; top: 82px; height: 82px;
  border-top: 1px solid var(--lit-dim); border-bottom: 1px solid var(--lit-dim);
  background: linear-gradient(180deg, rgba(238, 241, 244, .07), rgba(238, 241, 244, .015));
  pointer-events: none;
}
.reel-slot::before, .reel-slot::after {
  content: ''; position: absolute; top: 50%; width: 9px; height: 2px;
  margin-top: -1px; border-radius: 1px; background: var(--lit);
  box-shadow: 0 0 8px rgba(238, 241, 244, .55);
}
.reel-slot::before { left: 0; }
.reel-slot::after { right: 0; }
/* Пока крутится — подсвечивать нечего, решение ещё едет */
.arcade-screen.spinning .reel-slot { opacity: .4; }
.arcade-screen.won .reel-slot {
  border-color: var(--lit);
  animation: slot-pulse 1.1s ease-out 2;
}
@keyframes slot-pulse {
  0% { box-shadow: inset 0 0 0 rgba(238, 241, 244, 0); }
  35% { box-shadow: inset 0 0 40px rgba(238, 241, 244, .22); }
  100% { box-shadow: inset 0 0 0 rgba(238, 241, 244, 0); }
}

/* Панель под автоматом: кнопка, выигрыш с кодом и три ссылки */
.arcade-deck { max-width: 460px; margin: 0 auto; padding: 6px 12px 0; }
.slot-panel { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.slot-note { font-size: 12px; color: var(--mid); text-align: center; }

.slot-go {
  color: #0B0C0D; border: 0; font-weight: 800;
  background: linear-gradient(180deg, #FFFFFF, #D7DBDF);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.slot-go:hover { background: linear-gradient(180deg, #FFFFFF, #E6E9EC); }
.slot-go:active { transform: translateY(1px) scale(.995); }
.slot-go { transition: transform .12s ease, background .15s ease; }
.slot-go:disabled { opacity: .5; }

/* Выигрыш проявляется, а не возникает: показывать результат мгновенно
   после четырёх секунд прокрутки — обрывать движение на полуслове */
.slot-win, .slot-miss { animation: win-in .45s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes win-in {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.slot-win { width: 100%; text-align: center; }
.slot-win-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--lit); }
.slot-win.spent .slot-win-title { color: var(--mid); }
.slot-miss { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 6px 0; }
.slot-miss b { font-size: 17px; font-weight: 700; color: var(--light); }
.slot-miss span { font-size: 12px; color: var(--mid); }

/* Код диктуют вслух — крупно и с разрядкой */
.slot-code {
  display: inline-flex; align-items: center; gap: 10px; margin: 8px 0 2px;
  font-family: var(--mono); font-size: 21px; font-weight: 600; letter-spacing: .2em;
  padding: 11px 16px 11px 20px; border-radius: 12px; cursor: pointer;
  color: var(--lit); background: #0A0B0C; border: 1px solid var(--lit-dim);
  transition: border-color .15s, transform .15s;
}
.slot-code:hover { border-color: var(--lit); transform: translateY(-1px); }

.slot-links {
  display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid #1E1E1E;
}

@media (max-width: 560px) {
  .arcade-deck { padding: 2px 4px 0; }
  .slot-links .btn { padding-left: 8px; padding-right: 8px; }
}

/* Человек попросил систему не двигать картинки — значит не двигаем ничего,
   кроме самой прокрутки: без неё раздел просто не работает */
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) {
  .arcade-scan { animation: none; }
  .arcade-screen { animation: none; }
  .arcade-screen.won .reel-slot { animation: none; }
  .slot-win, .slot-miss { animation: none; }
  .reel-item { transition: none; }
}

/* ─── Телефон и планшет ──────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .layout-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: calc(16px + var(--safe-t)) 16px calc(var(--tabbar-space) + 28px + var(--safe-b)); }
  .main.with-player { padding-bottom: calc(var(--tabbar-space) + 96px + var(--safe-b)); }
  .page-head { margin-bottom: 18px; }
  .page-head .page-actions { width: 100%; }
  .page-head .page-actions .btn-primary { flex-grow: 1; }
  .card-head { padding: 16px 14px 10px; }
  .card-body { padding: 0 14px; }
  .card-foot, .card-note { padding-left: 14px; padding-right: 14px; }
  .card-pad { padding: 14px; }

  /* Плавающий док, а не полоса, приклеенная к краю экрана: та же семья,
     что карточки и плеер — скруглённый прямоугольник с рамкой. Активный
     раздел залит белым, как .btn-primary, .pill-solid и .choice.on. */
  .tabbar {
    display: grid; position: fixed; z-index: 45;
    left: 8px; right: 8px; bottom: calc(var(--tabbar-gap) + var(--safe-b));
    height: var(--tabbar-h); padding: 5px; gap: 2px;
    background: rgba(18, 18, 18, .82);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--border); border-radius: 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .55);
  }
  /* Только значки, без подписей: шесть разделов с текстом на телефоне
     теснятся и читаются хуже самих значков. Активный — залитый круг. */
  .tab {
    display: grid; place-items: center; position: relative; color: var(--mid);
    transition: color .18s ease;
  }
  /* Подложка повторяет форму плашки: её радиус минус отступ. Круг внутри
     скруглённого прямоугольника смотрелся чужеродно. */
  .tab::before {
    content: ""; position: absolute; inset: 0; border-radius: 13px;
    background: transparent; transition: background .18s ease, transform .12s ease;
  }
  /* Поднимаем только значок. Раньше правило било по всем детям и возвращало
     скрытую подпись в поток — из-за неё значок уезжал вверх. */
  .tab svg { position: relative; z-index: 1; }
  .tab:active::before { background: var(--hover); transform: scale(.96); }
  .tab.active { color: var(--bg); }
  .tab.active::before { background: var(--text); }
  .tab.active:active::before { background: #E6E6E6; }
  .tab-dot {
    position: absolute; top: 8px; left: 50%; margin-left: 8px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--text); border: 2px solid #121212;
  }
  /* На залитой белым вкладке метка должна быть тёмной, иначе сливается */
  .tab.active .tab-dot { background: var(--bg); border-color: var(--text); }

  .table-head, .table-desktop { display: none; }
  .table-mobile { display: block; }
  .m-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-top: 1px solid var(--divider); cursor: pointer; }
  .m-row:first-child { border-top: none; }
  .m-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .play { width: 44px; height: 44px; }
  .row { min-height: 64px; }
  .mobile-hide { display: none !important; }

  .sheet-backdrop { align-items: flex-end; padding: 0; }
  .sheet, .sheet-wide { max-width: none; max-height: calc(100vh - 56px - var(--safe-t)); border-radius: 22px 22px 0 0; border-bottom: none; animation: slide .25s cubic-bezier(.2, .9, .3, 1); }
  @keyframes slide { from { transform: translateY(40px); opacity: .6; } }
  .sheet-grab { display: block; width: 36px; height: 4px; border-radius: 2px; background: #3A3A3A; margin: 8px auto 0; position: relative; touch-action: none; }
  /* Полоска в 4 пикселя — не цель для пальца: ловим жест с запасом вокруг */
  .sheet-grab::after { content: ''; position: absolute; inset: -12px -60px; }
  .sheet-head { padding: 10px 6px 6px 16px; }
  .sheet-body { padding: 6px 16px 18px; }
  /* Шторка без кнопок снизу: содержимое не должно уходить под полоску «домой» */
  .sheet-body:last-child { padding-bottom: calc(28px + max(var(--safe-b), var(--tg-bottom, 0px))); }
  .sheet-foot { padding: 12px 16px calc(16px + max(var(--safe-b), var(--tg-bottom, 0px))); }

  .sticky-actions {
    position: fixed; z-index: 44; left: 0; right: 0; bottom: calc(var(--tabbar-space) + var(--safe-b));
    padding: 12px 16px; background: rgba(10, 10, 10, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--sidebar-line); display: flex; gap: 10px;
  }
  .sticky-actions .btn { height: 52px; border-radius: 12px; flex-grow: 1; }
  .has-sticky { padding-bottom: 90px; }

  /* Плеер над нижним меню. Перемотка здесь нужна не меньше, чем на
     широком экране, поэтому полоса остаётся — прятали её зря. */
  .player { left: 8px; right: 8px; bottom: calc(var(--tabbar-space) + var(--safe-b) + 8px); }
  .player-cover { width: 44px; height: 44px; }
  /* Подпись кнопки съедает всю ширину — оставляем значок */
  .player-offer-text { display: none; }
  .player-offer { width: 38px; padding: 0; }
  .player-seek { height: 26px; }
  .player-seek::before, .player-seek-fill { top: 12px; height: 4px; }
  .player-seek-knob { top: 6px; width: 16px; height: 16px; margin-left: -8px; }
  .toasts { bottom: calc(var(--tabbar-space) + var(--safe-b) + 84px); }
  .form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) and (min-width: 100000px) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  /* Без движения — но не без отклика: вместо выезда и улёта мягкое
     проявление и растворение на месте, иначе экраны просто подменяются */
  .swipe-card.enter, .sheet, .sheet-backdrop, .toast { animation: fade .2s ease-out !important; }
  .sheet-backdrop.closing, .sheet-backdrop.closing .sheet, .toast.leaving {
    animation: fade-out .18s ease-in forwards !important;
  }
}


/* ─── Полноэкранный режим в Telegram ─────────────────────────────────────── */

/* Класс ставит telegram.js, когда Telegram отдал приложению весь экран.
   Без отступа шапка кабинета уезжает под часы и кнопку «Закрыть». */
/* В полном экране кнопки Telegram есть всегда: отступ не меньше 96px, даже если клиент не прислал размеры */
.tg-fullscreen .main { padding-top: calc(16px + max(var(--tg-top), 96px)); }
.tg-fullscreen .sidebar { padding-top: calc(22px + max(var(--tg-top), 96px)); }
.tg-fullscreen .center-page,
.tg-fullscreen .onboard { padding-top: calc(32px + max(var(--tg-top), 96px)); }
/* Прокрутили — содержимое уходит под часы и кнопки Telegram. Подложка
   цвета фона с мягким краем, чтобы заголовки не наезжали на кнопки */
.tg-fullscreen body::before { content: ''; position: fixed; left: 0; right: 0; top: 0; z-index: 49;
  height: calc(max(var(--tg-top), 96px) + 10px); pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0, var(--bg) calc(100% - 14px), rgba(10, 10, 10, 0) 100%); }

/* Обложка в плеере: пока не загрузилась — значок ноты на подложке */
.player-cover {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 9px; overflow: hidden;
  background: var(--raised); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--dim);
}
.player-cover.has-image { border-color: transparent; }
.player-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Короткая подпись переключателя: на широком экране показываем полное слово,
   на телефоне — сокращение, иначе четыре фильтра не встают в строку. */
.seg-short { display: none; }
@media (max-width: 900px) {
  .seg-full { display: none; }
  .seg-short { display: inline; }
}

/* ─── Подсказки к полю ввода ──────────────────────────────────────────────── */

.suggest {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 260px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--raised); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
.suggest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer; min-height: 52px;
  border-top: 1px solid var(--divider);
}
.suggest-item:first-child { border-top: none; }
.suggest-item:hover, .suggest-item.on { background: var(--hover); }
.suggest-empty { padding: 14px 12px; color: var(--dim); font-size: 13px; line-height: 1.45; }

/* ─── Капсулы (тайпы) ─────────────────────────────────────────────────────── */

.chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 46px; padding: 7px 10px;
  background: var(--bg); border: 1px solid #2A2A2A; border-radius: 12px;
  cursor: text; transition: border-color .15s;
}
.chips:focus-within { border-color: var(--text); }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 6px 4px 11px; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 100%;
}
.chip > span { overflow: hidden; text-overflow: ellipsis; }
.chip-x {
  display: grid; place-items: center; flex-shrink: 0;
  width: 18px; height: 18px; border-radius: 50%;
  border: 0; background: transparent; color: var(--mid); cursor: pointer;
}
.chip-x:hover { background: var(--line); color: var(--text); }
.chips-field {
  flex: 1 1 90px; min-width: 90px;
  border: 0; background: transparent; outline: none;
  font-size: 15px; padding: 4px 0;
}
.chips-field::placeholder { color: var(--dim); }

/* ─── Подбор битов свайпами ───────────────────────────────────────────── */

/* Колода: карточки лежат одна на другой, поэтому у контейнера своя высота —
   иначе при absolute-карточках он схлопнется в ноль */
.deck {
  position: relative;
  height: min(560px, calc(100vh - 260px - var(--tabbar-space)));
  min-height: 420px;
  /* none, а не pan-y: pan-y означает «вертикаль отдаю браузеру под
     прокрутку», и он забирал жест себе, обрывая события указателя —
     свайп вверх до кода просто не доходил. Прокручивать здесь нечего,
     колода занимает экран целиком. */
  touch-action: none;
}

.swipe-card {
  /* Карточка по высоте содержимого, прижата к верху колоды: счётчик и фильтр лежат на её обложке */
  position: absolute; inset: 0 0 auto 0; height: fit-content; max-height: 100%;
  /* Жест начинается на карточке — браузер не должен трактовать его как
     прокрутку ни по одной из осей */
  touch-action: none;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); overflow: hidden;
  /* Карточку тащат пальцем — курсор и запрет выделения убирают
     «выделился текст вместо свайпа» */
  cursor: grab; user-select: none; -webkit-user-select: none;
  /* Положение ведёт пружина покадрово — переход по transform её бы догонял */
  transition: box-shadow .18s;
  will-change: transform;
}
.swipe-card.dragging { cursor: grabbing; }

/* Карточка позади — подсказка, что лента не кончилась */
.swipe-card.behind {
  transform: scale(.92) translateY(22px);
  /* Эффект фокуса: следующая карточка размыта, как за кадром, и наводится на резкость, пока верхнюю тянут */
  opacity: .55; pointer-events: none; filter: saturate(.6) blur(7px);
  will-change: transform, filter;
  /* Новая карточка позади не возникает из ниоткуда, а подъезжает издалека и проявляется (backwards: после входа рулят обычные значения и жест) */
  animation: behind-in .5s cubic-bezier(.23, 1, .32, 1) backwards;
}
@keyframes behind-in { from { opacity: 0; transform: scale(.86) translateY(34px); filter: saturate(.5) blur(14px); } }
@media (prefers-reduced-motion: reduce) { .swipe-card.behind { animation: none; } }

/* Куда полетит: подсветка появляется до отпускания, чтобы решение
   можно было передумать, не доводя жест до конца */
.swipe-card.to-like { box-shadow: 0 0 0 2px #4FC9EF, 0 18px 50px rgba(0, 0, 0, .5); }
.swipe-card.to-skip { box-shadow: 0 0 0 2px var(--danger), 0 18px 50px rgba(0, 0, 0, .5); }
.swipe-card.to-chat { box-shadow: 0 0 0 2px var(--text), 0 18px 50px rgba(0, 0, 0, .5); }

.swipe-art {
  /* Обложка квадратная; на низком экране сжимается по высоте, а не выталкивает кнопки */
  position: relative; flex: 0 1 auto; width: 100%; aspect-ratio: 1 / 1; min-height: 0;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #1F1F1F, #101010);
  cursor: pointer;
}
.swipe-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.swipe-art.has-cover::after {
  /* Затемнение под кнопкой: на светлой обложке белый значок терялся */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15));
}
.swipe-glyph {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(10, 10, 10, .62); color: var(--text);
  backdrop-filter: blur(6px);
  transition: opacity .2s, transform .2s;
}
/* Пока играет — значок не нужен, он закрывает обложку */
.swipe-card.playing .swipe-glyph { opacity: 0; transform: scale(.85); }
@media (hover: hover) and (pointer: fine) { .swipe-art:hover .swipe-glyph { opacity: 1; transform: none; } }

/* Кнопка «почему этот бит» — в нижнем углу обложки. Сверху справа она
   попадала под кнопку условий отбора, а сверху слева и справа во время
   свайпа выезжают подсказки «Пропустить» и «Отложить» */
.swipe-why {
  position: absolute; right: 10px; bottom: 14px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px); transition: background .15s, transform .15s;
}
@media (hover: hover) and (pointer: fine) { .swipe-why:hover { background: rgba(0, 0, 0, .7); transform: scale(1.06); } }
/* «Поделиться» стоит слева от (i): тот же кружок, тот же отступ */
.swipe-share {
  position: absolute; right: 50px; bottom: 14px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px); transition: background .15s, transform .15s;
}
@media (hover: hover) and (pointer: fine) { .swipe-share:hover { background: rgba(0, 0, 0, .7); transform: scale(1.06); } }
.swipe-share:active, .swipe-why:active { transform: scale(.94); }

/* Объяснение: причины списком с галочками, а не сплошным текстом */
.why-list { display: flex; flex-direction: column; gap: 8px; }
.why-line {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; line-height: 1.45; color: var(--light);
}
.why-line > span:first-child { color: var(--ok); flex-shrink: 0; margin-top: 1px; }
.why-line > svg { flex-shrink: 0; margin-top: 3px; }
.why-head {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim); margin: 22px 0 8px;
}



.swipe-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  height: 3px; background: rgba(255, 255, 255, .16);
}
.swipe-fill { height: 100%; background: var(--text); transition: width .2s linear; }

.swipe-body {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px;
  padding: 16px 16px 0;
}
.swipe-title { font-size: 20px; line-height: 24px; height: 24px; letter-spacing: -.02em; }
.swipe-types {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow: hidden; height: 28px;   /* высота слота постоянна */
  /* Не влезло – обрезаем по краю и гасим градиентом, перенос на второй ряд раздувал карточку */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
}
.swipe-types > * { flex: none; }
.chip-flat {
  padding: 4px 11px; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.swipe-meta {
  display: flex; flex-wrap: nowrap; gap: 12px; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap;
  font-family: var(--mono); font-size: 12px; color: var(--mid);
}
.swipe-owner {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--light); min-width: 0;
}

/* Автор на карточке — кнопкой на его страницу */
.swipe-owner-link {
  border: 0; background: transparent; padding: 4px 6px 4px 0; margin: -4px 0;
  font: inherit; cursor: pointer; align-self: flex-start; max-width: 100%;
}
.swipe-owner-link > span:last-child { color: var(--dim); flex-shrink: 0; }
.swipe-owner-link:hover { color: var(--text); }
.owner-link { color: var(--mid); text-decoration: none; display: block; margin-top: 1px; }
.owner-link:hover { color: var(--text); }

/* ─── Страница автора ─────────────────────────────────────────────────── */

.author-page { gap: 12px; }
.author-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.author-back { margin-left: -10px; flex-shrink: 0; }
.author-page > .author-back { align-self: flex-start; }
.author-channel { border: 1px solid var(--line); flex-shrink: 0; }
.author-name { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.author-actions { display: flex; gap: 8px; }
.author-actions .btn { flex: 1; gap: 6px; justify-content: center; }
.author-actions .author-shuffle { flex: 0 0 auto; border: 1px solid var(--line); }
.author-from { color: var(--mid); font-weight: 500; }
.author-seg { width: 100%; box-sizing: border-box; }
.author-seg button { flex: 1; }
.author-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim);
}
.btn.liked { color: var(--text); }

/* Обложка: пока не загрузилась или её нет — логотип на тёмном */
.cover-box {
  position: relative; overflow: hidden; background: #1A1A1A;
  display: grid; place-items: center; aspect-ratio: 1;
}
.cover-box .art-mark { width: 34%; opacity: .25; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* «Подходит вам» — первой и шире жанров */
.mix-card {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border-radius: 16px; background: var(--raised); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
}
.mix-cover { width: 72px; border-radius: 10px; flex-shrink: 0; }
.mix-title { font-size: 16px; font-weight: 800; margin-top: 1px; }

.play-circle {
  width: 44px; height: 44px; border-radius: 50%; border: 0; flex-shrink: 0;
  background: #FFFFFF; color: #0A0A0A; display: grid; place-items: center; cursor: pointer;
}
.play-circle.dim {
  position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px;
  background: rgba(10, 10, 10, .72); color: var(--text);
}

.list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.list-tile, .beat-tile {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  color: var(--text); text-decoration: none;
}
.list-art { position: relative; }
.list-cover { width: 100%; border-radius: 12px; }
.list-name { font-size: 14px; font-weight: 800; }
.tile-play { position: absolute; left: 8px; bottom: 8px; }
.tile-play .play { background: rgba(10, 10, 10, .72); }
.tile-heart { position: absolute; right: 0; top: 0; }

.chip-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-btn {
  flex-shrink: 0; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--light);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip-btn.on { background: #FFFFFF; border-color: #FFFFFF; color: #0A0A0A; }

/* Открытый плейлист */
.list-head { display: flex; gap: 14px; align-items: flex-end; }
.list-head-cover { width: 124px; border-radius: 14px; flex-shrink: 0; }
.list-head-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-top: 2px; }
.row-cover { position: relative; width: 48px; flex-shrink: 0; }
.row-cover-img { width: 48px; border-radius: 8px; }
.row-play { position: absolute; inset: 0; display: grid; place-items: center; }
.row-play .play { width: 32px; height: 32px; background: rgba(10, 10, 10, .6); border-color: transparent; }
.row-reason { font-size: 11px; color: var(--light); margin-top: 2px; line-height: 1.35; }

/* Цены — шторкой */
.price-list { display: flex; flex-direction: column; }
.price-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 15px;
}

/* Свайпы автора — обычная лента, только с «Назад» поверх */
.deck-wrap { position: relative; }
@media (min-width: 901px) { .deck-wrap { max-width: 460px; margin: 0 auto; } }
.deck-back {
  position: absolute; top: 10px; left: 10px; z-index: 4;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(10, 10, 10, .6); backdrop-filter: blur(8px); color: var(--text);
}

/* Кнопки поверх карточки: дублируют жест для тех, кому он неочевиден */
.swipe-actions {
  display: flex; justify-content: center; align-items: center; gap: 20px;
  padding: 16px 0 20px;
}
.swipe-btn {
  display: grid; place-items: center; flex: none;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--raised); border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
@media (hover: hover) and (pointer: fine) { .swipe-btn:hover { transform: translateY(-2px); } }
.swipe-btn:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .swipe-skip:hover { border-color: var(--danger); color: var(--danger); } }
@media (hover: hover) and (pointer: fine) { .swipe-like:hover { border-color: var(--ok); color: var(--ok); } }
/* «Написать автору» — главное действие, поэтому крупнее и светлее */
.swipe-chat { width: 66px; height: 66px; background: var(--text); color: var(--bg); border-color: var(--text); }
@media (hover: hover) and (pointer: fine) { .swipe-chat:hover { background: #E8E8E8; } }

@media (max-width: 520px) {
  .deck { height: calc(100vh - 172px - var(--tabbar-space)); min-height: 380px; }
  .swipe-body { padding: 14px 16px 0; }
}

/* ─── Статистика битов ────────────────────────────────────────────────── */

.stat-tiles {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat-tile {
  padding: 16px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--border);
}
.stat-value {
  font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
}
.stat-label { margin-top: 4px; font-size: 13px; color: var(--light); }
.stat-hint { margin-top: 2px; font-size: 11px; color: var(--dim); }

.stat-row {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 0; border-bottom: 1px solid var(--divider);
}
.stat-row:last-child { border-bottom: 0; }
.stat-row-head { display: flex; align-items: center; gap: 12px; }
.stat-interest {
  font-family: var(--mono); font-size: 15px; font-weight: 700; flex-shrink: 0;
}

.bar {
  display: flex; height: 8px; border-radius: 999px; overflow: hidden;
  /* Фон виден там, где долей не хватило до сотни: так заметно, что часть
     показов ещё без решения */
  background: var(--raised);
}
.bar-part { display: block; height: 100%; }
.bar-contact { background: var(--text); }
.bar-like { background: var(--ok); }
.bar-skip { background: var(--line); }

.stat-row-foot {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--mid);
}
.stat-row-foot .accent { color: var(--text); font-weight: 600; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }

/* ─── Лента: карточка на весь экран ───────────────────────────────────── */

/* Высота ровно по свободной области: вычитаем поля .main, плавающий док
   и панель Telegram. dvh, а не vh, — иначе адресная строка на телефоне
   срезает низ карточки вместе с кнопками. */
.deck-full {
  height: calc(100dvh - var(--tg-top) - var(--tabbar-space)
          - var(--safe-t) - var(--safe-b) - 44px);
  min-height: 420px; max-height: none;
}
@media (min-width: 901px) {
  .deck-full { height: calc(100vh - 76px); max-height: 720px; max-width: 460px; margin: 0 auto; }
}

/* Счётчик поверх карточки: отдельной строкой он съедал обложку */
.deck-counter {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 3; padding: 5px 12px; border-radius: 999px;
  background: rgba(10, 10, 10, .6); backdrop-filter: blur(8px);
  font-size: 12px; color: var(--light); white-space: nowrap;
  pointer-events: none;
}

/* Условия отбора: кнопка поверх карточки, парой к счётчику. Постоянная
   строка сверху отъедала бы обложку, а фильтром пользуются не каждый раз */
.deck-filter {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(10, 10, 10, .6); backdrop-filter: blur(8px);
  color: var(--light); cursor: pointer; transition: background .15s, color .15s;
}
@media (hover: hover) and (pointer: fine) { .deck-filter:hover { background: rgba(10, 10, 10, .8); } }
/* Условия заданы — видно, не открывая плашку */
.deck-filter.on { background: var(--accent, #E8E8E8); color: #0A0A0A; }

.filter-block { display: grid; gap: 10px; }
.filter-block + .filter-block { margin-top: 22px; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--mid); }

/* Ползунок «от и до»: два обычных ползунка друг на друге. Дорожку и заливку
   рисуем сами, у самих элементов остаются только бегунки */
.range-box { display: grid; gap: 10px; }
.range-value {
  font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text);
}
.range { position: relative; height: 28px; }
.range-track {
  position: absolute; top: 50%; left: 11px; right: 11px;
  height: 4px; margin-top: -2px; border-radius: 999px; background: var(--line);
}
.range-fill {
  position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--text);
}
.range-in {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 28px; margin: 0;
  -webkit-appearance: none; appearance: none;
  background: transparent; outline: none;
  /* Сквозь сам элемент нажатия проходят — иначе верхний ползунок перехватывал
     бы их у нижнего и второй конец было бы не сдвинуть */
  pointer-events: none;
}
.range-in::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--text); border: 2px solid var(--bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  cursor: grab; pointer-events: auto;
}
.range-in::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--text); border: 2px solid var(--bg);
  cursor: grab; pointer-events: auto;
}
.range-in:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--text); outline-offset: 2px; }
.range-in::-moz-range-track { background: transparent; }

.picks { display: flex; flex-wrap: wrap; gap: 6px; }
/* Двенадцать ступеней — ровной сеткой шесть на два, а не как лягут: при
   переносе по месту последний ряд оставался полупустым, и блок выглядел
   обрубленным */
.picks-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px;
}
.picks-grid .pick { padding: 8px 2px; text-align: center; }
/* Переключатель во всю ширину, доли равные */
.seg-even { display: flex; width: 100%; }
.seg-even button { flex: 1 1 0; min-width: 0; }
.pick {
  padding: 6px 12px; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; font-family: var(--mono);
  color: var(--mid); white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pick:hover { border-color: var(--text); color: var(--text); }
.pick.on { background: var(--text); border-color: var(--text); color: var(--bg); }
/* Тональность есть в списке, но битов в ней нет: прячем нажатие,
   а не саму кнопку — иначе ряд ступеней разъезжается при каждом
   переключении наклонения */
.pick.off { opacity: .32; cursor: default; }
.pick.off:hover { border-color: var(--line); color: var(--mid); }

/* Появление новой карточки: она выезжает из-под предыдущей, а не
   возникает на месте */
.swipe-card.enter { animation: card-in .3s ease-out; }
@keyframes card-in {
  from { transform: scale(.94) translateY(14px); opacity: .4; }
  to   { transform: none; opacity: 1; }
}

/* Улёт и возврат ведёт пружина в discover.js (motion.js): CSS-переход
   нельзя поймать на лету, и он не знает, с какой скоростью карточку бросили.
   Здесь только запрет трогать карточку, которая уже улетает */
.swipe-card.flying { pointer-events: none; }

/* Подсказка поверх обложки: проявляется по мере жеста */
.swipe-hint {
  position: absolute; z-index: 2; top: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .01em;
  opacity: 0; transition: opacity .12s linear; pointer-events: none;
}
.hint-like { right: 14px; background: #4FC9EF; color: #0A0A0A; }
.hint-skip { left: 14px; background: var(--danger); color: #FFFFFF; }
.hint-chat { left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); }

/* ─── Графики ─────────────────────────────────────────────────────────── */

.chart { display: flex; flex-direction: column; gap: 8px; }
.chart-bars {
  display: flex; align-items: flex-end; gap: 4px;
  height: 116px; padding-top: 4px;
}
/* column-reverse: первый добавленный слой оказывается внизу, как и задумано
   порядком в LAYERS */
.chart-day {
  flex: 1 1 0; min-width: 0; height: 100%;
  display: flex; flex-direction: column-reverse; justify-content: flex-start;
  border-radius: 4px; overflow: hidden;
}
.chart-day:hover { background: var(--hover); }
.chart-part { display: block; width: 100%; }
.chart-part.bar-contact { background: var(--text); }
.chart-part.bar-like { background: var(--ok); }
.chart-part.bar-skip { background: var(--line); }
/* День без свайпов: черта у основания, чтобы день был виден как день */
.chart-none { height: 2px; background: var(--line); opacity: .7; }

.chart-axis {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--dim);
}

/* Строки «лучших битов» стояли вплотную — заголовок следующей читался
   как продолжение предыдущей */
.stat-row { padding: 14px 0; gap: 10px; }
.stat-row:first-child { padding-top: 4px; }
.legend { margin-top: 10px; }

.stat-tiles.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat-tiles.compact .stat-tile { padding: 12px; }
.stat-tiles.compact .stat-value { font-size: 22px; }

.inline-icon { display: inline-flex; vertical-align: -2px; }

/* ─── «Новые артисты» на Обзоре битмейкера ─────────────────────────────── */

.aud-hero { display: flex; align-items: flex-end; gap: 12px; padding: 0 20px; }
.aud-num {
  font-family: var(--mono); font-weight: 700; font-size: 40px; line-height: 1;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.aud-hero-txt { color: var(--light); font-size: 13px; line-height: 1.35; padding-bottom: 3px; }
.aud-delta {
  margin-left: auto; font-family: var(--mono); font-size: 12px; white-space: nowrap;
  background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 4px 7px;
}
.aud-chart { position: relative; padding: 10px 14px 0; }
.aud-svg { display: block; width: 100%; height: auto; overflow: visible; }
.aud-stop { stop-color: var(--text); }
.aud-grid { stroke: var(--divider); stroke-width: 1; }
.aud-base { stroke: var(--line); stroke-width: 1; }
.aud-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.aud-dot { fill: var(--text); stroke: var(--card); stroke-width: 2; }
.aud-halo { fill: var(--text); fill-opacity: .12; }
.aud-end { fill: var(--text); }
.aud-cursor { stroke: #444; stroke-dasharray: 3 3; }
.aud-hit { fill: transparent; cursor: pointer; }
.aud-axis { fill: var(--dim); font: 500 10px var(--mono); }
.aud-tip {
  position: absolute; top: 4px; transform: translateX(-50%); pointer-events: none;
  background: var(--raised); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 9px; font-size: 12px; white-space: nowrap;
}
.aud-tip-date { color: var(--dim); font-size: 11px; }
.aud-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--divider); margin-top: 12px; }
.aud-tile { padding: 12px 20px 14px; min-width: 0; }
.aud-tile + .aud-tile { border-left: 1px solid var(--divider); }
.aud-tile-v { font-family: var(--mono); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.aud-tile-l { color: var(--light); font-size: 12px; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.aud-tile-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text); flex: none; }
@media (max-width: 560px) {
  .aud-hero { padding: 0 16px; }
  .aud-chart { padding: 10px 8px 0; }
  .aud-tile { padding: 12px 14px 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  .aud-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: aud-draw 1.2s cubic-bezier(.3, .7, .2, 1) .1s forwards; }
  .aud-area, .aud-dot { opacity: 0; animation: aud-fade .6s ease .8s forwards; }
}
@keyframes aud-draw { to { stroke-dashoffset: 0; } }
@keyframes aud-fade { to { opacity: 1; } }

/* Логотип вместо обложки: у части битов её нет в тегах, и пустой серый
   прямоугольник читался как поломка, а не как «картинки нет» */
.art-mark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34%; max-width: 88px; height: auto;
  opacity: .16; pointer-events: none;
}
.swipe-art.has-cover .art-mark { display: none; }
/* Правило .player-art img растягивало логотип на всю плашку и обрезало его
   по object-fit: cover — отсюда съехавший знак с рваными краями. Логотипу
   нужен contain и своя высота, поэтому перебиваем по классу. */
.player-art .art-mark {
  position: static; transform: none;
  width: 54%; height: auto; max-width: none;
  object-fit: contain; opacity: .45;
}

/* ─── Заглушки на время загрузки ──────────────────────────────────────── */

/* Блик, бегущий слева направо. Однотонный серый прямоугольник читается как
   поломка, а движение говорит «идёт загрузка» без единого слова. */
.skeleton-block {
  position: relative; overflow: hidden;
  background: var(--raised); border-radius: 8px;
}
.skeleton-block::after,
.art-loading::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent, rgba(255, 255, 255, .07) 45%, rgba(255, 255, 255, .12) 50%,
    rgba(255, 255, 255, .07) 55%, transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.swipe-card.skeleton {
  /* Не реагирует на жесты: тащить нечего, решения по ней не принимают */
  pointer-events: none;
}
.swipe-card.skeleton .swipe-art { border-radius: 0; }
.swipe-card.skeleton .swipe-body { gap: 10px; }
.skeleton-chip { width: 110px; height: 28px; border-radius: 999px; }
.skeleton-btn { width: 54px; height: 54px; border-radius: 50%; flex: none; }
.skeleton-btn.big { width: 66px; height: 66px; }

/* Блик поверх обложки, пока она и звук не подъехали. Логотип под ним
   остаётся видно — экран не выглядит пустым */
.swipe-art.art-loading { position: relative; overflow: hidden; }
.swipe-art.art-loading::after { z-index: 2; }

/* ─── Края экрана и полосы прокрутки ──────────────────────────────────── */

/* Карточку в ленте утаскивают далеко за край, и без этого браузер считал
   её частью страницы: внизу и справа вылезали полосы прокрутки, а сама
   страница начинала ездить вбок. Теперь карточка просто срезается краем
   окна, как и должна. */
html, body { overflow-x: hidden; }
/* Пока открыта шторка, страница под ней стоит. Запрет нужен именно на html:
   из-за overflow-x выше браузер не переносит его с body на всю страницу */
html.sheet-open, html.sheet-open body { overflow: hidden; }

/* Полосы прокрутки там, где они действительно нужны: тонкие и почти
   незаметные, проявляются только на фоне содержимого. */
* {
  scrollbar-width: thin;
  scrollbar-color: #2E2E2E transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2E2E2E; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #3C3C3C; }
/* Стрелки по краям крадут место и в тёмной теме выглядят чужеродно */
::-webkit-scrollbar-button { display: none; }

/* ─── Экран входа ─────────────────────────────────────────────────────── */

/* Три шага: видно, где человек сейчас и сколько осталось. Пройденный шаг
   не гасим полностью — он подсказывает, что уже сделано. */
.login-steps { display: flex; gap: 6px; }
.login-step {
  flex: 1 1 0; padding-top: 8px; border-top: 2px solid var(--line);
  font-size: 11px; color: var(--dim); text-align: left;
  transition: color .28s, border-color .28s;
}
.login-step.on { border-top-color: var(--text); color: var(--text); font-weight: 600; }

/* Код плитками: его сверяют глазами с тем, что показал бот, поэтому
   символы разнесены и крупные — ошибиться сложнее, чем в строке */
.login-code { display: flex; gap: 8px; justify-content: center; }
.login-code span {
  display: grid; place-items: center;
  width: 52px; height: 60px; border-radius: 12px;
  background: var(--raised); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 26px; font-weight: 600;
  animation: code-in .42s var(--ease-out, cubic-bezier(.22, 1, .36, 1)) both;
}
.login-code span:nth-child(2) { animation-delay: .055s; }
.login-code span:nth-child(3) { animation-delay: .11s; }
.login-code span:nth-child(4) { animation-delay: .165s; }
@keyframes code-in {
  from { opacity: 0; transform: translateY(10px) scale(.92); }
  to   { opacity: 1; transform: none; }
}

/* Сколько заявке осталось жить. Убывает непрерывно: ширина меняется раз
   в секунду, а переход растягивает её на эту же секунду */
.login-ttl {
  height: 3px; border-radius: 999px; background: var(--line); overflow: hidden;
}
.login-ttl i {
  display: block; height: 100%; width: 100%;
  background: var(--text); transition: width 1s linear;
}

.login-hint { margin: 0; font-size: 12px; text-align: center; line-height: 1.5; }

/* ─── Теги mp3 ────────────────────────────────────────────────────────── */

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 20px; border-radius: var(--r-card);
  border: 1.5px dashed var(--line); background: var(--card);
  color: var(--mid); cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s, color .15s;
}
.dropzone:hover { border-color: #3A3A3A; color: var(--light); }
/* Пока файл над окном — рамка светится, иначе непонятно, куда отпускать */
.dropzone.over {
  border-color: var(--text); border-style: solid;
  background: var(--hover); color: var(--text);
}
.dropzone-title { font-size: 15px; font-weight: 700; color: var(--text); }
.dropzone-sub { font-size: 12px; }

/* Карточка файла: шапка с именем, тело с обложкой и полями, низ с кнопкой.
   Раньше всё лежало в одну строку вперемешку, и глазу было не за что
   зацепиться — что здесь главное, а что справка. */
.tag-card { overflow: hidden; }
.tag-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--divider);
}
.tag-head .row-title { font-family: var(--mono); font-size: 12px; color: var(--mid); }
.tag-body { display: flex; align-items: flex-start; gap: 16px; padding: 16px; }
.tag-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--divider); background: var(--bg);
}
.tag-meta { font-size: 12px; }

.tag-cover { position: relative; flex-shrink: 0; cursor: pointer; }
.tag-art {
  position: relative; display: grid; place-items: center;
  width: 180px; height: 180px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(145deg, #1F1F1F, #101010);
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.tag-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Логотип — знак, а не картинка: его не растягиваем на всю плашку */
/* transform обязательно сбрасывать вместе с position: базовое правило
   сдвигает знак на половину его размера вверх-влево — это верно для
   absolute, но при static уводит логотип в угол плашки */
.tag-art .art-mark {
  position: static; transform: none;
  width: 38%; max-width: 120px; height: auto;
  object-fit: contain; opacity: .3;
}
/* Подпись появляется при наведении: иначе не догадаться, что тут можно нажать */
.tag-art-hint {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 5px 0; text-align: center;
  background: rgba(10, 10, 10, .72); backdrop-filter: blur(4px);
  font-size: 11px; font-weight: 600; color: var(--text);
  opacity: 0; transition: opacity .15s;
}
.tag-cover:hover .tag-art { border-color: #3A3A3A; }
.tag-cover:hover .tag-art-hint,
.tag-cover:focus-visible .tag-art-hint { opacity: 1; }

.tag-art-clear {
  position: absolute; top: -6px; right: -6px; z-index: 2;
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--raised); border: 1px solid var(--line);
  color: var(--light); cursor: pointer; padding: 0;
}
.tag-art-clear:hover { color: var(--danger); border-color: var(--danger); }

/* Телефон: обложка сверху во всю ширину карточки, поля под ней. Рядом они
   не помещаются — на 360 px под поле осталось бы меньше половины экрана. */
@media (max-width: 620px) {
  .tag-body { flex-direction: column; gap: 14px; padding: 14px; }
  .tag-cover { align-self: stretch; }
  .tag-art { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  /* Наведения на телефоне нет — подпись и кнопка видны сразу */
  .tag-art-hint { opacity: 1; padding: 8px 0; font-size: 12px; }
  .tag-art-clear { width: 28px; height: 28px; top: 8px; right: 8px; }

  .tag-head, .tag-foot { padding: 12px 14px; }
  /* Кнопка на всю ширину: пальцем в неё попадают, а не целятся */
  .tag-foot { flex-wrap: wrap; }
  .tag-foot .btn-primary { width: 100%; justify-content: center; }
  .tag-meta { width: 100%; }
  .tag-foot .grow { display: none; }

  .dropzone { padding: 26px 16px; }
}

}

/* ─── Ввод на телефоне ────────────────────────────────────────────────── */

/* Мобильные браузеры сами приближают страницу, когда фокус попадает в поле
   со шрифтом мельче 16px. Выглядит это как самопроизвольный зум, из которого
   потом приходится выходить руками. Лечится не запретом масштабирования —
   его оставляем человеку, — а размером шрифта ровно в 16px. */
@media (max-width: 900px) {
  .input, .select, .textarea, .chips-field, .search .input { font-size: 16px; }
}

/* ─── Мой вкус: сцены ────────────────────────────────────────────────────── */

.scene { overflow: hidden; }
.scene.open { border-color: var(--line); }
/* Скрытая сцена — пунктиром и приглушённо: видно, что она есть, но выключена */
.scene.off { border-style: dashed; background: #0F0F0F; }
.scene.off .scene-title { color: var(--mid); }
.scene-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 16px; border: 0; background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.scene-head > svg:last-child { flex-shrink: 0; color: var(--mid); transition: transform .2s; }
.scene.open .scene-head > svg:last-child { transform: rotate(90deg); }
.scene-title { display: block; font-size: 16px; font-weight: 800; }
.scene-sub { display: block; font-size: 13px; color: var(--mid); margin-top: 2px; }
.scene-state { flex-shrink: 0; font-size: 13px; color: var(--mid); }
.scene-state.on { color: var(--text); font-weight: 700; }

.scene-faces { display: flex; flex-shrink: 0; }
.scene-faces .scene-face + .scene-face { margin-left: -10px; }
.scene-face {
  position: relative; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 50%; overflow: hidden; border: 2px solid var(--card);
  background: var(--raised); color: var(--light);
  font-size: 12px; font-weight: 800; letter-spacing: .02em;
}
.scene-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.scene-face.has-img img { opacity: 1; }

.scene-body { display: grid; gap: 12px; padding: 0 16px 16px; }
/* Четыре положения сцены. Крупные кнопки, а не .seg: по ним тычут пальцем */
.scene-seg {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  padding: 4px; background: var(--bg); border-radius: 12px;
}
.scene-seg button {
  min-height: 40px; border: 0; border-radius: 9px; background: transparent;
  color: var(--mid); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.scene-seg button:hover { color: var(--text); }
.scene-seg button.on { background: var(--text); color: var(--bg); font-weight: 800; }

.scene-list { display: grid; border-top: 1px solid var(--divider); padding-top: 4px; }
.scene-artist {
  display: flex; align-items: center; gap: 12px; min-height: 48px;
  border: 0; background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; padding: 4px 0;
}
.scene-artist .scene-face { border-color: var(--card); }
.scene-name { font-size: 14px; font-weight: 600; min-width: 0; }
.scene-note { font-size: 13px; color: var(--mid); line-height: 1.4; }
.scene-divider {
  margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mid);
}

.scene-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.scene-genre {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 18px; background: transparent;
  color: var(--light); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.scene-genre.on { border-color: var(--text); color: var(--text); }
.scene-genre.off { border-style: dashed; color: var(--mid); text-decoration: line-through; }
.scene-genre-state { font-size: 11px; font-weight: 700; color: var(--mid); text-decoration: none; }

/* Состояние артиста — кнопкой-плашкой: видно, что это меняется */
.scene-pill {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  min-height: 32px; padding: 0 10px 0 12px; border-radius: 16px;
  border: 1px solid var(--line); color: var(--light); font-size: 13px; font-weight: 600;
}
.scene-pill.on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 800; }
.scene-name { display: block; }
.scene-learned { display: block; font-size: 12px; color: var(--mid); margin-top: 2px; }

.taste-choices { display: grid; gap: 8px; }
.taste-choice {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--raised);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.taste-choice.on { border-color: var(--text); }
.taste-choice-title { display: block; font-size: 15px; font-weight: 700; }
.taste-choice-hint { display: block; font-size: 13px; color: var(--mid); margin-top: 2px; }

/* Тайп, угаданный по посту: тише написанного битмейкером и с пометкой */
.chip-guess { border-style: dashed; color: var(--light); }
.swipe-guess-note { font-size: 12px; color: var(--mid); align-self: center; }
/* Строки объяснения: у причин галочка, у заметок и расхождений — свои значки */
.why-note svg { color: var(--mid); }
.why-clash svg { color: #D9A441; }

/* ─── Быстрый старт ─────────────────────────────────────────────────────── */
.starter { padding-bottom: 150px; }
.starter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.starter-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  min-height: 44px; padding: 0 14px 0 6px; border-radius: 22px;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.starter-chip .scene-face { border-color: transparent; }
.starter-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
/* Кнопки внизу — поверх списка, над панелью разделов */
.starter-bar {
  position: fixed; z-index: 40; left: 12px; right: 12px;
  bottom: calc(var(--tabbar-space) + var(--tabbar-gap) + var(--safe-b));
  display: flex; gap: 8px; padding: 10px;
  background: rgba(10, 10, 10, .92); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 14px;
}
@media (min-width: 901px) {
  .starter-bar { left: calc(var(--sidebar-w) + 24px); right: 24px; bottom: 16px; max-width: 720px; }
}

/* ─── Поиск артиста с подсказками ───────────────────────────────────────── */
.artist-search { position: relative; }
.artist-hits {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 340px; overflow-y: auto; padding: 6px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.artist-hit {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px;
  padding: 6px 8px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.artist-hit:hover, .artist-hit:focus-visible { background: var(--hover); }
.artist-hit .scene-face { border-color: var(--raised); }
.artist-hit > svg { flex-shrink: 0; color: var(--mid); }
.artist-hit-name { display: block; font-size: 15px; font-weight: 700; }
.artist-hit-sub { display: block; font-size: 12px; color: var(--mid); margin-top: 2px; }

/* ─── Подсказка «подключите канал» ─────────────────────────────────────── */
.hint-card { padding: 14px 14px 14px 16px; margin-bottom: 16px; }
.hint-row { display: flex; align-items: flex-start; gap: 12px; }
.hint-icon {
  display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 10px; background: var(--raised); color: var(--text);
}
.hint-title { font-size: 15px; font-weight: 700; }
.hint-text { font-size: 13px; color: var(--mid); margin-top: 2px; line-height: 1.4; }
.hint-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0 48px; }

.guide { display: grid; gap: 16px; }
.guide-step { display: flex; gap: 12px; align-items: flex-start; }
.guide-num {
  display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 50%; background: var(--text); color: var(--bg);
  font-size: 13px; font-weight: 800;
}
.guide-title { font-size: 15px; font-weight: 700; }
.guide-text { font-size: 13px; color: var(--light); margin-top: 3px; line-height: 1.45; }

/* ─── Розыгрыш: экран артиста, вариант «экран + кнопка» ─────────────────── */
/* От семплера — только дисплей с крутилками: иначе кнопка уходила под край */
.arcade.crop { aspect-ratio: 580 / 404; overflow: hidden; }
.arcade-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 12%;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0), var(--bg)); pointer-events: none;
}
.slot-head { align-items: flex-end; margin-bottom: 12px; }
.slot-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mid);
}
.slot-chip {
  flex-shrink: 0; font-size: 12px; color: var(--light); padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 999px; white-space: nowrap;
}
.slot-panel { align-items: stretch; }
.slot-go { min-height: 58px; font-size: 17px; font-weight: 800; border-radius: 16px; gap: 10px; }
.slot-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--card);
}
.slot-card.slot-win { border-color: var(--text); text-align: left; }
.slot-card.slot-miss { align-items: center; text-align: center; }
.slot-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.slot-card-head b { font-size: 16px; font-weight: 800; }
.slot-card-head .mono { font-family: var(--mono); font-size: 13px; color: var(--light); }
.slot-progress { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.slot-progress span { display: block; height: 100%; border-radius: 999px; background: var(--text); }
.slot-card .slot-code { align-self: stretch; justify-content: center; }
.slot-tiles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px;
}
.slot-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 64px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card); color: var(--text); font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 6px;
}
.slot-tile:hover { border-color: var(--line); }

/* ─── Розыгрыш: плашка, подарок, «Больше продаж» ─────────────────────── */

/* Плашка розыгрыша на главной — обычная подсказка (.hint-card), своих
   отступов у слота нет */
.wheel-banner-slot:empty { display: none; }

.slot-back { margin-left: -10px; align-self: center; flex-shrink: 0; }
.slot-actions { display: flex; gap: 8px; }
.slot-actions .btn { flex: 1; gap: 6px; justify-content: center; }
.slot-answer {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--mid);
}
.slot-answer button {
  border: 1px solid var(--line); background: transparent; color: var(--light);
  border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer;
}

.sales-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.sales-stat {
  padding: 10px 12px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.sales-stat b { font-size: 22px; font-weight: 800; }
.sales-stat span { font-size: 11px; color: var(--dim); line-height: 1.3; }
.sales-presets { display: flex; gap: 6px; }
.sales-presets button {
  flex: 1; height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
}
.sales-presets button.on { background: #FFFFFF; border-color: #FFFFFF; color: #0A0A0A; }

/* Подарок в форме договора: что уйдёт в договор */
.gift-box {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px; background: var(--raised);
}
.gift-box[hidden] { display: none; }
.gift-box-head { display: flex; align-items: center; gap: 10px; }
.gift-box-title { font-size: 14px; font-weight: 800; }
.gift-box-total { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.gift-box-total span { font-size: 13px; color: var(--mid); }
.gift-box-total b { font-size: 22px; font-weight: 800; }
.gift-box-note { font-size: 12px; color: var(--mid); line-height: 1.4; }

/* Подарок на странице автора */
.author-gift {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 14px; background: #FFFFFF; color: #0A0A0A;
}
.author-gift b { font-size: 14px; }
.author-gift span { font-size: 12px; color: #444444; }
.buy-btn { flex-shrink: 0; width: 76px; justify-content: center; }

/* Строки битов на странице автора: колонки «Купить» и сердечко стоят ровно.
   С flex-basis auto ширина текстового блока зависела от длины названия и
   тайпа — и кнопки справа съезжали от строки к строке */
.author-page .row { gap: 10px; }
.author-page .row > .grow { flex: 1 1 0; min-width: 0; }
.author-page .row > .buy-btn { flex: 0 0 72px; width: 72px; padding: 0; }
.author-page .row > .heart-btn { flex: 0 0 40px; width: 40px; }
.author-page .row > .row-cover { flex: 0 0 48px; }

/* Плашка «Договор» внизу страницы автора: всегда на месте, над меню и
   плеером. fixed, а не sticky: у страницы своя прокрутка, и sticky не цеплялся */
.contract-bar {
  position: fixed; z-index: 39; bottom: 16px;
  left: calc(var(--sidebar-w) + 32px); right: 32px; max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 16px; border: 0;
  background: #FFFFFF; color: #0A0A0A; font: inherit; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
.contract-bar-icon {
  width: 38px; height: 38px; border-radius: 10px; background: #0A0A0A; color: #FFFFFF;
  display: grid; place-items: center; flex-shrink: 0;
}
.contract-bar-title { font-size: 15px; font-weight: 800; }
.contract-bar-sub { font-size: 12px; color: #444444; }
/* Место под плашкой, чтобы она не закрывала последние строки */
.contract-bar-space { height: 76px; }
.main.with-player .contract-bar { bottom: 112px; }
@media (max-width: 900px) {
  .contract-bar { left: 8px; right: 8px; bottom: calc(var(--tabbar-space) + var(--safe-b) + 10px); }
  .main.with-player .contract-bar { bottom: calc(var(--tabbar-space) + var(--safe-b) + 112px); }
}

/* Фонд скидок битмейкера */
.fund-badge {
  flex: 0 0 auto; min-width: 64px; height: 32px; padding: 0 10px; border-radius: 10px;
  background: #FFFFFF; color: #0A0A0A; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
}
.fund-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fund-chip {
  height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.fund-chip.on { background: #FFFFFF; border-color: #FFFFFF; color: #0A0A0A; }
.fund-chips .input { width: 110px; height: 40px; }
.fund-chips .input.on { border-color: #FFFFFF; }
.fund-seg { width: 100%; box-sizing: border-box; }
.fund-seg button { flex: 1; }

/* iOS увеличивает страницу при нажатии на поле, если шрифт в нём мельче
   16px, — и не возвращает обратно: окна уезжают за край. 16px на телефоне
   это убирает (плюс maximum-scale=1 в index.html) */
@media (max-width: 900px) {
  input, select, textarea, .input, .select, .textarea, .search .input { font-size: 16px; }
}
.fund-chip:disabled { opacity: .35; cursor: not-allowed; }

/* Жалоба на автора: выбор причины */
.report-list { display: flex; flex-direction: column; gap: 6px; }
.report-item {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line); background: transparent;
  color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.report-item.on { border-color: #FFFFFF; }
.report-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--mid); flex-shrink: 0;
}
.report-item.on .report-dot { border-color: #FFFFFF; background: radial-gradient(circle, #FFFFFF 45%, transparent 50%); }

/* Каталог-профиль битмейкера */
.owner-badge {
  font-size: 10px; font-weight: 800; padding: 2px 6px; margin-left: 6px; vertical-align: 2px;
  border-radius: 6px; border: 1px solid var(--line); color: var(--mid);
}
.owner-stat { font-size: 11px; color: var(--dim); margin-top: 1px; }
.owner-price { font-size: 12px; color: var(--light); white-space: nowrap; flex-shrink: 0; }
.author-page .row > .owner-more { flex: 0 0 36px; width: 36px; }
@media (max-width: 420px) { .owner-price { display: none; } }
.stat-info {
  border: 0; background: none; color: var(--mid); padding: 0 0 0 4px; cursor: pointer;
  vertical-align: -2px;
}
.menu { display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 2px;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item.danger { color: #FF6B6B; }
.menu-title { display: block; font-size: 15px; font-weight: 700; }
.menu-sub { display: block; font-size: 12px; color: var(--mid); margin-top: 1px; }

/* Сообщить о проблеме: снимок экрана в окне */
.report-shot-box {
  display: flex; flex-direction: column; gap: 10px; padding: 10px;
  border: 1px solid var(--line); border-radius: 14px;
}
.report-shot {
  display: block; max-height: 260px; width: auto; max-width: 100%; margin: 0 auto;
  border-radius: 10px; border: 1px solid var(--line); transition: opacity .15s;
}
.report-shot-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.report-flash {
  position: fixed; inset: 0; z-index: 9999; background: #FFFFFF; pointer-events: none;
  animation: report-flash .26s ease-out forwards;
}
@keyframes report-flash { from { opacity: .85; } to { opacity: 0; } }
/* Прайс: сумма и «Договорная» в одной строке */
.price-edit { display: flex; gap: 8px; align-items: center; }
.price-edit .input { flex: 1; }
.price-edit .input:disabled { opacity: .5; }
.price-edit .chip-btn { height: 46px; }

/* ─── Проверка на слух (#/lab) ───────────────────────────────────────────── */
.lab-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  min-height: 300px; padding: 22px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; text-align: center; touch-action: pan-y; user-select: none;
  transition: transform .18s ease, border-color .15s ease; cursor: grab;
}
.lab-card:active { cursor: grabbing; transition: none; }
.lab-card[data-hint="close"] { border-color: var(--ok); }
.lab-card[data-hint="far"] { border-color: var(--danger); }
.lab-card .play-btn, .lab-card button { transform: scale(1.4); }
.lab-card-title { font-size: 24px; font-weight: 800; }
.lab-actions { display: flex; justify-content: center; align-items: center; gap: 22px; }
.lab-btn {
  width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--text); display: grid; place-items: center;
}
.lab-btn-yes { background: var(--text); color: var(--bg); border: 0; }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .lab-card { transition: none; } }

/* ─── Бит по треку (#/reference): колода со шкалами похожести ────────────── */
.ref-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px; overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  transition: transform .18s ease, box-shadow .15s ease;
}
.ref-card:active { cursor: grabbing; transition: none; }
.ref-card[data-hint="like"] { box-shadow: 0 0 0 2px var(--ok); }
.ref-card[data-hint="skip"] { box-shadow: 0 0 0 2px var(--danger); }
.ref-art { aspect-ratio: 1 / 1; max-height: 52vh; width: 100%; cursor: inherit; }
.ref-art .art-mark { width: 30%; opacity: .25; }
.ref-art.has-cover::after { background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0) 70%); }
/* Шкалы — поверх нижней части обложки, на затемнении */
.ref-scales {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 7px;
}
.ref-overall { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.ref-overall-value { font-size: 34px; font-weight: 700; line-height: 1; color: var(--text); }
.ref-overall-label { font-size: 12px; color: var(--light); }
.ref-scale { display: grid; grid-template-columns: 70px 1fr 26px; align-items: center; gap: 10px; }
.ref-scale-label { font-size: 12px; color: var(--light); }
.ref-scale-bar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.ref-scale-fill { display: block; height: 100%; border-radius: 2px; background: var(--text); transition: width .4s ease; }
.ref-scale-value { font-size: 11px; color: var(--light); text-align: right; }
.ref-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .ref-card, .ref-scale-fill { transition: none; } }

/* ─── Поиск по описанию в «Свайпах» ──────────────────────────────────────
   Строка над колодой; колода ужимается на её высоту (44 + 10 отступ),
   чтобы экран не прокручивался */
.deck-col { display: flex; flex-direction: column; gap: 10px; }
/* Автоотступы колоды в колонке отключают растяжение — ширину задаём явно */
.deck-col > .deck { width: 100%; margin: 0; }
@media (min-width: 901px) { .deck-col { max-width: 460px; margin: 0 auto; } }
.deck-full.deck-searchable {
  height: calc(100dvh - var(--tg-top) - var(--tabbar-space)
          - var(--safe-t) - var(--safe-b) - 98px);
  min-height: 380px;
}
@media (min-width: 901px) {
  .deck-full.deck-searchable { height: calc(100vh - 130px); max-height: 666px; }
}
.deck-search {
  display: flex; align-items: center; gap: 6px; height: 44px; flex: none;
  padding: 0 6px 0 0; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  transition: border-color .15s, background .15s;
}
.deck-search:hover { border-color: var(--line); }
.deck-search.on { border-color: var(--light); background: var(--raised); }
.deck-search-field {
  flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 10px;
  padding: 0 0 0 14px; border: 0; background: transparent; color: var(--mid);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.deck-search.on .deck-search-field { color: var(--text); }
.deck-search-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-search-clear {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--line); color: var(--text);
}
.deck-search-clear:hover { background: var(--mid); }

.search-input { min-height: 84px; font-size: 15px; }
/* Скрепка живёт внутри поля, в правом нижнем углу, и не залезает под текст */
.search-box { position: relative; }
.search-box .search-input { display: block; width: 100%; padding-right: 52px; }
.search-attach {
  position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--mid); cursor: pointer;
  transition: background .15s, color .15s;
}
.search-attach:hover { background: var(--hover); color: var(--text); }
.search-attach:active { transform: scale(.94); }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px;
  background: transparent; color: var(--light); font: inherit; font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.search-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.search-chip svg { flex: none; color: var(--mid); }
.search-chip:hover { background: var(--raised); color: var(--text); border-color: var(--mid); }

/* «Почему этот бит»: совпадение с описанием — первой причиной */
.why-match {
  display: grid; gap: 8px; padding: 14px; margin-bottom: 14px;
  border-radius: 14px; background: var(--raised); border: 1px solid var(--border);
}
.why-match-head { display: flex; align-items: baseline; gap: 8px; }
.why-match-value { font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.why-match-label { font-size: 13px; color: var(--light); }
.why-match-bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.why-match-bar > span { display: block; height: 100%; background: var(--text); border-radius: 2px; }
.why-match-text { font-size: 13px; line-height: 1.45; color: var(--mid); }

/* Подписка на поиск: колокольчик в строке и список «Слежу» в панели */
.deck-search-bell {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--mid);
  transition: background .15s, color .15s;
}
.deck-search-bell:hover { color: var(--text); background: var(--raised); }
.deck-search-bell.on { color: var(--bg); background: var(--ok); }
.deck-search-bell.on svg path:first-child { fill: currentColor; }
.sub-list { display: grid; gap: 6px; }
.sub-row {
  display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 0;
  border: 1px solid var(--border); border-radius: 12px; background: var(--raised);
}
.sub-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px;
  text-align: left; cursor: pointer;
}
.sub-open svg { flex: none; color: var(--ok); }
.sub-x {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--mid);
}
.sub-x:hover { background: var(--line); color: var(--text); }
/* Подпись области у подписки: «у safabeatz» */
.sub-owner { flex: none; font-size: 12px; color: var(--mid); white-space: nowrap; }
/* Страница автора: «Назад» — под строкой поиска, а не поверх неё */
.deck-wrap .deck-col ~ .deck-back { top: 64px; }

/* ─── Портфолио битмейкера ─────────────────────────────────────────────── */
.pf-form { display: flex; gap: 8px; }
.pf-form .input { flex: 1; min-width: 0; }
.pf-list { display: grid; gap: 4px; }
.pf-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.pf-cover { border-radius: 8px; object-fit: cover; flex: none; background: var(--raised); }
.pf-cover-empty { display: grid; place-items: center; color: var(--dim); border-radius: 8px; flex: none; background: var(--raised); }
/* «Работал с» на странице автора — лента обложек с прокруткой вбок */
.pf-strip { display: grid; gap: 10px; min-width: 0; }
.pf-strip-head { display: flex; align-items: center; justify-content: space-between; }
.pf-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pf-scroll::-webkit-scrollbar { display: none; }
.pf-card {
  flex: none; width: 128px; display: grid; gap: 6px; padding: 0; border: 0; background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start;
}
.pf-card .pf-cover { width: 128px; height: 128px; border-radius: 14px; }
.pf-card:hover .pf-cover { filter: brightness(1.1); }
.pf-title { font-size: 14px; font-weight: 700; }
.pf-artist { font-size: 13px; color: var(--mid); margin-top: -4px; }

/* «Работал с»: артисты кружками, по нажатию — их треки */
.pf-artist-chip {
  flex: none; width: 92px; display: grid; justify-items: center; gap: 4px; padding: 0;
  border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; scroll-snap-align: start;
}
.pf-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--raised);
  border: 1px solid var(--line); transition: transform .15s; }
.pf-artist-chip:hover .pf-avatar { transform: scale(1.04); }
.pf-artist-name { max-width: 92px; font-size: 13px; font-weight: 700; text-align: center; }
.pf-artist-count { font-size: 11px; color: var(--mid); margin-top: -3px; }
.pf-row .play { flex: none; }

/* Подборка артиста: play/pause на обложке трека */
.pf-play { position: relative; flex: none; padding: 0; border: 0; background: transparent; cursor: pointer;
  border-radius: 8px; overflow: hidden; width: 48px; height: 48px; }
.pf-play .pf-cover { display: block; }
.pf-play-glyph { position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  background: rgba(0, 0, 0, .38); transition: background .15s; }
.pf-play:hover .pf-play-glyph, .pf-play.on .pf-play-glyph { background: rgba(0, 0, 0, .55); }
.pf-add { display: grid; place-items: center; background: transparent; border: 1.5px dashed var(--line); color: var(--light); }
.pf-artist-chip:hover .pf-add { border-color: var(--light); color: var(--text); }

/* ─── «Свайпы» на компьютере ──────────────────────────────────────────────
   Колода крупнее: обложка почти квадратная (560 × ~560 над подписью), а
   пустоту по бокам занимает подсказка по клавишам */
.deck-keys { display: none; }
@media (min-width: 901px) {
  .deck-col { position: relative; max-width: 560px; }
  .deck-wrap { max-width: 560px; }
  .deck-full { max-width: 560px; height: calc(100vh - 76px); max-height: 790px; }
  .deck-full.deck-searchable { height: calc(100vh - 130px); max-height: 790px; }
}
@media (min-width: 1240px) {
  .deck-keys {
    display: grid; gap: 12px; position: absolute; left: calc(100% + 40px); bottom: 24px; width: 190px;
    color: var(--mid); font-size: 13px;
  }
  .deck-key { display: flex; align-items: center; gap: 10px; }
  .deck-key kbd {
    min-width: 30px; padding: 4px 8px; border-radius: 8px; text-align: center;
    border: 1px solid var(--line); background: var(--card); color: var(--light);
    font: inherit; font-family: var(--mono); font-size: 12px;
  }
}
/* Только на телефоне: на компьютере то же есть в боковом меню */
@media (min-width: 901px) { .mobile-only { display: none !important; } }
/* Правая колонка на компьютере шире: подпись и карточки в ней не теснятся */
@media (min-width: 1280px) { .layout-2 { grid-template-columns: minmax(0, 1fr) 440px; } }
@media (min-width: 1240px) { .deck-key kbd { font-size: 15px; line-height: 1.1; } }
/* Автозаполнение Chrome красит поле в свой синий — возвращаем наш фон */
.input:-webkit-autofill, .input:-webkit-autofill:hover, .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--raised) inset;
  caret-color: var(--text);
  transition: background-color 9999s;
}

/* ─── Чарт битов ─────────────────────────────────────────────────────────── */
.chart-row { gap: 12px; }
.chart-place { width: 40px; flex: none; display: grid; justify-items: center; gap: 2px; }
.chart-num { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-move { font-size: 10px; font-weight: 700; font-family: var(--mono); color: var(--dim); }
.chart-move.up { color: var(--ok); }
.chart-move.down { color: var(--danger); }
.chart-move.new { color: var(--text); letter-spacing: .04em; }
.chart-author { color: var(--light); }
.chart-author:hover { color: var(--text); }
/* Первая тройка — крупнее и ярче */
.chart-row:nth-child(-n+3) .chart-num { font-size: 22px; color: var(--text); }
@media (min-width: 901px) { .chart-page { max-width: 860px; } }

/* ─── Смарт-ссылки (views/releases.js) ─────────────────────────────────── */

.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.rel-narrow { max-width: 560px; }
.rel-head { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; text-decoration: none; }
.rel-actions { display: flex; gap: 8px; }
.rel-list-head { height: 46px; display: flex; align-items: center; }
.rel-row { display: flex; align-items: center; gap: 12px; min-height: 54px; border-top: 1px solid var(--divider); }
.card-body > .rel-row:first-child, .card-body > div:first-child > .rel-row:first-child, .rel-list-head + .rel-row { border-top: 0; }
.rel-row .input { height: 38px; flex: 1; min-width: 0; }
.rel-name { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; border: 0; background: none;
  padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rel-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.rel-stat { padding: 12px; background: var(--raised); border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.rel-stat-n { font-size: 20px; }
.rel-bar { height: 4px; border-radius: 2px; background: var(--border); }
.rel-bar-fill { height: 100%; border-radius: 2px; background: var(--text); }
.rl-tile { border-radius: 9px; background: var(--raised); display: grid; place-items: center;
  flex-shrink: 0; box-sizing: border-box; }
.rl-tile-dark { background: var(--bg); border: 0; }

.rel-title-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.rel-back { margin-left: -10px; flex-shrink: 0; }
/* Дата на iOS шире поля и вылезает за карточку — держим в границах */
.rel-date { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
  -webkit-appearance: none; appearance: none; text-align: left; }
.rel-date::-webkit-date-and-time-value { text-align: left; }
@media (max-width: 720px) {
  .rel-page-head .rel-new { flex: 1 1 100%; }
}
.rel-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rel-qr-box { width: min(280px, 100%); aspect-ratio: 1; background: #FFFFFF; border-radius: 16px; padding: 12px; box-sizing: border-box; }
.rel-qr-box img { width: 100%; height: 100%; display: block; }
.rel-has-back .page-sub { padding-left: 36px; }
.rel-suggest { display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; }
.rel-suggest-row { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0;
  border-top: 1px solid var(--border); background: transparent; color: inherit; font: inherit; font-size: 14px;
  text-align: left; cursor: pointer; }
.rel-suggest-row:first-child { border-top: 0; }
.rel-suggest-row:hover { background: var(--hover); }
.rel-picked { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 6px 0 12px;
  border: 1px solid var(--line); border-radius: 12px; }
.rel-picked-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.rel-story-row { display: flex; align-items: center; gap: 12px; }
.rel-range { width: 100%; accent-color: var(--text); }
.rel-picked-photo { object-fit: cover; background: var(--raised); }
.rel-picked-avatar { width: 30px; height: 30px; }
.rel-searching { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--mid); }
.rel-searching .spinner { width: 14px; height: 14px; }
.rel-found { display: flex; align-items: center; gap: 12px; margin: 0 20px 8px; padding: 12px 12px 12px 14px;
  border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
/* Перетаскивание площадок: ручка слева, соседние строки плавно раздвигаются */
.rel-grip { display: grid; place-items: center; width: 24px; height: 36px; margin-left: -6px; flex-shrink: 0;
  color: var(--dim); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.rel-grip:hover { color: var(--text); }
.rel-sorting > [data-index] { transition: transform .15s ease; }
.rel-sorting > .rel-dragging { transition: none; position: relative; z-index: 2; background: var(--card);
  box-shadow: 0 8px 24px rgba(0,0,0,.45); border-radius: 12px; cursor: grabbing; }
.rel-sorting { user-select: none; -webkit-user-select: none; }
/* Продюсеры капсулами: аватарка, ник, крестик; поле ввода — в той же строке */
.rel-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 6px 8px;
  background: var(--bg); border: 1px solid #2A2A2A; border-radius: 12px; cursor: text; }
.rel-chips:focus-within { border-color: var(--mid); }
.rel-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 4px 0 3px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
.rel-chip .rel-picked-avatar { width: 24px; height: 24px; font-size: 11px; }
.rel-chip-umt { border-color: var(--mid); }
.rel-chip-x { width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--dim);
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.rel-chip-x:hover { color: var(--text); background: var(--raised); }
.rel-chips-input { flex: 1; min-width: 120px; height: 30px; border: 0; outline: 0; background: none; color: var(--text);
  font: inherit; font-size: 15px; padding: 0 4px; }
/* «Новая ссылка»: что получится, шаги и площадки */
.rel-kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.rel-tiles { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
/* «До релиза»: дата и время рядом, текст по левому краю и по центру высоты (iOS) */
.rel-when { display: grid; grid-template-columns: 1fr 116px; gap: 8px; }
.rel-when .input { display: flex; align-items: center; text-align: left; -webkit-appearance: none; appearance: none; }
.rel-when .input::-webkit-date-and-time-value { text-align: left; }
/* Пре-сейв свёрнут: раскрывается, только если ссылки есть */
.rel-more > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; cursor: pointer;
  list-style: none; font-weight: 600; }
.rel-more > summary::-webkit-details-marker { display: none; }
.rel-more[open] > summary svg { transform: rotate(180deg); }
.rel-more-body { padding: 0 16px 16px; }
/* Первый экран «Новой ссылки»: заголовок, поле, кнопка, где ищем */
.rel-start-title { font-size: 20px; font-weight: 700; }
.rel-start-sub { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--mid); }
.rel-url { height: 52px; font-size: 16px; }
.rel-start-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.seg.seg-even button { min-height: 38px; font-size: 14px; }
/* «Чем лучше ссылки дистрибьютора» — на первом экране «Новой ссылки» */
.rel-why-row { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; }
.rel-why-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--light); flex-shrink: 0; }
/* Отдельные ссылки: поле для названия раскрывается по «+ Ссылка» */
.rel-link-new { display: flex; gap: 8px; }
.rel-link-new[hidden] { display: none; }
.rel-link-new .input { flex: 1; min-width: 0; }
/* Статистика: срезы «Вся страница» и по ссылкам, таблица по ссылкам */
.rel-chips-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rel-chips-row::-webkit-scrollbar { display: none; }
.rel-chips-row .pick { flex-shrink: 0; }
.rel-link-stat { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0;
  border: 0; border-top: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rel-link-stat > span:not(.grow) { width: 58px; text-align: right; font-size: 13px; flex-shrink: 0; }
.rel-link-stat-head { min-height: 30px; border-top: 0; cursor: default; color: var(--dim); }
.rel-link-stat-head > span:not(.grow) { font-size: 11px; }
.rel-chips-row .pick { font-family: inherit; font-size: 13px; }
/* Окно статистики: «что показать» и период — два выпадающих списка рядом */
.rel-filters { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; }
.rel-filters-one { grid-template-columns: 160px; }
/* Строка отдельной ссылки: текст слева, две кнопки справа с зазором */
.rel-link-row { gap: 10px; min-height: 64px; }
.rel-link-row .btn-icon { width: 40px; height: 40px; flex-shrink: 0; }

/* Карточка артиста: выбор релизов для импорта */
.ac-cab-avatar { border-radius: 50%; object-fit: cover; flex: none; }
.ac-disco { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; margin: 0 -4px; }
.ac-disco-head { display: flex; align-items: center; gap: 10px; }
.ac-disco-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 4px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.ac-disco-row:disabled { opacity: .5; cursor: default; }
.ac-disco-row .pf-cover { border-radius: 8px; flex: none; }
.ac-pick { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line, rgba(128,128,128,.4)); color: transparent; transition: background .15s, color .15s, border-color .15s; }
.ac-pick.on { background: var(--text, #fff); border-color: var(--text, #fff); color: var(--bg, #000); }
.rel-ac-link { margin-bottom: 16px; }

/* ─── Меню «⋯» ───────────────────────────────────────────────────────────── */
.pop-menu {
  position: fixed; z-index: 120; min-width: 224px; max-width: calc(100vw - 16px);
  background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
}
.pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text);
  font: 600 14px var(--font); text-align: left; cursor: pointer; white-space: nowrap;
}
.pop-item svg { color: var(--light); }
.pop-item:hover { background: var(--hover); }
.pop-item.danger, .pop-item.danger svg { color: var(--danger); }
.pop-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* Панель поверх карточки в свайпах: «Чарт» слева, фильтр и «⋯» справа.
   Счётчик остаётся по центру, поэтому панель не занимает места под колодой */
.deck-tools {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3;
  display: flex; align-items: center; gap: 8px; pointer-events: none;
}
.deck-tools > * { pointer-events: auto; }
.deck-tools .deck-filter { position: static; }
/* Строка над колодой: поиск и «⋯». Высота 44, как у поиска, чтобы колода не меняла размер */
.deck-top { display: flex; align-items: center; gap: 8px; height: 44px; flex: none; }
.deck-top .deck-search { flex: 1; min-width: 0; }
.deck-more {
  flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border); color: var(--light);
}
.deck-more:hover { background: var(--raised); border-color: var(--line); color: var(--text); }

/* Пустой каталог без канала: одна задача на экран */
.empty-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 48px 16px 24px;
}
.empty-hero-icon {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  background: var(--raised); border: 1px solid var(--line); color: var(--light);
}
.empty-hero-title { margin: 4px 0 0; font-size: 20px; font-weight: 800; }
.empty-hero-text { margin: 0; max-width: 32ch; color: var(--mid); }
.empty-hero .btn-lg { margin-top: 8px; }

/* Свёрнутый блок настроек (страница релиза) */
.fold-head {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 16px;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.fold-head:hover { background: var(--hover); }
.fold-chevron { color: var(--chev); transition: transform .15s; }
.fold-chevron.open { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .fold-chevron { transition: none; } }

/* Меню «⋯»: выезжает из кнопки и так же уходит */
.pop-menu { transform-origin: top right; animation: pop-in .16s cubic-bezier(.2, .8, .2, 1); }
.pop-menu.closing { animation: pop-out .12s ease-in forwards; pointer-events: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-4px) scale(.97); } }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .pop-menu, .pop-menu.closing { animation-duration: .01ms; } }

/* Профиль: разделы строками, иконка без плитки (как в макете) */
.hub-row {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 16px;
  border-top: 1px solid var(--divider); color: var(--text); transition: background .15s;
}
.hub-row:first-child { border-top: 0; }
.hub-row:hover { background: var(--hover); color: var(--text); }
.hub-row:active { background: var(--raised); }
.hub-ic { display: flex; color: var(--light); }
.hub-t { font-size: 14px; font-weight: 600; }
.hub-s { font-size: 12px; color: var(--dim); }
.hub-ch { display: flex; color: var(--chev); }

/* Настройки по макету: компактные карточки, строки 54px, иконки без плиток */
button.hub-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--divider); text-align: left; font: inherit; cursor: pointer; }
.card-head + .hub-row { border-top: 0; }
.settings-page .card-head { padding: 14px 16px 6px; }
.settings-page .card-title { font-size: 14px; font-weight: 700; }
.settings-page .card-body { padding: 0 0 6px; }
.settings-page .row { min-height: 54px; padding: 8px 16px; }
.settings-page .row-title { font-size: 14px; font-weight: 600; }
.settings-page .row-sub { font-size: 12px; color: var(--dim); }
.settings-page .card-note { padding: 6px 16px 14px; font-size: 12px; color: var(--dim); }
.settings-page .kv { padding: 10px 16px; font-size: 13px; }
.settings-page .kv .row-icon { width: 22px; height: 22px; background: none; border: 0; }

/* Заголовки – Unbounded (шире Manrope, поэтому размеры на ступень меньше), остальное – Geologica */
.page-title, .card-title, .sheet-title, .login-title, .tour-title, .slot-win-title, .swipe-title,
.mix-title, .list-head-title, .scene-title, .lab-card-title, .rel-start-title, .empty-hero-title {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.01em;
}
.page-title { font-size: 24px; }
.login-title { font-size: 22px; }
.sheet-title, .rel-start-title, .empty-hero-title { font-size: 17px; }
.tour-title { font-size: 18px; }
.slot-win-title, .list-head-title, .lab-card-title { font-size: 19px; }
.swipe-title { font-size: 20px; }
.card-title, .mix-title, .scene-title { font-size: 14px; }
@media (max-width: 420px) { .page-title { font-size: 22px; } }

/* Свёрнутая карточка (договоры в обзоре) */
.fold-head { width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; align-items: center; gap: 8px; }
.fold-chev { display: flex; color: var(--mid); transition: transform .2s ease; }
.fold-chev.open { transform: rotate(180deg); }
/* Красная точка «загляните сюда» */
.tab-dot.alert { background: var(--danger); border-color: #121212; }
.tab.active .tab-dot.alert { background: var(--danger); border-color: var(--text); }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.hub-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
/* График аудитории: тянут пальцем, поэтому текст на нём не выделяем */
.aud-chart, .aud-hero, .aud-tile { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.aud-chart * { -webkit-user-select: none; user-select: none; }

/* ─── Столбики по дням: аккуратная сетка, скругления, подсказка по нажатию ─ */
.chart { gap: 12px; }
.chart-plot { position: relative; padding-left: 22px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chart-grid { position: absolute; left: 22px; right: 0; top: 6px; bottom: 0; pointer-events: none; }
.chart-grid span { position: absolute; left: 0; right: 0; height: 1px; background: var(--divider); }
.chart-grid span:last-of-type { background: var(--line); }
.chart-peak { position: absolute; left: -22px; top: -5px; width: 18px; text-align: right; font-style: normal; font-size: 10px; line-height: 1; color: var(--dim); }
.chart-bars { position: relative; height: 132px; gap: 6px; padding-top: 6px; cursor: pointer; }
.chart-day { border-radius: 6px 6px 2px 2px; overflow: hidden; background: transparent; transition: opacity .15s ease; }
.chart-day:hover { background: transparent; }
.chart-part { border-top: 0; }
.chart-part.bar-skip { background: #2E2E2E; }
.chart-part.bar-like { background: var(--ok); }
.chart-part.bar-contact { background: #FFFFFF; min-height: 4px; }
.chart-none { height: 2px; border-radius: 1px; background: var(--line); opacity: .9; }
.chart-bars.has-pick .chart-day:not(.picked) { opacity: .35; }
.chart-tip { min-height: 34px; font-size: 12px; line-height: 16px; color: var(--dim); transition: color .15s ease; }
.chart-tip.on { color: var(--text); }
.chart-axis { padding: 4px 0 0 22px; }
.chart + .legend, .legend { margin-top: 14px; gap: 6px 16px; font-size: 12px; color: var(--light); }
.legend-item { font-size: 12px; }

/* Вкладка «Маркет»: поиск, фильтры и список – одна карточка */
.market-card { overflow: hidden; }
.market-tools { display: grid; gap: 10px; padding: 14px 16px 12px; }
.market-tools .search .input { background: var(--raised); }
.market-card > .card-body { border-top: 1px solid var(--divider); padding: 4px 16px 6px; }
.market-card > .btn-block { width: calc(100% - 32px); margin: 4px 16px 14px; }
/* Фильтры каталога – скруглённые прямоугольники, как поле поиска рядом, а не капсулы */
.market-tools .chip-btn { border-radius: 10px; height: 36px; padding: 0 14px; }
/* Иконка «что это» – в правом верхнем углу плитки, чтобы не сдвигать подпись */
.sales-stat { position: relative; }
.sales-stat .stat-info { position: absolute; top: 8px; right: 8px; margin: 0; }

/* Плитки быстрых переходов: стеклянная 3D-иконка крупно, часть её уходит за край плитки,
   а позади – наше тёплое свечение (иконка на прозрачном фоне, свет рисуется в CSS) */
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile {
  position: relative; display: block; height: 148px; padding: 16px; overflow: hidden; isolation: isolate;
  border-radius: 20px; background: var(--card); border: 1px solid var(--border); color: var(--text);
  transition: transform .15s ease, border-color .15s ease;
}
.tile-glow { position: absolute; z-index: -1; right: -60px; bottom: -70px; width: 250px; height: 250px; object-fit: cover; pointer-events: none;
  filter: blur(46px) saturate(1.05); opacity: .26;
  -webkit-mask-image: radial-gradient(closest-side at 55% 55%, #000 0, rgba(0,0,0,.5) 45%, transparent 100%);
          mask-image: radial-gradient(closest-side at 55% 55%, #000 0, rgba(0,0,0,.5) 45%, transparent 100%); }
.tile:hover { border-color: var(--line); }
.tile:active { transform: scale(.98); }
.tile-title { position: relative; z-index: 1; display: block; max-width: 70%; font-family: var(--display); font-weight: 700; font-size: 13px; line-height: 1.3; letter-spacing: -.01em; }
.tile-art { position: absolute; z-index: 0; right: -34px; bottom: -38px; width: 178px; height: 178px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.tile-grid .tile:last-child:nth-child(odd) { grid-column: 1 / -1; height: 128px; }
/* Спокойный вариант: плитка как остальные карточки кабинета, иконка меньше, без свечения */
.tile-glow { display: none; }
.tile { height: 104px; padding: 14px 16px; border-radius: var(--r-card, 16px); }
.tile-title { font-size: 12px; max-width: 60%; }
.tile-art { width: 112px; height: 112px; right: -14px; bottom: -22px; opacity: .92; filter: none; }
.tile-grid .tile:last-child:nth-child(odd) { height: 104px; }
.tile-grid .tile:last-child:nth-child(odd) { grid-column: auto; }

/* Свечение под иконкой вместо подложки: мягкое пятно света, растворяется в фоне карточки */
.tile::after {
  content: ""; position: absolute; z-index: -1; right: -26px; bottom: -34px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .15) 0%, rgba(150, 140, 255, .10) 34%, rgba(255, 150, 120, .05) 52%, transparent 70%);
  filter: blur(8px); box-shadow: none; border: 0;
}
.tile-art { width: 112px; height: 112px; right: -4px; bottom: -8px; }

.author-fold { display: flex; align-items: center; gap: 8px; width: 100%; padding: 2px 0; background: none; border: 0; color: var(--mid); font: inherit;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left; cursor: pointer; }
.tile-title { max-width: 62%; }
.tile-art { right: -10px; }

/* Иконки крупные: выходят за правый нижний край плитки и срезаются им */
.tile, .tile-grid .tile:last-child:nth-child(odd) { height: 148px; }
.tile-title { max-width: 64%; }
.tile-art { width: 168px; height: 168px; right: -38px; bottom: -42px; }
.tile::after { right: -30px; bottom: -40px; width: 200px; height: 200px; }

/* Фон плитки – размытая копия самой иконки (как свечение на смарт-ссылках): без отдельного пятна и границ */
.tile::after { display: none; }
.tile-glow { display: block; width: 190px; height: 190px; right: -48px; bottom: -52px; object-fit: contain; mask-image: none; -webkit-mask-image: none;
  filter: blur(26px) saturate(1.2); opacity: .5; z-index: -1; }
.author-fold[hidden] { display: none; }

/* Плавное раскрытие шторок: высота анимируется через grid-rows, без замеров в JS */
.fold { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows .36s cubic-bezier(.22, 1, .36, 1), opacity .24s ease, visibility 0s linear .36s; }
.fold.open { grid-template-rows: 1fr; opacity: 1; visibility: visible;
  transition: grid-template-rows .36s cubic-bezier(.22, 1, .36, 1), opacity .3s ease .05s, visibility 0s; }
.fold-in { min-height: 0; overflow: hidden; }
.fold-chev { transition: transform .32s cubic-bezier(.22, 1, .36, 1); }
/* Значок паузы/плея на обложке мини-плеера всегда белый: позднее правило .player-cover красило его в серый и он тонул в тёмной обложке */
.player-cover .player-glyph { color: #fff; }
.player-cover.has-image .player-glyph { background: rgba(0, 0, 0, .38); }
.player-cover .player-glyph svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }

.author-actions { flex-wrap: wrap; }

.overview-tags { justify-content: flex-start; gap: 10px; height: 52px; border: 1px solid var(--line); border-radius: var(--r-card, 16px); background: var(--card); padding: 0 16px; }
.overview-tags-sub { font-size: 12px; font-weight: 500; margin-left: auto; }

/* Одинокая плитка в ряду растягивается на всю ширину */
.tile-grid .tile:last-child:nth-child(odd) { grid-column: 1 / -1; height: 120px; }
.tile-grid .tile:last-child:nth-child(odd) .tile-art { right: -8px; width: 150px; height: 150px; bottom: -34px; }
.tile-grid .tile:last-child:nth-child(odd) .tile-glow { right: -20px; }

/* Широкая плитка: иконка крупная и уходит за правый нижний край, как у остальных */
.tile-grid .tile:last-child:nth-child(odd) .tile-art { width: 210px; height: 210px; right: -40px; bottom: -72px; }
.tile-grid .tile:last-child:nth-child(odd) .tile-glow { width: 230px; height: 230px; right: -50px; bottom: -80px; }
/* Иконка в широкой плитке того же размера, что и в обычных */
.tile-grid .tile:last-child:nth-child(odd) .tile-art { width: 168px; height: 168px; right: -38px; bottom: -42px; }
.tile-grid .tile:last-child:nth-child(odd) .tile-glow { width: 190px; height: 190px; right: -48px; bottom: -52px; }
.tile-grid .tile:last-child:nth-child(odd) { height: 148px; }
.tile-grid .tile:last-child:nth-child(odd) { height: 104px; }
.tile-grid .tile:last-child:nth-child(odd) .tile-art { width: 150px; height: 150px; right: -30px; bottom: -52px; }
.tile-grid .tile:last-child:nth-child(odd) .tile-glow { width: 170px; height: 170px; right: -40px; bottom: -60px; }
.tile-grid .tile:last-child:nth-child(odd) { height: 80px; padding: 14px 16px; }
.tile-grid .tile:last-child:nth-child(odd) .tile-art { width: 124px; height: 124px; right: -22px; bottom: -44px; }
.tile-grid .tile:last-child:nth-child(odd) .tile-glow { width: 150px; height: 150px; right: -34px; bottom: -56px; }

/* Настройки рассылки: сгруппированные блоки вместо длинной ленты полей */
.set-sheet { display: grid; gap: 14px; }
.set-group { background: var(--bg, #0A0A0A); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.set-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; }
.set-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); }
.set-note { font-size: 12px; color: var(--dim); }
.set-row { padding: 14px 16px; gap: 14px; border-top: 0 !important; }
.set-group .row.row-link { min-height: 52px; padding: 8px 16px; border-top: 1px solid var(--divider); gap: 12px; }
.set-group .row.row-link:first-child { border-top: 0; }
.set-pad { padding: 4px 16px 14px; }
.set-hint { padding: 2px 16px 14px; font-size: 12px; line-height: 1.5; color: var(--dim); }
.set-error, .set-empty { padding: 4px 16px 14px; font-size: 13px; line-height: 1.45; }
.set-empty { color: var(--dim); }
.set-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.set-chips .chip-btn { height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; }
.set-limit-input { width: 96px; height: 40px; padding: 0 12px; text-align: center; }
.set-chips .chip-btn { padding: 0 12px; min-width: 52px; }
.set-chips { gap: 6px; flex-wrap: nowrap; }
.set-limit-input { width: 78px; padding: 0 8px; }

.danger-head .card-title { color: var(--dim); font-size: 13px; }
.danger-body { display: grid; gap: 12px; padding: 0 20px 18px; justify-items: start; }

/* Настройки рассылки: плоско – подпись, содержимое, тонкая линия между разделами */
.set-sheet { gap: 0; }
.set-sheet .set-row { padding: 4px 0 18px; }
.set-part { padding: 16px 0; border-top: 1px solid var(--divider); display: grid; gap: 10px; }
.set-part .set-head { padding: 0; }
.set-part .row.row-link { padding: 8px 0; min-height: 48px; border-top: 0; }
.set-part .set-hint { padding: 0; }
/* Переключатель языка в настройках рассылки: две половины на всю ширину */
.set-part .seg { display: flex; width: 100%; }
.set-part .seg button { flex: 1 1 0; justify-content: center; text-align: center; }

.set-custom { display: flex; align-items: center; gap: 12px; }
.set-custom[hidden] { display: none; }
.set-custom .input { width: 120px; height: 44px; text-align: center; }

/* «Своё» – поле ввода внутри переключателя, выглядит как его пятый пункт */
.seg-limit { display: flex; width: 100%; }
.seg-limit button { flex: 1 1 0; justify-content: center; }
.seg-input { flex: 1.2 1 0; min-width: 0; height: 32px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; color: var(--text);
  font: inherit; font-size: 13px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.seg-input::placeholder { color: var(--mid); }
.seg-input::-webkit-outer-spin-button, .seg-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.seg-input:focus { outline: none; background: var(--border); }
.seg-input.on { background: var(--border); font-weight: 600; }

/* Выбор битов для рассылки */
.pick-list .row.row-link { padding: 8px 0; min-height: 52px; gap: 12px; }

/* Каталог в шторке рассылки: плавное появление строк и круговая загрузка */
@keyframes pickIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pick-in { opacity: 0; animation: pickIn .32s cubic-bezier(.22, 1, .36, 1) forwards; }
.pick-list .empty { padding: 36px 0; }
.pick-list .spinner { width: 26px; height: 26px; }
.sheet-body .btn-block .spinner { width: 16px; height: 16px; }
.pick-list .spinner { flex-basis: 26px; }

/* Переключение разделов: мягкое всплытие содержимого */
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.view-in { animation: viewIn .38s cubic-bezier(.22, 1, .36, 1) both; }

/* Переключение вкладок внутри экрана: то же мягкое всплытие, короче */
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.swap-in { animation: swapIn .3s cubic-bezier(.22, 1, .36, 1) both; }

/* Скользящая подложка активного пункта (нижнее меню и переключатели) */
.slide-pill { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: 7px; background: var(--border);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1), width .42s cubic-bezier(.22, 1, .36, 1), height .42s cubic-bezier(.22, 1, .36, 1); }
.seg { position: relative; }
.seg > button { position: relative; z-index: 1; }
.seg.slides > button.on { background: transparent; }
.seg .slide-pill { border-radius: 7px; }
.tabbar .slide-pill { border-radius: 13px; background: var(--text); }
.tabbar.slides .tab.active::before { background: transparent; }
.tabbar.slides .tab.active:active::before { background: transparent; }

/* Обучалка: без карточки, крупная стеклянная иконка с размытым фоном */
.tour-stage { padding: 4px 2px 0; }
.tour-body { min-height: 380px; align-items: flex-start; }
.tour-art { position: relative; width: 100%; height: 190px; margin: 0 0 18px; overflow: hidden; border-radius: 22px; background: var(--card); border: 1px solid var(--border); }
.tour-art-img { position: absolute; right: -10px; bottom: -34px; width: 230px; height: 230px; object-fit: contain; }
.tour-art-glow { position: absolute; right: -40px; bottom: -60px; width: 290px; height: 290px; object-fit: contain; filter: blur(34px); opacity: .5; }
.tour-text { margin-bottom: 14px; }
.tour-hint { color: var(--dim); }
.tour-hint { background: none; border: 0; padding: 0; font-family: var(--font); font-size: 13px; }
/* Экран подключения канала: стеклянная цепь с размытым фоном вместо квадратика с иконкой; без рамки вокруг всего экрана */
.empty-hero { border: 0 !important; background: transparent !important; padding-top: 0; }
.hero-art { position: relative; width: 220px; height: 170px; margin: 0 auto 6px; }
.hero-art-img { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; transform: translate(-50%, -50%); object-fit: contain; }
.hero-art-glow { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; transform: translate(-50%, -50%); object-fit: contain; filter: blur(34px); opacity: .45; }

/* Экран подключения канала: на сетке 8px, по центру свободной высоты */
.empty-hero { min-height: calc(100dvh - 232px); justify-content: center; gap: 16px; padding: 0 24px; }
.hero-art { width: 224px; height: 176px; margin: 0 auto 8px; }
.empty-hero-title { margin: 0; }
.empty-hero-text { margin: 0 0 8px; }
.empty-hero .btn-lg { margin-top: 0; min-width: 256px; height: 56px; }
.empty-hero .btn-sm { height: 40px; }
.empty-hero { min-height: calc(100dvh - 280px); padding-bottom: 8px; }
.empty-hero .btn-sm { margin: 0; }
/* Боковая панель на компьютере стоит на месте, прокручивается только страница.
   sticky ломался из-за overflow-x: hidden на html/body, поэтому панель закреплена жёстко */
@media (min-width: 901px) {
  .shell { padding-left: var(--sidebar-w); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: auto; z-index: 20; background: var(--bg); }
}
/* Полоса прокрутки скрыта везде: прокрутка колесом, пальцем и клавишами работает как раньше */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ═══ «Обзор» битмейкера на компьютере (макет A): показатели, график, события, лучшие биты ═══ */
.pc-board { display: none; }
@media (min-width: 1100px) {
  .main { max-width: 1480px; margin: 0 auto; padding: 32px 48px 56px; }
  .pc-hide { display: none !important; }
  .pc-board { display: grid; gap: 16px; }
  .pc-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
  .pc-kpi { padding: 20px 22px 18px; }
  .pc-k { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--mid); }
  .pc-num { margin-top: 10px; font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; }
  .pc-sub { margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--mid); }
  .pc-row2 { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
  .pc-row3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
  .pc-pad { padding: 22px 24px; }
  .pc-ev, .pc-beat { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--divider); }
  .pc-pad > .pc-k + .pc-ev, .pc-pad > .pc-k + .pc-beat { border-top: 0; margin-top: 6px; }
  .pc-ev-t { font-size: 14px; font-weight: 500; line-height: 1.35; }
  .pc-ev-s { margin-top: 2px; font-size: 12.5px; color: var(--dim); }
  .pc-dot { width: 8px; height: 8px; border-radius: 50%; background: #444; flex: none; }
  .pc-dot.on { background: var(--text); }
  .pc-cover { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--raised); }
  .pc-beat { color: inherit; }
  .pc-beat-n { font-family: var(--display); font-weight: 700; font-size: 18px; text-align: right; flex: none; }
  .pc-beat-n span { display: block; font-family: var(--font); font-size: 12px; font-weight: 400; color: var(--dim); }
  .pc-taste { margin: 14px 0 0; }
  .pc-taste-h { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
  .pc-bar { height: 6px; border-radius: 3px; background: #222; overflow: hidden; }
  .pc-bar i { display: block; height: 100%; border-radius: 3px; background: var(--text); }
  .pc-empty { padding: 14px 0 4px; font-size: 13px; line-height: 1.5; color: var(--dim); }
  .pc-tiles { display: grid; gap: 12px; }
  .pc-tiles .tile { height: 104px; }
  .pc-row2 .aud-svg { max-height: none; }
  .pc-row2 .aud-chart { padding-bottom: 20px; }
}
@media (min-width: 1500px) { .pc-row2 { grid-template-columns: minmax(0, 1fr) 440px; } }
@media (min-width: 1100px) {
  .pc-row2 .aud-axis { font-size: 6px; }
  .pc-row2 .aud-chart { padding: 6px 24px 22px; }
  .pc-row2 .aud-svg { max-height: none; }
}

@media (min-width: 1100px) {
  /* Карточки одного ряда одной высоты и без пустот, даже когда данных ещё нет */
  .pc-row2, .pc-row3 { align-items: stretch; }
  .pc-row2 > .card, .pc-row2 > .stack, .pc-row3 > .card, .pc-row3 > .pc-tiles { height: 100%; }
  .pc-row2 > .stack > .card { height: 100%; }
  .pc-tiles { grid-template-rows: 1fr 1fr; }
  .pc-tiles .tile { height: auto; min-height: 104px; }
  .pc-empty { padding: 18px 0 6px; }
  .pc-row2 .aud-empty { min-height: 220px; display: grid; align-content: center; padding: 24px 28px;
    background:
      linear-gradient(180deg, transparent 0 66%, rgba(255,255,255,.05) 66% 66.4%, transparent 66.4%),
      repeating-linear-gradient(180deg, transparent 0 55px, rgba(255,255,255,.04) 55px 56px); }
  .pc-board-hero { min-height: calc(100vh - 220px); display: grid; place-items: center; }
}
@media (min-width: 1100px) { .main:has(.pc-board-hero) .hint-card { display: none; } .pc-board-hero { min-height: calc(100vh - 150px); } }
@media (min-width: 1100px) {
  /* Пустые состояния: текст по центру карточки, всё ровно, без обрезанных линий */
  .pc-pad { display: flex; flex-direction: column; }
  .pc-pad > .pc-empty { flex: 1; display: grid; place-items: center; text-align: center; margin-top: 8px; padding: 12px 24px;
    border: 1px dashed var(--line); border-radius: 14px; }
  .pc-row2 .aud-empty { background: none; padding: 0; min-height: 0; }
  .pc-row2 > .card:first-child { display: flex; flex-direction: column; }
  .pc-row2 > .card:first-child > .aud-empty { flex: 1; display: grid; place-items: center; text-align: center; margin: 8px 24px 24px;
    padding: 24px; border: 1px dashed var(--line); border-radius: 14px; min-height: 180px; }
}

/* ═══ «Профиль» на компьютере (макет P1) ═══ */
.pc-profile-p1 { display: none; }
@media (min-width: 1100px) {
  .pc-profile-p1 { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 16px; align-items: start; }
  .pc-p1-left { display: grid; gap: 16px; }
  .pc-p1-id { display: flex; align-items: center; gap: 16px; padding: 22px 24px; }
  .pc-p1-name { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.01em; margin-bottom: 6px; }
  .pc-p1-pct { display: flex; justify-content: space-between; align-items: center; }
  .pc-p1-pct b { font-family: var(--display); font-size: 18px; }
  .pc-prog { height: 8px; border-radius: 4px; background: #222; overflow: hidden; margin: 14px 0 10px; }
  .pc-prog i { display: block; height: 100%; background: var(--text); border-radius: 4px; transition: width .5s cubic-bezier(.22, 1, .36, 1); }
  .pc-cl { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; }
  .pc-ok, .pc-no { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: none; }
  .pc-ok { background: var(--text); color: var(--bg); }
  .pc-no { border: 1.5px solid #444; }
  .pc-p1-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .pc-p-card { height: 150px; padding: 22px 24px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s; }
  .pc-p-card:hover { border-color: var(--line); }
  .pc-p-v { font-size: 16px; font-weight: 600; }
  .pc-p-edit { margin-top: 6px; font-size: 13px; color: var(--dim); }
  .pc-p-tile { height: 104px; }
  .pc-p-dot { position: absolute; top: 14px; right: 14px; z-index: 2; }
  .pc-p1-foot { grid-column: 1 / -1; display: flex; justify-content: center; }
}

/* ═══ «Каталог битов» на компьютере (макет M1) ═══ */
.pc-cat { display: none; }
@media (min-width: 1100px) {
  .pc-cat { display: grid; gap: 16px; }
  .pc-cat .page-head { margin-bottom: 8px; }
  .pc-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pc-num-s { font-size: 20px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pc-pf { padding: 18px 24px 8px; min-height: 192px; }
  .pc-pf-head { margin-bottom: 4px; }
  .pc-cat-card { overflow: hidden; }
  .pc-tools { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
  .pc-search { flex: 1; min-width: 0; }
  .pc-chips { display: flex; gap: 8px; }
  .pc-table { display: grid; }
  .pc-th, .pc-tr { display: grid; grid-template-columns: minmax(0, 2.6fr) 1.3fr .8fr .9fr 1fr 44px; gap: 16px; align-items: center; padding: 0 20px; }
  .pc-th { height: 44px; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--mid); }
  .pc-tr { min-height: 68px; border-top: 1px solid var(--divider); }
  .pc-th + .pc-tr { border-top: 0; }
  .pc-tr:hover { background: var(--hover); }
  .pc-td-beat { display: flex; align-items: center; gap: 14px; min-width: 0; }
  .pc-td-n { font-weight: 600; }
  .pc-td-dim { color: var(--dim); }
  .pc-td-price { font-weight: 600; white-space: nowrap; }
  .pc-td .pc-bar { max-width: 140px; margin-bottom: 4px; }
  .pc-more { display: grid; justify-items: center; padding: 14px; border-top: 1px solid var(--divider); }
  .pc-more:empty, .pc-more:has(button[hidden]) { display: none; }
  .pc-empty-row { padding: 36px 20px; text-align: center; color: var(--dim); }
  .pc-stats { padding: 4px 20px 20px; display: grid; gap: 12px; }
  .pc-pf .pf-strip { gap: 6px; }
}

/* Единая сетка «Обзора» на компьютере: пять колонок, края всех рядов совпадают */
@media (min-width: 1100px) {
  .pc-row2, .pc-row3 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pc-row2 > :first-child { grid-column: span 3; }
  .pc-row2 > :last-child { grid-column: span 2; }
  .pc-row3 > :nth-child(1), .pc-row3 > :nth-child(2) { grid-column: span 2; }
  .pc-row3 > :nth-child(3) { grid-column: span 1; }
  .pc-tiles .tile-art { width: 130px; height: 130px; right: -30px; bottom: -34px; }
  .pc-tiles .tile-title { max-width: 80%; }
}
@media (min-width: 1500px) { .pc-row2 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ═══ «Договоры» на компьютере (макет D1): таблица и панель выбранного договора ═══ */
.pc-ct-panel { display: none; }
@media (min-width: 1100px) {
  .pc-ct { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
  .pc-ct-panel { display: block; padding: 22px 24px; position: sticky; top: 28px; }
  .table-row.sel { background: var(--hover); }
  .pc-ct-top { display: flex; justify-content: space-between; align-items: center; }
  .pc-ct-title { margin: 14px 0 6px; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
  .pc-tls { margin: 18px 0 6px; }
  .pc-tl { display: flex; gap: 14px; padding: 10px 0; }
  .pc-tl-d { width: 10px; height: 10px; border-radius: 50%; background: #444; margin-top: 6px; flex: none; }
  .pc-tl-d.on { background: var(--text); }
  .pc-ev-dim { color: var(--mid); }
  .pc-ct-actions { display: flex; gap: 10px; margin-top: 14px; }
}
@media (min-width: 1100px) {
  .pc-ct .table-head, .pc-ct .table-row { grid-template-columns: 64px minmax(0, 1.6fr) minmax(0, 1.3fr) minmax(0, 1fr) 96px 128px; gap: 16px; padding: 0 24px; }
  .pc-ct .table-row { min-height: 60px; }
}
@media (min-width: 1100px) {
  .pc-ct .table-head, .pc-ct .table-row { grid-template-columns: 56px minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1.3fr) 100px 136px; gap: 14px; padding: 0 20px; }
  .pc-ct .table-head > div { white-space: nowrap; }
  .pc-ct .table-row .cell-dim { white-space: nowrap; }
}
@media (min-width: 1100px) {
  /* Профиль: правая сетка растягивается на высоту левой колонки, ряды равные – внизу нет пустоты */
  .pc-profile-p1 { align-items: stretch; }
  .pc-p1-grid { grid-auto-rows: 1fr; align-content: stretch; }
  .pc-p-card, .pc-p-tile { height: auto; min-height: 112px; }
  .pc-p1-foot { margin-top: 4px; }
}
@media (min-width: 1100px) {
  /* Панель поиска и переключателей каталога: ничего не жмётся, переключатели одной высоты с поиском */
  .pc-tools { gap: 16px; padding: 18px 24px; flex-wrap: nowrap; }
  .pc-search { flex: 1 1 260px; min-width: 260px; }
  .pc-search .input { height: 44px; }
  .pc-tools .seg { flex: none; padding: 4px; }
  .pc-tools .seg button { height: 34px; padding: 0 16px; font-size: 14px; white-space: nowrap; }
  .pc-th, .pc-tr { padding: 0 24px; }
}

/* Жест «назад» от левого края (js/edge_back.js): плашка с шевроном, как у системного жеста Telegram */
.edge-back {
  position: fixed; left: 0; top: 50%; z-index: 60; width: 56px; height: 76px; margin-left: -56px;
  display: grid; place-items: center end; padding-right: 10px; box-sizing: border-box;
  border-radius: 0 38px 38px 0; pointer-events: none;
  background: rgba(36, 40, 46, .92); color: var(--text);
  opacity: 0; transform: translate(0, -50%);
  transition: opacity .18s ease, transform .18s ease, background .12s ease;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.edge-back svg { width: 28px; height: 28px; }
.edge-back.ready { background: var(--text); color: var(--bg); }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .edge-back { transition: opacity .12s ease; } }

/* Кто зачитает на этот бит (js/views/tags.js) */
.singers { padding: 14px 16px 16px; border-top: 1px solid var(--divider); display: grid; gap: 10px; }
.singers[hidden] { display: none; }
.singers-title { font: 600 13px var(--display); }
.singers-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; }
.singers-chev { display: flex; color: var(--mid); transition: transform .18s ease; }
.singers-head[aria-expanded="false"] .singers-chev { transform: rotate(-90deg); }
.singers-body { display: grid; gap: 4px; }
.singers-body[hidden] { display: none; }
.singers-wait { display: flex; align-items: center; gap: 10px; color: var(--mid); }

/* Карточка файла: обложка слева, поля справа, внизу действия (макет A) */
.tag-a { padding: 14px; }
.tag-a-main { display: flex; gap: 12px; align-items: flex-start; }
.tag-a-fields .input { height: 40px; }
.tag-a .tag-cover { align-self: flex-start; }
.tag-a .tag-art { width: 88px; height: 88px; aspect-ratio: auto; border-radius: 14px; }
.tag-a .tag-art-hint { opacity: 1; padding: 3px 0; font-size: 10px; }
.tag-a .tag-art-clear { width: 22px; height: 22px; top: -6px; right: -6px; }
.tag-a-main { min-width: 0; }
.tag-a-fields { flex: 1; min-width: 0; display: grid; gap: 8px; }
.tag-a-fields .input { width: 100%; min-width: 0; box-sizing: border-box; text-overflow: ellipsis; }
.tag-a-meta { display: flex; align-items: center; gap: 8px; margin: 10px 2px 10px; min-height: 28px; font-size: 12px; color: var(--mid); }
.tag-a-meta .btn-icon { margin: -4px 0; }
.tag-a-meta .btn-icon:last-child { margin: -4px -6px -4px 0; }
.tag-a-actions { display: flex; gap: 10px; }
.tag-a-actions .btn { flex: 1; justify-content: center; }
.tag-a .singers { margin: 14px -14px -14px; padding: 14px; }
.singer-ava { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #1C1C1C; border: 1px solid var(--line); display: grid; place-items: center; }
.singer-pic { width: 100%; height: 100%; object-fit: cover; display: block; }
.singer-init { font: 600 16px var(--display); color: var(--mid); }

/* Чипы артистов («Чей тайп», js/views/tags.js) */
.tchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: transparent;
  border: 1px solid #2c2c2c; color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.tchip .singer-ava { width: 28px; height: 28px; font-size: 11px; }

/* Отступы карточки файла и панели «Чей тайп» */
.singers { padding: 14px; gap: 8px; }
.singers .card-note { padding: 0; margin: 0; }
.singers-body { gap: 10px; }
.tchips { margin-top: 0; }
.tag-a-meta .btn-icon:first-child { margin-left: -8px; }
.tag-a-actions .btn-ghost { border: 1px solid var(--line); }
.tag-a { padding: 14px; }
.tag-a-meta { margin: 8px 0 12px; }

/* «Чей тайп»: заголовок с кнопкой «i» (общий stat-info), чипы прежнего размера */
.singers { padding: 12px 14px 14px; gap: 8px; }
.singers-head { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.singers-head .grow { flex: 1; }
.singers-head .stat-info { margin: 0; }
.singers-body { gap: 8px; }
.tchips { gap: 8px; }

/* Выделять и копировать можно только текст в полях ввода */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable=""], [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, video, canvas { -webkit-user-drag: none; }

/* Авторы на карточке: одна строка капсул, не переносится */
.swipe-owner.by { gap: 6px; flex-wrap: nowrap; overflow: hidden; height: 32px; }
.by-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 6px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--raised); border-color: var(--line); color: var(--light); font: inherit; font-size: 13px; white-space: nowrap; min-width: 0; flex: 0 1 auto; cursor: default; }
.by-main { padding: 0 9px 0 3px; color: var(--text); font-weight: 500; }
.by-link { cursor: pointer; }
.by-link:hover { color: var(--text); border-color: var(--border-strong, #3a3a3a); }
.by-main > svg { color: var(--dim); flex: none; }
.by-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.by-ok { flex: none; display: inline-grid; place-items: center; margin-left: 2px; line-height: 0; }
.by-co { padding: 0 11px 0 4px; flex: 0 100 auto; }
.by-co:not(.by-plain) { cursor: pointer; }
.by-stack { padding: 0 8px 0 4px; gap: 0; flex: none; cursor: pointer; }
.by-stack > * { margin-left: -6px; border: 2px solid var(--raised); border-radius: 50%; box-sizing: content-box; }
.by-stack > *:first-child { margin-left: 0; }
.by-x { color: var(--dim); font-size: 12px; flex: none; }
.by-lines { display: flex; flex-direction: column; }
.by-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--divider, #1F1F1F); background: none; color: inherit; font: inherit; text-align: left; width: 100%; }
.by-line:first-child { border-top: 0; }
.by-line.link { cursor: pointer; }

/* Соавторы бита: окно выбора */
.co-chosen { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.co-chosen:empty { display: none; }
.co-tag { display: inline-flex; align-items: center; gap: 8px; background: var(--raised); border-radius: 999px; padding: 4px 6px; font-size: 13px; max-width: 100%; }
.co-x { width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: var(--mid); font: inherit; line-height: 1; cursor: pointer; padding: 0; }
.co-sug { margin-top: 8px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg); }
.co-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--divider, #1F1F1F); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.co-row:first-child { border-top: 0; }
.co-row:hover { background: var(--hover, rgba(255, 255, 255, .04)); }
.co-plus { width: 28px; height: 28px; border-radius: 50%; border: 1px dashed var(--border); display: grid; place-items: center; color: var(--mid); flex: none; }

/* ═══ «Отложенные», экран «Текст» и помощник Write (views/discover.js, views/lyrics.js) ═══
   Кривая и приёмы те же, что у остального кабинета: ease-out, движение только через transform и opacity
   (исключение – высота у схлопывающейся строки и шторки Write, там соседям нужно подъехать). Мелкий текст –
   --mid (#8A8A8A, контраст около 5,3:1), а не --dim: у серого #666 на тёмном фоне всего 3,4:1.
   Все кнопки нажимаются с запасом: видимый размер меньше, зона касания 44 px (псевдоэлемент ::after). */

/* ── Список отложенных ── */
.note-link { position: relative; }
.note-dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.narrow-page, .note-page { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }

.fav-swipe {
  position: relative; overflow: hidden;
  transition: height .28s cubic-bezier(.22, 1, .36, 1), opacity .2s ease-out, transform .28s cubic-bezier(.22, 1, .36, 1);
}
.fav-swipe.fav-out { height: 0 !important; opacity: 0; transform: translateX(10px); }
.fav-row {
  align-items: flex-start; gap: 12px; padding: 12px 14px; touch-action: pan-y;
  transition: transform .28s cubic-bezier(.32, .72, 0, 1);
}
/* Красная кнопка растёт справа по мере сдвига строки. Левый край самой строки тает у границы списка
   (--fade растёт вместе со сдвигом, в покое маски нет) */
.fav-swipe { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade, 0px)); mask-image: linear-gradient(to right, transparent 0, #000 var(--fade, 0px)); }
.fav-swipe .fav-row { will-change: transform; }
.fav-swipe.dragging .fav-row, .fav-swipe.dragging .fav-del { transition: none; }
.fav-del {
  position: absolute; top: 6px; right: 10px; bottom: 6px; width: 0; padding: 0; border: 0; overflow: hidden;
  border-radius: 18px; background: var(--danger); color: #fff; font-family: inherit; font-weight: 500; font-size: 12px; line-height: 1.2; cursor: pointer;
  transition: width .38s cubic-bezier(.32, .72, 0, 1), transform .14s cubic-bezier(.22, 1, .36, 1);
}
.fav-del:active { transform: scale(.96); }
.fav-del > span {
  position: absolute; top: 0; right: 0; bottom: 0; width: 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  opacity: var(--p, 0); transform: scale(calc(.7 + .3 * var(--p, 0)));
}
.fav-swipe .fav-row { transition: transform .38s cubic-bezier(.32, .72, 0, 1); }
@media (prefers-reduced-motion: reduce) { .fav-row, .fav-del { transition: none !important; } }
.fav-row .fav-cover { flex: 0 0 64px; width: 64px; }
.fav-row .row-cover-img { width: 64px; border-radius: 10px; }
.fav-row .row-play .play { width: 36px; height: 36px; }
.fav-actions { display: flex; flex: none; gap: 0; margin: -4px -6px 0 0; }
.fav-actions .btn-icon.btn-sm { width: 32px; position: relative; transition: transform .14s cubic-bezier(.22, 1, .36, 1), color .15s ease, background-color .15s ease; }
.fav-actions .btn::after { content: ''; position: absolute; inset: -5px -2px; }
.fav-actions .btn:active { transform: scale(.92); }

/* ── Экран «Текст»: всё на одном экране, без прокрутки страницы ──
   Высота как у колоды в свайпах: вычитаем поля, док и панель Telegram. Поле тянется на всё свободное место,
   прокручивается только оно само. Пока открыта клавиатура, высоту задаёт скрипт по видимой области. */
.note-page {
  height: calc(100dvh - var(--tg-top) - var(--tabbar-space) - var(--safe-t) - var(--safe-b) - 44px);
  min-height: 360px; gap: 12px;
}
@media (min-width: 901px) { .note-page { height: calc(100dvh - 88px); } }
.note-page .page-head { margin-bottom: 0; flex: none; }
.note-page > .card, .note-page > .note-chips { flex: none; }

/* Блоки всплывают по очереди с шагом 40 мс */
.note-in > * { opacity: 0; animation: pickIn .34s cubic-bezier(.22, 1, .36, 1) forwards; }
.note-in > :nth-child(2) { animation-delay: 40ms; }
.note-in > :nth-child(3) { animation-delay: 80ms; }
.note-in > :nth-child(4) { animation-delay: 120ms; }
.note-in > :nth-child(5) { animation-delay: 160ms; }
/* Человек выключил движение в приложении (umt-motion = reduce): всё на месте сразу, без переходов */
.note-page.calm.note-in > * { opacity: 1; animation: none; }
.note-page.calm *, .note-page.calm *::after { transition: none !important; animation: none !important; }

/* Плеер и перемотка */
.note-head { padding: 12px 14px 6px; gap: 12px; }
.note-seek-wrap { padding: 0 14px 10px; }
.note-seek { position: relative; transition: opacity .2s ease-out; }
.note-seek::after { content: ''; position: absolute; inset: -11px 0; }
.note-seek .player-seek-fill { transition: width .28s linear; }
.note-seek .player-seek-knob { transition: left .28s linear, transform .12s ease; }
.note-seek.dragging .player-seek-fill, .note-seek.dragging .player-seek-knob { transition: none; }

/* Метки секций */
.note-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.note-chip {
  position: relative; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line);
  background: var(--card); color: var(--mid); font: inherit; font-size: 12px; cursor: pointer;
  transition: transform .14s cubic-bezier(.22, 1, .36, 1), color .15s ease, border-color .15s ease;
}
.note-chip::after { content: ''; position: absolute; inset: -7px -3px; }
.note-chip:active { transform: scale(.94); }

/* Поле: рамка и фон на обёртке. Внутри ОДНА прокручиваемая область (note-edit): textarea и зеркало лежат в одной ячейке
   сетки и прокручиваются вместе, без скриптовой синхронизации (так не расходятся курсор и текст, и прокрутка не дёргается).
   Textarea прозрачный и даёт курсор, ввод и выделение; видимый текст рисует зеркало с теми же шрифтом, отступами и переносами. */
.note-field {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: border-color .18s ease;
}
.note-field:focus-within { border-color: var(--text); }
.note-edit { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.note-edit::-webkit-scrollbar { display: none; }
/* Запас снизу под кнопки: последняя строка прокручивается выше них, а пустое место под текстом нажимается как поле */
.note-stack { display: grid; box-sizing: border-box; min-height: 100%; padding-bottom: 84px; }
.note-field .note-area, .note-mirror {
  grid-area: 1 / 1; margin: 0; width: 100%; min-width: 0; box-sizing: border-box;
  padding: 12px 14px; border: 0; border-radius: 0;
  font: 400 15px/1.55 var(--font); letter-spacing: normal; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
}
.note-field .note-area {
  background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--text);
  outline: none; resize: none; overflow: hidden; z-index: 1;
  height: auto; min-height: 0;    /* у базового .input высота 46px: перебиваем, иначе поле остаётся в одну строку */
  align-self: stretch;            /* и растягивается в ячейке сетки на высоту зеркала */
}
.note-field .note-area::placeholder { color: var(--mid); -webkit-text-fill-color: var(--mid); }
.note-field .note-area::selection { background: rgba(255, 255, 255, .22); -webkit-text-fill-color: transparent; }
.note-mirror { color: var(--text); pointer-events: none; }
.note-tag { color: var(--mid); }

/* Только что вставленное подсвечено и плавно гаснет: видно, что именно изменилось */
.note-mirror .note-ins { background-color: rgba(255, 255, 255, .22); border-radius: 3px; animation: insFade 1.6s ease-out both; }
@keyframes insFade { from { background-color: rgba(255, 255, 255, .3); } to { background-color: rgba(255, 255, 255, 0); } }

/* Рифмы: линия по низу слова. У каждой группы свой цвет И свой рисунок линии (сплошная, штрих, точки),
   чтобы группы различались и без цвета. Слово, ставшее рифмой только что (rh-new), подчёркивается слева направо */
.note-mirror .rh {
  background-image: linear-gradient(var(--rh), var(--rh)); background-repeat: no-repeat;
  background-position: 0 100%; background-size: 100% 2px; padding-bottom: 1px;
  transition: background-size .3s cubic-bezier(.22, 1, .36, 1);
}
.note-mirror .rh1, .note-mirror .rh4 { background-image: repeating-linear-gradient(90deg, var(--rh) 0 6px, transparent 6px 9px); }
.note-mirror .rh3, .note-mirror .rh5 { background-image: repeating-linear-gradient(90deg, var(--rh) 0 2px, transparent 2px 5px); }
.note-mirror .rh-new { animation: rhIn .45s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes rhIn { from { background-size: 0 2px; } }
/* Слово и вставлено только что, и стало рифмой: обе анимации идут вместе, иначе одна перебивает другую */
.note-mirror .rh-new.note-ins { animation: rhIn .45s cubic-bezier(.22, 1, .36, 1) both, insFade 1.6s ease-out both; }
.note-field.no-rh .rh { background-size: 0 2px; }
.note-mirror .rh0 { --rh: #7FB2FF; }
.note-mirror .rh1 { --rh: #FFB26B; }
.note-mirror .rh2 { --rh: #8FE0A6; }
.note-mirror .rh3 { --rh: #E39BFF; }
.note-mirror .rh4 { --rh: #FFE27A; }
.note-mirror .rh5 { --rh: #72DCE0; }

/* Нижняя полоса: слева подсказки (не сохранено, отмена), справа кнопки */
/* Плашки слева – той же высоты, что круглые кнопки справа (40 px), и с зазором: плотно стоящие разной высоты выглядели криво */
.note-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 10px 10px; pointer-events: none;
}
.note-bar > * { pointer-events: auto; }
.note-hints { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; overflow: hidden; }
/* Текст плавно уходит под кнопки и под верхний край затуханием из цвета фона в прозрачное, а не упирается в сплошную полосу:
   границы не режут глаз. Градиент без чужого серого посередине: цвет фона и тот же цвет с нулевой непрозрачностью */
.note-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 88px; pointer-events: none; z-index: 2;
  background: linear-gradient(to top, var(--bg) 0%, var(--bg) 30%, rgba(10, 10, 10, 0) 100%);
}
.note-fade-top { top: 0; bottom: auto; height: 22px; background: linear-gradient(to bottom, var(--bg) 0%, rgba(10, 10, 10, 0) 100%); }
/* Страница с полем сама считает свою высоту до плавающего меню (скрипт), поэтому нижний отступ контейнера не нужен */
.main:has(.note-page) { padding-bottom: 0; }
.note-undo, .note-sync {
  position: relative; height: 40px; padding: 0 16px; border-radius: 20px; flex: none; white-space: nowrap;
  background: var(--card); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
  animation: pickIn .25s cubic-bezier(.22, 1, .36, 1) both;
  transition: opacity .18s ease, transform .18s cubic-bezier(.22, 1, .36, 1);
}
.note-sync { border-style: dashed; color: var(--light); }
.note-undo::after, .note-sync::after { content: ''; position: absolute; inset: -2px; }
.note-undo.out, .note-sync.out { opacity: 0; transform: translateY(4px); pointer-events: none; }
.note-undo[hidden], .note-sync[hidden] { display: none; }

.note-tools { display: flex; gap: 8px; }
.note-tool {
  position: relative; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border); color: var(--light);
  transition: transform .14s cubic-bezier(.22, 1, .36, 1), color .15s ease, border-color .15s ease;
}
.note-tool::after { content: ''; position: absolute; inset: -2px; }
.note-tool:active { transform: scale(.92); }
.note-ai, .note-rh.on { color: var(--text); }
.note-rh.on { border-color: var(--line); }
@media (hover: hover) and (pointer: fine) {
  .note-chip:hover { color: var(--text); border-color: var(--mid); }
  .note-tool:hover { color: var(--text); border-color: var(--line); }
}
.note-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #fff; color: #0A0A0A; font-size: 10px; font-weight: 700; display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.note-badge[hidden] { display: none; }

/* Клавиатура открыта: плавающее меню уезжает вниз и тает, а не пропадает рывком */
@media (max-width: 900px) {
  .tabbar { transition: transform .26s cubic-bezier(.22, 1, .36, 1), opacity .2s ease-out; }
  .kb-open .tabbar { display: grid; transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; }
}

/* ── Write: шторка помощника ── */
.wr { display: flex; flex-direction: column; min-height: 120px; }
.wr-view { display: flex; flex-direction: column; gap: 12px; }
.wr-sub { display: block; font-size: 12px; color: var(--mid); line-height: 1.35; }
.wr-t { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.wr-center { text-align: center; }
.wr-foot { padding: 4px 2px 0; }
.wr-num { display: inline-block; }
.wr-quota { display: flex; flex-direction: column; gap: 8px; }
.wr-quota-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wr-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--light); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.wr-pill svg, .wr-cost svg { flex: none; color: var(--light); }
.wr-bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.wr-bar i { display: block; height: 100%; background: var(--text); border-radius: 2px; transition: width .4s cubic-bezier(.22, 1, .36, 1); }
.wr-acts { display: flex; flex-direction: column; }
.wr-act {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 2px; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--border); color: inherit; font: inherit; cursor: pointer;
  transition: opacity .15s ease, transform .14s cubic-bezier(.22, 1, .36, 1), background-color .15s ease;
}
.wr-act:first-child { border-top: 0; }
.wr-act:active { transform: scale(.985); background-color: var(--raised); }
.wr-act.off { opacity: .5; }
.wr-ic { width: 26px; height: 26px; flex: none; display: grid; place-items: center; color: var(--light); }
.wr-act .grow { display: flex; flex-direction: column; gap: 1px; }
.wr-cost { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 11px; color: var(--mid); }
.wr-again {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px dashed var(--line); background: none; color: var(--light); font: inherit; font-size: 13px; cursor: pointer;
  transition: transform .14s cubic-bezier(.22, 1, .36, 1), background-color .15s ease;
}
.wr-again:active { transform: scale(.985); background-color: var(--raised); }

/* Ожидание: стадии и скелетоны будущих карточек, чтобы шторка не схлопывалась */
.wr-wait { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0 8px; }
.wr-status { display: block; }
.wr-skel { gap: 8px; pointer-events: none; }
.wr-skel i { display: block; position: relative; overflow: hidden; height: 14px; border-radius: 7px; background: var(--raised); }
.wr-skel i:nth-child(1) { width: 92%; }
.wr-skel i:nth-child(2) { width: 74%; }
.wr-skel i:nth-child(3) { width: 52%; }
.wr-skel i::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent); animation: wrShimmer 1.3s ease-in-out infinite;
}
@keyframes wrShimmer { to { transform: translateX(100%); } }

/* Результат: вся карточка нажимается, плюс и галочка только подсказывают действие */
.wr-res-head { display: flex; flex-direction: column; gap: 2px; }
.wr-list { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; }
.wr-opt {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px; animation: pickIn .3s cubic-bezier(.22, 1, .36, 1) both;
}
.wr-opt:nth-child(2) { animation-delay: 40ms; }
.wr-opt:nth-child(3) { animation-delay: 80ms; }
.wr-opt:nth-child(n+4) { animation-delay: 110ms; }
.wr-opt.tap { cursor: pointer; transition: transform .14s cubic-bezier(.22, 1, .36, 1), background-color .15s ease, border-color .15s ease; }
.wr-opt.tap:active { transform: scale(.99); background-color: var(--raised); }
.wr-ln { font-size: 15px; line-height: 1.5; color: var(--text); }
.wr-angle { font-weight: 600; }
.wr-first { color: var(--light); }
.wr-opt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wr-opt-row .wr-sub { flex: 1; min-width: 0; }
.wr-ins {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); color: var(--light); transition: color .15s ease, border-color .15s ease;
}
@media (hover: hover) and (pointer: fine) { .wr-opt.tap:hover { border-color: var(--line); } .wr-opt.tap:hover .wr-ins { color: var(--text); border-color: var(--dim); } }
.wr-pair { display: flex; gap: 8px; }
.wr-pair .btn { flex: 1; }

/* Ритм: слоги против такта */
.wr-rhythm { gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.wr-rl { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 12px; }
.wr-rl + .wr-rl { border-top: 1px solid var(--border); }
.wr-rl-t { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.wr-rl-n { font-size: 12px; color: var(--light); font-variant-numeric: tabular-nums; }
.wr-flag { font-size: 11px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.wr-meter { grid-column: 1 / -1; position: relative; height: 5px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.wr-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--light); border-radius: 3px; }
.wr-meter b { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); }
.wr-cut { grid-column: 1 / -1; justify-self: start; }

/* Закрыто или ошибка */
.wr-lock { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 12px 4px 0; }
.wr-lock > .btn { width: 100%; }
.wr-lock h3 { margin: 0; font-size: 16px; text-wrap: balance; }
.wr-lock p { margin: 0; color: var(--light); font-size: 13px; }
.wr-lock .wr-pair { width: 100%; }
.wr-lock-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); }

/* ── Write на обложке в свайпах: левее «поделиться», тот же кружок и тот же отступ ── */
.swipe-write {
  position: absolute; right: 90px; bottom: 14px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px); transition: background .15s, transform .15s;
}
.swipe-write:hover { background: rgba(0, 0, 0, .7); transform: scale(1.06); }
.swipe-write:active { transform: scale(.94); }
/* История: четвёртый кружок в том же ряду, слева от Write */
.swipe-hist {
  position: absolute; right: 130px; bottom: 14px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: rgba(0, 0, 0, .58);
  border: 1px solid rgba(255, 255, 255, .18);
  transition: background .15s, transform .15s;   /* без blur: четвёртый размытый кружок на двух карточках тормозил свайп на телефоне */
}
@media (hover: hover) and (pointer: fine) { .swipe-hist:hover { background: rgba(0, 0, 0, .7); transform: scale(1.06); } }
.swipe-hist:active { transform: scale(.94); }
.hist-sheet .card-body { padding: 0; }
.hist-sheet .fav-row { padding-left: 0; padding-right: 0; }
.hist-wait { padding: 28px 16px; text-align: center; color: var(--mid); font-size: 14px; }
/* Заглушка на время загрузки: те же пять строк по высоте, что и в списке, поэтому шторка не меняет размер */
.hist-sheet { height: min(560px, 58vh); overflow-y: auto; overscroll-behavior: contain; }
.hist-ghost-row { display: flex; gap: 14px; align-items: center; height: 104px; padding: 0 2px; border-bottom: 1px solid var(--divider); }
.hist-ghost-row i { width: 64px; height: 64px; border-radius: 12px; background: var(--raised); flex-shrink: 0; }
.hist-ghost-row span { flex: 1; height: 44px; border-radius: 8px; background: linear-gradient(90deg, var(--raised), var(--hover), var(--raised)); background-size: 200% 100%; animation: histShimmer 1.4s linear infinite; }
@keyframes histShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .hist-ghost-row span { animation: none; } }
.hist-sheet.ready { animation: histIn .18s ease-out both; }
@keyframes histIn { from { opacity: .4; } to { opacity: 1; } }
/* Кружки на обложке (Write, поделиться, i, история) нажимаются с запасом до 44 px */
.swipe-hist::after, .swipe-write::after, .swipe-share::after, .swipe-why::after { content: ''; position: absolute; inset: -6px; }

/* ─── Главная артиста: Write сверху, отложенные лентой ───────────────────── */
.ah { display: grid; gap: 14px; }
.ah-in > * { animation: pickIn .32s cubic-bezier(.22, 1, .36, 1) both; }
.ah-in > *:nth-child(2) { animation-delay: 60ms; }
.ah-hero {
  position: relative; display: block; overflow: hidden; isolation: isolate; padding: 18px; border-radius: 20px; color: var(--text);
  border: 1px solid var(--border); background: linear-gradient(160deg, #171717, #0e0e0e); text-decoration: none;
  transition: border-color .18s ease, transform .12s ease;
}
.ah-hero:hover { border-color: var(--line); }
.ah-hero:active { transform: scale(.99); }
.ah-bg { position: absolute; z-index: -1; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(30px) saturate(1.35); opacity: .8; transform: translateZ(0); }
.ah-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(160deg, rgba(14, 14, 14, .15), rgba(10, 10, 10, .72)); }
.ah-hero-main { position: relative; min-width: 0; }
.ah-hero-beat { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.ah-hero-cover { position: relative; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex: none; background: var(--raised); }
.ah-hero-meta { min-width: 0; }
.ah-hero-title { font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.25; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-hero-empty .ah-hero-title { white-space: normal; max-width: 70%; margin-bottom: 8px; font-size: 15px; }
.ah-hero-sub { color: var(--mid); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-lines { margin: 0 0 16px; padding-left: 12px; border-left: 2px solid rgba(255, 255, 255, .22); color: var(--light); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.ah-lines em { font-style: normal; color: var(--dim); }
.ah-lines-empty { border-left: 0; padding-left: 0; font-size: 14px; color: var(--mid); }
.ah-cta { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 20px; border-radius: 12px; background: #fff; color: #000; font-weight: 600; font-size: 14px; }
.ah-shelf-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 2px 10px; }
.ah-shelf-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: -.01em; }
.ah-all { display: inline-flex; align-items: center; gap: 2px; color: var(--mid); font-size: 13px; text-decoration: none; }
.ah-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.ah-row::-webkit-scrollbar { display: none; }
.ah-it { width: 112px; flex: none; scroll-snap-align: start; }
.ah-it .list-art { width: 112px; }
@media (min-width: 901px) {
  .ah-hero { padding: 26px; min-height: 236px; }
      .ah-hero-title { font-size: 18px; }
  .ah-hero-cover { width: 64px; height: 64px; }
  .ah-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; }
  .ah-it, .ah-it .list-art { width: auto; }
  .ah-it:nth-child(n+7) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ah-in > * { animation: none; } }
.ah, .ah > * { min-width: 0; }
/* Правой колонки нет (нечего решать): основная занимает всю ширину, а не оставляет справа пустую полосу */
@media (min-width: 901px) {
  .layout-2:has(> .stack:only-child) { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .layout-2:has(> .stack:only-child) .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layout-2:has(> .stack:only-child) .tile, .layout-2:has(> .stack:only-child) .tile-grid .tile:last-child:nth-child(odd) { height: 148px; grid-column: auto; }
}

@media (max-width: 900px) {
  /* Перо стоит «вдали», как дальние фигуры на лендинге: полного размера, но не в фокусе и чуть плавает за текстом */
      .ah-hero-title, .ah-hero-sub { max-width: 100%; }
  .ah-lines { font-size: 14px; }
}

.ah-search { position: relative; }
.ah-found { margin-top: 8px; overflow: hidden; }
.ah-chip-slot { display: inline-flex; align-items: center; }
.ah-credit {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--card);
  border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; transition: border-color .18s ease, transform .12s ease;
}
.ah-credit:hover { border-color: var(--line); }
.ah-credit:active { transform: scale(.97); }
@media (max-width: 900px) {
  .ah-newc { display: none; }
  .page-head:has(.ah-chip-slot) { position: relative; }
  .ah-chip-slot { position: absolute; right: 0; top: 4px; }
}
/* Главная артиста собрана заранее: появляется одним мягким проявлением, без подъёма, чтобы ничего не «ехало» */
@keyframes viewFade { from { opacity: 0; } to { opacity: 1; } }
.main.view-in:has(.ah) { animation: viewFade .26s ease-out both; }
/* Фон карточки светлее, поэтому второстепенный текст в ней контрастнее */
.ah-hero-sub, .ah-lines-empty { color: var(--light); }
.ah-lines em { color: var(--mid); }

.ah-art { all: unset; box-sizing: border-box; position: relative; display: block; cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.ah-art:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ah-art .list-cover { display: block; }
.ah-art::after { content: ""; position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 0 2px #fff; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.ah-art.playing::after { opacity: 1; }
.ah-art:active { transform: scale(.98); }
.ah-glyph {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 10, 10, .62); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: scale(.8); transition: opacity .18s ease, transform .22s cubic-bezier(.22, 1, .36, 1); pointer-events: none;
}
.ah-glyph.show { opacity: 1; transform: none; }
.ah-name { color: var(--text); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .ah-glyph { transition: opacity .1s; transform: none; } }
.tile-play .play.on { background: var(--text); color: var(--bg); }

/* Счётчики бита в каталоге: отложили, написали, пролистали. Иконка и число, без подписей */
.bs { display: flex; gap: 10px; flex: none; align-items: flex-end; }
.bs-c { display: grid; justify-items: center; gap: 2px; min-width: 28px; font-variant-numeric: tabular-nums; }
.bs-c b { font-size: 13px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.bs-c svg { display: block; }
.bs-like svg { fill: var(--ok); stroke: none; color: var(--ok); }
.bs-contact svg { color: var(--text); }
.bs-skip svg { color: var(--mid); }
.bs-c.z b { color: var(--dim); font-weight: 500; }
.bs-c.z svg { opacity: .35; }
.bs-none { flex: none; font-size: 11.5px; color: var(--dim); }
@media (max-width: 420px) { .bs { gap: 6px; } .bs-c { min-width: 24px; } }

/* ─── Выпуск релизов (прототип): дашборд, мастер релиза, страница релиза, откуда данные ─── */
.ds-page { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.ds-p { margin: 0; color: var(--light); font-size: 14px; line-height: 1.55; }
.ds-lead { padding: 0 2px; }
.ds-fine { margin: 0; color: var(--mid); font-size: 12.5px; line-height: 1.5; }
.ds-demo { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; color: var(--mid); font-size: 12.5px; line-height: 1.45; }
.ds-demo svg { flex: none; margin-top: 2px; }
.ds-demo a { color: var(--light); text-decoration: underline; text-underline-offset: 2px; }
.ds-period { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ds-link { display: inline-flex; align-items: center; gap: 6px; color: var(--mid); font-size: 13px; background: none; border: 0; cursor: pointer; padding: 0; }
a.ds-link:hover, button.ds-link:hover { color: #fff; }
.ds-src { flex: none; font-size: 10.5px; letter-spacing: .04em; color: var(--mid); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ds-tag { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 12px; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--border); color: var(--light); white-space: nowrap; }
.ds-tag.ok { color: var(--ok); border-color: #2f4b2a; background: rgba(155, 196, 138, .08); }
.ds-tag.bad { color: var(--danger); border-color: #5a2a27; background: rgba(229, 83, 75, .08); }
.ds-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ds-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 900px) { .ds-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.ds-kpi { padding: 14px 16px; display: grid; gap: 8px; min-width: 0; }
.ds-kpi-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--mid); font-size: 12.5px; }
.ds-kpi-v { font: 800 24px/1 var(--display); letter-spacing: -.03em; white-space: nowrap; }
.ds-kpi-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--mid); font-size: 12px; }
.ds-delta { display: inline-flex; align-items: center; gap: 2px; color: var(--ok); font-weight: 600; background: rgba(155, 196, 138, .1); border-radius: 999px; padding: 2px 8px; }
.ds-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@media (min-width: 1000px) { .ds-grid { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; } }
.ds-col { display: grid; gap: 12px; min-width: 0; }
.ds-card { padding: 16px; min-width: 0; }
.ds-card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ds-card-h b { display: block; font-size: 15px; font-weight: 600; }
.ds-card-h span:not(.ds-src) { font-size: 12.5px; color: var(--mid); }
.ds-chartbox { position: relative; margin-top: 30px; }
.ds-chart { width: 100%; height: auto; display: block; }
.ds-mark { position: absolute; top: -28px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; overflow: hidden; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.ds-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-tip { position: absolute; transform: translate(calc(-100% - 12px), -50%); background: #fff; color: #000; border-radius: 10px; padding: 6px 10px; white-space: nowrap; display: grid; gap: 1px; pointer-events: none; }
.ds-tip b { font: 700 13px var(--display); letter-spacing: -.02em; }
.ds-tip span { font-size: 11px; color: #555; }
.ds-bars { display: grid; gap: 14px; }
.ds-bar-h { display: flex; justify-content: space-between; font-size: 13px; color: var(--light); margin-bottom: 6px; }
.ds-bar-h b { color: #fff; font-weight: 600; }
.ds-bar-t { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ds-bar-t i { display: block; height: 100%; border-radius: 3px; background: #fff; }
.ds-rels { display: grid; }
.ds-rel { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--divider); color: inherit; text-decoration: none; min-width: 0; }
.ds-rel:first-child { border-top: 0; padding-top: 0; }
.ds-rel > svg { color: var(--dim); flex: none; }
.ds-cv { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--raised); }
.ds-rel-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ds-rel-t b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-rel-t span { font-size: 12.5px; color: var(--mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-rel-s { color: var(--light); display: none; flex: none; }
.ds-rel-n { display: none; text-align: right; flex: none; }
.ds-rel-n b { display: block; font-size: 14px; }
.ds-rel-n span { font-size: 11.5px; color: var(--mid); }
@media (min-width: 640px) { .ds-rel-s, .ds-rel-n { display: block; } }
.ds-todos { display: grid; gap: 8px; }
.ds-todo { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: inherit; text-decoration: none; }
.ds-todo > svg { color: var(--dim); flex: none; }
.ds-todo-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ds-todo-t b { font-size: 13.5px; font-weight: 600; }
.ds-todo-t span { font-size: 12px; color: var(--mid); }
.ds-ti { flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; color: var(--light); }
.ds-empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 36px 20px; }
.ds-empty b { font: 800 18px/1.2 var(--display); letter-spacing: -.02em; }
.ds-empty p { margin: 0; color: var(--light); font-size: 14px; line-height: 1.5; max-width: 40ch; }
.ds-empty-ico { width: 56px; height: 56px; border-radius: 18px; border: 1px solid var(--border); background: var(--raised); display: grid; place-items: center; color: var(--light); }
.ds-sheet { display: grid; gap: 14px; }
.ds-hero { display: flex; gap: 16px; align-items: center; padding: 14px; }
.ds-hero-cv { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; flex: none; }
.ds-hero > div { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.ds-hero p { margin: 0; color: var(--light); font-size: 13.5px; line-height: 1.5; }
.ds-fix { display: flex; }
.ds-tl { padding: 16px 16px 4px; }
.ds-tl-i { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.ds-tl-i::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 1px; background: var(--line); }
.ds-tl-i:last-child::before { display: none; }
.ds-tl-i i { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: var(--card); z-index: 1; font-style: normal; }
.ds-tl-i b { display: block; font-size: 14px; font-weight: 600; color: var(--mid); }
.ds-tl-i span { font-size: 12.5px; color: var(--dim); }
.ds-tl-i.done i { background: #fff; color: #000; border-color: #fff; }
.ds-tl-i.done b, .ds-tl-i.cur b, .ds-tl-i.bad b { color: #fff; }
.ds-tl-i.cur i { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }
.ds-tl-i.bad i { border-color: var(--danger); color: var(--danger); }
.ds-spark-b { color: var(--light); }
.ds-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ds-act { display: grid; gap: 4px; justify-items: start; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); color: inherit; text-decoration: none; }
.ds-act .ds-ti { margin-bottom: 8px; }
.ds-act b { font-size: 14px; font-weight: 600; }
.ds-act span:not(.ds-ti) { font-size: 12px; color: var(--mid); line-height: 1.4; }
.ds-w { display: flex; flex-direction: column; gap: 12px; }
.ds-whead { display: flex; align-items: flex-start; gap: 10px; }
.ds-whead > div { min-width: 0; padding-top: 2px; }
.ds-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); margin-bottom: 6px; }
.ds-whead h1 { margin: 0; font: 800 24px/1.1 var(--display); letter-spacing: -.03em; }
.ds-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.ds-steps i { height: 3px; border-radius: 2px; background: var(--line); }
.ds-steps i.on { background: #fff; }
.ds-ticket { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.ds-ticket img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.ds-ticket div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ds-ticket b { font-size: 15px; font-weight: 600; }
.ds-ticket span { font-size: 12.5px; color: var(--mid); }
.ds-chip { flex: none; font-size: 11.5px; color: var(--light); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.ds-player { padding: 16px; display: grid; gap: 14px; }
.ds-file { display: flex; align-items: center; gap: 12px; }
.ds-file > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ds-file b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-file span { font-size: 12.5px; color: var(--mid); }
.ds-fi { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); display: grid; place-items: center; color: var(--light); }
.ds-pl { display: flex; align-items: center; gap: 14px; }
.ds-play { flex: none; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; padding-left: 2px; }
.ds-wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 56px; min-width: 0; }
.ds-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--line); }
.ds-wave i.on { background: #fff; }
.ds-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ds-spec { position: relative; border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 12px; display: grid; gap: 4px; }
.ds-spec span { font-size: 11.5px; color: var(--mid); padding-right: 22px; white-space: nowrap; }
.ds-spec b { font: 700 15px var(--display); letter-spacing: -.02em; }
.ds-spec i { position: absolute; right: 10px; top: 10px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.ds-spec i.ok { background: rgba(155, 196, 138, .15); color: var(--ok); }
.ds-spec i.bad { background: rgba(229, 83, 75, .15); color: var(--danger); }
.ds-okline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ok); font-weight: 500; }
.ds-okline::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.ds-warn { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid #5a2a27; background: rgba(229, 83, 75, .06); color: var(--light); font-size: 13px; line-height: 1.5; }
.ds-warn b { display: block; color: #fff; margin-bottom: 2px; }
.ds-warn svg { flex: none; color: var(--danger); margin-top: 1px; }
.ds-cover-row { display: flex; gap: 14px; align-items: center; }
.ds-cover { position: relative; flex: none; width: 112px; height: 112px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.ds-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-cover button { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; background: rgba(0, 0, 0, .65); backdrop-filter: blur(6px); border: 0; border-radius: 8px; padding: 5px; color: #fff; cursor: pointer; }
.ds-cover-i { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.ds-cover-i b { font-size: 15px; }
.ds-cover-i > span:not(.ds-tag) { font-size: 12.5px; color: var(--mid); line-height: 1.45; }
.ds-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ds-field { display: grid; gap: 6px; min-width: 0; }
.ds-field.wide { grid-column: 1 / -1; }
.ds-field > span { font-size: 12px; color: var(--mid); }
.ds-sec { font-size: 12px; color: var(--mid); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.ds-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ds-date { border: 1px solid var(--border); background: var(--card); color: var(--mid); border-radius: 14px; padding: 12px 6px; display: grid; gap: 3px; justify-items: center; font-size: 12px; cursor: pointer; min-height: 64px; align-content: center; }
.ds-date b { color: #fff; font: 700 16px var(--display); letter-spacing: -.02em; }
.ds-date.on { border-color: #fff; background: rgba(255, 255, 255, .05); }
.ds-opts { display: grid; gap: 10px; }
.ds-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; text-align: left; color: inherit; border: 1px solid var(--border); border-radius: 16px; background: var(--card); cursor: pointer; }
.ds-opt.on { border-color: #fff; background: rgba(255, 255, 255, .03); }
.ds-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); position: relative; margin-top: 1px; }
.ds-opt.on .ds-radio { border-color: #fff; }
.ds-opt.on .ds-radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.ds-opt-b { display: grid; gap: 10px; flex: 1; min-width: 0; }
.ds-opt-t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; flex-wrap: wrap; }
.ds-opt-t em { font-style: normal; font-size: 11px; font-weight: 600; color: #000; background: #fff; border-radius: 999px; padding: 2px 9px; }
.ds-opt-d { font-size: 12.5px; color: var(--mid); margin-top: -6px; }
.ds-doc { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.ds-doc b { display: block; font-size: 13.5px; font-weight: 600; }
.ds-doc span:not(.ds-fi) { font-size: 12px; color: var(--mid); }
.ds-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--light); font-size: 13px; line-height: 1.5; }
.ds-note svg { flex: none; color: var(--mid); margin-top: 1px; }
.ds-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ds-tile { border: 1px solid var(--border); background: var(--card); color: var(--mid); border-radius: 16px; padding: 14px 8px; display: grid; gap: 4px; justify-items: center; text-align: center; cursor: pointer; font-size: 12px; }
.ds-tile b { color: #fff; font-size: 14px; font-weight: 600; }
.ds-tile.on { border-color: #fff; background: rgba(255, 255, 255, .05); }
.ds-tile .ds-ti { margin-bottom: 6px; }
.ds-tile.on .ds-ti { background: #fff; color: #000; border-color: #fff; }
.ds-explain { padding: 16px; display: grid; gap: 12px; }
.ds-explain b { font-size: 14px; }
.ds-explain ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--light); font-size: 13px; line-height: 1.45; }
.ds-explain-c { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--divider); padding-top: 12px; font-size: 13px; color: var(--mid); }
.ds-explain-c b { font: 700 15px var(--display); letter-spacing: -.02em; color: #fff; }
.ds-ta { resize: vertical; min-height: 140px; }
.ds-contract { padding: 14px; display: grid; gap: 8px; font-size: 13px; color: var(--light); line-height: 1.5; }
.ds-contract p { margin: 0; }
.ds-code { letter-spacing: .3em; text-align: center; font-size: 18px; }
.ds-sum { display: flex; gap: 16px; padding: 16px; align-items: center; }
.ds-sum img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; flex: none; }
.ds-sum > div { display: grid; gap: 4px; min-width: 0; }
.ds-sum b { font: 700 17px/1.15 var(--display); letter-spacing: -.02em; }
.ds-sum span { font-size: 12.5px; color: var(--mid); }
.ds-sum em { font-style: normal; display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--light); margin-top: 4px; }
.ds-checks { padding: 4px 14px; }
.ds-ck { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--divider); }
.ds-ck:first-child { border-top: 0; }
.ds-ci { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--light); }
.ds-ck.ok .ds-ci { background: rgba(155, 196, 138, .15); border-color: #2f4b2a; color: var(--ok); }
.ds-ck b { display: block; font-size: 14px; font-weight: 600; }
.ds-ck span:not(.ds-ci) { font-size: 12.5px; color: var(--mid); }
/* Автоматическая проверка: те же размеры, что у плашки «Файлы и обложка / Права / Текст» (.ds-ck), цвет только у значка */
.ck-card { padding: 4px 14px; }
.ck-list { display: grid; }
.ck-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--divider); }
.ck-list > .ck-row:first-child { border-top: 0; }
.ck-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--light); }
.ck-row.ok .ck-ic { background: rgba(155, 196, 138, .15); border-color: #2f4b2a; color: var(--ok); }
.ck-row.warn .ck-ic { background: rgba(227, 182, 90, .14); border-color: #5a4a22; color: #E3B65A; }
.ck-row.fail .ck-ic { background: rgba(229, 83, 75, .14); border-color: #5c2622; color: var(--danger); }
.ck-row.run .ck-ic { color: var(--mid); }
.ck-ic .spinner { width: 12px; height: 12px; }
.ck-b { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ck-b b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.ck-b span { font-size: 12.5px; line-height: 1.4; color: var(--mid); }
.ck-row .btn-sm { flex: none; }
.ck-what { font-style: normal; font-weight: 600; color: var(--light); }
.ck-what.fail { color: var(--danger); }
.ck-what.warn { color: #E3B65A; }
.ck-group { align-items: flex-start; }
.ck-group .ck-ic { margin-top: 1px; }
.ck-card { isolation: isolate; }
.ck-card .ck-group { position: relative; }
.ck-card .ck-group::before { content: ''; position: absolute; inset: 0 -14px; z-index: -1; opacity: 0; pointer-events: none; }
.ck-card .ck-group.ok::before { background: rgba(155, 196, 138, .12); }
.ck-card .ck-group.warn::before { background: rgba(227, 182, 90, .12); }
.ck-card .ck-group.fail::before { background: rgba(229, 83, 75, .14); }
.ck-b .ck-fix { justify-self: start; margin-top: 8px; gap: 4px; padding-right: 10px; }
.ck-b .ck-fix svg { opacity: .7; }
/* Пункты внутри группы и под видео/документом: строка без кружка, с отступом под значок группы */
.ck-list.ck-sub { margin: -6px 0 8px 38px; gap: 8px; }
.ck-list.ck-sub .ck-row, .ck-list.compact .ck-row { border-top: 0; padding: 0; gap: 10px; }
.ck-list.ck-sub .ck-ic, .ck-list.compact .ck-ic { display: none; }
.ck-list.ck-sub .ck-b b, .ck-list.compact .ck-b b { font-size: 13px; }
.ck-list.ck-sub .ck-row.fail .ck-b b, .ck-list.compact .ck-row.fail .ck-b b { color: var(--danger); }
.ck-list.ck-sub .ck-row.warn .ck-b b, .ck-list.compact .ck-row.warn .ck-b b { color: #E3B65A; }
.ck-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--mid); }
.dx-proof-card .ck-list.compact { margin: 2px 0 0 24px; gap: 6px; }
.ck-lead { display: flex; align-items: center; gap: 8px; margin: 0; }
.ck-list .ck-sub + .ck-group { border-top: 1px solid var(--divider); }
/* ─── Движение автоматической проверки и загрузки видео ───
   Кривая одна на всё: быстрый старт, мягкая остановка (ease-out). Галочка «прыгает» с лёгким перелётом (spring без отскока туда-сюда),
   штрих значка дорисовывается линией, строка коротко подсвечивается цветом результата. Двигаются только transform и opacity. */
:root { --ck-ease: cubic-bezier(0.23, 1, 0.32, 1); --ck-spring: cubic-bezier(0.34, 1.56, 0.64, 1); }
.ck-card { position: relative; overflow: hidden; }
.ck-prog { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.ck-prog i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(var(--to, 0)); }
.ck-prog.ok i { background: var(--ok); }
.ck-prog.fail i { background: var(--danger); }
.ck-row.run .ck-b span { color: var(--mid); }
.dx-up { display: grid; gap: 8px; margin-top: 10px; }
.dx-up[hidden] { display: none; }
.dx-up-row { display: flex; align-items: center; gap: 8px; color: var(--mid); font-size: .84rem; line-height: 1.35; }
.dx-up-bar { position: relative; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.dx-up-bar i { position: absolute; inset: 0; border-radius: 2px; background: #fff; transform-origin: left; transform: scaleX(0); transition: transform .3s var(--ck-ease); }
@media (prefers-reduced-motion: no-preference) {
  /* Вход на экран: пункты лесенкой */
  .ck-card.enter .ck-group { animation: ck-in .42s var(--ck-ease) both; }
  .ck-card.enter .ck-group:nth-child(2) { animation-delay: 60ms; }
  .ck-card.enter .ck-group:nth-child(3) { animation-delay: 120ms; }
  .ck-card.enter .ck-group:nth-child(4) { animation-delay: 180ms; }
  .ck-card.enter .ck-group:nth-child(5) { animation-delay: 240ms; }
  /* Полоса хода: от прошлого значения к новому; пока ждём сервер – бегущий отрезок */
  .ck-prog i { animation: ck-grow .45s var(--ck-ease) both; }
  .ck-prog.busy i { width: 38%; transform: none; animation: ck-run 1.2s cubic-bezier(.65, 0, .35, 1) infinite; }
  /* Пока пункт ждёт своей очереди – текст тихо мерцает */
  .ck-row.run .ck-b > * { animation: ck-breathe 1.6s ease-in-out infinite; }
  /* Пункт отметился: значок прыгает, штрих рисуется, строка вспыхивает цветом результата, причина выезжает */
  .ck-group.fresh .ck-ic { animation: ck-pop .5s var(--ck-spring) both; }
  .ck-group.fresh .ck-ic [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ck-draw .34s var(--ck-ease) .12s forwards; }
  .ck-group.fresh::before { animation: ck-flash .9s var(--ck-ease); }
  .ck-group.fresh .ck-b > span { animation: ck-in .34s var(--ck-ease) .06s both; }
  .ck-card.done-fail .ck-fix { animation: ck-in .36s var(--ck-ease) .16s both; }
  .ck-card.done-ok { animation: ck-done .9s var(--ck-ease); }
  .ck-lead.swap { animation: ck-in .32s var(--ck-ease) both; }
  .ck-fix { transition: transform .12s ease-out; }
  .ck-fix:active { transform: scale(.97); }
  /* Загрузка видео: подпись сменилась – проявляется; на сервере – бегущий отрезок; результат – карточка мягко «встаёт» */
  .dx-up:not([hidden]) { animation: ck-in .3s var(--ck-ease) both; }
  .dx-up-t.swap { animation: ck-fade .24s ease both; }
  .dx-up-bar.busy i { width: 38%; transform: none; transition: none; animation: ck-run 1.2s cubic-bezier(.65, 0, .35, 1) infinite; }
  .dx-proof-card.appear .dx-proof-file, .dx-proof-card.appear .ck-list { animation: ck-in .38s var(--ck-ease) both; }
  .dx-proof-card.appear .ck-list { animation-delay: 80ms; }
  @keyframes ck-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes ck-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes ck-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
  @keyframes ck-draw { to { stroke-dashoffset: 0; } }
  @keyframes ck-grow { from { transform: scaleX(var(--from, 0)); } to { transform: scaleX(var(--to, 0)); } }
  @keyframes ck-run { from { transform: translateX(-100%); } to { transform: translateX(270%); } }
  @keyframes ck-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
  @keyframes ck-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes ck-done { 0% { box-shadow: 0 0 0 0 rgba(155, 196, 138, .35); } 100% { box-shadow: 0 0 0 10px rgba(155, 196, 138, 0); } }
}
@media (prefers-reduced-motion: reduce) {
  .ck-group.fresh .ck-ic, .ck-group.fresh .ck-b > span, .ck-card.done-fail .ck-fix, .ck-lead.swap, .dx-proof-card.appear .ck-list { animation: ck-fade-r .2s ease both; }
  @keyframes ck-fade-r { from { opacity: 0; } to { opacity: 1; } }
}



.ds-sign { display: flex; gap: 14px; align-items: center; padding: 14px; text-align: left; color: #fff; cursor: pointer; border: 1px solid rgba(255, 255, 255, .25); border-radius: 16px; background: var(--card); width: 100%; }
.ds-sign > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ds-sign b { font-size: 14.5px; font-weight: 600; }
.ds-sign span span { font-size: 12.5px; color: var(--mid); }
.ds-sign > svg { color: var(--mid); flex: none; }
.ds-drow { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--divider); }
.ds-drow:first-of-type { border-top: 0; padding-top: 0; }
.ds-dn { display: grid; gap: 2px; }
.ds-dn b { font-size: 14px; font-weight: 600; }
.ds-dn span { font-size: 12.5px; color: var(--mid); }
.ds-dr { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ds-dneed { font-size: 12.5px; color: var(--light); flex: 1; min-width: 180px; }
.ds-dr em { font-style: normal; font-size: 11.5px; color: var(--dim); }
@media (min-width: 900px) { .ds-drow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; } }
@media (prefers-reduced-motion: reduce) { .ds-tl-i.cur i { box-shadow: none; } }

.ds-w .ed-dock { flex-direction: row; gap: 10px; }
.ds-w .ed-dock .btn { flex: 1 1 0; min-width: 0; }

/* ─── Выпуск релизов, деньги и статистика (iOS-подход) ───────────────────────────────────
   Сетка 4 pt: отступы 4, 8, 12, 16, 24, 32. Радиусы: 12 у кнопок и полей, 16 у карточек.
   Шкала шрифтов: 11 подпись капсом, 12 мелкий, 13 вторичный, 15 основной, 17 строка, 20 заголовок блока, 28 заголовок экрана, 34 число. */
.dx-page, .ds-page { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.dx-head { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.dx-nav { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-left: -8px; }
.dx-back, .dx-back-ph { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; text-decoration: none; }
.dx-back:active { background: var(--raised); }
.dx-head h1 { margin: 4px 0 0; font: 800 28px/32px var(--display); letter-spacing: -.03em; }
.dx-head p { margin: 0; font-size: 13px; line-height: 20px; color: var(--mid); }
.dx-over { font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); padding-top: 8px; }
.dx-sub { font-size: 13px; line-height: 20px; color: var(--mid); }
.dx-p { margin: 0; font-size: 15px; line-height: 22px; color: var(--light); }
.dx-note { margin: 0; font-size: 13px; line-height: 20px; color: var(--mid); }
.dx-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dx-card.flush { padding: 0; gap: 0; overflow: hidden; }
.dx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: #fff; font-size: 15px; line-height: 22px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .1s ease-out; }
.dx-btn:active { transform: scale(.98); }
.dx-btn.primary { background: #fff; color: #000; border-color: #fff; }
.dx-btn.small { height: 44px; padding: 0 16px; font-size: 14px; }
.dx-btn.grow { flex: 1; }
.dx-btn[disabled] { opacity: .4; cursor: default; }
.dx-btn[disabled]:active { transform: none; }
.dx-foot { display: flex; flex-direction: row; gap: 12px; }
.dx-foot .dx-btn { flex: 1; min-width: 0; white-space: nowrap; }
.dx-demo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; color: var(--mid); font-size: 12px; line-height: 16px; }
.dx-demo svg { flex: none; }
.dx-demo a { color: var(--light); text-decoration: underline; text-underline-offset: 2px; }
.dx-reset { margin-left: auto; background: none; border: 0; color: var(--light); font: inherit; cursor: pointer; padding: 8px 0 8px 8px; }
.dx-balance { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.dx-balance-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dx-balance-h .dx-over { padding-top: 0; }
.dx-upd { font-size: 12px; line-height: 16px; color: var(--dim); text-align: right; }
.dx-balance-v { display: flex; flex-direction: column; gap: 4px; }
.dx-balance-v b { font: 800 34px/40px var(--display); letter-spacing: -.04em; }
.dx-balance-v span { font-size: 13px; line-height: 20px; color: var(--mid); }
.dx-balance-a { display: flex; align-items: center; gap: 16px; }
.dx-balance-a .dx-btn { flex: 1; }
.dx-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--light); font-size: 13px; line-height: 20px; background: none; border: 0; cursor: pointer; text-decoration: none; padding: 0; }
.dx-link.center { justify-content: center; width: 100%; color: var(--mid); }
.dx-chart-h { display: flex; flex-direction: column; gap: 4px; }
.dx-chart-h .dx-over { padding-top: 0; }
.dx-chart-v { display: flex; align-items: center; gap: 8px; }
.dx-chart-v b { font: 800 28px/32px var(--display); letter-spacing: -.03em; }
.dx-delta { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 8px; border-radius: 12px; background: rgba(155, 196, 138, .12); color: var(--ok); font-size: 12px; font-weight: 600; }
.dx-delta[hidden] { display: none; }
.dx-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; height: 156px; }
.dx-bar { display: flex; flex-direction: column; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; min-height: 44px; color: inherit; }
.dx-bar-col { flex: 1; display: flex; align-items: flex-end; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.dx-bar-col i { display: block; width: 100%; border-radius: 8px; background: #3A3A3A; transition: background-color .15s ease-out; }
.dx-bar.on .dx-bar-col i { background: #fff; }
.dx-bar-l { font-size: 12px; line-height: 16px; color: var(--mid); text-align: center; }
.dx-bar.on .dx-bar-l { color: #fff; font-weight: 600; }
.dx-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border-top: 1px solid var(--divider); color: inherit; text-decoration: none; }
.dx-row:first-child { border-top: 0; }
a.dx-row:active { background: var(--raised); }
.dx-row > svg { flex: none; color: var(--dim); }
.dx-row-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dx-row-b b { font-size: 15px; line-height: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-row-b span { font-size: 13px; line-height: 18px; color: var(--mid); }
.dx-trail { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.dx-trail b { font-size: 15px; line-height: 20px; font-weight: 600; }
.dx-trail span { font-size: 12px; line-height: 16px; color: var(--mid); }
.dx-cv { flex: none; border-radius: 10px; object-fit: cover; display: block; background: var(--raised); }
.dx-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); display: grid; place-items: center; color: var(--light); }
.dx-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--border); color: var(--light); font-size: 12px; line-height: 16px; white-space: nowrap; }
.dx-chip.ok { color: var(--ok); border-color: #2F4B2A; background: rgba(155, 196, 138, .08); }
.dx-chip.bad { color: var(--danger); border-color: #5A2A27; background: rgba(229, 83, 75, .08); }
.dx-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 24px 8px; }
.dx-empty b { font: 800 18px/24px var(--display); letter-spacing: -.02em; }
.dx-empty p { margin: 0; color: var(--light); font-size: 15px; line-height: 22px; max-width: 36ch; }
.dx-empty-ico { width: 56px; height: 56px; border-radius: 16px; border: 1px solid var(--border); background: var(--raised); display: grid; place-items: center; color: var(--light); }
.dx-sheet { display: flex; flex-direction: column; gap: 16px; }
.dx-hero { display: flex; gap: 16px; align-items: center; padding: 8px 0; }
.dx-hero img { width: 104px; height: 104px; border-radius: 16px; object-fit: cover; flex: none; }
.dx-hero > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.dx-hero p { margin: 0; font-size: 13px; line-height: 20px; color: var(--light); }
.dx-kpi2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dx-kpi { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dx-kpi span { font-size: 13px; line-height: 20px; color: var(--mid); }
.dx-kpi b { font: 800 22px/28px var(--display); letter-spacing: -.03em; white-space: nowrap; }
.dx-more { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: inherit; min-height: 64px; }
.dx-more > svg { color: var(--dim); flex: none; }
.dx-more:active { background: var(--raised); }
.dx-tl { padding: 16px 16px 4px; gap: 0; }
.dx-tl-i { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.dx-tl-i::before { content: ""; position: absolute; left: 11px; top: 28px; bottom: 4px; width: 1px; background: var(--line); }
.dx-tl-i:last-child::before { display: none; }
.dx-tl-i i { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; z-index: 1; }
.dx-tl-i b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--mid); }
.dx-tl-i span { font-size: 13px; line-height: 18px; color: var(--dim); }
.dx-tl-i.done i { background: #fff; color: #000; border-color: #fff; }
.dx-tl-i.done b, .dx-tl-i.cur b, .dx-tl-i.bad b { color: #fff; }
.dx-tl-i.cur i { border-color: #fff; }
.dx-tl-i.cur i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.dx-tl-i.bad i { border-color: var(--danger); color: var(--danger); }
.dx-thead, .dx-trow { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; align-items: center; min-height: 48px; font-size: 15px; line-height: 20px; }
.dx-thead { min-height: 24px; font-size: 12px; line-height: 16px; color: var(--mid); }
.dx-trow { border-top: 1px solid var(--divider); }
.dx-thead .n, .dx-trow .n { text-align: right; }
.dx-trow span:first-child { color: var(--light); }
.dx-kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--divider); font-size: 15px; line-height: 20px; }
.dx-kv:first-child { border-top: 0; }
.dx-kv span { color: var(--mid); font-size: 13px; }
.dx-kv b { font-weight: 600; text-align: right; }
.dx-card:has(> .dx-kv:first-child) { gap: 0; padding-top: 4px; padding-bottom: 4px; }
.dx-w { display: flex; flex-direction: column; gap: 12px; }
.dx-stack { display: flex; flex-direction: column; gap: 12px; }
.dx-center { align-items: center; text-align: center; }
.dx-center .dx-card { align-self: stretch; text-align: left; }
.dx-sum { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.dx-sum .dx-over { padding-top: 0; }
.dx-sum b { font: 800 34px/40px var(--display); letter-spacing: -.04em; }
.dx-opt { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.dx-opt:first-child { border-top: 0; }
.dx-opt.on { background: rgba(255, 255, 255, .04); }
.dx-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--dim); position: relative; }
.dx-opt.on .dx-radio { border-color: #fff; }
.dx-opt.on .dx-radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.dx-field { display: flex; flex-direction: column; gap: 8px; }
.dx-field > span { font-size: 13px; line-height: 20px; color: var(--mid); }
.dx-input { height: 48px; padding: 0 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: #fff; font-size: 15px; width: 100%; }
.dx-input:focus { outline: 0; border-color: #fff; }
.dx-banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 16px; border: 1px solid #5A2A27; background: rgba(229, 83, 75, .07); color: var(--danger); }
.dx-banner svg { flex: none; margin-top: 3px; }
.dx-banner b { display: block; font-size: 15px; line-height: 20px; color: #fff; }
.dx-banner span { font-size: 13px; line-height: 18px; color: var(--light); }
.dx-check { display: flex; gap: 12px; align-items: center; min-height: 44px; color: var(--light); font-size: 15px; line-height: 20px; cursor: pointer; }
.dx-check i { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--dim); display: grid; place-items: center; color: transparent; }
.dx-check i.on { background: #fff; border-color: #fff; color: #000; }
.dx-done { width: 64px; height: 64px; border-radius: 50%; background: rgba(155, 196, 138, .12); color: var(--ok); display: grid; place-items: center; border: 1px solid #2F4B2A; margin-top: 16px; }
.dx-done-t { margin: 8px 0 0; font: 800 20px/26px var(--display); letter-spacing: -.02em; }
.dx-done-p { margin: 0; color: var(--light); font-size: 15px; line-height: 22px; max-width: 32ch; }
.dx-hist { display: flex; flex-direction: column; }
.dx-hist .dx-row { padding-left: 0; padding-right: 0; }
@media (min-width: 900px) {
  .dx-page { max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) { .dx-btn, .dx-bar-col i { transition: none; } }
@media (prefers-reduced-transparency: reduce) { .dx-back:active { background: var(--raised); } }

.dx-page .seg { display: flex; width: 100%; }
.dx-page .seg button { flex: 1; }
.dx-demo { justify-content: space-between; }
.dx-demo span { flex: 1 1 auto; }
.dx-hist .dx-row { padding-left: 16px; padding-right: 16px; }
.dx-balance-a .dx-btn { white-space: nowrap; }

.dx-demo { flex-wrap: nowrap; }
.dx-demo span { white-space: nowrap; }
.dx-demo a, .dx-reset { white-space: nowrap; flex: none; }
.ds-whead h1 { font-size: 28px; line-height: 32px; }
.ds-whead > .btn { flex: none; }

/* переключатель */
.dx-seg { --i: 0; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 40px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); isolation: isolate; width: 100%; }
.dx-seg-thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 8px; background: #2A2A2A; box-shadow: 0 1px 2px rgba(0, 0, 0, .4); transform: translateX(calc(var(--i) * 100%)); transition: transform .28s cubic-bezier(.22, 1, .36, 1); }
.dx-seg button { position: relative; z-index: 1; border: 0; background: none; padding: 0 8px; border-radius: 8px; color: var(--mid); font: 500 13px/20px var(--font); cursor: pointer; transition: color .15s ease-out; white-space: nowrap; }
.dx-seg button.on { color: #fff; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .dx-seg-thumb { transition: none; } }
/* кнопка-иконка рядом с главной кнопкой */
.dx-iconbtn { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--light); text-decoration: none; }
.dx-iconbtn:active { background: var(--raised); }
.dx-balance-a { gap: 12px; }
.dx-row-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.dx-row-btn > svg { flex: none; color: var(--dim); transition: transform .2s ease-out; }
.dx-row-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }
.dx-row-btn:active { background: var(--raised); }
.dx-stack[hidden] { display: none; }
.dx-reset { align-self: center; margin: 0; padding: 12px 16px; }
.dx-demo { flex-wrap: wrap; }

/* столбцы за год и всё время: колонки не уже 44, прокрутка по горизонтали */
.dx-bars.scroll { grid-auto-columns: minmax(44px, 1fr); overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; scroll-snap-type: x proximity; }
.dx-bars.scroll::-webkit-scrollbar { display: none; }
.dx-bars.scroll .dx-bar { scroll-snap-align: end; }
.dx-delta.down { background: rgba(229, 83, 75, .12); color: var(--danger); }
.dx-delta.down svg { transform: rotate(180deg); }
.dx-kv.flat { border-top: 1px solid var(--divider); padding-top: 4px; }
.dx-kv.flat span { font-size: 13px; }
/* плитки продвижения */
.dx-promos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dx-promo { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .1s ease-out; }
a.dx-promo:active { transform: scale(.98); }
.dx-promo.off { opacity: .55; }
.dx-promo-art { position: relative; height: 96px; overflow: hidden; background: var(--raised); }
.dx-promo-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.55) saturate(1.2); transform: scale(1.3); }
.dx-promo-ic { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px); color: #fff; }
.dx-promo-b { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px 16px; }
.dx-promo-b b { font-size: 15px; line-height: 20px; font-weight: 600; }
.dx-promo-b span { font-size: 13px; line-height: 18px; color: var(--mid); }
@media (prefers-reduced-motion: reduce) { .dx-promo { transition: none; } }

/* цена и баланс значком */
.ds-cr { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--light); }
.ds-cr svg { color: currentColor; }
.ds-cr.low { color: var(--danger); }
.ds-tile .ds-cr { justify-content: center; }
.ds-explain-c .ds-cr { font: 700 15px/20px var(--display); letter-spacing: -.02em; color: #fff; }
.ds-explain-c .ds-cr.low { color: #fff; }
.ds-bal { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ds-doc-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ds-doc-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-doc .ds-link { flex: none; min-height: 44px; padding-left: 8px; }
.ds-opt .dx-btn { height: 44px; align-self: flex-start; }
.ds-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--light); font-size: 13px; cursor: pointer; padding: 0; }
.ds-opt { cursor: pointer; }
.ds-w .dx-link.center { margin-top: 4px; }
.btn[disabled] { opacity: .4; }

button.ds-doc { width: 100%; text-align: left; color: inherit; cursor: pointer; font: inherit; }
button.ds-doc > svg { flex: none; color: var(--dim); }
.ds-doc-t span { font-size: 12px; line-height: 16px; color: var(--mid); }

/* цена значком баланса из кабинета: число и иконка, без красного */
.ds-cr { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--light); }
.ds-cr.low { color: var(--light); }
.ds-explain-c .ds-cr { font: 700 15px/20px var(--display); letter-spacing: -.02em; color: #fff; }
.ds-warn.soft { border-color: var(--border); background: var(--raised); }
.ds-warn.soft svg { color: var(--mid); }
.ds-warn.soft b { margin-bottom: 4px; }
.ds-opt .dx-btn { width: 100%; }
.ds-opt-b { min-width: 0; }
button.ds-doc { padding: 10px 12px; gap: 12px; align-items: center; }
.ds-doc-t b { font-size: 14px; line-height: 20px; white-space: normal; }

.ds-bal { display: block; line-height: 24px; }
.ds-bal .ds-cr { vertical-align: middle; }

/* даты выхода: до трёх плиток, последняя открывает календарь */
.ds-dates { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.ds-date { position: relative; overflow: hidden; }
.ds-date > svg { color: #fff; }
.ds-date input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.ds-date-now { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; line-height: 20px; color: var(--mid); }
.ds-date-now b { color: #fff; font-weight: 600; }

/* подсказки под полями и артисты в треке */
.ds-hint { font-style: normal; font-size: 12px; line-height: 16px; color: var(--dim); }
.ds-chips2 { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-chip2 { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 16px; border-radius: 22px; border: 1px solid var(--border); background: var(--card); color: #fff; font-size: 15px; line-height: 20px; }
.ds-chip2 em { font-style: normal; font-size: 12px; color: var(--mid); }
.ds-chip2 button { display: grid; place-items: center; width: 28px; height: 28px; margin-right: -4px; border: 0; border-radius: 50%; background: var(--raised); color: var(--light); cursor: pointer; padding: 0; }
.ds-chip2.me { padding-right: 16px; }
.ds-chip2.add { padding: 0 16px 0 12px; color: var(--light); border-style: dashed; background: none; cursor: pointer; font: inherit; font-size: 14px; }

.ds-field { align-content: start; }
.ds-field .input, .ds-field select { height: 48px; box-sizing: border-box; margin: 0; }

/* список артистов в треке */
.ds-alist { overflow: hidden; }
.ds-arow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; color: inherit; text-align: left; width: 100%; font: inherit; }
.ds-arow:first-child { border-top: 0; }
.ds-arow-b { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ds-arow-b b { font-size: 15px; line-height: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-arow-b span { font-size: 13px; line-height: 18px; color: var(--mid); }
.ds-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--border); color: var(--light); font: 700 15px/20px var(--display); }
.ds-av.plus { background: none; border-style: dashed; border-color: var(--dim); }
.ds-arow.add { cursor: pointer; }
.ds-arow.add b { color: var(--light); font-weight: 500; }
.ds-arow.add:active { background: var(--raised); }
.ds-arm { flex: none; width: 44px; height: 44px; margin: -4px -8px -4px 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--mid); cursor: pointer; }
.ds-arm:active { background: var(--raised); }
.ds-form { grid-template-columns: 1fr; }

/* состав релиза: тип, список треков, настройка каждого */
.ds-kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-kinds .ds-date { cursor: default; }
.ds-kinds .ds-date span { white-space: nowrap; }
.ds-sec-row { display: flex; align-items: center; justify-content: space-between; min-height: 20px; margin-top: 4px; }
.ds-sec-row .ds-sec { margin: 0; }
.ds-sec-row .ds-link { min-height: 44px; margin: -12px -8px; padding: 0 8px; color: #fff; font-size: 15px; }
.ds-av.num { font: 700 15px/20px var(--display); }
.ds-av.ok { background: rgba(155, 196, 138, .12); border-color: #2f4b2a; color: var(--ok); }
.ds-av.bad { background: rgba(229, 83, 75, .1); border-color: #5a2a27; color: var(--danger); }
.ds-arow-b span.bad { color: var(--danger); }
.ds-ok { flex: none; display: grid; place-items: center; width: 28px; height: 28px; color: var(--ok); }
.ds-edit { flex: none; display: flex; align-items: center; margin: -4px -8px -4px 0; }
.ds-mv { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--light); cursor: pointer; padding: 0; }
.ds-mv:active { background: var(--raised); }
.ds-mv.dn svg { transform: rotate(180deg); }
.ds-mv.rm { color: var(--mid); }
.ds-mv[disabled] { opacity: .3; pointer-events: none; }
.ds-arow.go { cursor: pointer; }
.ds-arow.go:active { background: var(--raised); }
.ds-arow.go > svg { flex: none; color: var(--dim); }
.ds-prog { display: grid; gap: 8px; font-size: 13px; line-height: 20px; color: var(--mid); }
.ds-prog i { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ds-prog u { display: block; height: 100%; background: #fff; border-radius: 2px; transition: width .25s cubic-bezier(.23, 1, .32, 1); }
.ds-tabbody { display: grid; gap: 16px; }
.ds-inline-act { display: grid; }
.ds-inline-act .btn { width: 100%; }
.ds-arow.edit { min-height: 64px; }
.ds-arow.edit .ds-arow-b span { display: none; }

/* выпуск релизов по-настоящему: загрузка, договор, пустые обложки */
.dx-load { display: grid; place-items: center; min-height: 160px; }
.dx-load .spinner { width: 26px; height: 26px; }
.ds-cover-ph, .ds-ticket-ph { display: grid; place-items: center; background: var(--raised); color: var(--mid); }
.ds-cover-ph { width: 100%; aspect-ratio: 1; border-radius: inherit; }
.ds-ticket-ph { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.ds-contract-frame { width: 100%; height: 320px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.ds-sigbox { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
.ds-sigbox .sig-pad { display: block; width: 100%; height: 150px; touch-action: none; }
.ds-arow .spinner { width: 18px; height: 18px; }
.ds-sum .ds-ticket-ph { width: 56px; height: 56px; border-radius: 12px; }

.dx-hero-ph { width: 104px; height: 104px; border-radius: 16px; flex: none; display: grid; place-items: center; background: var(--raised); color: var(--mid); }
.dx-promo-art:not(:has(img)) { background: var(--raised); }

.dx-acts { display: flex; align-items: center; gap: 8px; }
.dx-btn.danger { color: var(--danger); border-color: #5a2a27; }

.ds-field.err .input { border-color: var(--danger); }
.ds-field.err .ds-hint { color: var(--danger); }

/* обрезка обложки */
.ds-crop { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #000; touch-action: none; cursor: grab; }
.ds-crop:active { cursor: grabbing; }
.ds-crop-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.ds-crop-grid { position: absolute; inset: 0; pointer-events: none; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
  background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .28)) 33.33% 0 / 1px 100% no-repeat, linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .28)) 66.66% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .28)) 0 33.33% / 100% 1px no-repeat, linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .28)) 0 66.66% / 100% 1px no-repeat; }
.ds-crop-row { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 13px; color: var(--mid); }
.ds-crop-zoom { flex: 1; height: 28px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; outline: none; cursor: pointer; --p: 0%; }
.ds-crop-zoom::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--text) var(--p), var(--line) var(--p)); }
.ds-crop-zoom::-moz-range-track { height: 4px; border-radius: 999px; background: var(--line); }
.ds-crop-zoom::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--text); }
.ds-crop-zoom::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); cursor: grab; }
.ds-crop-zoom::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); cursor: grab; }
.ds-crop-zoom:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--text); outline-offset: 2px; }

/* заглушки загрузки: серые плашки по форме экрана, мягкая пульсация */
.dx-skels { display: grid; gap: 12px; }
.dx-skel { border-radius: 16px; background: var(--card); border: 1px solid var(--border); animation: dxPulse 1.4s ease-in-out infinite; }
@keyframes dxPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dx-skel { animation: none; } }

/* мои обращения */
.rp-list { display: grid; gap: 12px; }
.rp-load { display: grid; place-items: center; min-height: 120px; }
.rp-card { display: grid; gap: 10px; padding: 16px; }
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rp-head b { font-size: 16px; line-height: 22px; }
.rp-chip { font-size: 12px; line-height: 16px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--light); white-space: nowrap; }
.rp-chip.rp-done { color: var(--ok); border-color: #2f4b2a; background: rgba(155, 196, 138, .08); }
.rp-chip.rp-closed { color: var(--mid); }
.rp-when { font-size: 12px; line-height: 16px; color: var(--dim); }
.rp-text { margin: 0; font-size: 14px; line-height: 20px; color: var(--light); overflow-wrap: anywhere; }
.rp-path { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rp-path li { display: grid; gap: 6px; font-size: 11.5px; line-height: 14px; color: var(--dim); }
.rp-path li i { display: block; height: 3px; border-radius: 2px; background: var(--line); }
.rp-path li.done i, .rp-path li.cur i { background: #fff; }
.rp-path li.cur, .rp-path li.done { color: var(--light); }
.rp-path li.cur span { color: #fff; font-weight: 600; }
.rp-path li em { font-style: normal; font-size: 10.5px; color: var(--dim); }
.rp-path.closed li { opacity: .5; }
.rp-note { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 4px; }
.rp-note span { font-size: 12px; color: var(--dim); }
.rp-note p { margin: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }

/* профиль и настройки в системе раздела «Релизы» */
.dx-prof { display: flex; align-items: center; gap: 16px; padding: 4px 0 8px; }
.dx-prof h1 { margin: 0; font: 800 28px/32px var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.dx-prof p { margin: 2px 0 0; font-size: 13px; line-height: 20px; color: var(--mid); }
.dx-group { display: grid; gap: 8px; min-width: 0; }
.dx-over-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dx-over-row .card-count { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--dim); }
.dx-row-as-btn { width: 100%; border: 0; border-top: 1px solid var(--divider); background: none; text-align: left; font: inherit; cursor: pointer; }
.dx-row-as-btn:first-child { border-top: 0; }
.dx-row-as-btn:active, a.dx-row.link:active { background: var(--raised); }
.dx-row-b b.dx-wrap { white-space: normal; overflow: visible; }
.dx-row .dx-plain { color: var(--light); font-size: 14px; line-height: 20px; }
.dx-card.flush > .dx-row .switch { flex: none; }
.dx-note { margin: 0; padding: 0 4px; font-size: 12.5px; line-height: 18px; color: var(--dim); }
.dx-head + .layout-2 { margin-top: 12px; }
.settings-page .stack { gap: 20px; }

.swipe-art.art-avatar .swipe-cover { filter: saturate(.8) brightness(.88); }

.scene-art { flex: none; width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--raised); }

/* Пустой слот тайпов (у бита тайп не указан): та же высота, что и с чипами */
.swipe-types.row-sub { margin: 0; padding: 0; line-height: 28px; }

/* Обложка в правке бита */
.edit-cover-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
.edit-cover-actions { display: flex; gap: 8px; flex: 1 1 100%; }
.edit-cover { flex: none; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); }
.edit-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Свечение под колодой ленты: размытый цвет обложки, очень мягко и только внизу */
.feed-glow {
  position: fixed; left: -25%; width: 150%; bottom: -8vh; height: 70vh; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity .6s ease;
  filter: blur(80px) saturate(1.25);
  -webkit-mask-image: linear-gradient(to top, #000 15%, transparent 92%); mask-image: linear-gradient(to top, #000 15%, transparent 92%);
}
.feed-glow.on { opacity: .3; }
.feed-glow .fg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .feed-glow, .feed-glow .fg { transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .feed-glow { display: none; } }

/* Обложка всегда квадратная. Если колоде не хватает высоты, сжимается вся карточка (по ширине), а не картинка:
   высота карточки = ширина + 252 px под название, автора, параметры, теги и кнопки */
@supports (height: 1cqh) {
  .deck { container-type: size; }
  .swipe-card { width: min(100%, calc(100cqh - 252px)); margin-inline: auto; }
  .swipe-art { flex: none; }
}

/* Колода низкая (у телефона с шапкой Telegram): тайпы убираем, отступы сжимаем – карточка остаётся на всю ширину и квадратной */
@supports (height: 1cqh) {
  @container (max-height: 615px) {
    .swipe-types { display: none; }
    .swipe-body { padding-top: 14px; gap: 8px; }
    .swipe-actions { padding: 12px 0 16px; }
    .swipe-card { width: min(100%, calc(100cqh - 202px)); }
  }
}


/* Плейлист с настоящей обложкой: размытая картинка, зерно и знак UMT – в одном ключе с градиентами */
.cover-blurred { filter: blur(4px) saturate(1.1) brightness(.88); transform: scale(1.12); }
.cover-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}
.cover-logo { position: absolute; left: 6%; top: 6%; width: 8%; min-width: 14px; opacity: .85; pointer-events: none; }

/* На сенсорном экране :hover «залипает» после касания, и кнопка оставалась красной: цвет – только пока нажата */
.swipe-btn:active { transform: scale(.94); }
.swipe-skip:active { border-color: var(--danger); color: var(--danger); }
.swipe-like:active { border-color: #4FC9EF; color: #4FC9EF; }

/* Почему этот бит: заголовок, факты, причины; настройка свёрнута */

/* На карточке позади не показываем «пауза»: она ещё не играет, значок только путал */
.swipe-card.behind .swipe-glyph { display: none; }


/* Почему этот бит: шкалы совпадения (монохром), таблица фактов, группа действий. Шаг 8 px: 12 внутри блока, 16 между блоками */
.why-summary { display: grid; gap: 16px; margin: 0 0 16px; }
.why-meters { display: grid; gap: 14px; }
.why-meter { display: grid; grid-template-columns: 128px 1fr 52px; align-items: center; gap: 12px; font-size: 14px; line-height: 20px; color: var(--light); }
.why-m-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.why-m-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--text); transform-origin: left center; will-change: transform; }
.why-m-val { text-align: right; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.why-table { background: var(--raised); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.why-k { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; font-size: 14px; line-height: 20px; color: var(--light); }
.why-k > span { flex: none; white-space: nowrap; }
.why-k + .why-k { border-top: 1px solid var(--divider); }
.why-k b { color: var(--text); font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.why-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.why-cta { width: 100%; }
.why-list:not(:empty) { margin: 0 0 16px; }
.why-group { margin-top: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.why-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; border: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer;
}
.why-row + .why-row { border-top: 1px solid var(--divider); }
.why-row:active { background: rgba(255, 255, 255, .04); }
.why-row > svg:first-child { color: var(--light); flex: none; }
.why-row > svg:last-child { color: var(--dim); flex: none; transition: transform .25s cubic-bezier(.23, 1, .32, 1); }
.why-tune-toggle.open > svg:last-child { transform: rotate(180deg); }
.why-tune { margin-top: 16px; }

/* «Вы любите» шторкой: плавно раскрывается по высоте (grid 0fr → 1fr, без анимации height) */
.why-love-block { border-top: 1px solid var(--divider); }
.why-disclose { width: 100%; border: 0; background: transparent; color: var(--light); font: inherit; font-size: 14px; cursor: pointer; align-items: center; }
.why-disclose > svg { color: var(--dim); transition: transform .25s cubic-bezier(.23, 1, .32, 1); }
.why-disclose.open > svg { transform: rotate(180deg); }
.why-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.23, 1, .32, 1); }
.why-fold.open { grid-template-rows: 1fr; }
.why-fold-in { overflow: hidden; min-height: 0; }
.why-love { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 14px; }
@media (prefers-reduced-motion: reduce) { .why-fold, .why-disclose > svg { transition: none; } }

/* Релиз: «Далее» шире, «Назад» иконкой; низ страницы не прячется за панель */
.ds-w .ed-dock .ds-back { flex: 0 0 56px; padding: 0; display: grid; place-items: center; }
.ds-page.has-sticky { padding-bottom: 190px; }
.ds-av { position: relative; overflow: hidden; }
.ds-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ds-av.big { width: 56px; height: 56px; font-size: 20px; }
.ds-arow.split { padding: 0; }
.ds-arow-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 64px; padding: 12px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ds-arow .ds-arm { margin-right: 12px; }
.ds-ce { display: grid; gap: 12px; }
.ds-ce-more { display: grid; gap: 12px; }
.ds-ce-name { display: flex; align-items: flex-end; gap: 12px; }
.ds-ce-name .ds-field { flex: 1; min-width: 0; }

.ds-sigbox { position: relative; }
.ds-sig-clear { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, .06); color: var(--light); font: inherit; font-size: 12px; cursor: pointer; }

.ds-grip { touch-action: none; cursor: grab; width: 44px; margin-left: 0; }
.ds-alist.rel-sorting > .rel-dragging { background: var(--card); }

/* Перерисовка внутри экрана мастера без повторного появления страницы */
.ds-still .card, .ds-still .page-head, .ds-still .ds-w, .ds-still .ds-w * { animation: none !important; }

.ds-tt { display: grid; gap: 8px; }
.ds-tt .dx-link { justify-self: start; }

/* Релизы: отклик, шапка, плашки статусов, мягкая смена графика */
.dx-bars { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dx-bars.scroll { touch-action: auto; }
.dx-bar:active .dx-bar-col { background: rgba(255, 255, 255, .09); }
.dx-bar:active .dx-bar-l { color: var(--light); }
.dx-fade { animation: fade .18s ease-out; }
.dx-acts .dx-iconbtn { width: 44px; height: 44px; }
a.dx-row .dx-chip:not(.ok):not(.bad) { border-color: transparent; background: none; padding: 0; color: var(--mid); }
.dx-seg { height: 44px; }
.dx-seg button::after { content: ""; position: absolute; inset: -4px 0; }
.dx-seg button:active { color: #fff; }
.dx-upd, .dx-tl-i span { color: var(--mid); }
.dx-coop { margin: 12px 0 0; text-align: center; font-size: 12px; line-height: 16px; color: var(--mid); }
.dx-unlink { min-height: 44px; padding: 12px 18px; color: var(--mid); }
@media (prefers-reduced-motion: reduce) {
  .dx-fade, .dx-page .card, .dx-page .page-head, .dx-row-btn > svg { animation: none; transition: none; }
  .view-in, .swap-in, .sheet { animation-name: fade; }
}

/* Шторка настроек: капсула со знаками UMT × Union справа от заголовка, отвязка мелкой ссылкой */
.dx-unlink { display: block; margin: 20px auto 4px; padding: 10px 14px; border: 0; background: none; color: var(--dim); font: inherit; font-size: 13px; cursor: pointer; }
.dx-unlink:active { color: var(--danger); }

/* Первый релиз: вместо нулей на обзоре. Стеклянные значки UMT, свечение как на постерах */
.dx-first { position: relative; overflow: hidden; min-height: 220px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); isolation: isolate; }
.dx-first-hero, .dx-first-glow { position: absolute; right: -44px; bottom: -48px; width: 220px; height: 220px; object-fit: contain; pointer-events: none; z-index: -1; }
.dx-first-glow { filter: blur(36px); opacity: .4; }
.dx-first-t { display: flex; flex-direction: column; gap: 8px; padding: 20px 16px; max-width: 62%; }
.dx-first-t b { font: 800 22px/28px var(--display); letter-spacing: -.03em; }
.dx-first-t p { margin: 0; font-size: 14px; line-height: 20px; color: var(--light); }
.dx-first-row { min-height: 72px; }
.dx-first-row:not(.cur) .dx-row-b b { color: var(--light); }
@media (prefers-reduced-motion: no-preference) { .dx-first-hero { animation: rise .5s ease-out both; } }
.dx-first-row .dx-ico { border: 0; background: none; width: 32px; height: 32px; }
.dx-first-row.cur .dx-ico { color: #fff; }
.dx-first-row:not(.cur) .dx-ico { color: var(--mid); }

/* Продвижение релиза: смарт-ссылка и ролик из Edits */
.dx-sl { gap: 14px; }
.dx-sl-top { display: flex; align-items: center; gap: 12px; }
.dx-sl-url { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); color: var(--light); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.dx-first-t .dx-btn { align-self: flex-start; margin-top: 8px; }

/* Главная: длинная плитка сверху, под ней две обычные */
.tile-grid .tile.tile-wide { grid-column: 1 / -1; height: 104px; }
.tile-grid.tile-grid-top .tile:last-child:nth-child(odd):not(.tile-wide) { grid-column: auto; height: 104px; }
.tile-grid.tile-grid-top .tile-wide .tile-title { font-size: 16px; max-width: 55%; }
.settings-page { margin-top: 12px; }
.tile-grid.tile-grid-top .tile:not(.tile-wide) { height: 104px; align-self: start; }
.tile-grid.tile-grid-top .tile:not(.tile-wide) { height: 112px; }
.tile-grid.tile-grid-top .tile-art { width: 64px; height: 64px; right: 16px; bottom: 14px; filter: none; }
/* Плитки главной: значки одного размера и на одном месте (внизу справа), название сверху слева */
.tile-grid.tile-grid-top .tile:not(.tile-wide) { height: 128px !important; grid-column: auto !important; }
.tile-grid.tile-grid-top .tile.tile-wide { height: 104px !important; }
.tile-grid.tile-grid-top .tile .tile-art { width: 118px !important; height: 118px !important; right: -12px !important; bottom: -22px !important; filter: none !important; opacity: 1 !important; z-index: 1 !important; }
.tile-grid.tile-grid-top .tile .tile-glow { display: block !important; width: 118px !important; height: 118px !important; right: -12px !important; bottom: -22px !important; object-fit: contain !important; filter: blur(22px) saturate(1.2) !important; opacity: .8 !important; mask-image: none !important; -webkit-mask-image: none !important; z-index: 0 !important; transform: scale(1.35); }
/* Шторки раздела «Релизы»: значки без подложки */
.dx-sheet .dx-ico { border: 0; background: none; width: 32px; height: 32px; }
/* Запас под нижнюю панель действий нужен, только когда она есть на экране */
.ds-page.has-sticky:not(:has(.sticky-actions)) { padding-bottom: 24px; }

/* Шапка экрана: стрелка «назад» в одной строке с названием, без отдельной строки над ним */
.dx-titlerow { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.dx-titlerow h1 { margin: 0; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.dx-titlerow .dx-back { margin-left: -12px; flex: none; }
.dx-titlerow .dx-acts { flex: none; margin-left: auto; }
.dx-head { padding-top: 0; }

.dx-card .dx-note.flat { padding: 0; }


/* ─── Окно релиза на компьютере: две колонки вместо растянутого телефонного экрана ─── */
.dx-rel-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.dx-rel-b:empty { display: none; }
.dx-relpage .dx-kpi b, .dx-relpage .dx-chart-v b, .dx-relpage .dx-trow .n { font-variant-numeric: tabular-nums; }
.dx-relpage .dx-bar:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 8px; }
@media (min-width: 900px) {
  .dx-relpage { max-width: 760px; }
  .dx-relpage > .dx-seg { max-width: 360px; }
}
@media (min-width: 1100px) {
  .dx-relpage { max-width: 1120px; gap: 16px; }
  .dx-relpage .dx-head h1 { font-size: 40px; line-height: 44px; letter-spacing: -.035em; }
  .dx-relpage .dx-hero { gap: 20px; }
  .dx-relpage .dx-hero img, .dx-relpage .dx-hero-ph { width: 136px; height: 136px; border-radius: 20px; }
  .dx-relpage .dx-hero p { font-size: 15px; line-height: 22px; max-width: 56ch; }
  .dx-rel-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .dx-rel-grid > .dx-rel-b { position: sticky; top: 24px; }
  .dx-relpage .dx-kpi b { font-size: 28px; line-height: 34px; }
}
@media (hover: hover) and (pointer: fine) {
  .dx-relpage .dx-bar:hover .dx-bar-col { background: rgba(255, 255, 255, .09); }
  .dx-relpage .dx-bar:not(.on):hover .dx-bar-col i { background: #5A5A5A; }
  .dx-relpage .dx-bar:hover .dx-bar-l { color: var(--light); }
}
.dx-rel-grid > .dx-stack > .dx-over:first-child { padding-top: 0; }

/* ─── «Релизы» на компьютере: та же сдержанная линия, что у бокового меню ─── */
.dx-dash-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.dx-chev-d { display: none; }
.dx-dash-quick { display: none; }
@media (min-width: 900px) {
  .dx-dash { max-width: 760px; }
}
@media (min-width: 1100px) {
  .dx-dash { max-width: 1120px; gap: 16px; }
  .dx-dash .dx-head h1 { font-size: 40px; line-height: 44px; letter-spacing: -.035em; }
  .dx-dash-top { grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: stretch; }
  .dx-dash .dx-balance { padding: 20px; }
  .dx-only-m { display: none; }
  .dx-dash-quick { display: flex; flex: 1; }
  .dx-dash-quick > * { flex: 1; }
  .dx-dash-quick .dx-kv, .dx-dash-quick .dx-row { padding-left: 20px; padding-right: 20px; }
  .dx-dash-quick .dx-kv:first-child { border-top: 0; }
  .dx-dash-quick .dx-count { font-variant-numeric: tabular-nums; color: var(--mid); font-weight: 600; }
  .dx-dash-chart { position: relative; }
  .dx-dash-chart > .dx-seg { position: absolute; top: 14px; right: 14px; width: 300px; z-index: 1; }
  .dx-dash-chart > .dx-card { flex: 1; padding: 20px; }
  .dx-dash-chart .dx-bars { flex: 1; height: auto; min-height: 128px; }
  .dx-dash .dx-seg { max-width: 360px; }
  .dx-dash .dx-card.flush > a.dx-row.link { min-height: 72px; padding: 12px 20px; transition: background-color .15s ease-out; }
  .dx-dash .dx-chev-d { display: grid; place-items: center; flex: none; color: var(--dim); transition: color .15s ease-out, transform .2s ease-out; }
}
@media (hover: hover) and (pointer: fine) {
  .dx-dash .dx-card.flush > a.dx-row.link:hover { background: var(--hover); }
  .dx-dash .dx-card.flush > a.dx-row.link:hover .dx-chev-d { color: #fff; transform: translateX(3px); }
  .dx-dash .dx-bar:hover .dx-bar-col { background: rgba(255, 255, 255, .09); }
  .dx-dash .dx-bar:not(.on):hover .dx-bar-col i { background: #5A5A5A; }
}
.dx-dash .dx-bar:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 8px; }
.dx-dash .dx-card.flush > a.dx-row.link:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .dx-dash .dx-chev-d { transition: none; } }
/* «Обзор» артиста на компьютере: быстрые переходы делят ширину поровну, без пустой четвёртой колонки */
@media (min-width: 720px) {
  .layout-2 > .stack > .tile-grid.tile-grid-top { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .layout-2 > .stack > .tile-grid.tile-grid-top .tile, .layout-2 > .stack > .tile-grid.tile-grid-top .tile.tile-wide { grid-column: auto !important; height: 128px !important; }
  .layout-2 > .stack > .tile-grid.tile-grid-top .tile-wide .tile-title { font-size: 13px; max-width: 70%; }
}
/* Write на «Обзоре»: компактная полоса, а не главный экран. Главное внимание – отложенные и быстрые переходы */
.ah-hero { padding: 14px 16px; min-height: 0; border-radius: 16px; }
.ah-bg { opacity: .55; }
.ah-hero-beat { margin-bottom: 10px; }
.ah-hero-cover { width: 44px; height: 44px; border-radius: 8px; }
.ah-hero-title { font-size: 14px; }
.ah-lines { margin: 0 0 12px; font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ah-lines em { display: none; }
.ah-cta { height: 36px; padding: 0 14px; border-radius: 10px; background: rgba(255, 255, 255, .14); color: var(--text); font-size: 13px; }
@media (min-width: 901px) {
  .ah-hero { padding: 16px 20px; min-height: 0; }
  .ah-hero-main { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) auto; gap: 24px; align-items: center; }
  .ah-hero-beat, .ah-lines { margin: 0; }
  .ah-hero-title { font-size: 16px; }
  .ah-hero-cover { width: 56px; height: 56px; border-radius: 10px; }
  .ah-hero-empty .ah-hero-title { max-width: none; margin: 0; }
}
@media (hover: hover) and (pointer: fine) { .ah-hero:hover .ah-cta { background: rgba(255, 255, 255, .22); } }

/* ─── Блок «Релизы» на обзоре артиста: живая карточка с шагами линиями, как в меню ─── */
.rl-card { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px;
  border-radius: 16px; border: 1px solid var(--border); background: #111; color: var(--text); text-decoration: none; overflow: hidden; isolation: isolate;
  transition: border-color .18s ease, transform .12s ease; }
.rl-card::before { content: ""; position: absolute; z-index: -1; right: -40px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .10), transparent 68%); pointer-events: none; }
.rl-card:active { transform: scale(.99); }
.rl-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rl-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); }
.rl-title { font: 800 20px/1.15 var(--display); letter-spacing: -.03em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.rl-sub { font-size: 13px; line-height: 18px; color: var(--light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.rl-stats:empty { display: none; }
.rl-chip { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); font-size: 12px; line-height: 16px; color: var(--light); font-variant-numeric: tabular-nums; }
.rl-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.rl-step { display: flex; flex-direction: column; gap: 6px; font-size: 11px; line-height: 14px; color: var(--dim); }
.rl-step i { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.rl-step.done, .rl-step.cur { color: var(--light); }
.rl-step.done i { background: #fff; }
.rl-step.cur i { background: rgba(255, 255, 255, .6); animation: rlPulse 2.4s ease-in-out infinite; }
.rl-step.bad { color: var(--danger); }
.rl-step.bad i { background: var(--danger); }
@keyframes rlPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.rl-art { width: 96px; height: 96px; flex: none; display: grid; place-items: center; }
.rl-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.rl-art.cover img { border-radius: 14px; object-fit: cover; border: 1px solid var(--border); filter: none; }
.rl-go { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(10, 10, 10, .6); color: var(--light); transition: color .15s ease-out, transform .2s ease-out, border-color .15s ease-out; }
@media (hover: hover) and (pointer: fine) { .rl-card:hover { border-color: var(--line); } .rl-card:hover .rl-go { color: #fff; border-color: var(--line); transform: translateX(2px); } }
.rl-card:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .rl-step.cur i { animation: none; } .rl-go { transition: none; } }
@media (max-width: 520px) { .rl-art { width: 72px; height: 72px; } .rl-title { font-size: 18px; } }
@media (min-width: 720px) {
  .layout-2 > .stack > .tile-grid.tile-grid-top:has(> .rl-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; }
  .layout-2 > .stack > .tile-grid.tile-grid-top:has(> .rl-card) > .rl-card { grid-column: 1 / -1 !important; grid-row: auto; min-height: 148px; padding: 22px 24px; gap: 28px; }
  .layout-2 > .stack > .tile-grid.tile-grid-top:has(> .rl-card) .tile { height: 140px !important; }
  .rl-art { width: 120px; height: 120px; }
  .rl-title { font-size: 26px; }
}
/* Первые экраны релизов на компьютере: без растянутых на всю ширину пустот */
.ds-whead > .dx-back { background: none; border: 0; padding: 0; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ds-whead > .dx-back:hover { background: var(--raised); } }
@media (min-width: 900px) {
  .ds-page:has(.ds-w) { width: 100%; max-width: 720px; margin-inline: auto; }
}
@media (min-width: 1100px) {
  .dx-dash .dx-stack:has(> .dx-first) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: stretch; }
  .dx-dash .dx-stack > .dx-first { grid-column: 1; grid-row: 1 / 3; min-height: 100%; }
  .dx-dash .dx-stack:has(> .dx-first) > .dx-card { grid-column: 2; grid-row: 1; }
  .dx-dash .dx-stack:has(> .dx-first) > a.dx-btn { grid-column: 2; grid-row: 2; }
  .dx-dash .dx-first-t { max-width: 70%; padding: 32px 28px; gap: 12px; }
  .dx-dash .dx-first-t b { font-size: 32px; line-height: 38px; }
  .dx-dash .dx-first-t p { font-size: 16px; line-height: 24px; }
  .dx-dash .dx-first-hero, .dx-dash .dx-first-glow { width: 340px; height: 340px; right: -50px; bottom: -60px; }
}

/* Телефон: плитки быстрых переходов и блок «Релизы» на зернистом градиенте Paper Shaders вместо свечения.
   Фоны – готовые маленькие webp (design/tiles/make_tile_bg.py). Соседние плитки чередуют форму градиента.
   На компьютере всё прежнее. */
@media (max-width: 719px) {
  .tile { border-color: transparent; background-color: #0A0A0A; background-size: cover; background-position: center; }
  .tile:nth-child(odd) { background-image: url(/static/img/tiles/g/corners.webp); }
  .tile:nth-child(even) { background-image: url(/static/img/tiles/g/wave.webp); }
  .tile .tile-glow, .tile::after { display: none; }
  .tile .tile-title { color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }

  /* Блок «Релизы»: слева тёмная часть градиента с текстом, справа светлая, где стеклянная иконка выходит за край */
  .rl-card { border-color: transparent; background: #0A0A0A; padding: 20px 18px 20px 20px; gap: 4px; min-height: 164px; }
  .rl-card::before { display: none; }
  .rl-eyebrow { color: rgba(255, 255, 255, .72); }
  .rl-title { color: #fff; font-size: 19px; }
  .rl-sub { color: rgba(255, 255, 255, .78); }
  .rl-chip { border-color: rgba(255, 255, 255, .28); color: #fff; background: rgba(10, 10, 10, .28); }
  .rl-step { color: rgba(255, 255, 255, .6); }
  .rl-step.done, .rl-step.cur { color: #fff; }
  .rl-step i { background: rgba(255, 255, 255, .26); }
  .rl-art:not(.cover) { width: 128px; height: 128px; margin: 0 -26px -30px -6px; align-self: end; }
  .rl-go { background: rgba(10, 10, 10, .45); border-color: rgba(255, 255, 255, .3); color: #fff; }
}
@media (max-width: 719px) {
  /* «Релизы» на телефоне: без подписи-кикера, стрелки и 3D-иконки – только заголовок, подпись и шаги; обложка релиза остаётся */
  .rl-eyebrow, .rl-go, .rl-art:not(.cover) { display: none; }
  .rl-card { min-height: 0; padding: 22px 20px; }
  .rl-card:has(.rl-art.cover) { padding-right: 18px; }
}
@media (max-width: 719px) {
  .rl-card .rl-art.cover { width: 64px; height: 64px; }
  .rl-card .rl-stats { gap: 6px; }
  .rl-card .rl-chip { padding: 3px 9px; font-size: 11.5px; white-space: nowrap; }
}
@media (max-width: 719px) {
  /* «Релизы» на телефоне: обложка слева от названия, цифры одной строкой без капсул, шаги на всю ширину */
  .rl-card { grid-template-columns: minmax(0, 1fr); gap: 0; row-gap: 6px; align-items: start; }
  .rl-card .rl-body { display: contents; }
  .rl-card .rl-steps-host { grid-column: 1 / -1; margin-top: 10px; }
  .rl-card:has(.rl-art.cover) { grid-template-columns: 72px minmax(0, 1fr); column-gap: 14px; }
  .rl-card:has(.rl-art.cover) .rl-art { grid-column: 1; grid-row: 1 / span 3; width: 72px; height: 72px; align-self: start; }
  .rl-card:has(.rl-art.cover) .rl-title, .rl-card:has(.rl-art.cover) .rl-sub, .rl-card:has(.rl-art.cover) .rl-stats { grid-column: 2; }
  .rl-card:has(.rl-art.cover) .rl-title { font-size: 18px; -webkit-line-clamp: 1; }
  .rl-card .rl-stats { flex-wrap: nowrap; gap: 0; overflow: hidden; }
  .rl-card .rl-chip { padding: 0; border: 0; background: none; border-radius: 0; font-size: 13px; color: rgba(255, 255, 255, .86); }
  .rl-card .rl-chip + .rl-chip::before { content: "·"; margin: 0 8px; opacity: .55; }
}
@media (max-width: 719px) {
  /* Под обложкой градиент темнеет к левому краю, чтобы светлая или синяя обложка не сливалась с фоном */
  .rl-card:has(.rl-art.cover)::before { display: block; inset: 0; right: 0; bottom: 0; left: 0; top: 0; width: auto; height: auto; border-radius: 0;
    background: linear-gradient(90deg, rgba(8, 10, 14, .82) 0%, rgba(8, 10, 14, .58) 42%, rgba(8, 10, 14, 0) 82%); }
  .rl-card .rl-art.cover img { border-color: rgba(255, 255, 255, .16); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
}
/* Блоки «Релизы» и Write (Текст на бит) на обзоре артиста – без обводки; у «Релизов» текст без тени */
.rl-card, .ah-hero { border: 0; }
.rl-card:hover, .ah-hero:hover { border: 0; }
.rl-title { text-shadow: none; }
/* Плитки-кнопки с картинкой (Найти по описанию, Теги mp3 и др.) – тоже без обводки */
.tile, .tile:hover { border: 0; }
/* Телефон, спокойный вид (экран артиста): градиенты приглушены, плитки-инструменты низкие, иконка слева от названия, ошибка релиза – красная точка. У битмейкера плитки прежние, крупные */
@media (max-width: 719px) {
  /* инструменты на экране артиста – без градиента, обычная тёмная карточка */
  .tile-grid-top .tile:nth-child(odd), .tile-grid-top .tile:nth-child(even) { background-image: none; background-color: var(--card, #141414); }
  .tile-grid.tile-grid-top .tile:not(.tile-wide), .tile-grid.tile-grid-top .tile.tile-wide { height: 72px !important; padding: 12px 16px 12px 12px; display: flex; flex-direction: row; align-items: center; gap: 10px; }
  .tile-grid.tile-grid-top .tile .tile-art { position: static; order: -1; flex: none; width: 48px; height: 48px; margin: 0; right: auto; bottom: auto; opacity: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
  .tile-grid.tile-grid-top .tile .tile-title { max-width: none; min-width: 0; font-size: 13px; text-shadow: none; }
  .rl-card { background-image: linear-gradient(rgba(10, 10, 10, .42), rgba(10, 10, 10, .42)), url(/static/img/tiles/g/card.webp); }
  .rl-card .rl-title { font-size: 17px; }
}
.rl-sub-fix::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--danger, #ff6b5e); vertical-align: 1px; }
@media (max-width: 719px) { .rl-sub-fix { color: #fff; } .rl-card .rl-step.bad { color: #ff8a7e; } }
@media (max-width: 719px) {
  .tile-grid.tile-grid-top .tile .tile-art { position: static !important; width: 48px !important; height: 48px !important; right: auto !important; bottom: auto !important; z-index: auto !important; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)) !important; }
}
/* Блок «Релизы» с обложкой: фоном размытая обложка, поверх затемнение под текст (как у плашки Write) */
.rl-bg { position: absolute; inset: -24px; z-index: -1; background: center / cover no-repeat; filter: blur(26px) saturate(1.15); opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.rl-card.has-cover .rl-bg { opacity: 1; }
.rl-card.has-cover::before { display: none !important; }
.rl-card.has-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 10, 14, .74) 0%, rgba(8, 10, 14, .52) 55%, rgba(8, 10, 14, .38) 100%); }
@media (max-width: 719px) { .tile-grid-top .tile::before, .tile-grid-top .tile::after, .tile-grid-top .tile .tile-glow { display: none !important; } }
@media (max-width: 719px) { .tile-grid-top .tile { background-image: none !important; background-color: var(--card, #141414) !important; } }

/* Экран артиста на телефоне, единый ритм: одинаковые отступы и радиус 20 у всех блоков, отклик на нажатие сразу (пружинный возврат), крупные зоны касания */
@media (max-width: 719px) {
  .layout-2 > .stack { gap: 14px; }
  .tile-grid-top { gap: 10px; }
  .rl-card, .ah-hero, .tile-grid-top .tile { border-radius: 20px; }
  .tile-grid-top .tile { min-height: 72px; }
  .rl-card, .tile-grid-top .tile, .ah-hero { transition: transform .35s cubic-bezier(.22, 1, .36, 1); -webkit-tap-highlight-color: transparent; }
  .rl-card:active, .tile-grid-top .tile:active, .ah-hero:active { transform: scale(.975); transition-duration: .08s; }
  .rl-title { letter-spacing: -.025em; }
  .rl-sub, .rl-step { letter-spacing: .005em; }
}
@media (prefers-reduced-motion: reduce) { .rl-card, .tile-grid-top .tile, .ah-hero { transition: none; } .rl-card:active, .tile-grid-top .tile:active, .ah-hero:active { transform: none; opacity: .85; } }
@media (max-width: 719px) { .tile-grid.tile-grid-top .tile .tile-glow { display: none !important; } }

/* ─── Единый стиль плиток и блока «Релизы» ───
   Тёмная карточка кабинета, без градиентов и свечений: цвет несут только обложка релиза и стеклянная иконка.
   Понятность – заголовок и одна строка о том, что делает инструмент. */
.tile, .tile-grid-top .tile, .tile:nth-child(odd), .tile:nth-child(even) { background-image: none !important; background-color: var(--card, #141414) !important; border: 0; }
.tile .tile-glow, .tile::after, .tile::before, .tile-grid.tile-grid-top .tile .tile-glow { display: none !important; }
.rl-card { background-image: none !important; background-color: var(--card, #141414) !important; }
.rl-card:not(.has-cover)::before { display: none !important; }
.tile-txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 64%; }
.tile-txt .tile-title { max-width: none; text-shadow: none; color: var(--text, #fff); }
.tile-sub { display: block; font-size: 12px; line-height: 16px; color: var(--mid, #9a9a9a); font-weight: 400; }
@media (max-width: 719px) {
  .tile .tile-title, .rl-title { color: var(--text, #fff); text-shadow: none; }
  .tile-grid.tile-grid-top .tile .tile-txt { max-width: none; }
  .tile-grid.tile-grid-top .tile .tile-title { font-size: 13px; }
  .rl-card .rl-sub, .rl-card .rl-step { color: var(--mid, #9a9a9a); }
  .rl-card .rl-step.done, .rl-card .rl-step.cur { color: var(--text, #fff); }
  .rl-card .rl-step i { background: rgba(255, 255, 255, .14); }
  .rl-card .rl-step.done i { background: #fff; }
  .rl-sub-fix { color: var(--text, #fff); }
}
@media (max-width: 719px) {
  /* Инструменты на экране артиста – строками во всю ширину: значок, название, пояснение в одну линию */
  .tile-grid.tile-grid-top { grid-template-columns: minmax(0, 1fr) !important; }
  .tile-grid.tile-grid-top .tile:not(.tile-wide) { height: 68px !important; min-height: 68px; }
  .tile-grid.tile-grid-top .tile .tile-txt { gap: 2px; }
}

/* Блок «Релизы» – главный на экране: без обложки синий градиент Paper, с обложкой – её размытая копия. Остальные блоки серые */
.rl-card:not(.has-cover) { background-image: linear-gradient(rgba(10, 10, 10, .32), rgba(10, 10, 10, .32)), url(/static/img/tiles/g/card.webp) !important; background-size: cover !important; background-position: center !important; }
.rl-card:not(.has-cover) .rl-eyebrow { color: rgba(255, 255, 255, .72); }
.rl-card:not(.has-cover) .rl-sub, .rl-card:not(.has-cover) .rl-step { color: rgba(255, 255, 255, .76) !important; }
.rl-card:not(.has-cover) .rl-step.done, .rl-card:not(.has-cover) .rl-step.cur { color: #fff !important; }
.rl-card:not(.has-cover) .rl-step i { background: rgba(255, 255, 255, .26) !important; }
.rl-card:not(.has-cover) .rl-step.done i { background: #fff !important; }
.rl-card:not(.has-cover) .rl-step.bad { color: #ff9a8f !important; }
.rl-card:not(.has-cover) .rl-step.bad i { background: #ff6b5e !important; }
.rl-card:not(.has-cover) .rl-go { background: rgba(10, 10, 10, .45); border-color: rgba(255, 255, 255, .3); color: #fff; }
.rl-card.has-cover .rl-sub, .rl-card.has-cover .rl-step { color: rgba(255, 255, 255, .8) !important; }
.rl-card.has-cover .rl-step.done, .rl-card.has-cover .rl-step.cur { color: #fff !important; }

/* ─── Блок «Инструменты»: подпись раздела и список-карточка со строками, как в остальном кабинете ─── */
.tool-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tool-k { padding: 0 4px; font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--mid, #9a9a9a); }
.tool-list { background: var(--card, #141414); border-radius: 16px; overflow: hidden; }
.tool-row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; color: var(--text, #fff); text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: background-color .25s cubic-bezier(.22, 1, .36, 1); }
.tool-row + .tool-row::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--border, #252525); }
.tool-row:active { background: rgba(255, 255, 255, .05); transition-duration: .06s; }
@media (hover: hover) and (pointer: fine) { .tool-row:hover { background: rgba(255, 255, 255, .035); } }
.tool-ic { flex: none; width: 28px; height: 40px; display: grid; place-items: center; color: #fff; }
.tool-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-tx b { font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -.005em; }
.tool-tx span { font-size: 13px; line-height: 18px; color: var(--mid, #9a9a9a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-go { flex: none; display: grid; color: #555; }
.rl-card { grid-column: auto; }
/* «Релизы»: 3D-иконки нет и на компьютере – остаётся только обложка релиза */
.rl-art:not(.cover) { display: none !important; }
.rl-card { grid-template-columns: minmax(0, 1fr); }
.rl-card:has(.rl-art.cover) { grid-template-columns: auto minmax(0, 1fr); }

/* Write и «Релизы» без размытых обложек: обычная тёмная карточка / синий градиент */
.ah-bg, .ah-hero::after { display: none !important; }
.ah-hero { background: var(--card, #141414); }
.rl-bg { display: none !important; }
/* «Отложенные» внизу экрана: подпись раздела как у остальных блоков, обложки ровным рядом */
.ah-shelf { margin-top: 6px; }
.ah-shelf-head { margin: 0 4px 10px; align-items: center; }
.ah-shelf-title { font-family: inherit; font-size: 11px; line-height: 14px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--mid, #9a9a9a); }
.ah-shelf .beat-tile .list-cover, .ah-shelf .ah-it .list-cover { border-radius: 14px; }
.ah-shelf .ah-name { font-weight: 600; }
/* «Релизы» с обложкой: фон простой тёмный, без картинки и градиента (синий градиент – только когда обложки нет) */
.rl-card.has-cover { background-image: none !important; background-color: var(--card, #141414) !important; }
.rl-card.has-cover::before, .rl-card.has-cover::after { display: none !important; }
.ah-shelf { margin-top: 18px; }
.ah-cta { white-space: nowrap; }

/* «Отложенные» – такой же блок-карточка, как остальные; по бокам обложки плавно растворяются в карточку */
.ah-shelf { background: var(--card, #141414); border-radius: 16px; padding: 18px 16px 16px; }
.ah-shelf-head { margin: 0 0 14px; }
.ah-shelf-title { font-family: var(--display); font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text, #fff); }
.ah-shelf .ah-row { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 36px), transparent 100%); }
@media (min-width: 901px) {
  .ah-shelf { padding: 20px; }
  .ah-shelf .ah-row { -webkit-mask-image: none; mask-image: none; }
}

/* Блок «Релизы» на компьютере – тот же вид, что на телефоне: без подписи, стрелки и иконки, обложка слева, шаги на всю ширину */
@media (min-width: 720px) {
  .rl-eyebrow, .rl-go { display: none; }
  .rl-card { padding: 22px 20px; gap: 0; row-gap: 6px; align-items: start; grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .rl-card .rl-body { display: contents; }
  .rl-card .rl-title { font-size: 19px; }
  .rl-card .rl-steps-host { grid-column: 1 / -1; margin-top: 10px; }
  .rl-card:has(.rl-art.cover) { grid-template-columns: 72px minmax(0, 1fr); column-gap: 14px; }
  .rl-card:has(.rl-art.cover) .rl-art { grid-column: 1; grid-row: 1 / span 3; width: 72px; height: 72px; align-self: start; }
  .rl-card:has(.rl-art.cover) .rl-title, .rl-card:has(.rl-art.cover) .rl-sub, .rl-card:has(.rl-art.cover) .rl-stats { grid-column: 2; }
  .rl-card:has(.rl-art.cover) .rl-title { font-size: 18px; -webkit-line-clamp: 1; }
  .rl-card .rl-stats { flex-wrap: nowrap; gap: 0; overflow: hidden; }
  .rl-card .rl-chip { padding: 0; border: 0; background: none; border-radius: 0; font-size: 13px; color: rgba(255, 255, 255, .86); }
  .rl-card .rl-chip + .rl-chip::before { content: "·"; margin: 0 8px; opacity: .55; }
}

/* Окно привязки Union: пара знаков «UMT ··· Union», заголовок, три пункта и две кнопки в столбик */
.sheet:has(.dx-link) .sheet-head { display: none; }
.sheet:has(.dx-link) .sheet-foot { flex-direction: column; }
.sheet:has(.dx-link) .sheet-foot .dx-btn { width: 100%; flex: none; }
.dx-link { gap: 14px; }
.dx-link-k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.dx-link-t { margin: 0; font: 800 28px/1.1 Unbounded, sans-serif; letter-spacing: -.02em; }
.dx-pair { display: flex; align-items: center; gap: 12px; }
.dx-pair-lg { width: 52px; height: 52px; border-radius: 16px; background: #1c1c1c; display: grid; place-items: center; }
.dx-pair-lg img { display: block; max-width: 30px; max-height: 26px; }
.dx-pair-dots { display: flex; gap: 5px; }
.dx-pair-dots i { width: 5px; height: 5px; border-radius: 50%; background: #444; }
.dx-link { align-items: stretch; text-align: left; width: 100%; }
.dx-link > * { align-self: stretch; }
.dx-link .dx-pair { justify-content: flex-start; }
.dx-link-t { color: var(--text, #fff); }
.dx-link .dx-card { width: 100%; box-sizing: border-box; }

/* Окно кода из письма: повторная отправка */
.dx-link-btn { align-self: flex-start; padding: 6px 0; background: none; border: 0; color: var(--text, #fff); font: 500 14px/20px Geologica, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dx-link-btn:disabled { color: var(--mid); text-decoration: none; cursor: default; }
.rl-soon { cursor: default; } .rl-soon:active { transform: none; }

/* Окно данных для Union: список стран */
.dx-select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

.dx-ulink { color: inherit; text-decoration: underline; text-underline-offset: 3px; }


/* Шторка «аккаунт Union уже есть»: без значка, но с воздухом, как у остальных окон */
.dx-wait { padding: 12px 0 48px; }

/* ─── Промо к релизу ─────────────────────────────────────────────────────────── */
.pr-offer { gap: 12px; }
.pr-offer-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pr-offer-h b { font: 800 15px/20px Unbounded, sans-serif; letter-spacing: -.01em; }
.pr-offer-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--mid); font-size: 13px; }
.pr-switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; border: 1px solid var(--line); background: var(--raised); cursor: pointer; transition: background .16s ease-out, border-color .16s ease-out; padding: 0; }
.pr-switch i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--mid); transition: transform .16s ease-out, background .16s ease-out; }
.pr-switch.on { background: #fff; border-color: #fff; }
.pr-switch.on i { transform: translateX(18px); background: #000; }
.pr-form-row { border: 1px solid var(--border); border-radius: 12px; min-height: 60px; background: var(--raised); }
.pr-form-row:first-child { border-top: 1px solid var(--border); }
.pr-card { gap: 12px; }
.pr-t { font: 800 14px/20px Unbounded, sans-serif; letter-spacing: -.01em; }
.pr-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.pr-list li { display: flex; gap: 10px; color: var(--light); font-size: 14px; line-height: 20px; }
.pr-list li::before { content: "•"; color: var(--mid); }
.pr-rules { background: var(--raised); border-radius: 12px; padding: 12px 14px; max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--light); }
.pr-rules p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pr-area { width: 100%; resize: vertical; min-height: 84px; line-height: 20px; font-family: Geologica, sans-serif; }
.pr-count { text-align: right; font-size: 11px; color: var(--dim); }
.pr-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 14px; border: 1.5px dashed var(--line); border-radius: 16px; background: none; color: var(--light); cursor: pointer; text-align: center; font: inherit; }
.pr-drop b { color: var(--text); font-weight: 600; }
.pr-drop span { font-size: 12px; color: var(--mid); }
.pr-files { display: flex; flex-direction: column; }
.pr-file { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--divider); }
.pr-file:last-child { border-bottom: 0; }
.pr-th { width: 38px; height: 38px; border-radius: 10px; background: var(--raised); display: grid; place-items: center; color: var(--mid); flex: none; }
.pr-fb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-fb b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-fb span { font-size: 12px; color: var(--mid); }
.pr-x { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 8px; margin: -8px; }
.pr-bar { height: 3px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.pr-bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .15s linear; }
.pr-url { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--light); }
.pr-url span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-url button { background: none; border: 0; color: var(--light); cursor: pointer; padding: 6px; margin: -6px; }
.pr-sum { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.pr-sum b { font-weight: 600; }
.pr-count-big { display: flex; align-items: flex-end; gap: 12px; }
.pr-count-big b { font: 800 44px/1 Unbounded, sans-serif; letter-spacing: -.03em; }
.pr-count-big span { display: flex; flex-direction: column; color: var(--light); font-size: 14px; padding-bottom: 4px; }
.pr-count-big em { font-style: normal; color: var(--mid); font-size: 12px; }
.pr-tl { display: flex; flex-direction: column; }
.pr-tl > div { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--dim); font-size: 14px; }
.pr-tl > div.done, .pr-tl > div.cur { color: var(--text); }
.pr-tl > div:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 24px; bottom: -8px; width: 1px; background: var(--line); }
.pr-tl i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); display: grid; place-items: center; flex: none; }
.pr-tl .done i { background: #fff; border-color: #fff; color: #000; }
.pr-tl .cur i { border-color: #fff; }
.pr-report { background: var(--raised); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.pr-report p { margin: 0; color: var(--light); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .pr-switch, .pr-switch i, .pr-bar i { transition: none; } }
.pr-mat { gap: 12px; padding: 14px; }
.pr-mat-add { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: var(--light); text-align: left; cursor: pointer; font: inherit; padding: 0; }
.pr-mat-add .dx-row-b b { color: var(--text); }
.pr-mat-top { display: flex; align-items: center; gap: 12px; }
.pr-sum-cv { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.pr-sum { gap: 12px; }
.pr-area { padding: 12px 14px; }
.pr-rules-full { gap: 10px; max-height: 60vh; overflow: auto; }
.pr-rules-full p { margin: 0; color: var(--light); font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pr-rt { font-weight: 600; margin-top: 4px; }
.pr-checks { display: flex; flex-direction: column; gap: 4px; }
.pr-checks .dx-check { padding-block: 6px; }
.pr-actions { display: flex; flex-direction: column; gap: 10px; }
.pr-actions .dx-btn { width: 100%; }
.pr-actions .dx-link-btn { align-self: center; }
.pr-warn { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 19px; color: var(--light); background: var(--raised); border-radius: 12px; padding: 10px 12px; }
.pr-switch:disabled { opacity: .35; cursor: default; }

/* ─── UMT Диск: файловая система ───────────────────────────────────────────────────
   Тот же чёрно-белый язык UMT, но с движением как у современных сервисов: карточки выезжают по очереди, вкладка-подсветка скользит,
   шкала места растёт, выбор и панели пружинят. Двигаем только transform и opacity; при «уменьшить движение» всё статично. */
.dk { --ease: cubic-bezier(0.23, 1, 0.32, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1); display: flex; flex-direction: column; gap: 16px; padding-bottom: 110px; }
@keyframes dk-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dk-up { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes dk-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dk-growy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dk-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes dk-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } }
@keyframes dk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes dk-shim { from { background-position: 160% 0; } to { background-position: -60% 0; } }
@keyframes dk-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-26px, 18px); } }
@keyframes dk-sweep { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(260%) skewX(-18deg); } }
@keyframes dk-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* Шапка: название, объём и «Создать» */
.dk-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 20px; background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px; }
.dk-hero > * { position: relative; }
.dk-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dk-title { margin: 0; font: 800 26px/1.1 Unbounded, sans-serif; letter-spacing: -.03em; }
.dk-sub { margin: 6px 0 0; color: var(--mid); font-size: 14px; }
.dk-create { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: #fff; color: #000; font: 700 15px Geologica, sans-serif; cursor: pointer; flex: none; transition: transform .18s var(--ease), box-shadow .25s var(--ease); }
.dk-create:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .dk-create:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -8px rgba(255, 255, 255, .45); } }
.dk-usage { display: flex; flex-direction: column; gap: 10px; }
.dk-usage-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dk-usage-row b { font: 600 15px Geologica, sans-serif; }
.dk-usage-row span { font-size: 13px; color: var(--mid); }
.dk-seg { display: flex; height: 8px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.dk-seg i { flex: none; width: var(--w); transform-origin: left; animation: dk-grow .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.dk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.dk-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--light); }
.dk-leg em { font-style: normal; color: var(--mid); }
.dk-leg i { width: 8px; height: 8px; border-radius: 50%; }
.k-image { background: #fff; } .k-video { background: #d2d2d2; } .k-audio { background: #a6a6a6; } .k-doc { background: #7c7c7c; } .k-archive { background: #585858; } .k-other { background: #3c3c3c; }

/* Поиск, вид и выбор */
.dk-bar { display: flex; gap: 10px; align-items: center; }
.dk-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 14px; background: #121212; border: 1px solid var(--border); color: var(--mid); transition: border-color .2s var(--ease), box-shadow .25s var(--ease), color .2s; }
.dk-search:focus-within { border-color: rgba(255, 255, 255, .45); box-shadow: 0 0 0 5px rgba(255, 255, 255, .06); color: var(--text); }
.dk-search-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.dk-search-input::placeholder { color: var(--dim); }
.dk-icon-btn { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: #121212; border: 1px solid var(--border); color: var(--light); cursor: pointer; transition: transform .16s var(--ease), background .2s, color .2s, border-color .2s; }
.dk-icon-btn:active { transform: scale(.92); }
.dk-icon-btn.on { background: #fff; color: #000; border-color: #fff; }
.dk-icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
@media (hover: hover) and (pointer: fine) { .dk-icon-btn:hover { background: #1b1b1b; color: #fff; border-color: #3a3a3a; } .dk-icon-btn.on:hover { background: #fff; color: #000; } }

/* Вкладки с подсветкой, которая скользит */
.dk-tabs { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-self: stretch; padding: 4px; border-radius: 14px; background: #121212; border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dk-ind { position: absolute; left: 0; top: 4px; height: calc(100% - 8px); border-radius: 10px; background: #fff; opacity: 0; transition: transform .42s var(--ease), width .42s var(--ease), opacity .2s; pointer-events: none; }
.dk-ind.ready { opacity: 1; }
.dk-tab { position: relative; z-index: 1; height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--light); font: 500 14px Geologica, sans-serif; cursor: pointer; white-space: nowrap; transition: color .25s var(--ease); }
.dk-tab.on { color: #000; font-weight: 600; }

.dk-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--mid); font-size: 14px; }
.dk-crumbs[hidden], .dk-note[hidden] { display: none; }
.dk-crumb { background: none; border: 0; padding: 4px 2px; color: var(--light); font: inherit; cursor: pointer; }
.dk-crumb:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.dk-crumb-now { color: var(--text); font-weight: 600; padding: 4px 2px; }
.dk-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--mid); font-size: 13px; }
.dk-link { background: none; border: 0; padding: 0; color: var(--text); font: 600 13px Geologica, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Карточки */
.dk-body { display: flex; flex-direction: column; gap: 18px; }
.dk-cards { display: grid; gap: 12px; }
.dk-body.grid .dk-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.dk-body.grid .dk-cards.dirs { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.dk-body.list .dk-cards { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: #121212; }
.dk-item { position: relative; cursor: pointer; user-select: none; -webkit-user-select: none; outline: none; animation: dk-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 38ms);
  transition: transform .28s var(--ease), box-shadow .3s var(--ease), border-color .2s, background .2s, opacity .18s; }
.dk-item:active { transform: scale(.975); transition-duration: .1s; }
.dk-item:focus-visible { box-shadow: 0 0 0 2px #fff inset; }
.dk-item.leaving { transform: scale(.9); opacity: 0; pointer-events: none; transition: transform .18s ease-in, opacity .18s ease-in; }
.dk-item.fresh { animation: dk-in .55s var(--ease) both, dk-glow 1.8s ease-out .2s both; }
.dk-body.grid .dk-item { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.dk-body.grid .dk-pre { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; color: #b5b5b5; overflow: hidden; background: #1c1c1c; }
.dk-pre svg { filter: drop-shadow(0 4px 14px rgba(255, 255, 255, .12)); }
.dk-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.dk-ext { position: absolute; top: 9px; right: 9px; padding: 3px 7px; border-radius: 8px; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #e4e4e4; font: 700 10px Geologica, sans-serif; letter-spacing: .07em; }
.dk-linked { position: absolute; left: 9px; bottom: 9px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 13px; background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; }
.dk-meta { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.dk-body.grid .dk-meta { padding: 11px 44px 13px 13px; }
.dk-meta b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-meta span { font-size: 12px; color: var(--mid); }
.dk-mini { display: flex; gap: 10px; margin-top: 4px; }
.dk-mini span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #a8a8a8; }
.dk-more { position: absolute; background: none; border: 0; color: var(--light); cursor: pointer; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 19px; transition: background .2s, transform .16s var(--ease); }
.dk-more:active { transform: scale(.88); }
.dk-body.grid .dk-more { right: 4px; bottom: 6px; }
.dk-body.grid .dk-folder { flex-direction: row; align-items: center; gap: 8px; padding: 12px 42px 12px 14px; min-height: 66px; }
.dk-body.grid .dk-folder .dk-pre { aspect-ratio: auto; width: 36px; flex: none; background: none; place-items: center start; color: #d0d0d0; overflow: visible; }
.dk-folder .dk-pre svg { transition: transform .35s var(--spring); }
.dk-body.grid .dk-folder .dk-meta { padding: 0; }
.dk-body.grid .dk-folder .dk-more { bottom: auto; top: 14px; }
.dk-body.grid .dk-folder .dk-check { top: 21px; left: 10px; }
.dk-body.list .dk-item { display: flex; align-items: center; gap: 12px; padding: 10px 52px 10px 14px; border-top: 1px solid var(--divider); min-height: 66px; border-radius: 0; background: none; }
.dk-body.list .dk-item:first-child { border-top: 0; }
.dk-body.list .dk-pre { position: relative; width: 46px; height: 46px; flex: none; border-radius: 12px; overflow: hidden; display: grid; place-items: center; color: #b5b5b5; background: #1c1c1c; }
.dk-body.list .dk-pre svg { width: 22px; height: 22px; }
.dk-body.list .dk-folder .dk-pre { color: #d0d0d0; background: none; }
.dk-body.list .dk-folder .dk-pre svg { width: 28px; height: 28px; }
.dk-body.list .dk-ext { display: none; }
.dk-body.list .dk-more { right: 8px; top: 14px; }
.dk-body.list .dk-linked { left: auto; right: 2px; bottom: 2px; width: 18px; height: 18px; }
.dk-check { position: absolute; display: none; width: 24px; height: 24px; border-radius: 12px; border: 1.6px solid rgba(255, 255, 255, .35); background: rgba(10, 10, 10, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: transparent; place-items: center; }
.dk-body.grid .dk-check { left: 10px; top: 10px; }
.dk-body.list .dk-check { left: 14px; top: 50%; margin-top: -12px; }
.dk-body.selecting .dk-check { display: grid; }
.dk-body.selecting .dk-more { display: none; }
.dk-body.list.selecting .dk-item { padding-left: 50px; }
.dk-item.sel { border-color: #fff; box-shadow: 0 0 0 1px #fff inset; }
.dk-body.list .dk-item.sel { background: #1b1b1b; box-shadow: none; }
.dk-item.sel .dk-check { background: #fff; border-color: #fff; color: #000; animation: dk-pop .38s var(--spring); }
@media (hover: hover) and (pointer: fine) {
  .dk-body.grid .dk-item:hover { transform: translateY(-4px); border-color: #3b3b3b; box-shadow: 0 18px 38px -14px rgba(0, 0, 0, .9); }
  .dk-body.grid .dk-item:hover .dk-thumb { transform: scale(1.06); }
  .dk-body.grid .dk-folder:hover .dk-pre svg { transform: scale(1.12) rotate(-4deg); }
  .dk-body.list .dk-item:hover { background: #181818; }
  .dk-more:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .dk-item:hover .dk-check { display: grid; }
}
.dk-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 60px 16px; color: var(--mid); animation: dk-in .6s var(--ease) both; }
.dk-empty-ico { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; color: #cfcfcf; background: var(--raised); }
.dk-empty b { color: var(--text); font: 800 17px/1.2 Unbounded, sans-serif; letter-spacing: -.01em; margin-top: 10px; }
.dk-empty p { margin: 0 0 12px; max-width: 34ch; font-size: 14px; }

/* Загрузка списка: тени вместо пустоты */
.dk-sk { border-radius: 18px; border: 1px solid var(--border); padding: 0 0 14px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; animation: dk-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.dk-sk-pre, .dk-sk-line { background: #1c1c1c; animation: dk-pulse 1.4s ease-in-out infinite; }
.dk-sk-pre { aspect-ratio: 4 / 3; }
.dk-sk-line { height: 12px; margin: 0 13px; border-radius: 6px; }
.dk-sk-line.short { width: 40%; }

/* Панель выбора, загрузки, перетаскивание */
.dk-selbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-space, 66px) + 10px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; background: rgba(28, 28, 28, .82); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 16px 50px rgba(0, 0, 0, .65); max-width: 560px; margin: 0 auto; animation: dk-up .45s var(--spring) both; }
.dk-selbar[hidden] { display: none; }
.dk-selbar .dk-icon-btn { width: 40px; height: 40px; border-radius: 12px; background: none; border: 0; }
.dk-count { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-selact { display: flex; gap: 6px; }
.dk-selact .btn { gap: 6px; white-space: nowrap; }
.dk-tray { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-space, 66px) + 10px + env(safe-area-inset-bottom, 0px)); z-index: 41; display: flex; flex-direction: column; gap: 8px; max-width: 460px; margin: 0 auto; }
.dk-tray[hidden] { display: none; }
.dk-up { padding: 11px 13px; border-radius: 16px; background: rgba(28, 28, 28, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 16px 50px rgba(0, 0, 0, .65); animation: dk-up .45s var(--spring) both; }
.dk-up-top { display: flex; align-items: center; gap: 10px; }
.dk-up-top b { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-up-top span { font-size: 13px; color: var(--mid); flex: none; }
.dk-up-top .dk-up-err { color: var(--danger); max-width: 50%; white-space: normal; text-align: right; }
.dk-up-bar { position: relative; height: 4px; border-radius: 2px; background: var(--line); margin-top: 9px; overflow: hidden; }
.dk-up-bar i { display: block; position: relative; height: 100%; background: #fff; border-radius: 2px; transition: width .25s linear; overflow: hidden; }
.dk-up.done .dk-up-top span { color: var(--ok); }
.dk-drop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(10, 10, 10, .86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; animation: dk-in .25s var(--ease) both; }
.dk-drop[hidden] { display: none; }
.dk-drop-in { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 54px 64px; border-radius: 30px; border: 2px dashed rgba(255, 255, 255, .5); color: #fff; font-size: 18px; animation: dk-pulse 1.4s ease-in-out infinite; }
.dk-drop-in svg { animation: dk-float 1.4s ease-in-out infinite; }

/* Шторки: меню, просмотр, выбор папки, статистика */
.dk-menu { display: flex; flex-direction: column; padding: 4px 0 8px; }
.dk-menu-row { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 6px; border-radius: 12px; background: none; border: 0; color: var(--text); font: 500 16px Geologica, sans-serif; text-align: left; cursor: pointer; transition: background .18s, transform .14s var(--ease); }
.dk-menu-row:active { transform: scale(.98); background: #1a1a1a; }
.dk-menu-row svg { color: var(--light); flex: none; }
.dk-menu-row.danger, .dk-menu-row.danger svg { color: var(--danger); }
@media (hover: hover) and (pointer: fine) { .dk-menu-row:hover { background: #181818; } }
.dk-view { display: grid; place-items: center; min-height: 160px; border-radius: 16px; overflow: hidden; background: var(--raised); }
.dk-view-img, .dk-view-video { display: block; width: 100%; max-height: 52vh; object-fit: contain; background: #000; }
.dk-view-audio, .dk-view-other { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 28px 16px; color: var(--mid); width: 100%; }
.dk-view-audio audio { width: 100%; }
.dk-pick-path { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--mid); font-size: 14px; }
.dk-pick-list { display: flex; flex-direction: column; max-height: 42vh; overflow: auto; }
.dk-pick-row { display: flex; align-items: center; gap: 12px; min-height: 54px; background: none; border: 0; border-radius: 12px; color: var(--text); font: 500 15px Geologica, sans-serif; text-align: left; cursor: pointer; padding: 0 6px; transition: background .18s; }
.dk-pick-row:active { background: #1a1a1a; }
.dk-pick-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-pick-row svg { color: var(--mid); flex: none; }
.dk-stats { display: flex; flex-direction: column; gap: 16px; }
.dk-stats-name { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 520px) { .dk-lbl { display: none; } .dk-selact .btn { padding: 0 12px; } .dk-hero { padding: 16px; border-radius: 22px; } .dk-create { padding: 0 16px; } }
@media (prefers-reduced-motion: reduce) {
  .dk-item, .dk-sk, .dk-seg i, .dk-selbar, .dk-up, .dk-empty, .dk-drop, .dk-empty-ico, .dk-drop-in, .dk-drop-in svg, .dk-sk-pre, .dk-sk-line, .dk-up-bar i::after { animation: none !important; }
  .dk-item, .dk-ind, .dk-create, .dk-thumb, .dk-folder .dk-pre svg { transition: none !important; }
}
.dk-body.grid.selecting .dk-folder { padding-left: 46px; }
.dk-title { line-height: 0; } .dk-title img { display: block; height: 34px; width: auto; }


.dk-stats .aud-tiles { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.dk-stats .card { margin: 0; }
.dk-warn { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--raised); border: 1px solid var(--border); animation: dk-in .4s var(--ease) both; }
.dk-warn[hidden] { display: none; }
.dk-warn.over { border-color: #5a3a3a; }
.dk-warn-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dk-warn-txt b { font-size: 14px; font-weight: 600; }
.dk-warn-txt span { font-size: 13px; line-height: 1.45; color: var(--light); }
.dk-warn-btn { flex: none; display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 12px; background: #fff; color: #000; font: 700 14px Geologica, sans-serif; text-decoration: none; transition: transform .16s var(--ease); }
.dk-warn-btn:active { transform: scale(.95); }
/* Анимация появления только при смене места; действия на месте ничего не проигрывают заново */
.dk-body.still .dk-item:not(.fresh), .dk-body.still .dk-empty, .dk-body.still .dk-sk { animation: none; }
.dk-seg.done i { animation: none; }
.dk-up-bar[hidden], .dk-up .dk-icon-btn[hidden] { display: none; }
.dk-up-bar i { transition: width .3s linear; }

/* Значок «открыт по ссылке»: в сетке – метка слева сверху в одной манере с расширением справа, в списке – в строке под названием */
.dk-linked { top: 9px; bottom: auto; left: 9px; width: auto; height: 20px; padding: 0 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); }
.dk-linked svg { display: block; }
.dk-body.list .dk-linked { display: none; }
.dk-link-inl { display: none; align-items: center; margin-right: 5px; color: #d6d6d6; font-style: normal; vertical-align: -1px; }
.dk-body.list .dk-link-inl, .dk-link-inl.on { display: inline-flex; }
.dk-meta span { display: flex; align-items: center; }

/* Живой градиент (Paper Shaders): слой под содержимым карточки */
.live-gl { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.live-gl canvas { display: block; width: 100%; height: 100%; contain: strict; }
.dk-hero { isolation: isolate; background: #101010; }
.dk-hero > .live-gl { position: absolute; }

/* Подсветка нового файла: мягкое осветление по форме карточки, без кольца с резкой кромкой */
@keyframes dk-glow { 0% { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, .09); } 100% { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0); } }

/* Свой плеер звука в окне просмотра */
.dk-pl { display: flex; align-items: center; gap: 16px; width: 100%; padding: 4px 4px 0; color: var(--text); }
.dk-pl-btn { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 0; background: #fff; color: #000; cursor: pointer; transition: transform .16s var(--ease); }
.dk-pl-btn:active { transform: scale(.92); }
.dk-pl-btn svg { fill: currentColor; stroke: none; }
.dk-pl-btn svg:first-child { margin-left: 3px; }
.dk-pl-btn svg:last-child, .dk-pl.playing .dk-pl-btn svg:first-child { display: none; }
.dk-pl.playing .dk-pl-btn svg:last-child { display: block; margin: 0; }
.dk-pl-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dk-pl-seek { position: relative; height: 28px; cursor: pointer; touch-action: none; }
.dk-pl-seek::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: #333; }
.dk-pl-seek .fill { position: absolute; left: 0; top: 12px; height: 4px; width: 0; border-radius: 2px; background: #fff; }
.dk-pl-seek .knob { position: absolute; top: 7px; left: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; transition: transform .12s; }
.dk-pl-seek.drag .knob { transform: scale(1.25); }
.dk-pl-seek:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
.dk-pl-seek.wait { opacity: .45; pointer-events: none; }
.dk-pl-time { font-size: 13px; color: var(--mid); font-variant-numeric: tabular-nums; }
.sheet-title { overflow-wrap: anywhere; }

/* Состав архива в окне просмотра */
.dk-view-other.arc { align-items: stretch; padding: 20px 14px; }
.dk-view-other.arc > svg { align-self: center; }
.dk-arc { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.dk-arc-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.dk-arc-head span { color: var(--mid); }
.dk-arc ul { list-style: none; margin: 0; padding: 0; max-height: 34vh; overflow: auto; }
.dk-arc li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 2px; border-top: 1px solid var(--divider); font-size: 14px; color: var(--text); }
.dk-arc li:first-child { border-top: 0; }
.dk-arc li span { min-width: 0; overflow-wrap: anywhere; }
.dk-arc li.d span { color: var(--light); font-weight: 600; }
.dk-arc li small { flex: none; color: var(--mid); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dk-arc li { padding-left: calc(2px + var(--d, 0) * 16px); }
.dk-arc li.d span::before { content: ""; display: inline-block; width: 14px; height: 11px; margin-right: 8px; border-radius: 2px 3px 3px 3px; background: #6a6a6a; }
.dk-arc li { padding-left: 2px; }
.dk-arc li.d { padding: 0; }
.dk-arc li.d button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 2px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dk-arc li.d button span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.dk-arc li.d button small, .dk-arc li.d button svg:last-child { color: var(--mid); flex: none; }
.dk-arc li.d button svg:first-child { color: var(--light); flex: none; }
.dk-arc li.d span::before { display: none; }
.dk-arc li.empty { justify-content: center; color: var(--mid); padding: 18px 0; }
.dk-arc-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--mid); }
.dk-arc-path button { background: none; border: 0; padding: 4px 2px; color: var(--light); font: inherit; cursor: pointer; }
.dk-arc-path b { color: var(--text); font-weight: 600; }
.dk-arc-path i { font-style: normal; opacity: .6; }
.dk-view-other.arc { padding: 16px 14px; }
.dk-arc li.d button small { margin-right: -6px; }
.dk-arc-path .up { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 8px; color: var(--text); }
.dk-view-audio { padding: 26px 16px; }
.dx-btn.dk-cancel { flex: 0 0 auto; width: auto; padding-left: 22px; padding-right: 22px; }
.sheet .dx-btn.primary.grow { white-space: nowrap; }
.dk-view:has(.dk-view-audio) { min-height: 0; }
.dk-view-audio { padding: 12px 14px; gap: 0; }
.dk-pl { padding: 0; }
.dx-sheet:has(.dk-pick-list) { gap: 4px; }
.dk-pick-path { padding: 2px 0; }
.dk-pick-row { min-height: 48px; }
.dk-pick-list .dx-note { padding: 10px 6px; margin: 0; }
.dk-title img { height: 38px; }

/* Кнопки загрузки: всегда на виду, файл уходит туда, где человек сейчас */
.dk-upbar { display: flex; align-items: center; gap: 10px; }
.dk-upbar[hidden] { display: none; }
.dk-upload { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 16px; border: 0; border-radius: 14px; background: #fff; color: #000; font: 700 15px Geologica, sans-serif; cursor: pointer; transition: transform .16s var(--ease); }
.dk-upload span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-upload:active { transform: scale(.97); }
.dk-cover-btn { flex: none; display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px 0 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); color: var(--text); font: 600 14px Geologica, sans-serif; cursor: pointer; transition: transform .16s var(--ease); }
.dk-cover-btn:active { transform: scale(.97); }
.dk-cover-btn img, .dk-cover-ph { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; display: grid; place-items: center; background: #1f1f1f; color: var(--mid); }
.dk-upbar.album { flex-wrap: wrap; }
.dk-upbar.album .dk-upload { flex: 1 1 100%; }
.dk-upbar.album .dk-cover-btn { flex: 1; min-width: 0; }

/* Компьютер: Облако не растягивается на всю ширину */
@media (min-width: 900px) {
  .dk { max-width: 1120px; }
  .dk-upload, .dk-upbar.album .dk-upload { flex: 0 0 auto; padding: 0 30px; }
  .dk-upbar.album .dk-cover-btn { flex: 0 0 auto; }
  .dk-tabs { align-self: flex-start; grid-auto-columns: 150px; }
  .dk-body.grid .dk-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .dk-body.grid .dk-cards.dirs { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }   /* папки той же ширины, что и квадраты файлов: сетка ровная */
  .dk-hero { padding: 24px 28px; }
}

/* Кнопка загрузки: круглая, внизу сбоку, над меню */
.dk-fab { position: fixed; z-index: 42; right: 16px; bottom: calc(var(--tabbar-space, 66px) + 16px + env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fff; color: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); cursor: pointer; transition: transform .2s var(--ease), bottom .3s var(--ease), box-shadow .2s; }
.dk-fab[hidden] { display: none; }
.dk-fab:active { transform: scale(.9); }
.dk-fab.lift { bottom: calc(var(--tabbar-space, 66px) + 100px + env(safe-area-inset-bottom, 0px)); }
@media (hover: hover) and (pointer: fine) { .dk-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0, 0, 0, .6); } }
@media (min-width: 900px) { .dk-fab { right: 40px; bottom: 36px; } .dk-fab.lift { bottom: 124px; } }

/* Папка как цель при перетаскивании файлов */
.dk-item.drop-on { outline: 2px solid #fff; outline-offset: -2px; background: #202020; }
.dk-drop-in b { text-align: center; }

/* Аудит: касание, ясность и доступность */
.dk-item { animation-fill-mode: backwards; }
.dk-item:active { transform: scale(.985); }
.dk-item, .dk-tab, .dk-create, .dk-upload, .dk-cover-btn, .dk-icon-btn, .dk-fab, .dk-more, .dk-crumb { -webkit-tap-highlight-color: transparent; }
.dk-item:focus-visible, .dk-tab:focus-visible, .dk-create:focus-visible, .dk-upload:focus-visible, .dk-cover-btn:focus-visible, .dk-icon-btn:focus-visible, .dk-fab:focus-visible, .dk-more:focus-visible, .dk-crumb:focus-visible, .dk-menu-row:focus-visible, .dk-pick-row:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dk-crumb, .dk-crumb-now { padding: 11px 4px; }
.dk-crumbs { gap: 2px; min-height: 44px; }
.dk-icon-btn.sm { position: relative; }
.dk-icon-btn.sm::after { content: ""; position: absolute; inset: -6px; }
.dk-hero .dk-sub, .dk-hero .dk-usage-row span, .dk-hero .dk-leg em { color: var(--light); }
.dk-tabs, .dk-tab { touch-action: manipulation; }
@media (prefers-reduced-transparency: reduce) {
  .dk-tray .dk-up, .dk-selbar, .dk-warn, .dk-fab { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: #1c1c1c; }
}
@media (prefers-reduced-motion: reduce) { .dk-fab { transition: none; } .dk-item:active { transform: none; } }

.dk-pro-link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.dk-fab.pop { animation: dk-fabin .42s var(--spring, cubic-bezier(.34, 1.4, .64, 1)) backwards; }
@keyframes dk-fabin { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dk-fab.pop { animation: none; } }

/* Статистика альбома по трекам */
.dk-trk-stats { display: flex; flex-direction: column; padding: 4px 16px 10px; }
.dk-trk { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: baseline; gap: 10px; padding: 11px 0; border-top: 1px solid var(--divider); font-size: 14px; }
.dk-trk:first-child { border-top: 0; }
.dk-trk b { color: var(--mid); font-weight: 600; font-variant-numeric: tabular-nums; }
.dk-trk span { overflow-wrap: anywhere; }
.dk-trk small { color: var(--mid); font-size: 12.5px; text-align: right; }
.dk-trk { grid-template-columns: 22px minmax(0, 1fr); row-gap: 2px; }
.dk-trk small { grid-column: 2; text-align: left; }

/* загрузка трека: белый круг, не зелёный (зелёный остаётся у галочки «готово») */
.ds-ok.ds-wait { color: #fff; }
.ds-ok.ds-wait .spinner { animation: spin .8s linear infinite; }

/* шторка «Сообщение автору»: поле с нормальными отступами, а не вплотную к тексту */
.chat-msg { display: block; width: 100%; box-sizing: border-box; padding: 16px 18px; min-height: 132px; line-height: 1.55; font-size: 1rem; border-radius: 16px; resize: none; }

/* ── Верификация битмейкера: печать-галочка у ника и шторка (web/static/js/views/verify.js). Чёрно-белая, без акцентных цветов ── */
.vf-badge { flex: none; display: inline-grid; place-items: center; padding: 0; margin: 0 0 0 6px; vertical-align: middle; background: none; border: 0; line-height: 0; }
.vf-btn { cursor: pointer; }
.vf-seal { display: block; overflow: visible; }
.vf-on .vf-body { fill: #fff; }
.vf-cut { fill: none; stroke: #000; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.vf-off .vf-body { fill: none; stroke: #6a6a6a; stroke-width: 5; stroke-dasharray: none; stroke-linejoin: round; }
.vf-off .vf-tick { fill: none; stroke: #6a6a6a; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.vf-btn:hover .vf-off .vf-body, .vf-btn:hover .vf-off .vf-tick { stroke: #bdbdbd; }
.vf-hero { position: relative; display: grid; place-items: center; padding: 24px 0 8px; }
.vf-halo { position: absolute; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(79, 201, 239, .55), rgba(79, 201, 239, 0) 66%); animation: vf-halo 3.2s ease-in-out infinite; }
.vf-hero-seal { position: relative; overflow: visible; transform-origin: 50% 50%; filter: drop-shadow(0 0 16px rgba(79, 201, 239, .65)); animation: vf-pop .7s cubic-bezier(.34, 1.25, .64, 1) both; }
.vf-hero-seal .vf-cut { stroke-dasharray: 100; stroke-dashoffset: 100; animation: vf-draw .55s .32s cubic-bezier(.23, 1, .32, 1) forwards; }
.vf-sheen { fill: rgba(0, 0, 0, .09); animation: vf-sheen 4.2s 1.2s ease-in-out infinite; }
/* Шапка шторки: живой градиент Paper Shaders, к описанию уходит в обычный фон */
.sheet.vf-sheet { position: relative; overflow: hidden; border: 0; }
.sheet.vf-sheet > *:not(.vf-top) { position: relative; z-index: 1; }
.sheet:focus, .sheet:focus-visible { outline: none; }
.vf-top { position: absolute; inset: 0 0 auto 0; height: 300px; z-index: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 30%, transparent 100%); mask-image: linear-gradient(#000 30%, transparent 100%); }
.vf-top .live-gl { z-index: 0; opacity: .85; }
.vf-parts { position: absolute; inset: 0; pointer-events: none; }
.vf-parts i { position: absolute; border-radius: 50%; background: #dff6ff; opacity: 0; box-shadow: 0 0 6px rgba(79, 201, 239, .9); animation: vf-float linear infinite; }
@keyframes vf-float { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--dx, 0), -110px); } }
.vf-sheet .sheet-title { display: none; }
.vf-sheet .sheet-body { overscroll-behavior-y: none; }
/* Шапка прозрачная и лежит поверх верха шторки: за неё, как и за ручку, шторку можно утянуть вниз */
.sheet.vf-sheet > .sheet-head { position: absolute; top: 0; left: 0; right: 0; height: 84px; padding: 0; z-index: 2; background: none; }
.sheet.vf-sheet > .sheet-grab { position: absolute; top: 0; left: 50%; transform: translateX(-50%); margin: 8px 0 0; z-index: 3; }
.vf-form { display: flex; flex-direction: column; gap: 10px; margin: 28px 0 10px; }
.vf-form textarea { min-height: 136px; height: auto; padding: 16px 16px; line-height: 1.45; resize: none; }
.vf-note + .btn, .vf-form + .btn { margin-top: 10px; }
@keyframes vf-pop { from { transform: scale(.55) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes vf-draw { to { stroke-dashoffset: 0; } }
@keyframes vf-halo { 0%, 100% { transform: scale(.92); opacity: .55; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes vf-sheen { 0% { transform: skewX(-18deg) translateX(0); } 45%, 100% { transform: skewX(-18deg) translateX(190px); } }
.vf-title { text-align: center; font-family: var(--display, inherit); font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.vf-perks { display: flex; flex-direction: column; gap: 10px; }
.vf-perk { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; line-height: 1.45; }
.vf-plus { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #262626; color: #f2f2f2; display: grid; place-items: center; margin-top: 1px; }
.vf-k { color: var(--dim); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; margin-top: 14px; }
.vf-yes { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #f2f2f2; color: #121212; display: grid; place-items: center; }
.vf-no { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed #5a5a5a; }
.vf-card { background: #1b1b1b; border: 1px solid #2a2a2a; border-radius: 16px; overflow: hidden; }
.vf-row { display: flex; gap: 12px; align-items: flex-start; padding: 16px 16px 16px; }
.vf-row + .vf-row { border-top: 1px solid #2a2a2a; }
.vf-row-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vf-row-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vf-row-t { font-size: .9375rem; font-weight: 600; }
.vf-row-m { font-size: .8125rem; color: var(--dim); }
.vf-opt { white-space: nowrap; flex: none; font-size: .6875rem; letter-spacing: .04em; color: var(--dim); border: 1px solid #333; border-radius: 99px; padding: 1px 8px; }
.vf-row .vf-yes, .vf-row .vf-no { margin-top: 1px; }
.vf-bar { flex: none; width: 96px; height: 6px; border-radius: 99px; background: #2e2e2e; overflow: hidden; }
.vf-bar i { display: block; height: 100%; border-radius: 99px; background: #f2f2f2; transition: width .7s cubic-bezier(.23, 1, .32, 1); }
.vf-note { font-size: .8125rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) {
  .vf-halo, .vf-sheen, .vf-parts i { animation: none; }
  .vf-parts { display: none; }
  .vf-hero-seal { animation: none; }
  .vf-hero-seal .vf-cut { animation: none; stroke-dashoffset: 0; }
  .vf-bar i { transition: none; }
}

/* Cover: значок-искра на обложке в Тегах (пара к крестику) и вторая плашка «Нарисовать» в релизе */
.tag-art-ai { position: absolute; top: -6px; left: -6px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg, #0A0A0A); border: 1px solid #fff; color: #fff; cursor: pointer; padding: 0; transition: transform .18s cubic-bezier(.22, 1, .36, 1); }
.tag-art-ai:active { transform: scale(.9); }
@media (max-width: 620px) { .tag-art-ai { width: 28px; height: 28px; top: 8px; left: 8px; } }
.ds-cover.has-ai button:first-of-type { bottom: 40px; }
.ds-cover .ds-cover-ai { bottom: 8px; background: #fff; color: #0A0A0A; font-weight: 600; }
.tag-a .tag-art-ai { width: 22px; height: 22px; top: -6px; left: -6px; }

/* Мастер релиза: прикрепить документ файлом вместо ссылки */
.dx-attach-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 6px; }
.dx-attach { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; }
.dx-attach[disabled] { opacity: .7; cursor: default; }
.dx-attach-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; color: var(--light); font-size: .84rem; overflow-wrap: anywhere; }
.dx-attach-name svg { flex: none; color: #fff; }
/* Выбор прав на бит: компактные плитки вместо длинного списка */
.dx-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dx-tile { display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--light); font: inherit; font-size: .84rem; font-weight: 600; text-align: left; cursor: pointer; white-space: nowrap; }
.dx-tile { transition: border-color .15s ease, background-color .15s ease, transform .1s ease-out; -webkit-tap-highlight-color: transparent; }
.dx-tile:active { transform: scale(.97); }                      /* отклик в момент касания, не после отпускания */
.dx-tile:focus-visible, .dx-attach:focus-visible, .dx-proof-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .dx-tile:not(.on):hover { border-color: var(--dim); color: #fff; } }
@media (prefers-reduced-motion: reduce) { .dx-tile { transition: border-color .15s ease, background-color .15s ease; } .dx-tile:active { transform: none; } }
.dx-tile svg { flex: none; }
.dx-tile > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.dx-tile.on { border-color: #fff; background: rgba(255, 255, 255, .06); color: #fff; }
.dx-tile:active { background: var(--raised); }
.dx-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.dx-pick-note { margin: 10px 2px 2px; color: var(--light); font-size: .88rem; line-height: 1.35; }
/* Переписка и чек вместо договора: одна карточка из двух строк, сборка идёт сама */
.dx-proof { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 6px; }
.dx-proof-card { overflow: hidden; }
.dx-proof-row { padding: 12px 14px; border-top: 1px solid var(--divider); }
.dx-proof-row:first-child { border-top: 0; }
.dx-proof-head { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.dx-proof-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dx-proof-t b { font-weight: 600; font-size: .94rem; }
.dx-proof-t span { color: var(--mid); font-size: .8rem; line-height: 1.3; }
.dx-proof-add { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--raised); color: #fff; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: transform .1s ease-out; }
.dx-proof-add:active:not([disabled]) { transform: scale(.97); }
.dx-proof-add[disabled] { opacity: .5; cursor: default; }
.dx-proof-file { display: flex; align-items: center; gap: 8px; min-height: 32px; margin-top: 4px; color: var(--light); font-size: .86rem; }
.dx-proof-file svg { flex: none; color: #fff; }
.dx-proof-file > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-proof-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -6px -10px -6px 0; padding: 0; background: none; border: 0; color: var(--light); cursor: pointer; }   /* зона касания 44 px, строка остаётся прежней высоты */
.dx-proof-x:active { opacity: .6; }
.dx-proof-row > .input { margin-top: 10px; width: 100%; }
.dx-proof-row > .dx-proof-t { display: flex; }
.dx-proof-st { display: flex; align-items: center; gap: 8px; margin: 0 2px; color: var(--mid); font-size: .84rem; line-height: 1.35; }
.dx-proof-st.ok { color: var(--light); }
.dx-proof-st.ok svg { color: #fff; }
.dx-proof-st.bad { color: #ff8a80; flex-wrap: wrap; }
.dx-proof-st .spinner { width: 16px; height: 16px; }
.dx-attach:active:not([disabled]) { transform: scale(.98); }
.dx-proof-x:active { opacity: .6; }

/* История прослушанных: итог по биту и время одной тихой строкой под автором */
.hist-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 11px; color: var(--mid); font-variant-numeric: tabular-nums; }
.hist-state { padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; }
.hist-state.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
