/* Плеер, комната просмотра и экран «Сейчас играет». Плеер всегда тёмный — как зал при выключенном свете. */

.player {
  --p-fg: #f6f6f4;
  --p-fg-2: rgba(246, 246, 244, .7);
  --p-fg-3: rgba(246, 246, 244, .42);
  --p-glass: rgba(18, 18, 18, .6);
  --p-line: rgba(255, 255, 255, .14);
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; color: var(--p-fg); border-radius: var(--r-l); overflow: hidden;
  user-select: none; -webkit-user-select: none; outline: none; isolation: isolate; touch-action: manipulation; color-scheme: dark;
}
.player:fullscreen { border-radius: 0; width: 100vw; height: 100vh; aspect-ratio: auto; }
.player:-webkit-full-screen { border-radius: 0; width: 100vw; height: 100vh; aspect-ratio: auto; }
.player.pseudo-fs { position: fixed; z-index: 200; inset: 0; border-radius: 0; width: 100vw; height: 100dvh; aspect-ratio: auto; }
.player.idle { cursor: none; }
.player-stage { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; }
.player-stage video, .player-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; transition: transform var(--t) var(--ease); }
.player-stage canvas { z-index: 1; pointer-events: none; background: transparent; }
.player-poster { position: absolute; inset: 0; z-index: 1; background-size: contain; background-repeat: no-repeat; background-position: center; opacity: 1; transition: opacity .5s var(--ease); pointer-events: none; }
.player-poster.hide { opacity: 0; }

.player-subs { position: absolute; z-index: 3; left: 6%; right: 6%; bottom: 12%; display: flex; justify-content: center; pointer-events: none; transition: bottom var(--t) var(--ease); }
.player.idle .player-subs { bottom: 6%; }
.player-subs span {
  display: inline-block; max-width: 100%; padding: .16em .5em .22em; border-radius: .4em; background: rgba(0, 0, 0, .62); color: #fff; text-align: center;
  font-size: clamp(15px, 2.5cqw, 34px); font-weight: 560; line-height: 1.3; white-space: pre-line; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.player { container-type: inline-size; }
.player-subs span:empty { display: none; }

.player-fx { position: absolute; z-index: 4; inset: 0; pointer-events: none; overflow: hidden; }
.fx-emoji { position: absolute; bottom: 12%; font-size: clamp(30px, 5cqw, 54px); line-height: 1; will-change: transform, opacity; animation: floatUp 3.4s cubic-bezier(.22, .7, .3, 1) forwards; text-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.fx-emoji small { display: block; margin-top: 4px; font-size: 11px; font-weight: 650; text-align: center; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); font-family: var(--font); }
@keyframes floatUp {
  0% { transform: translate(0, 30px) scale(.3) rotate(0); opacity: 0; }
  12% { transform: translate(calc(var(--dx) * .2), -6vh) scale(1.15) rotate(calc(var(--rot) * .5)); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), -62cqh) scale(.9) rotate(var(--rot)); opacity: 0; }
}

.player-flash { position: absolute; z-index: 7; top: 14px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; padding: 0 12px; }
.pflash {
  max-width: 100%; padding: 8px 15px; border-radius: 999px; background: var(--p-glass); color: #fff; font-size: var(--fs-s); font-weight: 580; line-height: 1.3; text-align: center;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--p-line);
  opacity: 0; transform: translateY(-10px) scale(.94); transition: opacity var(--t), transform var(--t-slow) var(--spring);
}
.pflash.in { opacity: 1; transform: none; }
.pflash.out { opacity: 0; transform: translateY(-6px) scale(.97); transition-duration: .2s; }

