/* watch.css — chỉ nạp ở trang xem phim (watching.movie.php), sau watching.css. Phiên bản theo filemtime. */

/* ── Thanh tiêu đề ── */
.wp-title {
  margin: 12px 0 2px;
}

.wp-title__h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ah-text);
  overflow-wrap: anywhere;
}

.wp-title__h1 a {
  color: inherit;
  text-decoration: none;
}

.wp-title__h1 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wp-title__ep {
  color: var(--ah-accent);
  white-space: nowrap;
}

.wp-title__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

.wp-title__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.wp-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 59, 92, .9);
}

.wp-chip--hoat-hinh-trung-quoc { background: rgba(217, 119, 6, .92); }
.wp-chip--phim-ai { background: rgba(8, 145, 178, .92); }
.wp-chip--the-loai-khac { background: rgba(100, 116, 139, .92); }
.wp-chip:hover { filter: brightness(1.12); }

.wp-score,
.wp-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--ah-text);
}

.wp-score { color: #fbbf24; }
.wp-status { color: #fca5a5; }
.wp-status--done { color: #86efac; }

.wp-title__acts {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.wp-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--ah-text);
  font: 600 12.5px/1 var(--ah-font);
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}

.wp-act .material-icons-round { font-size: 17px; }
.wp-act:hover { background: rgba(255, 255, 255, .13); }

.wp-act--on {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, .6);
  background: rgba(251, 191, 36, .1);
}

/* ── Hàng điều khiển ── */
.wp-ctrl__sep {
  flex: 1;
  min-width: 6px;
}

.wp-lbl-m { display: none; }

.wp-btn:focus-visible,
.wp-act:focus-visible,
.wp-ep:focus-visible,
.wp-eplist__grp:focus-visible,
.wp-more:focus-visible,
.wp-mrow:focus-visible,
.wp-ov__btn:focus-visible,
.wp-ov--skip:focus-visible,
.wp-pill button:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  /* Mobile: nút công cụ chỉ còn biểu tượng (tên nằm trong aria-label / title); phím tắt không dùng trên cảm ứng */
  .wp-btn--tool .wp-btn__lbl { display: none; }
  .wp-btn--tool { padding: 6px 8px; }
  .wp-btn--help { display: none; }
}

@media (max-width: 600px) {
  .wp-lbl-d { display: none; }
  .wp-lbl-m { display: inline; }
  .wp-ctrl { gap: 4px; }
  .wp-title__h1 { font-size: 17px; }
}

@media (max-width: 380px) {
  .wp-btn--nav { padding: 5px 8px; }
  .wp-btn--tool { padding: 6px 6px; }   /* 360px: ‹ Trước · Sau › + 5 biểu tượng vừa một hàng */
  .wp-title__acts { width: 100%; }
  .wp-act { flex: 1; justify-content: center; }
}

/* ── Ghi chú + nội dung: thu gọn 3 dòng ── */
.wp-note__body { min-width: 0; flex: 1; }

