/* account-features — bookmarks by status, profiles + kids mode, TV sign-in by code, «Мои устройства» */

/* ---- profile colours: an extra profile gets its own gradient (the main one keeps the accent) ---- */
[data-pc="1"] { --pc: linear-gradient(135deg, #6cc4ff 0%, #5c63ff 100%); }
[data-pc="2"] { --pc: linear-gradient(135deg, #63e6a8 0%, #18a08c 100%); }
[data-pc="3"] { --pc: linear-gradient(135deg, #ffcb62 0%, #ff7a4d 100%); }
[data-pc="4"] { --pc: linear-gradient(135deg, #d98cff 0%, #7a5cff 100%); }
.acct-btn .acct-ava[data-pc], .am-ava[data-pc], .tb-ava[data-pc], .pf-ava[data-pc], .pr-ava[data-pc] { background: var(--pc); color: #fff; }
.pf-ava[data-pc] { box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
span.pf-ava-btn { display: inline-block; }

/* account menu: «Сменить профиль» */
.am-item[data-go="profiles"] svg { background: linear-gradient(135deg, #63e6a8, #18a08c); }

/* ---- «Закладки»: status tabs ---- */
.bk-host { flex: none; min-width: 0; }
.bk-tabs {
  position: relative; display: flex; gap: 8px; padding: 2px 0 14px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.bk-tabs::-webkit-scrollbar { display: none; }
.bk-tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 7px 0 15px;
  border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--glass-hi);
  color: #e2ddef; font: 600 14px var(--body); white-space: nowrap; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.bk-tab:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.bk-tab:active { transform: scale(.97); }
.bk-tab em {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
  font-style: normal; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.1);
}
.bk-tab em.zero { opacity: .45; }
.bk-tab.on {
  background: var(--accent-grad); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(255,93,143,.28), inset 0 1px 0 rgba(255,255,255,.3);
}
.bk-tab.on em { background: rgba(255,255,255,.24); opacity: 1; }
.bk-empty { min-height: 180px; padding: 24px 12px; }
.bk-empty p { line-height: 1.5; }
.tpage .bk-tabs { margin: -6px calc(-1 * var(--gutter)) 2px; padding: 2px var(--gutter) 14px; scroll-padding-inline: var(--gutter); }
/* desktop dialog: the row runs to the card's edges, so a scrolled tab isn't cut at the padding */
.auth-wide .bk-tabs { margin: 0 -24px; padding: 2px 24px 14px; }
@media (max-width: 719px) { .auth-wide .bk-tabs { margin: 0 -16px; padding: 2px 16px 14px; } }

/* ---- profiles ---- */
.pr-sec { gap: 10px; }
.pr-state { display: grid; place-items: center; min-height: 64px; }
.pr-list { display: flex; flex-direction: column; gap: 8px; }
.pr-row {
  display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 4px; border-radius: 24px;
  background: var(--glass); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--glass-hi);
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.pr-row.on { border-color: rgba(255,93,143,.45); background: linear-gradient(180deg, rgba(255,93,143,.15), rgba(192,107,255,.06)); }
.pr-row.busy { opacity: .6; pointer-events: none; }
.pr-pick {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 6px;
  border: 0; border-radius: 20px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.pr-row:not(.on) .pr-pick:hover { background: rgba(255,255,255,.05); }
.pr-row.on .pr-pick { cursor: default; }
.pr-pick:active .pr-ava { transform: scale(.95); }
.pr-ava {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--accent-grad); color: #fff; font: 700 19px var(--display);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3); transition: transform .12s ease;
}
.pr-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pr-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pr-name b { font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-name small { color: var(--muted); font-size: 12.5px; }
.pr-row.on .pr-name small { color: #ff9dbd; }
.pr-kid {
  flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  color: #ffd36b; background: rgba(255,194,75,.14); border: 1px solid rgba(255,194,75,.3);
}
.pr-cur {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.pr-cur svg { width: 13px; height: 13px; }
.pr-edit {
  flex: none; width: 38px; height: 38px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  border: 0; background: rgba(255,255,255,.07); color: var(--muted); cursor: pointer; transition: background .15s ease, color .15s ease;
}
.pr-edit:hover { background: rgba(255,255,255,.14); color: var(--text); }
.pr-edit svg { width: 17px; height: 17px; }

/* inline forms: add / edit / delete confirm / PIN */
.pr-form {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 24px;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); box-shadow: var(--glass-hi);
  animation: pr-in .2s ease;
}
@keyframes pr-in { from { opacity: 0; transform: translateY(-4px); } }
.pr-form p { margin: 0; font-size: 14px; line-height: 1.45; color: #d9d3e7; }
.pr-form p b { color: var(--text); }
.pr-form-t { font-size: 15px; }
.pr-confirm { border-color: rgba(255,107,125,.32); background: linear-gradient(180deg, rgba(255,107,125,.1), rgba(255,107,125,.03)); }
.pr-check { display: flex; align-items: flex-start; gap: 10px; padding: 2px 4px; cursor: pointer; font-size: 15px; font-weight: 500; }
.pr-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.pr-check small { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.4; }
.pr-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pr-acts .btn { height: 40px; padding: 0 18px; }
.pr-acts .btn-sm { height: 34px; padding: 0 14px; }
.pr-del { margin-left: auto; color: #ff8a95; }
.pr-del-yes { color: #fff; background: linear-gradient(180deg, rgba(255,107,125,.55), rgba(255,107,125,.35)); border-color: rgba(255,107,125,.5); }
.pr-del-yes:hover { background: rgba(255,107,125,.6); border-color: rgba(255,107,125,.7); }
.pr-pin { text-align: center; letter-spacing: 10px; font: 700 22px var(--body); }
.pr-pin::placeholder { letter-spacing: normal; font-size: 15px; font-weight: 500; }
/* the hint goes away once the field is tapped: only the caret and the dots remain */
.pr-pin:focus::placeholder { color: transparent; }
.pr-add { align-self: flex-start; height: 40px; padding: 0 18px 0 14px; gap: 6px; }
.pr-add span { font-size: 20px; line-height: 1; font-weight: 400; color: #ff9dbd; }
.pr-hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.pr-form .pr-hint { color: var(--muted); font-size: 13px; }
.pr-warn { color: #ffb3c6; }
.pr-forgot {
  padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.pr-forgot:hover { color: var(--accent); }

/* PIN for leaving a kids profile */
.pr-pinsec { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.pr-pinhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pr-pinstate {
  flex: none; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--muted); background: rgba(255,255,255,.07);
}
.pr-pinstate.on { color: #6fd38a; background: rgba(111,211,138,.14); }
.pr-pinbtn { align-self: flex-start; height: 36px; padding: 0 16px; }

/* kids profile: a note instead of the account settings */
.pr-note {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 20px; font-size: 14px; line-height: 1.5; color: #d9d3e7;
  background: linear-gradient(180deg, rgba(255,194,75,.12), rgba(255,194,75,.04)); border: 1px solid rgba(255,194,75,.24); box-shadow: var(--glass-hi);
}
/* «Сменить профиль» dialog: the list alone */
.pr-only .pr-sec { padding-top: 0; border-bottom: 0; }
.pr-only .pr-sec > .as-label { display: none; }

/* ---- TV: «Подключить телевизор» on the profile, the code screen in the sign-in dialog ---- */
.tv-in { min-width: 0; }
.tv-in::placeholder { color: rgba(255,255,255,.25); }
.auth-tv { width: 100%; height: 46px; margin-top: 12px; gap: 10px; color: #e2ddef; }
.auth-tv svg { flex: none; width: 19px; height: 19px; color: #ff9dbd; }

.auth-device .auth-card { width: min(560px, 100%); text-align: center; }
.auth-device .auth-card h3 { margin-left: 30px; }
.dv { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dv-how { margin: 0; max-width: 40ch; color: #d9d3e7; font-size: 15px; line-height: 1.55; }
.dv-how b { color: #fff; font-weight: 600; }
.dv-code {
  --d: clamp(34px, 11.5vw, 72px);
  display: flex; align-items: center; justify-content: center; gap: calc(var(--d) * .12);
  min-height: calc(var(--d) * 1.3); margin: 6px 0 2px;
}
.dv-code span:not(.spinner) {
  width: var(--d); height: calc(var(--d) * 1.3); display: grid; place-items: center; border-radius: calc(var(--d) * .3);
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi);
  color: #fff; font: 800 calc(var(--d) * .78)/1 var(--display); font-variant-numeric: tabular-nums;
}
.dv-code span:nth-child(3) { margin-right: calc(var(--d) * .2); }
.dv-code.expired span { opacity: .35; }
.dv-left { margin: 0; min-height: 21px; color: var(--muted); font-size: 14px; }
.auth-device .auth-submit { max-width: 320px; }

/* ---- «Мои устройства»: the account's signed-in devices (auth.js mountDevices) ---- */
.md-sec { gap: 10px; }
.md-state { display: grid; place-items: center; min-height: 64px; }
.md-state.error { gap: 10px; padding: 8px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.md-state.error p { margin: 0; line-height: 1.45; }
.md-list { display: flex; flex-direction: column; gap: 8px; }
/* icon | name, status, profile — the actions go on a line of their own under the text, so the
   name keeps its room on a narrow phone and in the dialog alike */
.md-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px 12px;
  padding: 10px 12px 10px 10px; border-radius: 24px;
  background: var(--glass); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--glass-hi);
}
.md-row.cur { border-color: rgba(255,93,143,.45); background: linear-gradient(180deg, rgba(255,93,143,.15), rgba(192,107,255,.06)); }
.md-ico {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(108,140,255,.16); color: #a9bcff; box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  transition: opacity .15s ease;
}
.md-ico svg { width: 22px; height: 22px; }
.md-row[data-kind="tv"] .md-ico { background: rgba(255,93,143,.16); color: #ff9dbd; }
.md-row[data-kind="phone"] .md-ico { background: rgba(99,230,168,.14); color: #7fe3b5; }
.md-row[data-kind="tablet"] .md-ico { background: rgba(192,107,255,.16); color: #d4a8ff; }
.md-row:not(.on):not(.cur) .md-ico { opacity: .6; }
.md-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.md-top { display: flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.md-name { min-width: 0; font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-edit {
  flex: none; width: 30px; height: 30px; margin: -4px 0; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: none; color: var(--muted); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.md-edit:hover { background: rgba(255,255,255,.1); color: var(--text); }
.md-edit svg { width: 15px; height: 15px; }
.md-sub { display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.md-sub span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-sub.on { color: #d9d3e7; }
.md-sub.on::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: #5ee38f; box-shadow: 0 0 0 3px rgba(94,227,143,.16);
}
.md-row.cur .md-sub { color: #ff9dbd; }
.md-tag {
  max-width: 100%; margin-top: 4px; padding: 2px 9px; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; color: #c9c2dc; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
}
.md-acts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.md-acts .btn { height: 34px; padding: 0 14px; font-size: 13.5px; box-shadow: var(--glass-hi); }
.md-acts .btn svg { flex: none; width: 17px; height: 17px; margin-left: -2px; }
.md-ctl { gap: 6px; color: #ff9dbd; border-color: rgba(255,93,143,.42); background: linear-gradient(180deg, rgba(255,93,143,.16), rgba(255,93,143,.05)); }
.md-ctl:hover { background: rgba(255,93,143,.2); border-color: rgba(255,93,143,.7); }
/* «Смотреть здесь»: the row's main action — an accent pill with a light rim, no shadow under it */
.md-acts .md-here { gap: 6px; color: #fff; border-color: transparent; background: var(--accent-grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.md-acts .md-here:hover { background: var(--accent-grad); border-color: transparent; filter: brightness(1.08); }
.md-out { color: #ff8a95; }
.md-ask p { flex: 1 0 100%; margin: 0; color: #d9d3e7; font-size: 13.5px; line-height: 1.4; }
.md-yes { color: #fff; background: linear-gradient(180deg, rgba(255,107,125,.55), rgba(255,107,125,.35)); border-color: rgba(255,107,125,.5); }
.md-yes:hover { background: rgba(255,107,125,.6); border-color: rgba(255,107,125,.7); }
/* what came of the row's action (a failed «Управлять» or sign-out, «Сохранено»): right under its
   buttons, not below the whole list where a phone can't see it */
.md-note { grid-column: 2 / -1; margin-top: -2px; font-size: 13px; line-height: 1.4; }
/* rename in place */
.md-ren { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; margin-bottom: 2px; }
.auth-in.md-in { flex: 1; min-width: 0; height: 38px; padding: 0 14px; font-size: 15px; }
.md-rbtn {
  flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--glass-hi);
  color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
.md-rbtn:disabled { opacity: .5; cursor: default; }
.md-rbtn svg { width: 15px; height: 15px; }
.md-rsave { border-color: transparent; background: var(--accent-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
/* sign out everywhere else (the confirm reuses .pr-confirm) */
.md-all {
  align-self: flex-start; max-width: 100%; min-height: 40px; padding: 8px 18px 8px 14px; gap: 8px;
  color: #ff8a95; font-size: 14px; line-height: 1.25; text-align: left; box-shadow: var(--glass-hi);
}
.md-all svg { flex: none; width: 17px; height: 17px; }
.md-hint { margin-top: 2px; }

@media (max-width: 719px) {
  .pr-row { border-radius: 26px; }
  .pr-acts .btn { flex: 1 1 auto; }
  .pr-del { margin-left: 0; }
  .auth-in.md-in { font-size: 16px; }  /* no iOS zoom on focus */
  /* three actions don't fit a phone's line: «Смотреть здесь» takes one of its own, «Управлять»
     and «Выйти» share the next */
  .md-acts:has(.md-here) .btn { flex: 1 1 auto; }
  .md-acts .btn.md-here { flex: 1 1 100%; }
}

/* dialogs scroll without a visible scrollbar (wheel, touchpad, touch and keys still scroll) */
.auth-card { scrollbar-width: none; -ms-overflow-style: none; }
.auth-card::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* account menu: «Статистика» */
.am-item[data-go="stats"] svg { background: linear-gradient(135deg, #ffb35c, #ff5d8f); }

/* ---- «Статистика» (auth.js mountStats): the profile section and its dialog ---- */
.st-dlg .auth-card { width: min(560px, 100%); }
.st-only .st-sec { padding-top: 0; border-bottom: 0; }
.st-only .st-head > .as-label { display: none; }
.st-sec { gap: 12px; }
.st-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.st-seg {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
}
.st-seg button {
  height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none;
  color: var(--muted); font: 600 13px var(--body); white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.st-seg button:hover { color: var(--text); }
.st-seg button[aria-pressed="true"] { background: var(--accent-grad); color: #fff; box-shadow: 0 3px 10px rgba(255,93,143,.3), inset 0 1px 0 rgba(255,255,255,.3); }
.st-body { display: flex; flex-direction: column; gap: 14px; transition: opacity .2s ease; }
.st-busy .st-body { opacity: .45; pointer-events: none; }
.st-hero { display: flex; flex-direction: column; gap: 2px; }
.st-year { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #ff9dbd; }
.st-big {
  align-self: flex-start; min-height: 52px; font: 800 44px/1.15 var(--display); letter-spacing: -.01em;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.st-big small { margin-left: 3px; font-size: 22px; font-weight: 700; }
.st-sub { min-height: 21px; color: #d9d3e7; font-size: 14.5px; line-height: 1.45; }
/* bars: one column per day (per month for a year); a quiet stub for an empty one */
.st-chart {
  display: flex; align-items: stretch; gap: 3px; height: 140px; padding: 12px 10px 6px; border-radius: 20px;
  background: var(--glass); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--glass-hi);
}
.st-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.st-bar { flex: 1; display: flex; align-items: flex-end; min-height: 0; }
.st-bar i {
  display: block; width: 100%; max-width: 22px; margin: 0 auto; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(0deg, #c06bff 0%, #ff5d8f 100%); box-shadow: 0 0 10px rgba(255,93,143,.25);
}
.st-col.zero .st-bar i { height: 3px !important; background: rgba(255,255,255,.1); box-shadow: none; }
.st-col:hover .st-bar i { filter: brightness(1.15); }
.st-col small { height: 14px; color: var(--muted); font-size: 10.5px; line-height: 14px; text-align: center; white-space: nowrap; overflow: visible; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.st-tile {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 10px 12px; border-radius: 18px;
  background: var(--glass); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--glass-hi);
}
.st-tile b { font-size: 19px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tile small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.st-block { display: flex; flex-direction: column; gap: 8px; }
.st-h { font-size: 13px; font-weight: 600; color: var(--muted); }
.st-genres { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.st-genres li { display: grid; grid-template-columns: minmax(70px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.st-gname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-gbar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.st-gbar i { display: block; height: 100%; border-radius: 999px; background: var(--accent-grad); }
.st-gtime { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.st-titles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.st-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-tposter {
  aspect-ratio: 2 / 3; margin-bottom: 4px; border-radius: 12px; background: var(--surface-2) center / cover no-repeat;
  box-shadow: 0 6px 16px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.06); transition: transform .15s ease;
}
.st-t:hover .st-tposter { transform: translateY(-2px); }
.st-t b { font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-t small { color: #ff9dbd; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-empty { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--glass); border: 1px solid rgba(255,255,255,.08); }
.st-empty p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.st-empty-ico, .dub-empty-ico {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,93,143,.14); color: #ff9dbd;
}
.st-empty-ico svg, .dub-empty-ico svg { width: 20px; height: 20px; }
/* loading: the same frame, quietly pulsing */
.st-skel .st-big, .st-skel .st-sub, .st-skel .st-tile b, .st-skel .st-tile small { border-radius: 8px; background: rgba(255,255,255,.07); color: transparent; }
.st-skel .st-big { width: 190px; }
.st-skel .st-sub { width: 120px; }
.st-skel .st-bar i { background: rgba(255,255,255,.08); box-shadow: none; }
.st-skel { animation: pulse 1.2s ease-in-out infinite; }
@media (max-width: 719px) {
  .st-big { font-size: 38px; min-height: 46px; }
  .st-chart { gap: 2px; padding: 10px 8px 6px; height: 128px; }
  .st-titles { gap: 6px; }
  .st-tposter { border-radius: 10px; }
}
@media (max-width: 360px) {
  .st-seg button { padding: 0 9px; font-size: 12.5px; }
  .st-genres li { grid-template-columns: minmax(64px, 36%) minmax(0, 1fr) auto; gap: 8px; }
}

/* ---- «Любимые озвучки» (auth.js mountDubs) ---- */
.dub-sec { gap: 10px; }
.dub-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dub-row {
  display: flex; align-items: center; gap: 4px; min-width: 0; padding: 5px 6px; border-radius: 20px;
  background: var(--glass); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--glass-hi);
}
.dub-row:first-child { border-color: rgba(255,93,143,.38); }
.dub-n {
  flex: none; width: 28px; height: 28px; margin-right: 6px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: var(--muted); font-size: 13px; font-weight: 700;
}
.dub-row:first-child .dub-n { background: var(--accent-grad); color: #fff; }
.dub-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dub-btn {
  flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: none; color: var(--muted); transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.dub-btn svg { width: 18px; height: 18px; }
.dub-btn:hover:not(:disabled) { background: rgba(255,255,255,.1); color: var(--text); }
.dub-btn:disabled { opacity: .25; cursor: default; }
.dub-x:hover:not(:disabled) { background: rgba(255,107,125,.18); color: #ff8a95; }
.dub-empty { display: flex; align-items: center; gap: 12px; }

/* ---- «Сообщать о новых сериях в Telegram» (auth.js mountNotify) ---- */
.nt-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px 10px 10px; border-radius: 22px;
  background: var(--glass); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--glass-hi);
  color: inherit; font: inherit; text-align: left; transition: border-color .15s ease, background .15s ease;
}
.nt-row:hover:not(:disabled) { border-color: rgba(255,255,255,.18); }
.nt-row:disabled { cursor: default; opacity: .6; }
.nt-ico {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(108,196,255,.15); color: #8fd3ff;
}
.nt-ico svg { width: 20px; height: 20px; }
.nt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nt-text b { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.nt-text small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.nt-sw {
  position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px;
  background: rgba(255,255,255,.14); box-shadow: inset 0 1px 2px rgba(0,0,0,.3); transition: background .2s ease;
}
.nt-sw i {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .2s cubic-bezier(.3,.7,.3,1);
}
.nt-row[aria-checked="true"] .nt-sw { background: var(--accent-grad); }
.nt-row[aria-checked="true"] .nt-sw i { transform: translateX(18px); }

/* kids profile: «Выйти из аккаунта» under the note (the PIN is asked for in a dialog) */
.kids-out { margin-top: 14px; }
.lo-form .as-row .btn { height: 46px; }

/* ---- «Админка» (admins only): the account menu item and a row in the profile ---- */
a.am-item { text-decoration: none; }
.am-item[data-go="admin"] svg { background: linear-gradient(135deg, #6cd2ff, #7a5cff); }
.pf-admin {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; height: 54px;
  padding: 0 12px 0 9px; border-radius: 18px; color: var(--text); text-decoration: none;
}
.pf-admin svg { flex: none; }
.pf-admin svg:first-child {
  width: 36px; height: 36px; padding: 8px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, #6cd2ff, #7a5cff); box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.pf-admin span { flex: 1; text-align: left; font-size: 15px; font-weight: 600; }
.pf-admin svg:last-child { width: 18px; height: 18px; color: var(--muted); }

/* ============================================================================
   Stable dialog sizes: a tab, a period, a sign-in step or a form opened inside never resizes
   a dialog or makes it jump. auth.js steady(): a card keeps the tallest height it has had (--lock).
   ============================================================================ */
:root { --dlg-max: calc(100vh - 32px); }
@supports (height: 100dvh) { :root { --dlg-max: calc(100dvh - 32px); } }
@media (max-width: 719px) {
  /* a bottom sheet stays clear of the status bar and the home indicator */
  :root { --dlg-max: calc(100vh - 20px - max(env(safe-area-inset-top), 12px) - env(safe-area-inset-bottom)); }
  @supports (height: 100dvh) {
    :root { --dlg-max: calc(100dvh - 20px - max(env(safe-area-inset-top), 12px) - env(safe-area-inset-bottom)); }
  }
}
.auth-card, .auth-wide .auth-card, .auth-settings .auth-card, .pick-card { max-height: var(--dlg-max); }
.auth-card.steady { min-height: min(var(--lock, 0px), var(--dlg-max)); }

/* sign-in steps swap inside one card: the links at the foot stay at the foot */
.auth-flow .auth-card { display: flex; flex-direction: column; }
.auth-flow .auth-card > .auth-switch { margin-top: auto; padding-top: 16px; }

/* «Закладки» and «История просмотра»: one height whatever the tab holds; the list scrolls under
   the tabs (no visible scrollbar, like the other dialogs — so its coming and going can't reflow
   the grid either); an empty tab, a spinner or an error sits in the middle of the same frame */
.auth-wide .auth-card { height: min(680px, var(--dlg-max)); }
.auth-wide .ap-body {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  scrollbar-gutter: stable; scrollbar-width: none; -ms-overflow-style: none;
}
.auth-wide .ap-body::-webkit-scrollbar { display: none; width: 0; height: 0; }
.auth-wide .ap-body > * { flex: none; }
.auth-wide .ap-body > .ap-state { flex: 1 0 auto; }
.ap-state.error { gap: 12px; align-content: center; padding: 16px 12px; }

/* «Статистика» dialog: a fixed frame; the title and Месяц / Год / Всё время stay put, the
   numbers scroll below them */
.st-dlg .auth-card { height: min(680px, var(--dlg-max)); display: flex; flex-direction: column; overflow: hidden; }
.st-dlg .st-only { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.st-dlg .st-sec { flex: 1 1 auto; min-height: 0; padding-bottom: 0; }
.st-dlg .st-sec > .st-head { flex: none; }
.st-dlg .st-sec > :not(.st-head) {
  flex: 1 1 auto; min-height: 0; margin: 0 -24px; padding: 2px 24px 6px;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: none; -ms-overflow-style: none;
}
.st-dlg .st-sec > :not(.st-head)::-webkit-scrollbar { display: none; width: 0; height: 0; }
.st-dlg .st-body > * { flex-shrink: 0; }
@media (max-width: 719px) {
  .st-dlg .st-sec > :not(.st-head) { margin: 0 -16px; padding: 2px 16px 6px; }
}

/* «Настройки аккаунта»: one height, the sections scroll inside */
.set-dlg .auth-card { height: min(780px, var(--dlg-max)); }

/* phones, 2 x 2 tiles: three of them (no record yet) leave no hole — the last takes the row */
@media (max-width: 719px) { .st-tiles > .st-tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* dialogs and sheets take the focus themselves when they have no field (auth.js shell(),
   index.js filter sheet): no focus ring around the whole card for that */
.auth-card:focus, .fsheet:focus { outline: none; }

/* phones: the four statistics tiles go 2 x 2 so the record («3 ч 11 мин») isn't cut */
@media (max-width: 719px) { .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