.player-banner-slot { position: absolute; z-index: 6; inset: 0; display: grid; place-items: center; pointer-events: none; }
.player-banner-slot:empty, .player-wait-slot:empty { display: none; }
.player-banner {
  pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: min(86%, 440px); padding: 20px 22px; border-radius: var(--r-l); background: var(--p-glass); text-align: center; font-weight: 560; line-height: 1.35;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--p-line); animation: pop var(--t) var(--spring) both;
}
.player-banner .meter { width: 100%; background: rgba(255, 255, 255, .2); }
.player-banner .meter > i { background: #fff; }
.player-banner .btn { background: #fff; color: #000; }
.player-wait-slot { position: absolute; z-index: 6; left: 0; right: 0; bottom: 84px; display: flex; justify-content: center; pointer-events: none; padding: 0 12px; }
.player-wait {
  display: flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 9px 16px 9px 12px; border-radius: 999px; background: var(--p-glass); font-size: var(--fs-s); font-weight: 580;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--p-line); animation: rise var(--t) var(--ease-out) both; pointer-events: none;
}

.player-center { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; pointer-events: none; }
.player-big {
  pointer-events: auto; width: clamp(64px, 11cqw, 92px); height: clamp(64px, 11cqw, 92px); border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .94); color: #000; box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
  transition: transform var(--t-slow) var(--spring), opacity var(--t) var(--ease);
}
.player-big .ic { width: 42%; height: 42%; }
.player-big .i-play { margin-left: 6%; }
.player-big:hover { transform: scale(1.06); }
.player-big:active { transform: scale(.94); }
.player.playing .player-big { opacity: 0; transform: scale(.7); pointer-events: none; }
.player.touch.playing:not(.idle) .player-big { opacity: 1; transform: none; pointer-events: auto; background: rgba(20, 20, 20, .55); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: none; }
.player.buffering .player-big, .player.blocked .player-big { opacity: 0; pointer-events: none; }
.player-load { position: absolute; width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .22); border-top-color: #fff; opacity: 0; transition: opacity var(--t); animation: spin .8s linear infinite; }
.player.buffering .player-load { opacity: 1; }
.player-tap { position: absolute; z-index: 5; top: 0; bottom: 0; width: 38%; display: grid; place-items: center; pointer-events: none; opacity: 0; color: #fff; font-weight: 680; font-size: 15px; }
.player-tap.l { left: 0; border-radius: 0 50% 50% 0 / 0 100% 100% 0; background: linear-gradient(90deg, rgba(255, 255, 255, .16), transparent); }
.player-tap.r { right: 0; border-radius: 50% 0 0 50% / 100% 0 0 100%; background: linear-gradient(270deg, rgba(255, 255, 255, .16), transparent); }
.player-tap.go { animation: tapFlash .55s var(--ease) both; }
@keyframes tapFlash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

.player-unmute {
  position: absolute; z-index: 8; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px;
  background: #fff; color: #000; font-weight: 640; font-size: var(--fs-s); animation: pop var(--t-slow) var(--spring) both; box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
}

.player-top, .player-bar { position: absolute; z-index: 9; left: 0; right: 0; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.player-top { top: 0; padding: 14px 16px 40px; background: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent); display: flex; align-items: center; gap: 10px; pointer-events: none; }
.player-top > * { pointer-events: auto; }
.player-top .ttl { font-weight: 640; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.player-bar { bottom: 0; padding: 46px 12px 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .3) 60%, transparent); }
.player.idle .player-top, .player.idle .player-bar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.player.idle .player-top { transform: translateY(-8px); }
.player.idle .player-top > * { pointer-events: none; }

.pseek { position: relative; height: 22px; margin: 0 6px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.pseek::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); transition: height var(--t-fast); }
.pseek-buf, .pseek-fill { position: absolute; left: 0; height: 4px; border-radius: 4px; width: 0; transition: height var(--t-fast); pointer-events: none; }
.pseek-buf { background: rgba(255, 255, 255, .34); }
.pseek-fill { background: #fff; }
.pseek-thumb { position: absolute; left: 0; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform var(--t) var(--spring); pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.pseek:hover::before, .pseek.drag::before, .pseek:hover .pseek-buf, .pseek.drag .pseek-buf, .pseek:hover .pseek-fill, .pseek.drag .pseek-fill { height: 6px; }
.pseek:hover .pseek-thumb, .pseek.drag .pseek-thumb, .player.touch .pseek-thumb { transform: scale(1); }
.pseek-tip {
  position: absolute; bottom: 22px; left: 0; transform: translateX(-50%) translateY(4px); padding: 4px 9px; border-radius: 8px; background: rgba(20, 20, 20, .9); color: #fff;
  font-size: var(--fs-xs); font-weight: 640; font-variant-numeric: tabular-nums; pointer-events: none; opacity: 0; transition: opacity var(--t-fast), transform var(--t-fast); white-space: nowrap;
}
.pseek:hover .pseek-tip, .pseek.drag .pseek-tip { opacity: 1; transform: translateX(-50%); }
.pbar-row { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.pbtn { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: #fff; flex: none; transition: background-color var(--t-fast), transform var(--t-fast) var(--ease); }
.pbtn:hover { background: rgba(255, 255, 255, .14); }
.pbtn:active { transform: scale(.9); }
.pbtn .ic { width: 23px; height: 23px; }
.pbtn.on { background: #fff; color: #000; }
.pbtn.gear .ic { transition: transform var(--t-slow) var(--spring); }
.player.menu-open .pbtn.gear .ic { transform: rotate(60deg); }
.ptime { padding: 0 8px; font-size: var(--fs-s); font-weight: 580; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--p-fg-2); }
.ptime b { color: #fff; font-weight: 620; }
.pbadge:empty { display: none; }
.pbadge { margin-left: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 11px; font-weight: 660; white-space: nowrap; }
.pvol { display: flex; align-items: center; }
.pvol-slide { width: 0; overflow: hidden; transition: width var(--t) var(--ease); display: flex; align-items: center; }
.pvol:hover .pvol-slide, .pvol:focus-within .pvol-slide { width: 86px; }
.pvol-slide input { width: 76px; margin: 0 6px 0 2px; }
.player.novol .pvol-slide { display: none; }

input[type='range'].rng { -webkit-appearance: none; appearance: none; height: 18px; background: transparent; cursor: pointer; --v: 50%; }
input[type='range'].rng::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, currentColor var(--v), rgba(128, 128, 128, .35) var(--v)); }
input[type='range'].rng::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, currentColor var(--v), rgba(128, 128, 128, .35) var(--v)); }
input[type='range'].rng::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border-radius: 50%; background: currentColor; border: 0; }
input[type='range'].rng::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: currentColor; border: 0; }