.wp-clamp {
  max-height: 4.8em;            /* 3 dòng × line-height 1.6 */
  line-height: 1.6;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.wp-clamp--open { max-height: none; }
.wp-clamp--plain { white-space: pre-line; }
.wp-clamp a { color: #7dd3fc; word-break: break-all; }
.wp-clamp img { max-width: 100%; height: auto; }

.wp-more {
  margin-top: 4px;
  padding: 2px 0;
  background: none;
  border: 0;
  color: #7dd3fc;
  font: 600 12.5px var(--ah-font);
  cursor: pointer;
}

.wp-more[hidden] { display: none; }
.wp-more:hover { text-decoration: underline; }

.wp-desc {
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  color: var(--ah-text-muted);
}

.wp-desc__head {
  margin-bottom: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ah-text);
}

/* ── Danh sách tập ── */
.wp-eplist__wrap { position: relative; }   /* gốc offsetTop khi cuộn tới tập đang xem */
.wp-ep { position: relative; }

.wp-eplist__search {
  -webkit-appearance: none;
  appearance: none;
}

.wp-eplist__search::-webkit-search-cancel-button { display: none; }

.wp-ep__new {
  position: absolute;
  top: -7px;
  right: -5px;
  padding: 0 4px;
  border-radius: 4px;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  line-height: 14px;
  background: #fbbf24;
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  pointer-events: none;
}

/* Lần trước xem tới tập này (lịch sử trên máy) */
.wp-ep--last {
  border-color: #38bdf8;
  color: #e0f2fe;
  background: rgba(56, 189, 248, .16);
}

.wp-ep--last::after {
  content: '✓';
  position: absolute;
  bottom: -6px;
  right: -5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  background: #38bdf8;
  color: #0b1220;
}

.wp-ep--seen { opacity: .5; }
.wp-ep--seen:hover { opacity: 1; }

/* ── Lớp phủ trên player (gợi ý tập tiếp / xem tiếp / bỏ qua mở đầu) ──
   ".wp-player>div" (watching.css) phủ kín khung → ghi đè kích thước cho .wp-ov */
.wp-player > .wp-ov {
  position: absolute;
  inset: auto;
  width: auto;
  height: auto;
  z-index: 3;
  font-family: var(--ah-font);
}

.wp-player > .wp-ov[hidden] { display: none; }

.wp-player > .wp-ov--next {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 24px);
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(10, 10, 18, .9);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
  text-align: center;
  color: #fff;
}

.wp-ov__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.wp-ov__btns {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wp-ov__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: 600 13px var(--ah-font);
  text-decoration: none;
  cursor: pointer;
}

.wp-ov__btn[hidden] { display: none; }
.wp-ov__btn .material-icons-round { font-size: 18px; }
.wp-ov__btn:hover { background: rgba(255, 255, 255, .16); }

.wp-ov__btn--primary {
  background: var(--ah-accent);
  border-color: var(--ah-accent);
}

.wp-ov__btn--primary:hover { background: var(--ah-accent); filter: brightness(1.1); }

.wp-player > .wp-ov--resume {
  left: 10px;
  bottom: 56px;
  max-width: calc(100% - 20px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(10, 10, 18, .88);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 13px;
}

.wp-player > .wp-ov--skip {
  right: 12px;
  bottom: 56px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(10, 10, 18, .82);
  color: #fff;
  font: 700 13px var(--ah-font);
  cursor: pointer;
}

.wp-player > .wp-ov--skip .material-icons-round { font-size: 18px; }

/* ── Bình luận + cột "Phần khác" / "Phim tương tự" ── */
.wp-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.wp-lower--single { grid-template-columns: minmax(0, 1fr); }
.wp-lower__main { min-width: 0; }

.wp-lower__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}

@media (max-width: 960px) {
  .wp-lower { grid-template-columns: minmax(0, 1fr); }
  .wp-lower__side { margin-top: 0; }
}

.wp-side-card {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 10px 0 6px;
}

.wp-side-card__title {
  margin: 0 13px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ah-text);
}

.wp-mlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wp-mrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 13px;
  text-decoration: none;
  color: var(--ah-text-muted);
  transition: background .12s, color .12s;
}

.wp-mrow:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--ah-text);
}

.wp-mrow__img {
  flex-shrink: 0;
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
}

.wp-mrow__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wp-mrow__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.wp-mrow__meta {
  font-size: 11.5px;
  color: #fbbf24;
}

.wp-mrow--cur {
  color: var(--ah-text);
  box-shadow: inset 3px 0 0 var(--ah-accent);
  background: rgba(255, 255, 255, .04);
}

.wp-mrow--cur .wp-mrow__meta { color: var(--ah-accent); }

