/* Свой проигрыватель pomoshniki.org (задание № 1162) — одежда «Помощников»: слива, крем, молоко, тёплая полоса.
   Кадр тёмный в любой теме — свои цвета, не переменные палитры (правило плеера Medina Edu, pleer.md раздел 5). */
.pp {
  --pp-moloko: #FFFDF8; --pp-sliva: #5B3A5E; --pp-temn: #24162A;
  --pp-zheltyy: #F7C948; --pp-oranzh: #F59A3C;
  position: relative; container-type: inline-size; overflow: hidden; isolation: isolate;
  background: #000; color: var(--pp-moloko); font-family: "Nunito", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent; outline: none;
}
.pp:focus-visible { box-shadow: 0 0 0 3px var(--pp-zheltyy); }
.pp--zakryt .pp__video { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }   /* № 2317: долгое нажатие на телефоне — без «Сохранить» */
.pp__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }

/* большая кнопка в кадре — как на обложке карточки */
.pp__bolshaya {
  position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; z-index: 2;
  width: 4.5rem; height: 4.5rem; border: 3px solid rgba(255, 253, 248, .9); border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--pp-sliva); color: var(--pp-moloko);
  box-shadow: 0 6px 18px -6px rgba(36, 22, 42, .6); transition: scale .15s, opacity .2s;
}
.pp__bolshaya svg { width: 2.25rem; height: 2.25rem; fill: currentColor; }   /* «плей» — оптический центр в рисунке (№ 1177) */
.pp__bolshaya:hover { scale: 1.07; }
.pp__bolshaya:focus-visible { outline: 3px solid var(--pp-zheltyy); outline-offset: 3px; }
.pp--idet .pp__bolshaya, .pp--zhdu .pp__bolshaya { opacity: 0; pointer-events: none; }

/* «Загрузка…»: кольцо охватывает место кнопки, слово под ним одной строкой */
.pp__zhdu { position: absolute; inset: 0; z-index: 2; display: none; place-items: center; pointer-events: none; }
.pp--zhdu .pp__zhdu { display: grid; }
.pp__kolco {
  grid-area: 1 / 1; width: 4.25rem; height: 4.25rem; border-radius: 50%;
  border: 4px solid rgba(255, 253, 248, .25); border-top-color: var(--pp-zheltyy); border-right-color: var(--pp-oranzh);
  animation: pp-krug .9s linear infinite;
}
.pp__slovo {
  grid-area: 1 / 1; translate: 0 3.4rem; white-space: nowrap; font-weight: 700; font-size: .9rem;
  padding: .15rem .55rem; border-radius: 999px; background: rgba(36, 22, 42, .55);
}
.pp__slovo i { font-style: normal; opacity: .25; animation: pp-tochka 1.2s infinite; }
.pp__slovo i:nth-of-type(2) { animation-delay: .2s; }
.pp__slovo i:nth-of-type(3) { animation-delay: .4s; }
@keyframes pp-krug { to { rotate: 1turn; } }
@keyframes pp-tochka { 30% { opacity: 1; } 60% { opacity: .25; } }

.pp__oshibka {
  position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; gap: .6rem; padding: 1rem;
  text-align: center; background: rgba(36, 22, 42, .85); font-weight: 700;
}
.pp__oshibka[hidden] { display: none; }
.pp__oshibka p { margin: 0; }
.pp__povtor {
  font: inherit; font-weight: 700; padding: .5rem 1rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--pp-moloko); color: var(--pp-sliva);
}

/* нижняя панель */
.pp__panel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.6rem .45rem .3rem;
  background: linear-gradient(to top, rgba(36, 22, 42, .82), rgba(36, 22, 42, .45) 55%, transparent);
  transition: opacity .25s, translate .25s;
}
/* до первого «смотреть» — только большая кнопка; потом панель прячется, пока мультик идёт и рука не двигается */
.pp:not(.pp--nachato) .pp__panel, .pp--tiho .pp__panel { opacity: 0; translate: 0 .5rem; pointer-events: none; }
.pp--tiho { cursor: none; }

.pp__polosa {
  position: relative; height: 1.4rem; margin: 0 .35rem; cursor: pointer; touch-action: none; outline: none;
}
.pp__polosa::before, .pp__bufer, .pp__proshlo {
  content: ""; position: absolute; left: 0; top: 50%; height: 4px; translate: 0 -50%; border-radius: 999px;
  transition: height .15s;
}
.pp__polosa::before { right: 0; background: rgba(255, 253, 248, .28); }
.pp__bufer { width: 0; background: rgba(255, 253, 248, .45); }
.pp__proshlo { width: 0; background: linear-gradient(90deg, var(--pp-zheltyy), var(--pp-oranzh)); }
.pp__tochka {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%;
  background: var(--pp-moloko); box-shadow: 0 0 0 3px var(--pp-oranzh), 0 2px 6px rgba(0, 0, 0, .4);
  scale: .85; transition: scale .15s;
}
.pp__polosa:hover::before, .pp__polosa:hover .pp__bufer, .pp__polosa:hover .pp__proshlo,
.pp--tyanu .pp__polosa::before, .pp--tyanu .pp__bufer, .pp--tyanu .pp__proshlo { height: 6px; }
.pp__polosa:hover .pp__tochka, .pp--tyanu .pp__tochka, .pp__polosa:focus-visible .pp__tochka { scale: 1.1; }
.pp__polosa:focus-visible .pp__tochka { box-shadow: 0 0 0 3px var(--pp-zheltyy), 0 0 0 6px rgba(255, 253, 248, .6); }

.pp__ryad { display: flex; align-items: center; gap: .1rem; }
.pp__k {
  flex: none; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: .7rem; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--pp-moloko); font: inherit;
}
.pp__k svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }
.pp__k:hover { background: rgba(255, 253, 248, .16); }
.pp__k:focus-visible { outline: 2px solid var(--pp-zheltyy); outline-offset: 1px; }
.pp__skor { width: auto; min-width: 2.4rem; padding: 0 .35rem; font-weight: 800; font-size: .85rem; }
.pp__vremya { flex: none; padding: 0 .3rem; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp__promezh { flex: 1; }

/* узкая карточка (телефон, полка в 2 столбца): только главное */
@container (max-width: 15rem) {
  .pp__skor, .pp__vse { display: none; }
  .pp__k { width: 2rem; height: 2rem; }
  .pp__panel { padding-inline: .2rem; }
}
@container (max-width: 11rem) {
  .pp__zvuk { display: none; }
}

/* полный экран */
.pp--ekran { width: 100% !important; height: 100% !important; border-radius: 0 !important; aspect-ratio: auto !important; }
.pp--ekran .pp__k { width: 2.75rem; height: 2.75rem; }
.pp--ekran .pp__k svg { width: 1.6rem; height: 1.6rem; }
.pp--ekran .pp__vremya { font-size: 1rem; }
.pp--ekran .pp__panel { padding: 2.5rem 1rem .8rem; }

@media (prefers-reduced-motion: reduce) {
  .pp__kolco { animation-duration: 2.4s; }
  .pp__slovo i { animation: none; opacity: 1; }
  .pp__panel, .pp__bolshaya, .pp__tochka { transition: none; }
}