/* Меню настроек плеера */
.player-menu {
  position: absolute; z-index: 12; right: 12px; bottom: 66px; width: 272px; max-height: calc(100% - 84px); overflow: hidden; border-radius: var(--r-m);
  background: rgba(18, 18, 18, .82); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); box-shadow: inset 0 0 0 1px var(--p-line), 0 18px 50px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(10px) scale(.94); transform-origin: 100% 100%; pointer-events: none; transition: opacity var(--t-fast), transform var(--t) var(--spring);
}
.player.menu-open .player-menu { opacity: 1; transform: none; pointer-events: auto; }
.pmenu-pages { display: flex; align-items: flex-start; transition: transform var(--t) var(--ease), height var(--t) var(--ease); }
.pmenu-page { flex: 0 0 100%; padding: 6px; max-height: min(360px, 100cqh - 96px); overflow-y: auto; scrollbar-width: thin; }
.pmenu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 11px; background: none; color: #fff; text-align: left; font-size: var(--fs-s); font-weight: 560; transition: background-color var(--t-fast); }
.pmenu-item:hover { background: rgba(255, 255, 255, .12); }
.pmenu-item .ic { width: 19px; height: 19px; color: var(--p-fg-2); }
.pmenu-item .val { margin-left: auto; color: var(--p-fg-2); font-weight: 520; display: flex; align-items: center; gap: 4px; }
.pmenu-item .sub { display: block; font-size: 11px; color: var(--p-fg-3); font-weight: 500; }
.pmenu-item .tick { margin-left: auto; opacity: 0; }
.pmenu-item.on .tick { opacity: 1; }
.pmenu-item[disabled] { opacity: .45; pointer-events: none; }
.pmenu-head { display: flex; align-items: center; gap: 6px; padding: 4px 4px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--p-line); font-weight: 640; font-size: var(--fs-s); }
.pmenu-head .pbtn { width: 32px; height: 32px; }
.pzoom { display: flex; align-items: center; gap: 8px; padding: 10px; }
.pzoom b { flex: 1; text-align: center; font-variant-numeric: tabular-nums; font-size: var(--fs-l); }
.pzoom .pbtn { background: rgba(255, 255, 255, .12); }

.player-stats {
  position: absolute; z-index: 8; left: 12px; top: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(10, 10, 10, .72); color: #fff;
  font: 500 11.5px/1.6 var(--mono); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--p-line); pointer-events: none; white-space: pre; animation: pop var(--t) var(--spring) both;
}
.player.has-unmute .player-stats { top: 64px; }

@media (max-width: 560px) {
  .pbtn { width: 38px; height: 38px; }
  .pbtn.hide-s { display: none; }
  .player-bar { padding: 36px 6px 6px; }
  .ptime { padding: 0 4px; font-size: var(--fs-xs); }
  .player-menu { right: 8px; bottom: 58px; width: min(272px, calc(100% - 16px)); }
  .pbadge { display: none; }
}

