/* remote — the phone remote for TVs: the «Пульт · Телевизор LG» pill, «Смотреть на телевизоре»,
   the remote sheet (phones) and the big «Нажмите ОК» button (screens); and continuing on another
   device: «Продолжить на…» in the player, the «Продолжить здесь» banner, the offer card (at the
   end). See remote.js. */

/* ---- the pill: clear glass like the tab bar, just above it (remote.js sets `bottom`).
   «Пульт» stays whole; the screen's name after the thin line gives way with an ellipsis ---- */
.rm-pill {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 895;
  display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 18px 0 13px;
  /* max-content: left 50% would otherwise stop it at half the screen */
  width: max-content; max-width: min(70vw, 420px);
  border-radius: 999px; border: 1px solid transparent; transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(22,26,36,.34), rgba(8,10,16,.52)) padding-box,
    linear-gradient(160deg, rgba(255,255,255,.55), rgba(255,255,255,.12) 32%, rgba(255,255,255,.04) 58%, rgba(255,255,255,.28)) border-box;
  -webkit-backdrop-filter: blur(10px) saturate(165%) brightness(.9);
  backdrop-filter: blur(10px) saturate(165%) brightness(.9);
  box-shadow: inset 0 1.5px 1px rgba(255,255,255,.3), inset 0 -1px 1px rgba(255,255,255,.08);
  color: #fff; font: 600 14.5px var(--body); text-shadow: 0 1px 2px rgba(0,0,0,.45);
  -webkit-tap-highlight-color: transparent; animation: rm-rise .28s cubic-bezier(.2,.8,.2,1);
  transition: bottom .34s cubic-bezier(.2,.8,.2,1);
}
.rm-pill:active { transform: translateX(-50%) scale(.95); }
.rm-pi { flex: none; display: grid; place-items: center; }
.rm-pi svg { display: block; width: 21px; height: 21px; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.4)); }
.rm-pw { flex: none; }
.rm-sep { flex: none; display: none; width: 1px; height: 16px; margin: 0 2px; border-radius: 1px; background: rgba(255,255,255,.4); }
.rm-pt { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: rgba(255,255,255,.9); }
.rm-pill.named .rm-sep { display: block; }
.rm-pill.named .rm-pt { display: block; }
.rm-pill.away .rm-pt { color: rgba(255,255,255,.6); }     /* the screen is coming back (a new page) */
@keyframes rm-rise { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---- «Смотреть на телевизоре» in the title page's hero (tinted like «Что посмотреть?») ---- */
.btn.rm-tv {
  color: #ff9dbd; border-color: rgba(255,93,143,.42);
  background: linear-gradient(180deg, rgba(255,93,143,.16), rgba(255,93,143,.05));
}
.btn.rm-tv:hover { background: rgba(255,93,143,.2); border-color: rgba(255,93,143,.7); }
.btn.rm-tv svg { width: 19px; height: 19px; flex: none; }
@media (max-width: 719px) {
  .hero-actions .rm-tv { grid-column: 1 / -1; height: 46px; justify-content: center; min-width: 0; }
  .hero-actions .rm-tv span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---- the remote sheet (.as-sheet gives the position, the panel and the grab handle).
   It may open from the profile: above the phone's full-screen pages (.tpages 880), «Что
   посмотреть?» (.pick-modal 1100) and the account dialogs (.auth-modal 1200 — the profile on
   wide screens); its toasts (3200) stay above it ---- */
.sheet-bg.rm-bg { z-index: 1300; }
.rm-sheet.as-sheet {
  z-index: 1301; display: flex; flex-direction: column; gap: 12px; padding: 24px 16px 16px;
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-x: hidden;
}
/* taller than the screen: the sheet scrolls; no row gets squashed (the chips row, a scroller
   itself, would otherwise shrink to nothing) */
.rm-sheet.as-sheet > * { flex-shrink: 0; }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
/* what the remote drives: the kind in a glass disc, the name, «в сети» / «переподключается…» */
.rm-target { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.rm-kind {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--glass-hi); color: #ff9dbd;
}
.rm-kind svg { width: 24px; height: 24px; }
.rm-tg { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rm-tn { font: 700 18px/1.25 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-ts { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13.5px; line-height: 1.3; }
.rm-sd { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); }
.rm-target[data-m="on"] .rm-sd { background: #44d36a; box-shadow: 0 0 0 3px rgba(68,211,106,.22); }
.rm-target[data-m="on"] .rm-ts { color: #8fe3a6; }
.rm-target[data-m="wait"] .rm-sd { background: #f2b441; animation: rm-blink 1.2s ease-in-out infinite; }
.rm-target[data-m="wait"] .rm-ts { color: #f5cf7a; }
@keyframes rm-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rm-target[data-m="wait"] .rm-sd { animation: none; } }
.rm-x {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -10px -6px 0; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
}
.rm-x:active { background: rgba(255,255,255,.08); }
.rm-x svg { width: 20px; height: 20px; }

/* several screens: one chip each, the chosen one in the accent */
.rm-chips {
  display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.rm-chips::-webkit-scrollbar { display: none; }
.rm-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 13px;
  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; -webkit-tap-highlight-color: transparent;
}
.rm-chip.on { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.rm-ci { flex: none; display: grid; place-items: center; color: #ff9dbd; }
.rm-ci svg { display: block; width: 19px; height: 19px; }
.rm-chip.on .rm-ci { color: #fff; }
.rm-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #44d36a; box-shadow: 0 0 0 3px rgba(68,211,106,.22); }
.rm-chip.on .rm-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }

.rm-status { margin: 0; padding: 10px 14px; border-radius: 16px; background: rgba(242,180,65,.12); color: #f5cf7a; font-size: 14px; line-height: 1.45; }
.rm-body, .rm-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* now playing */
.rm-now { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rm-poster {
  flex: none; width: 56px; height: 84px; border-radius: 12px;
  background: var(--surface-2) center / cover no-repeat; box-shadow: 0 0 0 1px rgba(255,255,255,.1);
}
.rm-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rm-name {
  font: 700 17px/1.25 var(--display); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.rm-ep { color: #ff9dbd; font-size: 14px; font-weight: 600; }
.rm-hint { margin: 0; padding: 6px 4px; color: var(--muted); font-size: 14.5px; line-height: 1.5; text-align: center; }

/* sliders: a rounded track with the gradient fill up to the thumb (--p, set by remote.js) */
.rm-range {
  --p: 0%;
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; padding: 0;
  background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rm-range:focus { outline: none; }
.rm-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, #ff5d8f, #c06bff) 0 0 / var(--p) 100% no-repeat, rgba(255,255,255,.16);
}
.rm-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.rm-range::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.16); }
.rm-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent-grad); }
.rm-range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; }
.rm-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255,93,143,.45); }
.rm-range:disabled { opacity: .45; cursor: default; }

.rm-prog { display: flex; flex-direction: column; }
.rm-times {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: -6px;
  color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums;
}
.rm-t { color: var(--text); font-weight: 600; }
.rm-ends { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* transport: big play / pause in the middle. The gaps give way first, so the five buttons fit
   the row: (row − buttons) / 4, between 4 and 12 px */
.rm-transport {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  column-gap: clamp(4px, calc((100% - 284px) / 4), 12px);
}
.rm-btn {
  position: relative; flex: none; display: grid; place-items: center; width: 56px; height: 56px; padding: 0;
  border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--glass-hi);
  color: #fff; -webkit-tap-highlight-color: transparent; transition: transform .12s ease, background .15s ease;
}
.rm-btn svg { width: 26px; height: 26px; }
.rm-btn:active { transform: scale(.92); background: rgba(255,255,255,.14); }
.rm-btn:disabled { opacity: .4; transform: none; }
.rm-btn.rm-sm { width: 48px; height: 48px; }
.rm-btn.rm-sm svg { width: 22px; height: 22px; }
.rm-btn.rm-main {
  width: 76px; height: 76px; border-color: transparent; background: var(--accent-grad);
  box-shadow: 0 8px 22px rgba(255,93,143,.32), inset 0 1px 0 rgba(255,255,255,.35);
}
.rm-btn.rm-main svg { width: 32px; height: 32px; }
.rm-n { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -42%); font: 700 9px/1 var(--body); pointer-events: none; }

.rm-vol { display: flex; align-items: center; gap: 10px; }
.rm-vol .rm-btn { width: 44px; height: 44px; }
.rm-vol .rm-btn svg { width: 22px; height: 22px; }
.rm-vol .rm-range { flex: 1 1 auto; width: auto; min-width: 0; }
.rm-vol.fixed { justify-content: center; }     /* no slider (iPad): the mute button on its own */

.rm-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.rm-act {
  flex: 1 1 140px; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--glass-line);
  background: var(--glass); box-shadow: var(--glass-hi); color: #fff; font: 600 14.5px var(--body);
  -webkit-tap-highlight-color: transparent;
}
.rm-act:active { background: rgba(255,255,255,.14); }
.rm-act:disabled { opacity: .45; }
.rm-act svg { width: 19px; height: 19px; flex: none; }
.rm-act span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* «Смотреть на этом телефоне»: the film moves over to the phone (tinted like «Смотреть на телевизоре») */
.rm-pull {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-width: 0; height: 50px; padding: 0 18px;
  border-radius: 999px; border: 1px solid rgba(255,93,143,.42); color: #ff9dbd;
  background: linear-gradient(180deg, rgba(255,93,143,.16), rgba(255,93,143,.05)); box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  font: 600 15px var(--body); -webkit-tap-highlight-color: transparent; transition: transform .12s ease, background .15s ease;
}
.rm-pull:active { transform: scale(.97); background: rgba(255,93,143,.2); }
.rm-pull:disabled { opacity: .45; transform: none; }
.rm-pull svg { width: 20px; height: 20px; flex: none; }
.rm-pull span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* narrow phones (320 px): the five transport buttons still fit in one row */
@media (max-width: 359px) {
  .rm-sheet.as-sheet { padding-left: 12px; padding-right: 12px; }
  .rm-chips { margin: 0 -12px; padding: 0 12px; }
  .rm-transport { gap: 6px; column-gap: clamp(4px, calc((100% - 254px) / 4), 12px); }
  .rm-btn { width: 50px; height: 50px; }
  .rm-btn.rm-sm { width: 44px; height: 44px; }
  .rm-btn.rm-main { width: 66px; height: 66px; }
}
/* phones held sideways: two columns, so it fits the short screen */
@media (max-height: 500px) and (orientation: landscape) {
  .rm-sheet.as-sheet {
    max-width: min(760px, calc(100% - 16px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    /* the sheet sits 8 px + the bottom inset up (.as-sheet): both insets come off its height */
    max-height: calc(100vh - 16px);
    max-height: calc(100vh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 16px 18px 14px; gap: 10px;
  }
  .rm-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 20px; }
  .rm-poster { width: 46px; height: 69px; }
  /* half the width (283 px on a 640 × 360 phone): the buttons a size down */
  .rm-transport { column-gap: clamp(4px, calc((100% - 256px) / 4), 12px); }
  .rm-btn { width: 52px; height: 52px; }
  .rm-btn.rm-sm { width: 44px; height: 44px; }
  .rm-btn.rm-main { width: 64px; height: 64px; }
  .rm-pull { height: 44px; }
}
/* …and on the smallest (568 × 320) a size smaller still */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 600px) {
  .rm-sheet.as-sheet { padding-left: 12px; padding-right: 12px; }
  .rm-chips { margin: 0 -12px; padding: 0 12px; }
  .rm-transport { column-gap: clamp(4px, calc((100% - 236px) / 4), 12px); }
  .rm-btn { width: 46px; height: 46px; }
  .rm-btn.rm-main { width: 56px; height: 56px; }
}

/* a short note: at the top of the screen, or at the top of the open sheet */
.rm-toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); z-index: 3200;
  width: max-content; max-width: calc(100vw - 32px); padding: 10px 16px; transform: translateX(-50%);
  border-radius: 999px; border: 1px solid var(--glass-line); background: var(--panel); box-shadow: var(--glass-hi);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  color: var(--text); font: 500 14px/1.4 var(--body); text-align: center; pointer-events: none;
  animation: rm-pop .2s ease;
}
.rm-toast.in-sheet { position: absolute; top: 10px; z-index: 5; max-width: calc(100% - 32px); }
@keyframes rm-pop { from { opacity: 0; transform: translate(-50%, -6px); } }

/* ---- screens: «Нажмите ОК» — sized for a TV across the room, one big focused button ---- */
.rm-ok {
  position: fixed; inset: 0; z-index: 3100; display: grid; place-items: center; padding: 24px;
  background: rgba(6,5,12,.6); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  color: var(--text); animation: rm-fade .25s ease;
}
.rm-ok-card { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: min(640px, 100%); text-align: center; }
.rm-ok-poster {
  width: 22vh; height: 33vh; min-width: 96px; min-height: 144px; max-width: 200px; max-height: 300px; margin-bottom: 10px;
  border-radius: 20px; background: var(--surface-2) center / cover no-repeat;
  box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.1);
}
.rm-ok-title { margin: 0; font: 700 clamp(20px, 3.4vh, 36px)/1.2 var(--display); }
.rm-ok-ep { margin: 0; color: #ff9dbd; font-size: clamp(15px, 2.4vh, 24px); font-weight: 600; }
.rm-ok-note { margin: 0; color: rgba(255,255,255,.82); font-size: clamp(15px, 2.4vh, 24px); }
.rm-ok-btn {
  display: inline-flex; align-items: center; gap: .55em; margin-top: 3vh; height: clamp(64px, 10vh, 96px);
  padding: 0 clamp(28px, 4.5vh, 48px); border: 0; border-radius: 999px; background: var(--accent-grad);
  color: #fff; font: 700 clamp(20px, 3.2vh, 32px) var(--body); white-space: nowrap;
  box-shadow: 0 0 0 10px rgba(255,93,143,.16), 0 14px 36px rgba(255,93,143,.35), inset 0 1px 0 rgba(255,255,255,.35);
  animation: rm-breathe 2.4s ease-in-out infinite;
}
.rm-ok-btn:focus, .rm-ok-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px #fff, 0 0 0 12px rgba(255,93,143,.35), 0 14px 36px rgba(255,93,143,.4), inset 0 1px 0 rgba(255,255,255,.35);
}
.rm-ok-ic { display: grid; place-items: center; }
.rm-ok-ic svg { display: block; width: 1.15em; height: 1.15em; }
@keyframes rm-fade { from { opacity: 0; } }
@keyframes rm-breathe { 50% { transform: scale(1.04); } }

/* sound / fullscreen: the film keeps playing — a small card at the bottom instead of the dim */
.rm-ok.soft {
  top: auto; bottom: calc(4vh + env(safe-area-inset-bottom)); padding: 0 16px;
  background: none; -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none;
}
.rm-ok.soft .rm-ok-card {
  flex-direction: row; gap: 18px; padding: 10px 10px 10px 24px; border-radius: 999px; pointer-events: auto;
  border: 1px solid var(--glass-line); background: rgba(16,12,30,.74); box-shadow: var(--glass-hi);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
}
.rm-ok.soft .rm-ok-note { color: #fff; font-weight: 600; font-size: clamp(15px, 2.2vh, 22px); }
.rm-ok.soft .rm-ok-btn {
  margin: 0; height: clamp(48px, 7vh, 64px); padding: 0 clamp(20px, 3vh, 30px); font-size: clamp(17px, 2.6vh, 24px);
  animation: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.rm-ok.soft .rm-ok-btn:focus, .rm-ok.soft .rm-ok-btn:focus-visible { box-shadow: 0 0 0 3px #fff, inset 0 1px 0 rgba(255,255,255,.35); }
@media (max-width: 520px) {
  .rm-ok.soft .rm-ok-card { flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 26px; }
}

/* =====================================================================================
   Continue on another device
   ===================================================================================== */

/* ---- «Продолжить на…» in the player's control row ---- */
.p-btn.rm-send svg { width: 23px; height: 23px; }
/* narrow phones: one more button in the row, so they all go a size down and the row still fits */
@media (max-width: 380px) {
  .player.rm-has-send .p-bar .p-btn { width: 34px; height: 34px; }
  .player.rm-has-send .p-bar .p-btn svg { width: 21px; height: 21px; }
}
/* the control row stays up while the menu is open; «Пропустить заставку» steps aside as for the
   settings menu (with the controls hidden it would drop onto the row, over its buttons) */
.player.started.rm-hm-open .p-bottom { opacity: 1; pointer-events: auto; transform: none; }
.player.rm-hm-open .p-skip { display: none; }

/* its menu: a .p-menu (the settings menu's glass, inside the player — fullscreen too — or a bottom
   sheet on touch screens); a row per device: kind in a glass disc, name, what it is doing */
.p-menu.rm-hmenu { width: 320px; }
.m-head.rm-hhead { gap: 10px; min-height: 44px; cursor: default; }
.m-head.rm-hhead:hover { background: transparent; }
.rm-hhi { flex: none; display: grid; place-items: center; color: #ff9dbd; }
.m-head.rm-hhead .rm-hhi svg { width: 19px; height: 19px; }
.m-row.rm-hrow { gap: 12px; min-height: 54px; padding: 7px 10px; }
.rm-hic {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--glass-hi); color: #ff9dbd;
}
.m-row.rm-hrow .rm-hic svg { width: 20px; height: 20px; color: inherit; }
.rm-htx { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rm-htx b { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-htx small { color: rgba(255,255,255,.6); font-size: 12.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-row.rm-hrow:focus-visible { outline-offset: -2px; }
.rm-hnone { margin: 0; padding: 12px 10px 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.as-sheet .m-row.rm-hrow { min-height: 60px; }
.as-sheet .rm-htx b { font-size: 16px; }
.as-sheet .rm-htx small { font-size: 13.5px; }
.sheet-bg.rm-hbg { z-index: 1000; }

/* ---- «Продолжить здесь с 41:20 · идёт на «Телевизор LG»» — first in the hero's actions, on a line
   of its own: the margin takes the rest of the line (older TV browsers without max(): inline) ---- */
.rm-here {
  flex: 0 1 520px; min-width: 0; margin-right: max(0px, calc(100% - 520px));
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 18px 6px 6px;
  border-radius: 999px; border: 1px solid transparent; color: #fff; text-align: left;
  background:
    linear-gradient(180deg, rgba(255,93,143,.2), rgba(192,107,255,.1)) padding-box,
    linear-gradient(160deg, rgba(255,255,255,.5), rgba(255,255,255,.1) 34%, rgba(255,255,255,.04) 60%, rgba(255,157,189,.42)) border-box;
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1.5px 1px rgba(255,255,255,.22), inset 0 -1px 1px rgba(255,255,255,.06);
  -webkit-tap-highlight-color: transparent; animation: rm-fade .25s ease; transition: transform .12s ease, filter .15s ease;
}
.rm-here:hover { filter: brightness(1.1); }
.rm-here:active { transform: scale(.98); }
.rm-here-ic {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.rm-here-ic svg { width: 20px; height: 20px; }
.rm-here-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rm-here-tx b { font: 700 15.5px/1.25 var(--body); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-here-tx small { color: rgba(255,255,255,.74); font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 719px) {
  .hero-actions .rm-here { grid-column: 1 / -1; width: 100%; max-width: none; margin-right: 0; }
}

/* ---- an offer from another device: a glass card at the top (inside the fullscreen element when
   there is one), above the tab bar on phones (.low; remote.js sets `bottom`) ---- */
.rm-offer {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); z-index: 3150;
  width: min(440px, calc(100% - 24px)); transform: translateX(-50%);
  animation: rm-drop .28s cubic-bezier(.2,.8,.2,1);
}
.rm-offer.low {
  top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); width: calc(100% - 16px); max-width: 440px; animation-name: rm-rise;
  transition: bottom .34s cubic-bezier(.2,.8,.2,1);       /* follows the tab bar as it hides / comes back, like the pill */
}
/* what a screen reader says when the card comes: not shown */
.rm-of-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
@keyframes rm-drop { from { opacity: 0; transform: translate(-50%, -12px); } }
.rm-of-card {
  position: relative; display: flex; gap: 12px; padding: 12px; border-radius: 28px; border: 1px solid transparent; color: #fff;
  background:
    linear-gradient(180deg, rgba(40,30,66,.66), rgba(16,12,30,.8)) padding-box,
    linear-gradient(160deg, rgba(255,255,255,.55), rgba(255,255,255,.12) 32%, rgba(255,255,255,.04) 58%, rgba(255,255,255,.24)) border-box;
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1.5px 1px rgba(255,255,255,.24), inset 0 -1px 1px rgba(255,255,255,.07);
}
.rm-of-poster {
  flex: none; width: 64px; height: 96px; border-radius: 16px;
  background: var(--surface-2) center / cover no-repeat; box-shadow: 0 0 0 1px rgba(255,255,255,.1);
}
.rm-of-body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.rm-of-from { display: flex; align-items: flex-start; gap: 6px; max-width: 100%; margin: 0; padding-right: 36px; color: rgba(255,255,255,.74); font-size: 13px; line-height: 1.35; }
.rm-of-fi { flex: none; display: grid; place-items: center; height: 1.35em; color: #ff9dbd; }     /* on the first line */
.rm-of-fi svg { display: block; width: 16px; height: 16px; }
/* «Компьютер Windows · Chrome предлагает продолжить» on a phone: the name gives way with an ellipsis,
   «предлагает продолжить» stays whole — after it when there is room, else on a line of its own */
.rm-of-ft { display: flex; flex-wrap: wrap; min-width: 0; }
.rm-of-ft b { min-width: 0; max-width: 100%; margin-right: .3em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-weight: 600; }
.rm-of-ft span { white-space: nowrap; }
.rm-of-title {
  max-width: 100%; padding-right: 30px; font: 700 16px/1.25 var(--display); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.rm-of-ep { color: #ff9dbd; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rm-of-go {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; margin-top: 8px; padding: 0 20px 0 16px;
  border: 0; border-radius: 999px; background: var(--accent-grad); color: #fff; font: 600 15px var(--body); white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35); -webkit-tap-highlight-color: transparent; transition: transform .12s ease;
}
.rm-of-go:active { transform: scale(.96); }
.rm-of-go:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, inset 0 1px 0 rgba(255,255,255,.35); }
.rm-of-go svg { width: 18px; height: 18px; flex: none; }
.rm-of-x {
  position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.72); -webkit-tap-highlight-color: transparent;
}
.rm-of-x:hover, .rm-of-x:active { background: rgba(255,255,255,.1); color: #fff; }
.rm-of-x svg { width: 18px; height: 18px; }
/* narrow phones: a smaller poster, «Смотреть здесь» across the card */
@media (max-width: 380px) {
  .rm-of-card { gap: 10px; padding: 10px; }
  .rm-of-poster { width: 52px; height: 78px; border-radius: 13px; }
  .rm-of-go { align-self: stretch; }
}

/* the sleep timer: its button shows what is left (tinted while set). Its choices open over the
   transport and volume rows (.rm-pad), which step aside meanwhile, so the sheet keeps its size and
   nothing jumps: two rows — Выкл · 15 · 30 · 45, then 1 час · После этой серии — fit the space of
   those two rows on every phone, upright (320–430 px) or sideways (half the sheet) */
.rm-sleepb.on { border-color: rgba(255,93,143,.42); color: #ff9dbd; background: linear-gradient(180deg, rgba(255,93,143,.16), rgba(255,93,143,.05)); }
.rm-pad { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rm-pad.sleep-open > .rm-transport, .rm-pad.sleep-open > .rm-vol { visibility: hidden; }
.rm-sleep {
  position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: center; gap: 8px 6px; overflow-y: auto; animation: rm-fade .18s ease;
}
.rm-sleep[hidden] { display: none; }
.rm-sleep .rm-chip { justify-content: center; min-width: 0; height: 42px; padding: 0 6px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.rm-sleep .rm-chip:last-child { grid-column: span 3; }
@media (max-width: 359px), (max-height: 500px) and (orientation: landscape) and (max-width: 600px) {
  .rm-sleep .rm-chip { height: 40px; padding: 0 4px; font-size: 13px; }
}