/* ── Mobile: player tràn viền (trừ chế độ rạp chiếu đang position:fixed) ── */
@media (max-width: 768px) {
  .wp-player:not(.wp-player--cinema) {
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ── Viên "Đang phát Tập N — quay lại" (mobile, iframe) — nằm trên catfish (--wp-pill-b do watch.js đo) ── */
.wp-pill {
  position: fixed;
  left: 12px;
  bottom: calc(var(--wp-pill-b, 0px) + 12px + env(safe-area-inset-bottom, 0px));
  z-index: 99;                 /* trên catfish (98), dưới menu / hộp thoại */
  display: flex;
  align-items: center;
  max-width: calc(100% - 82px); /* chừa chỗ thanh nổi .wp-float bên phải */
  border-radius: 999px;
  background: rgba(18, 18, 30, .96);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .55);
  animation: wp-pill-in .2s ease;
}

.wp-pill[hidden] { display: none; }

.wp-pill__go {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 40px;
  padding: 6px 6px 6px 12px;
  background: none;
  border: 0;
  color: #fff;
  font: 600 13px var(--ah-font);
  cursor: pointer;
}

.wp-pill__go span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wp-pill__go .material-icons-round { font-size: 20px; color: var(--ah-accent); flex-shrink: 0; }

.wp-pill__x {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .12);
  color: var(--ah-text-muted);
  cursor: pointer;
}

.wp-pill__x .material-icons-round { font-size: 18px; }

@media (min-width: 769px) {
  .wp-pill { display: none !important; }
}

@keyframes wp-pill-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ── Bảng phím tắt ── */
.wp-help {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .6);
}

.wp-help[hidden] { display: none; }

.wp-help__box {
  width: 100%;
  max-width: 360px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #15151f;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  color: var(--ah-text);
}

.wp-help__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wp-help__head h2 { margin: 0; font-size: 16px; }

.wp-help__x {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--ah-text);
  cursor: pointer;
}

.wp-help__list { margin: 0; display: grid; gap: 7px; }
.wp-help__list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wp-help__list dt { margin: 0; white-space: nowrap; }
.wp-help__list dd { margin: 0; font-size: 13px; color: var(--ah-text-muted); text-align: right; }

.wp-help kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, .06);
  font: 600 12px/1.4 var(--ah-font);
  text-align: center;
}

.wp-help--noctl .wp-help__ctl { opacity: .45; }
.wp-help--noctl .wp-help__ctl dd::after { content: ' (trình phát này chưa hỗ trợ)'; }

.wp-help__note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ah-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .wp-pill { animation: none; }
  .wp-act, .wp-mrow { transition: none; }
}

/* Chọn nhóm tập gọn khi có nhiều nhóm (> 6): ‹ [Tập 1201–1220 ▾] › — trang xem phim + trang thông tin phim */
.ep-rnav { display: flex; align-items: center; gap: 6px; width: 100%; }
.ep-rnav__btn { flex: 0 0 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .05); color: var(--ah-text); }
.ep-rnav__btn:hover:not(:disabled) { border-color: var(--ah-accent); color: var(--ah-accent); }
.ep-rnav__btn:disabled { opacity: .35; cursor: default; }
.ep-rnav__btn .material-icons-round { font-size: 20px; }
.ep-rnav__sel { flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 30px 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .1); color: var(--ah-text); font: inherit; font-size: 13px; font-weight: 700;
  appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, .05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23aaa' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center; }
