/* ==========================================================================
   player.css - Trang phát phim ngắn dạng dọc (vuốt lên/xuống chuyển tập)
   Dùng cùng: html/vod/play.html + asset/js/player.js
   ========================================================================== */

:root {
  --hp-accent: #f5c518;          /* màu nhấn: thanh tiến trình, tập đang xem */
  --hp-pink: #ec237f;
  --hp-panel-bg: #121212;
  --hp-card-bg: #1c1c1e;
  --hp-text: #f2f2f4;
  --hp-muted: rgba(255, 255, 255, 0.55);
  --hp-safe-top: env(safe-area-inset-top, 0px);
  --hp-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html.hp-page,
html.hp-page body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: var(--hp-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.hp-page button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.hp-page a { color: inherit; text-decoration: none; }
.hp-page img { -webkit-user-drag: none; user-select: none; }

/* ---------- Khung chính (trên PC thu về giữa màn hình như điện thoại) ---------- */
.hp-stage {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  max-width: 480px;
  overflow: hidden;
  background: #000;
}

/* ---------- Danh sách cuộn dọc ---------- */
.hp-feed {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.hp-feed::-webkit-scrollbar { display: none; }
.hp-stage.is-locked .hp-feed { overflow: hidden; }

.hp-slide {
  position: relative;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hp-slide__blur {
  position: absolute;
  inset: -40px;
  background: center / cover no-repeat;
  filter: blur(30px) brightness(0.45);
  transform: scale(1.1);
}

.hp-slide__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-slide__poster,
.hp-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}
.hp-slide__poster { position: absolute; inset: 0; transition: opacity .25s ease; }
.hp-slide.is-playing .hp-slide__poster { opacity: 0; }
.hp-video { position: relative; z-index: 1; display: block; }

/* Gradient trên/dưới để chữ dễ đọc */
.hp-slide::before,
.hp-slide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}
.hp-slide::before { top: 0; height: 120px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.hp-slide::after { bottom: 0; height: 260px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }

/* Watermark */
.hp-watermark {
  position: absolute;
  top: calc(64px + var(--hp-safe-top));
  right: 14px;
  z-index: 3;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

/* Nút play giữa màn hình + vòng loading */
.hp-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  transform: scale(.9);
}
.hp-center svg { width: 30px; height: 30px; margin-left: 4px; fill: rgba(255,255,255,.9); }
.hp-slide.is-paused .hp-center,
.hp-slide--poster .hp-center { opacity: 1; transform: scale(1); pointer-events: auto; }

.hp-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: hp-spin .8s linear infinite;
  display: none;
}
.hp-slide.is-loading .hp-spinner { display: block; }

/* Tập không phát được */
.hp-slide.is-error .hp-center { opacity: 0; pointer-events: none; }
.hp-slide.is-error .hp-slide__media::after {
  content: "该集视频暂不可用";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
@keyframes hp-spin { to { transform: rotate(360deg); } }

/* ---------- Thông tin dưới đáy ---------- */
.hp-bottom {
  position: absolute;
  left: 0;
  right: 72px;
  bottom: calc(96px + var(--hp-safe-bottom));
  z-index: 5;
  padding: 0 16px;
}
.hp-title-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hp-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-ep-label { flex: none; font-size: 13px; color: var(--hp-muted); }
.hp-desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 19px;
  color: rgba(255, 255, 255, 0.75);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.hp-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--hp-accent);
  color: #111 !important;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Thanh điều khiển cố định dưới cùng ---------- */
.hp-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  padding: 0 16px calc(12px + var(--hp-safe-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.6) 40%);
}

.hp-progress {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.hp-progress__track,
.hp-progress__buffer,
.hp-progress__fill {
  position: absolute;
  left: 0;
  height: 2px;
  border-radius: 2px;
}
.hp-progress__track { right: 0; background: rgba(255, 255, 255, 0.25); }
.hp-progress__buffer { width: 0; background: rgba(255, 255, 255, 0.4); }
.hp-progress__fill { width: 0; background: var(--hp-accent); }
.hp-progress__dot {
  position: absolute;
  left: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--hp-accent);
}
.hp-progress.is-dragging .hp-progress__track,
.hp-progress.is-dragging .hp-progress__buffer,
.hp-progress.is-dragging .hp-progress__fill { height: 4px; }
.hp-progress.is-dragging .hp-progress__dot { width: 14px; height: 14px; margin-left: -7px; }

.hp-seek-tip {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: none;
}
.hp-progress.is-dragging .hp-seek-tip { display: block; }

.hp-dock__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 40px;
}
.hp-dock__eps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hp-dock__tools { display: flex; align-items: center; gap: 4px; flex: none; }
.hp-dock__btn {
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.hp-dock__btn svg, .hp-dock__eps svg { width: 20px; height: 20px; }
.hp-time { font-size: 11px; color: var(--hp-muted); font-variant-numeric: tabular-nums; }

/* ---------- Thanh trên: quay lại / phản hồi ---------- */
.hp-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  height: calc(52px + var(--hp-safe-top));
  padding: var(--hp-safe-top) 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.hp-top > * { pointer-events: auto; }
.hp-top__btn {
  height: 40px;
  min-width: 40px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.hp-top__btn svg { width: 22px; height: 22px; }

/* ---------- Cột nút bên phải ---------- */
.hp-side {
  position: absolute;
  right: 8px;
  bottom: calc(110px + var(--hp-safe-bottom));
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hp-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 56px;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.hp-action__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  transition: transform .15s ease;
}
.hp-action__icon svg { width: 24px; height: 24px; fill: #fff; }
.hp-action:active .hp-action__icon { transform: scale(.88); }
.hp-action.is-on[data-act="like"] svg { fill: #ff3b5c; }
.hp-action.is-on[data-act="collect"] svg { fill: var(--hp-accent); }
.hp-action.is-pop .hp-action__icon { animation: hp-pop .35s ease; }
@keyframes hp-pop { 50% { transform: scale(1.25); } }
.hp-action__speed { font-size: 15px; font-weight: 800; }

.hp-clear-btn {
  position: absolute;
  left: 12px;
  bottom: calc(110px + var(--hp-safe-bottom));
  z-index: 9;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 12px;
  display: none;
  font-weight: 700;
  font-size: 18px;
}

/* Chế độ 清屏: ẩn hết giao diện, chỉ còn video và nút thoát */
.hp-stage.is-clean .hp-top,
.hp-stage.is-clean .hp-side,
.hp-stage.is-clean .hp-bottom,
.hp-stage.is-clean .hp-dock,
.hp-stage.is-clean .hp-watermark,
.hp-stage.is-clean .hp-slide::before,
.hp-stage.is-clean .hp-slide::after { opacity: 0; pointer-events: none; }
.hp-stage.is-clean .hp-clear-btn { display: block; }
.hp-top, .hp-side, .hp-bottom, .hp-dock { transition: opacity .2s ease; }

/* ---------- Bảng trượt từ dưới lên (简介 / 选集 / 作品 / 最新地址) ---------- */
.hp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.hp-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  max-width: 480px;
  height: 72%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  background: var(--hp-panel-bg);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
  visibility: hidden;
}
.hp-panel.is-open { transform: none; visibility: visible; }
.hp-panel.is-open + .hp-backdrop,
.hp-backdrop.is-open { opacity: 1; pointer-events: auto; }

.hp-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hp-panel__tabs { display: flex; gap: 22px; }
.hp-panel__tab {
  position: relative;
  padding: 6px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--hp-muted) !important;
  transition: color .2s ease, font-size .2s ease;
}
.hp-panel__tab.is-active { color: #fff !important; font-size: 18px; }
.hp-panel__tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 18px;
  height: 3px;
  margin-left: -9px;
  border-radius: 3px;
  background: var(--hp-accent);
}
.hp-panel__close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12) !important;
}
.hp-panel__close svg { width: 16px; height: 16px; }