/* ── Комната ───────────────────────────────────────────────────────────── */
.room { display: grid; grid-template-columns: minmax(0, 1fr) 372px; height: 100vh; height: 100dvh; gap: 0; opacity: 0; transition: opacity var(--t) var(--ease); }
.room.in { opacity: 1; }
.room.solo { grid-template-columns: minmax(0, 1fr); }
.room-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: calc(12px + var(--safe-t)) 12px 12px 14px; gap: 10px; }
.room-top { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.room-top .ttl { font-size: var(--fs-l); font-weight: 650; letter-spacing: -.018em; }
.room-top .sub { font-size: var(--fs-s); color: var(--fg-3); }
.room-stage { flex: 1 1 auto; min-height: 0; display: flex; }
.room-stage .player { width: 100%; height: 100%; aspect-ratio: auto; border-radius: var(--r-l); }
.room-under { display: flex; align-items: center; gap: 10px; min-height: 48px; flex-wrap: wrap; }
.reacts { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); }
.react { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 21px; line-height: 1; display: grid; place-items: center; filter: grayscale(1); opacity: .8; transition: transform var(--t-slow) var(--spring), filter var(--t), opacity var(--t), background-color var(--t-fast); padding: 0; }
.react:hover { filter: none; opacity: 1; transform: translateY(-3px) scale(1.22); }
.react:active { transform: scale(.85); }
.voice { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.voice .btn.live { background: var(--solid); color: var(--on-solid); }
.voice .lvl { width: 4px; height: 18px; border-radius: 3px; background: var(--surface-3); overflow: hidden; position: relative; }
.voice .lvl i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: currentColor; transition: height .08s linear; }

.room-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; margin: calc(12px + var(--safe-t)) 12px 12px 0; border-radius: var(--r-xl); padding: 10px; gap: 10px; background: var(--surface); }
.rpanel-body { position: relative; flex: 1 1 auto; min-height: 0; }
.rpane { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; opacity: 0; transform: translateX(10px); pointer-events: none; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.rpane.on { opacity: 1; transform: none; pointer-events: auto; }
.chat-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 6px 10px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--fg-4) transparent; }
.chat-list > :first-child { margin-top: auto; }
.msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; animation: rise var(--t) var(--ease-out) both; }
.msg-head { display: flex; align-items: baseline; gap: 7px; font-size: var(--fs-s); }
.msg-head b { font-weight: 640; }
.msg-at { border: 0; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); font-size: 10.5px; font-weight: 640; font-variant-numeric: tabular-nums; transition: background-color var(--t-fast); }
.msg-at:hover { background: var(--surface-3); color: var(--fg); }
.msg-text { overflow-wrap: anywhere; line-height: 1.38; }
.msg.same { margin-top: -8px; }
.msg.same .avatar, .msg.same .msg-head { display: none; }
.msg.same > div { grid-column: 2; } /* аватар скрыт — текст остаётся во второй колонке */
.sysmsg { text-align: center; font-size: var(--fs-xs); color: var(--fg-3); animation: fade var(--t) both; }
.chat-empty { margin: auto; text-align: center; color: var(--fg-3); font-size: var(--fs-s); padding: 20px; }
.chat-form { display: flex; gap: 6px; padding: 2px; }
.chat-form .input { height: 46px; border-radius: 999px; }
.chat-new { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--solid); color: var(--on-solid); font-size: var(--fs-xs); font-weight: 650; animation: pop var(--t) var(--spring) both; }
.viewers { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.viewer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: var(--r-m); animation: rise var(--t) var(--ease-out) both; }
.viewer:hover { background: var(--surface); }
.viewer b { display: block; font-weight: 620; }
.viewer .st { font-size: var(--fs-xs); color: var(--fg-3); }
.viewer .vctl { display: flex; align-items: center; gap: 6px; color: var(--fg-2); }
.viewer .vctl input { width: 70px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; }
.pick { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px; border: 0; border-radius: var(--r-m); background: none; text-align: left; transition: background-color var(--t-fast); }
.pick:hover { background: var(--surface-2); }
.pick .now-thumb { border-radius: 12px; }