.ep-rnav__sel:focus-visible, .ep-rnav__btn:focus-visible { outline: 2px solid var(--ah-accent); outline-offset: 1px; }
.ep-rnav__sel option { background: #16161f; color: #fff; }

/* ============================================================
   Bố cục phương án A (watching.movie.php):
   player → Chọn server (nổi bật) → 1 hàng hành động → tiêu đề → "Quay lại tập X" → bình luận
   cột phải dính: Tập tiếp theo · Danh sách tập · Các phần. Mobile: 1 cột, player dính trên cùng.
   ============================================================ */

/* ── Chọn server: 1 hàng gọn (vẫn tô màu để dễ thấy) ── */
.wp-srv {
  margin-top: 8px; padding: 6px 8px 6px 12px; border-radius: 10px;
  background: rgba(255, 59, 92, .07); border: 1px solid rgba(255, 59, 92, .3);
  display: flex; align-items: center; gap: 8px 12px;
}
.wp-srv__head { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.wp-srv__head b { font-size: 13px; color: var(--ah-text); white-space: nowrap; }
.wp-srv__ic { font-size: 18px !important; color: var(--ah-accent); }
.wp-srv__hint { font-size: 12px; color: var(--ah-text-dim); margin-left: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-srv .wp-svtabs { padding: 0; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; flex-shrink: 0; }
.wp-srv .wp-svtab {
  min-height: 32px; padding: 0 12px; gap: 6px; border-radius: 8px; font-size: 13px; font-weight: 800;
  color: var(--ah-text); background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .16);
}
.wp-srv .wp-svtab:hover { border-color: var(--ah-accent); }
.wp-srv .wp-svtab.active { background: var(--ah-accent); border-color: var(--ah-accent); color: #fff; }
.wp-srv .wp-svtab__ic { font-size: 14px; line-height: 1; }
.wp-srv .wp-svtab__badge { font-size: 9.5px; padding: 1px 5px; border-radius: 5px; }
.wp-srv .wp-svtab.active .wp-svtab__badge { background: rgba(255, 255, 255, .28); }
@media (max-width: 900px) { .wp-srv__hint { display: none; } }

/* ── 1 hàng hành động ── */
.wp-ctrl.wp-bar {
  margin: 10px 0 0; padding: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap;
}
.wp-bar__nav { display: flex; gap: 8px; }
.wp-bar .wp-btn--nav { min-height: 38px; padding: 0 14px; font-size: 13.5px; font-weight: 700; border-radius: 10px; color: var(--ah-text); }
.wp-bar .wp-btn--accent { background: var(--ah-accent); border-color: var(--ah-accent); color: #fff; padding: 0 16px; }
.wp-bar .wp-btn--accent:hover { filter: brightness(1.08); color: #fff; }
.wp-bar .wp-btn--nav .material-icons-round { font-size: 20px; }
.wp-bar__tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wp-tool { min-height: 38px; border-radius: 10px; }
.wp-bar .wp-btn--tool { padding: 0 10px; }
.wp-bar .wp-btn--tool .wp-btn__lbl { display: none; }            /* chỉ biểu tượng, tên trong title / aria-label */
.wp-bar .wp-btn--tool .material-icons-round { font-size: 19px; }
.wp-bar .wp-act { padding: 0 12px; border-radius: 10px; font-size: 13px; }
.wp-bar .wp-act:not(.wp-tool--follow) .wp-act__lbl { display: none; }
.wp-bar #wp-pin-btn.active { color: var(--ah-accent); border-color: var(--ah-accent); background: var(--ah-accent-soft); }
.wp-tool--mob { display: none !important; }

/* ── Tiêu đề ── */
.wp-ago { font-size: 12px; color: var(--ah-text-dim); }

/* ── "Quay lại tập X" ── */
.wp-back {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(56, 189, 248, .08); border: 1px solid rgba(56, 189, 248, .35); font-size: 13px; color: var(--ah-text);
}
.wp-back[hidden] { display: none; }
.wp-back__ic { color: #38bdf8; font-size: 20px !important; }
.wp-back__txt { flex: 1 1 auto; min-width: 0; }
.wp-back__btn {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 7px 12px; border-radius: 9px; text-decoration: none;
  font-weight: 700; font-size: 12.5px; color: #e0f2fe; background: rgba(56, 189, 248, .18); border: 1px solid rgba(56, 189, 248, .5);
}
.wp-back__btn:hover { background: rgba(56, 189, 248, .3); color: #fff; }
.wp-back__btn .material-icons-round { font-size: 16px; }
.wp-cmt-wrap { min-width: 0; margin-top: 4px; }
.wp-cmt-wrap .wp-comments { margin: 12px 0 0; }

/* ── Cột phải: Tập tiếp theo ── */
.wp-nextcard {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; flex-shrink: 0;
  background: linear-gradient(90deg, rgba(255, 59, 92, .16), rgba(255, 59, 92, .04)); border: 1px solid rgba(255, 59, 92, .4); color: var(--ah-text);
}
.wp-nextcard:hover { border-color: var(--ah-accent); }
.wp-nextcard__ic { font-size: 26px !important; color: var(--ah-accent); }
.wp-nextcard__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wp-nextcard__body small { font-size: 11.5px; color: var(--ah-text-muted); }
.wp-nextcard__body b { font-size: 14.5px; }
.wp-nextcard__go { padding: 6px 14px; border-radius: 9px; background: var(--ah-accent); color: #fff; font-weight: 800; font-size: 13px; }
.wp-nextcard--last { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .1); }
.wp-nextcard--last .wp-nextcard__ic { color: #4ade80; }

/* ── Cột phải: Các phần (cùng kiểu thẻ với trang thông tin phim, xếp dọc) ── */
.wp-parts { flex-shrink: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); }
.ib-parts__head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13.5px; color: var(--ah-text); }
.ib-parts__head .material-icons-round { font-size: 18px; color: var(--ah-accent); }
.ib-parts__count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ah-text-muted); }
/* Khung chứa hàng ngang phải được co (min-width:0) — không thì hàng thẻ dài kéo giãn cả cột / trang trên mobile */
.wp-col-side, .wp-parts { min-width: 0; max-width: 100%; }
/* Các phần: 1 hàng ngang kéo được (chuột: nhấn giữ + kéo; cảm ứng: vuốt) — gọn hơn danh sách dọc */
.wp-parts .ib-parts__list { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x proximity;
  padding-bottom: 2px; cursor: grab; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.wp-parts .ib-parts__list::-webkit-scrollbar { display: none; }
.wp-parts .ib-parts__list.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.wp-parts .ib-parts__list.is-drag .ib-part { pointer-events: none; }
.wp-parts .ib-part { flex: 0 0 82%; max-width: 230px; scroll-snap-align: start; }
.wp-parts .ib-part__img { -webkit-user-drag: none; user-select: none; }
.ib-part { display: flex; align-items: center; gap: 10px; padding: 5px; border-radius: 10px; text-decoration: none; min-width: 0;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.ib-part:hover { border-color: rgba(255, 255, 255, .25); }
.ib-part.is-active { border-color: var(--ah-accent); background: rgba(255, 59, 92, .12); }
.ib-part__img { width: 36px; height: 50px; flex-shrink: 0; object-fit: cover; border-radius: 6px; background: rgba(255, 255, 255, .06); }
.ib-part__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ib-part__name { font-size: 12.5px; font-weight: 700; color: var(--ah-text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ib-part__sub { font-size: 11px; color: var(--ah-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-part__sub em { font-style: normal; font-weight: 700; color: var(--ah-accent); margin-right: 5px; }
.wp-col-side .wp-eplist { min-height: 220px; }

/* ── Tắt đèn: lớp tối phủ trang, player nằm trên ── */

/* ── Mobile: 1 cột — player dính trên cùng khi cuộn; thứ tự: player · server · hành động · tiêu đề ·
   quay lại · tập tiếp theo · danh sách tập · các phần · bình luận ── */
@media (max-width: 768px) {
  .wp-grid { gap: 0; }
  .wp-col-main { display: contents; }
  .wp-col-side { order: 1; margin-top: 12px; }
  .wp-cmt-wrap { order: 2; margin-top: 12px; }
  body.wp-pin-on .wp-player:not(.wp-player--cinema) { position: sticky; top: var(--navbar-h, 100px); z-index: 60; background: #000; }
  .wp-tool--mob { display: inline-flex !important; }
  .wp-srv { padding: 6px 6px 6px 10px; }
  .wp-bar__nav { width: 100%; }
  .wp-bar__nav > * { flex: 1 1 0; justify-content: center; }
  .wp-bar__tools { width: 100%; justify-content: space-between; }
  .wp-bar__tools > * { flex: 1 1 0; justify-content: center; padding: 0 !important; }
  .wp-bar .wp-act.wp-tool--follow .wp-act__lbl { display: none; }
  .wp-tool--desk { display: none !important; }
  .wp-back { font-size: 12.5px; }
  .wp-parts .ib-part { flex-basis: 70%; }
}