.hp-panel__body { position: relative; flex: 1; min-height: 0; }
.hp-pane {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px calc(24px + var(--hp-safe-bottom));
  display: none;
}
.hp-pane.is-active { display: block; }

/* 简介 */
.hp-info__title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.hp-info__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hp-info__tags a { color: var(--hp-accent); font-size: 13px; font-weight: 600; }
.hp-info__meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; font-size: 12px; color: var(--hp-muted); }
.hp-info__desc { margin: 0 0 16px; font-size: 14px; line-height: 22px; color: rgba(255,255,255,.85); white-space: pre-line; }

.hp-rate {
  margin-top: 8px;
  padding: 16px;
  border-radius: 12px;
  background: var(--hp-card-bg);
}
.hp-rate__row { display: flex; align-items: center; justify-content: space-between; }
.hp-rate__label { font-size: 14px; font-weight: 600; }
.hp-rate__score { color: var(--hp-accent); font-size: 26px; font-weight: 800; }
.hp-rate__score small { font-size: 12px; margin-left: 2px; }
.hp-rate__stars { display: flex; gap: 6px; }
.hp-rate__star svg { width: 24px; height: 24px; fill: rgba(255, 255, 255, 0.2); transition: fill .15s; }
.hp-rate__star.is-on svg { fill: var(--hp-accent); }
.hp-rate__submit {
  width: 100%;
  height: 42px;
  margin-top: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08) !important;
  font-size: 14px;
  font-weight: 600;
}
.hp-rate__submit:disabled { opacity: .5; }

