/* ===== Маленький плеер-проигрыватель (js/site-player.js) =====
   В фирменном стиле сайта: полупрозрачное синее стекло с золотой каймой. Слева крутится пластинка со звукоснимателем,
   посередине название, золотые объёмные кнопки и время, справа громкость полукругом (заполненная часть светится золотом).
   Сворачивается в маленькую пластинку. */
.miniplayer {
  position: fixed; left: auto; top: auto; z-index: 60;
  width: 290px; max-width: calc(100vw - 24px);
  color: #fff; font-family: var(--sans, system-ui, sans-serif);
  animation: mini-in .45s cubic-bezier(.2, .8, .2, 1);
  -webkit-tap-highlight-color: transparent;
}
.miniplayer[hidden] { display: none; }
@keyframes mini-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ---- корпус: синее стекло ---- */
.miniplayer__panel {
  position: relative; height: 108px; border-radius: 54px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  border: 1px solid rgba(255, 214, 110, .5);
  background:
    radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%),
    linear-gradient(165deg, rgba(10, 114, 84, .5), rgba(8, 94, 72, .3));
  backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -2px 6px rgba(3, 51, 40, .25), 0 20px 36px -18px rgba(1, 41, 34, .75);
}
.miniplayer.is-dragging .miniplayer__panel { cursor: grabbing; }
.mp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }

/* ---- пластинка на золотом диске ---- */
.mp-deck { position: absolute; left: 8px; top: 8px; width: 92px; height: 92px; pointer-events: none; }
.mp-platter {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, #8a6a24 0 60%, #ffe6a3 66%, #b58a2c 71%, #f2d28a 100%);
  box-shadow: 0 3px 6px rgba(1, 41, 34, .45), inset 0 1px 1px rgba(255, 255, 255, .8);
}
.mp-vinyl {
  position: absolute; inset: 3px; border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(255, 255, 255, .055) 0 .6px, rgba(0, 0, 0, 0) .6px 2px),
    radial-gradient(circle, #222 0 34%, #0d0d0e 35%, #151516 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  animation: mp-spin 1.8s linear infinite; animation-play-state: paused;
}
.miniplayer.is-playing .mp-vinyl { animation-play-state: running; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-vinyl__label {
  position: absolute; inset: 33%; border-radius: 50%;
  background: #c8a24a center / cover no-repeat;
  box-shadow: 0 0 0 2px #1a1a1b, inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.mp-vinyl__label::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #e9d9a8; box-shadow: inset 0 0 1px #000; }
.mp-vinyl__sheen { /* блик на пластинке — стоит на месте, пока она крутится */
  position: absolute; inset: 3px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 20deg, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, .16) 30deg, rgba(255, 255, 255, 0) 70deg, rgba(255, 255, 255, 0) 200deg, rgba(255, 255, 255, .1) 225deg, rgba(255, 255, 255, 0) 260deg);
}

/* ---- звукосниматель: ось на подставке справа сверху, поворот = место в записи ---- */
.mp-arm {
  position: absolute; left: 84px; top: 2px; width: 20px; height: 87px; z-index: 2; overflow: visible;
  transform-origin: 10px 10px; transform: rotate(var(--arm, -12deg));
  transition: transform .9s cubic-bezier(.3, .9, .3, 1);
  filter: drop-shadow(2px 4px 3px rgba(1, 41, 34, .45));
  cursor: grab; touch-action: none;
}
.mp-arm.is-drag { transition: none; cursor: grabbing; }