@media (max-width: 860px) {
  .room { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .room-main { padding: var(--safe-t) 0 0; gap: 6px; }
  .room-top { padding: 6px 10px 0; }
  .room-stage { flex: none; }
  .room-stage .player { height: auto; aspect-ratio: 16 / 9; border-radius: 0; }
  .room-under { padding: 0 8px; flex-wrap: nowrap; gap: 8px; }
  .reacts { flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .reacts::-webkit-scrollbar { display: none; }
  .react { width: 36px; height: 36px; font-size: 19px; flex: none; }
  .voice { margin-left: 0; flex: none; }
  .voice .btn { padding: 0 14px; }
  .voice .btn > span:not(.lvl), .voice > .small { display: none; }
  .room-side { margin: 6px 8px calc(8px + var(--safe-b)); border-radius: var(--r-l); }
  .room.solo { grid-template-rows: minmax(0, 1fr); }
  .room.solo .room-stage { flex: 1 1 auto; align-items: center; padding-bottom: 12vh; }
}
@media (max-height: 520px) and (orientation: landscape) and (max-width: 960px) {
  .room { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .room-top, .room-under, .room-side { display: none; }
  .room-main { padding: 0; }
  .room-stage { flex: 1 1 auto; }
  .room-stage .player { height: 100dvh; aspect-ratio: auto; border-radius: 0; }
}

/* ── «Сейчас играет» ───────────────────────────────────────────────────── */
.np-wrap { position: fixed; z-index: 60; inset: 0; background: var(--bg); overflow: hidden; opacity: 0; transform: translateY(4%); transition: opacity var(--t) var(--ease), transform var(--t-slow) var(--ease-out); }
.np-wrap.in { opacity: 1; transform: none; }
.np-wrap.out { opacity: 0; transform: translateY(3%); transition-duration: .22s; }
.np-bg { position: absolute; inset: -12%; background-size: cover; background-position: center; filter: grayscale(1) blur(60px) brightness(.5) contrast(1.1); opacity: 0; transition: opacity 1.2s var(--ease), background-image 1s; }
.np-bg.ok { opacity: 1; }
html[data-theme='light'] .np-bg { filter: grayscale(1) blur(60px) brightness(1.3) contrast(.75); }
html[data-theme='light'] .np-bg.ok { opacity: .75; }
.np-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, transparent, var(--bg) 85%); opacity: .7; }
.np { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100%; }
.np-main { position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.2vh, 24px); padding: calc(60px + var(--safe-t)) 28px 24px; min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.np-main::-webkit-scrollbar { display: none; }
.np-main > .np-art { margin-top: auto; }
.np-main > :last-child { margin-bottom: auto; }
.np-close { position: absolute; left: 16px; top: calc(14px + var(--safe-t)); z-index: 2; }
.np-cover { position: relative; width: min(38vh, 72%, 440px); aspect-ratio: 1; border-radius: clamp(22px, 4vh, 38px); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .8s var(--spring); flex: none; }
.np-cover.paused { transform: scale(.92); }
.np-cover img { width: 100%; height: 100%; object-fit: cover; }
.np-cover .ic { width: 30%; height: 30%; color: var(--fg-4); }
.np-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; container-type: size; }
.np-info { text-align: center; max-width: 100%; }
.np-title { font-size: clamp(22px, 3.4vh, 34px); font-weight: 690; letter-spacing: -.03em; line-height: 1.12; overflow-wrap: anywhere; }
.np-artist { margin-top: 6px; color: var(--fg-2); font-size: var(--fs-l); }
.np .seekline { width: min(520px, 100%); }
.np-ctl { display: flex; align-items: center; gap: clamp(10px, 3vw, 26px); }
.np-ctl .btn-icon { width: 54px; height: 54px; }
.np-ctl .btn-icon .ic { width: 26px; height: 26px; }
.np-ctl .np-play { width: 76px; height: 76px; }
.np-ctl .np-play .ic { width: 32px; height: 32px; }
.np-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.np-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; margin: calc(12px + var(--safe-t)) 12px 12px 0; border-radius: var(--r-xl); padding: 10px; gap: 10px; }
.np-side .queue { overflow-y: auto; padding: 2px; }
@media (max-width: 900px) {
  .np { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  .np-main { padding: calc(58px + var(--safe-t)) 18px 12px; gap: 14px; overflow: visible; }
  .np-cover { width: min(34vh, 62vw); }
  .np-side { margin: 0 8px calc(8px + var(--safe-b)); min-height: 44vh; }
}

/* Заголовок внутри плеера нужен только там, где нет шапки комнаты: в полном экране и на телефоне в альбомной ориентации. */
.room-stage .player:not(.is-fs):not(.pseudo-fs) .player-top { display: none; }
.player.is-fs .pback, .player.pseudo-fs .pback { display: none; }
@media (max-height: 520px) and (orientation: landscape) and (max-width: 960px) {
  .room-stage .player:not(.is-fs):not(.pseudo-fs) .player-top { display: flex; }
}