/* 选集 */
.hp-eps__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.hp-eps__head small { font-size: 12px; font-weight: 400; color: var(--hp-muted); }
.hp-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 10px; }
.hp-ep {
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--hp-card-bg) !important;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 6px !important;
}
.hp-ep.is-active { border-color: var(--hp-accent); color: var(--hp-accent); background: rgba(245, 197, 24, 0.08) !important; }

/* 作品 / 猜你喜欢 */
.hp-section-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 16px; font-weight: 700; }
.hp-section-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--hp-accent); }
.hp-works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hp-work { display: block; border-radius: 10px; overflow: hidden; background: var(--hp-card-bg); }
.hp-work__cover { position: relative; aspect-ratio: 3 / 4; background: #222; }
.hp-work__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-work__badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 11px;
}
.hp-work__score {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--hp-accent);
  font-size: 11px;
  font-weight: 700;
}
.hp-work__body { padding: 8px 10px 10px; }
.hp-work__title { margin: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-work__desc {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 17px;
  color: var(--hp-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 最新地址 */
.hp-addr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--hp-card-bg);
}
.hp-addr__name { margin: 0; font-size: 14px; font-weight: 600; }
.hp-addr__url { margin: 4px 0 0; font-size: 12px; color: var(--hp-muted); word-break: break-all; }
.hp-addr__note { margin: 4px 0 0; font-size: 11px; color: var(--hp-accent); }
.hp-copy {
  flex: none;
  height: 30px;
  padding: 0 14px !important;
  border-radius: 999px;
  border: 1px solid var(--hp-accent) !important;
  color: var(--hp-accent) !important;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Popup 问题反馈 ---------- */
.hp-fb { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.hp-fb[hidden] { display: none; }
.hp-fb__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.hp-fb__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  padding: 20px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #18181b;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: hp-fb-in .2s ease;
  outline: none;
}
@keyframes hp-fb-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.hp-fb__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hp-fb__title { margin: 0; font-size: 20px; font-weight: 800; }
.hp-fb__sub { margin: 4px 0 0; font-size: 12px; color: var(--hp-muted); }
.hp-fb__x { width: 32px; height: 32px; display: grid; place-items: center; flex: none; }
.hp-fb__x svg { width: 20px; height: 20px; }

.hp-fb__filmbox { margin-top: 14px; }
.hp-fb__filmbox > span { font-size: 12px; color: var(--hp-muted); }
.hp-fb__film {
  margin: 6px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #232327;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-fb__label { display: flex; align-items: baseline; gap: 4px; margin: 16px 0 8px; font-size: 14px; }
.hp-fb__label em { font-style: normal; font-size: 12px; color: var(--hp-muted); }
.hp-fb__label em::before { content: "（"; }
.hp-fb__label em::after { content: "）"; }
.hp-fb__opt.is-required { color: var(--hp-accent); }

.hp-fb__types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hp-fb__type {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 10px;
  background: #232327 !important;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.hp-fb__type i {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  position: relative;
}
.hp-fb__type[aria-checked="true"] { border-color: rgba(245, 197, 24, 0.5) !important; }
.hp-fb__type[aria-checked="true"] i { border-color: var(--hp-accent); background: var(--hp-accent); }
.hp-fb__type[aria-checked="true"] i::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #111;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.hp-fb__note textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #232327;
  color: var(--hp-text);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  resize: vertical;
  outline: none;
}
.hp-fb__note textarea:focus { border-color: rgba(245, 197, 24, 0.5); }
.hp-fb__note textarea::placeholder { color: rgba(255, 255, 255, 0.3); }
.hp-fb__meta { display: flex; justify-content: space-between; gap: 8px; min-height: 18px; margin-top: 4px; font-size: 12px; }
.hp-fb__error { margin: 0; color: #ff5a6e; }
.hp-fb__count { margin: 0 0 0 auto; color: var(--hp-muted); font-variant-numeric: tabular-nums; }

.hp-fb__verify { display: flex; gap: 8px; margin-top: 10px; }
.hp-fb__verify[hidden] { display: none; }
.hp-fb__verify input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #232327;
  color: var(--hp-text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.hp-fb__verify input:focus { border-color: rgba(245, 197, 24, 0.5); }
.hp-fb__verify img { width: 110px; height: 40px; border-radius: 10px; background: #fff; cursor: pointer; object-fit: cover; }

.hp-fb__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.hp-fb__btn { height: 44px; border-radius: 10px; font-size: 15px; font-weight: 700; }
.hp-fb__btn--cancel { background: #2c2c30 !important; }
.hp-fb__btn--submit { background: linear-gradient(90deg, #ffd21f, #f5a623) !important; color: #111 !important; }
.hp-fb__btn--submit:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Thông báo nhỏ ---------- */
.hp-toast {
  position: fixed;
  left: 50%;
  top: 45%;
  z-index: 50;
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.78);
  font-size: 14px;
  text-align: center;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.hp-toast.is-show { opacity: 1; }

.hp-unmute {
  position: absolute;
  left: 12px;
  top: calc(60px + var(--hp-safe-top));
  z-index: 9;
  display: none;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 12px;
}
.hp-stage.is-muted-auto .hp-unmute { display: inline-flex; }
.hp-unmute svg { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
  .hp-panel, .hp-backdrop, .hp-slide__poster { transition: none; }
}

/* Membership-locked episodes remain selectable to open registration or purchase. */
.hp-ep--locked { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.hp-ep__lock { width: 13px; height: 13px; flex-shrink: 0; fill: currentColor; opacity: .75; }

/* Membership offer shown when entering a locked episode. */
.hp-access { position: fixed; inset: 0; margin: auto; width: min(280px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: #202027; color: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.hp-access::backdrop { background: rgba(0,0,0,.72); }
.hp-access__body { padding: 20px 18px 18px; text-align: center; }
.hp-access h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.hp-access p { margin: 0; color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.6; }
.hp-access__actions { display: flex; gap: 10px; margin-top: 18px; }
.hp-access__actions button, .hp-access__actions a { display: flex; flex: 1; align-items: center; justify-content: center; box-sizing: border-box; height: 38px; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 13px; line-height: 20px; text-decoration: none; cursor: pointer; }
.hp-access__actions .hp-access__primary { background: var(--brand-cta, linear-gradient(135deg,#ff4787,#c344ef)); font-weight: 600; }
.hp-access__actions :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.hp-access.hp-access--fallback[open] { display: block; z-index: 2147483647; top: 50%; bottom: auto; transform: translateY(-50%); }
.hp-access-backdrop { position: fixed; inset: 0; z-index: 2147483646; background: rgba(0,0,0,.72); }
.hp-access-backdrop[hidden] { display: none; }

/* Keep point unlock and membership choices compact on small screens. */
.hp-access__actions { flex-wrap: wrap; }
.hp-access__actions--points [data-access-close] { flex-basis: 100%; order: 3; }
.hp-access__actions button:disabled { opacity: .5; cursor: default; }