/* ---- середина: название, кнопки, время ---- */
.mp-mid {
  position: absolute; left: 108px; right: 60px; top: 9px; bottom: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.miniplayer__title {
  max-width: 100%; margin: 0; padding: 0 2px; border: 0; background: none; cursor: pointer;
  font: 700 17px/1.1 "Caveat", var(--serif, serif); color: #ffc935; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(3, 61, 47, .6);
}
.miniplayer__name { display: block; overflow: hidden; text-overflow: ellipsis; }
.miniplayer__title:hover { color: #ffe39a; }

/* золотые объёмные кнопки */
.mp-keys { display: flex; align-items: center; gap: 5px; }
.mp-key {
  position: relative; display: grid; place-items: center; width: 26px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: #4a3200;
  background: radial-gradient(circle at 50% 28%, #fff4cf 0%, #f2cf74 45%, #b8862a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 226, 150, .9), 0 0 0 2.5px rgba(255, 214, 110, .25),
    0 3px 5px -1px rgba(1, 41, 34, .55), inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -2px 3px rgba(110, 70, 0, .3);
  transition: transform .12s, box-shadow .2s, color .12s;
}
.mp-key svg { width: 46%; height: 46%; }
.mp-key:hover { box-shadow: 0 0 0 1px rgba(255, 226, 150, .9), 0 0 0 2.5px rgba(255, 214, 110, .3), 0 3px 5px -1px rgba(1, 41, 34, .55), inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -2px 3px rgba(110, 70, 0, .3), 0 0 10px rgba(255, 205, 80, .55); }
/* нажатие: кнопка «продавливается» и вспыхивает золотом */
.mp-key:active {
  transform: translateY(1.5px) scale(.95);
  box-shadow: 0 0 0 1px rgba(255, 226, 150, .9), inset 0 2px 4px rgba(110, 70, 0, .5), 0 0 14px rgba(255, 210, 90, .9);
}
.mp-key--play {
  width: 32px; height: 32px; color: #3a2600;
  background: radial-gradient(circle at 50% 26%, #fffbe8 0%, #ffd760 40%, #e3a020 100%);
}
.miniplayer.is-playing .mp-key--play {
  box-shadow: 0 0 0 1px rgba(255, 226, 150, .95), 0 0 0 2.5px rgba(255, 214, 110, .3), 0 3px 5px -1px rgba(1, 41, 34, .55),
    inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -2px 3px rgba(110, 70, 0, .3), 0 0 16px rgba(255, 205, 70, .75);
}
.miniplayer .i-pause, .miniplayer.is-playing .i-play { display: none; }
.miniplayer.is-playing .i-pause { display: block; }
.mp-key:focus-visible, .mp-mini:focus-visible, .miniplayer__icon:focus-visible, .mp-vol__knob:focus-visible, .miniplayer__title:focus-visible { outline: 2px solid #ffd36b; outline-offset: 2px; }

.mp-info { display: flex; align-items: center; gap: 5px; }
.mp-time { font: 600 11px/1 var(--sans, sans-serif); color: rgba(255, 255, 255, .92); font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 1px 2px rgba(3, 61, 47, .55); }
.mp-mini {
  position: relative; display: grid; place-items: center; width: 18px; height: 18px; margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: none; color: rgba(255, 255, 255, .92); cursor: pointer; transition: color .2s, filter .2s; -webkit-tap-highlight-color: transparent;
}
.mp-mini svg { width: 74%; height: 74%; }
@media (hover: hover) { .mp-mini:not(.is-on):hover { color: #ffe39a; } } /* на телефоне наведение «залипало» после касания */
.mp-mini.is-on { color: #ffd36b; filter: drop-shadow(0 0 3px rgba(255, 205, 70, .7)); }
.miniplayer__one { position: absolute; right: -2px; bottom: -2px; display: none; font: 700 8px/1 var(--sans, sans-serif); color: #ffd36b; pointer-events: none; }
.mp-mini.is-one .miniplayer__one { display: block; }

/* ---- громкость полукругом справа: заполненная часть светится золотом ---- */
.mp-vol { position: absolute; right: 0; top: 0; width: 108px; height: 108px; pointer-events: none; }
.mp-vol__arc { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mp-vol__track, .mp-vol__fill { fill: none; stroke-linecap: round; }
.mp-vol__track { stroke: rgba(255, 255, 255, .25); stroke-width: 3.4; pointer-events: stroke; cursor: pointer; }
.mp-vol__fill { stroke: #ffd36b; stroke-width: 3.8; stroke-dasharray: 80 100; filter: drop-shadow(0 0 3px rgba(255, 200, 70, .9)); pointer-events: none; }
.mp-vol__knob {
  position: absolute; left: 90.6%; top: 50%; width: 21px; height: 21px; margin: -10.5px 0 0 -10.5px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; pointer-events: auto; cursor: grab; touch-action: none; color: #4a3200;
  background: radial-gradient(circle at 50% 28%, #fff4cf, #f2cf74 55%, #b8862a);
  box-shadow: 0 0 0 1px rgba(255, 226, 150, .9), 0 3px 5px -1px rgba(1, 41, 34, .55), inset 0 1px 1px rgba(255, 255, 255, .9);
}
.mp-vol__knob svg { width: 58%; height: 58%; }
.miniplayer.is-vol-drag .mp-vol__knob { cursor: grabbing; box-shadow: 0 0 0 1px rgba(255, 226, 150, .9), 0 0 12px rgba(255, 210, 90, .9); }
.miniplayer.is-muted .i-vol, .miniplayer:not(.is-muted) .i-mute { display: none; }

/* «свернуть» и «закрыть» — внутри полукруга */
.mp-corner { position: absolute; left: 68%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 3px; pointer-events: auto; }
.miniplayer__icon {
  display: grid; place-items: center; width: 19px; height: 19px; margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); cursor: pointer; transition: background .2s, color .2s;
}
.miniplayer__icon svg { width: 60%; height: 60%; }
.miniplayer__icon:hover { background: rgba(255, 255, 255, .28); color: #ffe39a; }

/* ---- свёрнут: маленькая пластинка (крутится, пока играет) ---- */
.miniplayer__bubble {
  display: none; position: relative; width: 56px; height: 56px; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer; touch-action: none;
  background: radial-gradient(circle, #8a6a24 0 60%, #ffe6a3 66%, #b58a2c 71%, #f2d28a 100%);
  box-shadow: 0 10px 22px -10px rgba(1, 41, 34, .8), 0 0 0 1px rgba(255, 214, 110, .5);
}
.miniplayer__bubble .mp-vinyl { inset: 3px; }
.miniplayer.is-min { width: 56px; }
.miniplayer.is-min .miniplayer__panel { display: none; }
.miniplayer.is-min .miniplayer__bubble { display: block; }
.miniplayer.is-min.is-playing .miniplayer__bubble { box-shadow: 0 10px 22px -10px rgba(1, 41, 34, .8), 0 0 0 1px rgba(255, 214, 110, .5), 0 0 14px rgba(255, 205, 70, .6); }

@media (prefers-reduced-motion: reduce) {
  .miniplayer { animation: none; }
  .mp-vinyl { animation: none; }
  .mp-arm { transition: none; }
}
