/* ============================================================
   HHPhim — CSS tự viết sạch theo bảng màu + khung của hhninja1.lol
   (KHÔNG bê CSS utility của gốc; xem DESIGN.md R1/R3).
   Màu: body #000, wrapper #28282d, topbar #47474d, chữ #ccc,
   teal #02d5bd, đỏ #b73a3a, xanh lá #369e69, tên phim #cc8d4c,
   viền #404040. Font: theo setting CMS (biến --font của lõi) —
   không hardcode font của demo.
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: #000; color: #ccc;
  font-family: var(--font, system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 14px; line-height: 1.5;
}
a { color: #ccc; text-decoration: none; }
a:hover { color: #02d5bd; }
/* 1.2.23 — touch-action: manipulation cho phần tử tương tác:
   diệt độ trễ double-tap-zoom của Safari iOS (chạm phải chờ xem
   có phải double-tap không rồi mới bắn click). Kết hợp với việc
   bọc mọi rule :hover đổi transform/opacity/filter vào
   @media (hover: hover) and (pointer: fine) ở vòng này: thiết bị
   cảm ứng không còn rule hover nào đổi trạng thái hiển thị, nên
   chạm 1 là đi link ngay. */
a, button, input, select, textarea, label, summary,
.movie-item, .mi-play, .tab-cell, .rd-sv-tab, .rd-ep-list a, .ah-chip23 {
  touch-action: manipulation;
}
img { max-width: 100%; }
.muted { color: #999; }
.teal { color: #02d5bd; }
.red { color: #e57373; }
.form-ok { background: #1d3a2a; border: 1px solid #369e69; color: #b7e4c7; padding: 8px 12px; border-radius: 5px; }
.form-err { background: #3a1d1d; border: 1px solid #b73a3a; color: #f3c1c1; padding: 8px 12px; border-radius: 5px; }

/* ---------- Nút kiểu gốc ---------- */
.button-default {
  display: inline-block; background: #6b6a6a; color: #fff; border: 0;
  border-bottom: 3px solid #292929; border-radius: 5px;
  padding: 7px 14px; font-size: 14px; cursor: pointer; line-height: 1.3;
}
/* 1.2.27: brightness(1.12) -> .97 (bản bg-teal bị kéo tương phản 3.27 -> 2.64). */
@media (hover: hover) and (pointer: fine) { .button-default:hover { color: #fff; filter: brightness(.97); } }
.button-default.bg-red { background: #b73a3a; }
.button-default.bg-green { background: #369e69; }
.bg-blue { background: #3a79af; }
.button-default.bg-primary { background: #3a79af; }
.button-default.bg-brown { background: #795548; }
.button-default.bg-teal { background: #02a08d; }
.button-default.disabled { opacity: .45; pointer-events: none; }
.btn-grad { background: linear-gradient(to right, #FF512F, #DD2476); color: #fff; }

/* ---------- Thanh cố định + menu ---------- */
#ah_header { position: relative; z-index: 60; }
.ah-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 50px;
  background: #47474d; box-shadow: 0 1px 4px rgba(0,0,0,.5); z-index: 60;
  border-bottom: 1px solid #333338; /* 1.2.12: viền liền mạch xuống thanh menu */
}
.ah-topbar-in {
  max-width: 1050px; margin: 0 auto; height: 50px; padding: 0 10px;
  display: flex; align-items: center; gap: 12px;
}
.ah-logo { font-size: 27px; font-weight: 800; white-space: nowrap; line-height: 1; }
.ah-logo .lg1 { color: #e53935; }
.ah-logo img { height: 34px; width: auto; display: block; }
/* Form tìm kiếm — đúng demo hhninja 1:1: pill liền khối cao 38px.
   Ô nhập: nền #28282d (trang demo có rule .timkiemphim ghi đè
   background #28282d !important lên nền đen của utility), chữ +
   placeholder #a7a7a7, padding 10px, bo 20px riêng 2 góc trái.
   Đoạn nút: nền ĐEN #000, cao 38px, padding 0 5px, bo 20px riêng
   2 góc phải, kính lúp #a7a7a7. Khi focus vào ô nhập, cả 2 đoạn
   co bo góc còn 5px, transition .5s — y hệt demo. */
/* 1.2.6 (điểm K): form tìm kiếm CAP bề ngang (desktop từng phình
   910px, logo bị lép) — tối đa 600px + margin auto cân giữa logo
   và avatar; giữ nguyên spec pill 38px của 1.0.2. */
.ah-search { position: relative; flex: 1; display: flex; align-items: stretch; max-width: 600px; margin-inline: auto; }
.ah-search input {
  flex: 1; min-width: 0; height: 38px; border: 0; outline: 0;
  border-radius: 20px 0 0 20px; background: #28282d; color: #a7a7a7;
  padding: 10px; font-size: 14px; transition: border-radius .5s;
}
.ah-search button {
  height: 38px; border: 0; background: #000; color: #a7a7a7;
  border-radius: 0 20px 20px 0; padding: 0 5px; cursor: pointer;
  display: flex; align-items: center; transition: border-radius .5s;
}
.ah-search button .ah-ic { transition: transform .2s; }
@media (hover: hover) and (pointer: fine) { .ah-search button:hover .ah-ic { transform: scale(1.1); } }
.ah-search:focus-within input { border-radius: 5px 0 0 5px; }
.ah-search:focus-within button { border-radius: 0 5px 5px 0; }
.ah-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #1c1c1f;
  border: 1px solid #404040; border-radius: 8px; overflow: hidden; z-index: 70;
}
.ah-suggest a { display: flex; gap: 10px; align-items: center; padding: 6px 10px; }
.ah-suggest a:hover { background: #28282d; color: #02d5bd; }
.ah-suggest img { width: 34px; height: 48px; object-fit: cover; border-radius: 3px; }
.ah-account { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
/* Header thu gọn (1.2.12): topbar chỉ còn logo + icon search +
   avatar/Đăng Nhập. Nút icon search 38px tròn; trạng thái đang mở
   panel = nền tối + icon teal. Pill Đăng Nhập cho khách: viền teal,
   chữ teal, hover lật nền teal chữ tối. */
.ah-search-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; flex: none;
  background: transparent; color: #e8e8e8; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ah-search-btn .ah-ic { width: 23px; height: 23px; }
.ah-search-btn:hover { background: rgb(0 0 0 / 25%); color: #fff; }
.ah-search-btn.active { background: #28282d; color: #02d5bd; }
.ah-login-pill {
  border: 1px solid #02d5bd; color: #02d5bd; font-weight: 700; font-size: 13.5px;
  padding: 7px 14px; border-radius: 20px; white-space: nowrap; line-height: 1;
}
.ah-login-pill:hover { background: #02d5bd; color: #05302a; }
/* Panel tìm kiếm full-width xổ dưới topbar cố định (top 50px),
   nền #17171a + viền dưới, trượt xuống bằng keyframe mỗi lần mở.
   Form bên trong giữ spec pill 1.0.2, bề ngang tối đa 720px cân
   giữa. Chế độ KHÔNG dính (setting hf_header_sticky tắt -> body
   .ah-nosticky): topbar + panel chuyển absolute để cuộn theo trang. */
.ah-search-panel {
  position: fixed; top: 50px; left: 0; right: 0; z-index: 59;
  background: #17171a; border-bottom: 1px solid #3a3a40;
  box-shadow: 0 10px 24px rgb(0 0 0 / 45%);
  padding: 12px 10px 14px;
  animation: ahSpIn .18s ease;
}
@keyframes ahSpIn { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.ah-search-panel-in { max-width: 1050px; margin: 0 auto; }
.ah-search-panel .ah-search { max-width: 720px; width: 100%; }
body.ah-nosticky .ah-topbar { position: absolute; }
body.ah-nosticky .ah-search-panel { position: absolute; }
/* 1.2.26: form tìm kiếm thường trực chỉ DESKTOP (>= 860px, cùng
   ngưỡng topbar co gọn ở @media max-width 859px): hiện form
   .ah-search-top trong topbar (spec pill .ah-search có sẵn, flex:1
   tối đa 600px cân giữa logo và cụm tài khoản), ẩn nút icon lúp.
   Dưới 860px: form ẩn, icon lúp + panel giữ nguyên như 1.2.12. */
.ah-search-top { display: none; }
@media (min-width: 860px) {
  .ah-search-top { display: flex; }
  .ah-search-btn { display: none; }
}
.ah-btn-login {
  background: #b73a3a; color: #fff; font-weight: 700; border-radius: 5px;
  padding: 7px 16px; border-bottom: 3px solid #7e2727; white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) { .ah-btn-login:hover { color: #fff; filter: brightness(1.1); } }
.ah-user { position: relative; }
.ah-avatar-btn {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; padding: 0;
  border: 2px solid #02d5bd; background: #333; cursor: pointer; display: block;
}
.ah-avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-avatar-letter {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: #ff8a00; color: #fff; font-weight: 800; font-size: 17px;
}
.ah-avatar-letter.big { font-size: 34px; }
.ah-user-menu {
  position: absolute; right: 0; top: 46px; width: 276px; max-width: calc(100vw - 16px);
  background: #101012;
  border: 1px solid #404040; border-radius: 12px; overflow: hidden; z-index: 80;
  box-shadow: 0 14px 34px rgba(0,0,0,.65);
}
/* Đầu menu (1.2.15): avatar 44px + tên + chip #ID, thanh EXP,
   chip cấp bậc + Linh Thạch. */
.ah-user-head { padding: 14px; border-bottom: 1px solid #2c2c30; display: flex; gap: 12px; align-items: flex-start; background: #17171a; }
.ah-user-ava {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none;
  border: 2px solid #02d5bd; background: #333; display: block;
}
.ah-user-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-user-ava .ah-avatar-letter { font-size: 19px; }
.ah-user-meta { flex: 1; min-width: 0; }
.ah-user-line1 { display: flex; align-items: center; gap: 8px; }
.ah-user-id { color: #9a9a9a; background: #28282d; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 9px; flex: none; }
.ah-user-name { color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-user-expbar { height: 6px; background: #333338; border-radius: 3px; margin: 8px 0 4px; overflow: hidden; }
.ah-user-expbar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #02a08d, #02d5bd); }
.ah-user-lv { color: #02d5bd; font-size: 11.5px; }
.ah-user-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.ah-uchip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1;
  padding: 4px 9px; border-radius: 11px; background: #28282d; color: #e8e8e8;
}
.ah-uchip .ah-ic { width: 14px; height: 14px; }
.ah-uchip-rank { background: rgb(204 141 76 / 16%); color: #e0aa5e; font-weight: 700; }
.ah-uchip-coin .ah-ic { color: #ffd54f; }
.ah-user-list { list-style: none; margin: 0; padding: 6px; }
.ah-user-list li a {
  display: flex; align-items: center; gap: 11px; min-height: 44px;
  padding: 8px 10px; border-radius: 8px; color: #e8e8e8; font-size: 14px;
}
.ah-user-list li a .ah-ic { width: 20px; height: 20px; color: #9a9a9a; flex: none; }
.ah-user-list li a:hover, .ah-user-list li a:active { background: #28282d; color: #fff; text-decoration: none; }
.ah-user-list li a:hover .ah-ic { color: #02d5bd; }
.ah-user-sep { height: 1px; background: #2c2c30; margin: 6px 10px; }
.ah-user-list li a.ah-user-logout { color: #ff7166; }
.ah-user-list li a.ah-user-logout .ah-ic { color: #ff7166; }
.ah-user-list li a.ah-user-logout:hover { background: rgb(229 57 53 / 13%); color: #ff8a80; }
.ah-user-list li a.ah-user-logout:hover .ah-ic { color: #ff8a80; }

/* ---------- Chuông thông báo + popup + trang /thong-bao (1.2.15) ----------
   Chuông 38px như nút search, badge đỏ góc trên-phải. Popup neo
   theo .ah-account (position: relative): mép phải trùng mép phải
   cụm tài khoản, bề ngang min(350px, 100vw - 16px) nên không bao
   giờ tràn ở 360. Tin chưa đọc: nền teal mờ + chấm teal. */
.ah-notif { display: flex; }
.ah-notif-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; flex: none; position: relative;
  background: transparent; color: #e8e8e8; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ah-notif-btn .ah-ic { width: 23px; height: 23px; }
.ah-notif-btn:hover { background: rgb(0 0 0 / 25%); color: #fff; }
.ah-notif-btn.active { background: #28282d; color: #02d5bd; }
.ah-notif-badge {
  position: absolute; top: -1px; right: -1px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; border: 2px solid #47474d;
  background: #e53935; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.ah-notif-badge[hidden] { display: none; }
.ah-notif-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 85;
  width: 350px; max-width: calc(100vw - 16px);
  background: #101012; border: 1px solid #404040; border-radius: 12px;
  overflow: hidden; box-shadow: 0 14px 34px rgba(0,0,0,.65);
  animation: ahSpIn .18s ease;
}
.ah-notif-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid #2c2c30; background: #17171a;
}
.ah-notif-title { color: #fff; font-weight: 700; font-size: 14.5px; }
.ah-notif-readall {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: #02d5bd; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.ah-notif-readall:hover { text-decoration: underline; }
.ah-notif-list { max-height: 60vh; overflow-y: auto; }
.ah-notif-loading, .ah-notif-empty { padding: 20px 14px; text-align: center; color: #999; font-size: 13px; }
.ah-notif-foot { padding: 10px; text-align: center; border-top: 1px solid #2c2c30; }
.ah-notif-foot a { color: #02d5bd; font-weight: 700; font-size: 13.5px; }
.ah-notif-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px; border-bottom: 1px solid #232326; color: #e8e8e8;
}
.ah-notif-item:last-child { border-bottom: 0; }
.ah-notif-item:hover { background: #1b1b1e; text-decoration: none; }
.ah-notif-item.unread { background: rgb(2 213 189 / 7%); }
.ah-notif-ic {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: #28282d; color: #02d5bd;
  display: flex; align-items: center; justify-content: center;
}
.ah-notif-ic .ah-ic { width: 19px; height: 19px; }
.ah-notif-ic.admin { color: #e0aa5e; }
.ah-notif-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ah-notif-t { font-size: 13.5px; font-weight: 600; color: #f0f0f0; }
.ah-notif-b { font-size: 12.5px; color: #b9b9b9; }
.ah-notif-time { font-size: 11.5px; color: #888; margin-top: 2px; }
.ah-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: #02d5bd; flex: none; margin-top: 6px; }
/* Trang /thong-bao: cùng ngôn ngữ item với popup, khung card riêng. */
.ah-notifpage-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ah-notif-readall-page {
  border: 1px solid #02d5bd; border-radius: 20px; padding: 7px 14px; font-size: 13px;
}
.ah-notifpage { display: flex; flex-direction: column; gap: 8px; }
.ah-notifpage .ah-notif-item {
  background: #202024; border: 1px solid #3a3a40; border-radius: 10px; padding: 12px 14px;
}
.ah-notifpage .ah-notif-item.unread { border-color: rgb(2 213 189 / 55%); }

/* Thanh MenuHeader — LUÔN HIỆN ở mọi bề ngang (không burger):
   6 ô (Tổng Hợp / Ngẫu Nhiên mở panel thả xuống, Lọc Phim /
   Theo Dõi / Lịch Sử là link, ô cuối khách = Đăng Nhập, member =
   avatar + tên). Thiết kế lại ở khối .ah-tabbar bên dưới. */
/* Thanh menu 6 ô — REDESIGN 1.2.0 (bản cũ của demo: ô cao, nhãn
   15px bị gãy 2 dòng ở mobile, ô tài khoản avatar 20px + tên tự do
   làm ô cao lệch hẳn 5 ô còn lại). Bản mới: thanh bo 10px viền
   #3a3a40, mọi ô CỐ ĐỊNH chiều cao 54px (mobile 52px), flex cột
   căn giữa icon 20px + nhãn 13px ĐÚNG 1 dòng (tên tài khoản dài
   cắt ellipsis), ngăn ô bằng viền #333338. Hover: nền sáng +
   icon teal. Ô active / ô đang mở panel: nền #26262b + gạch
   teal 3px ở đáy + nhãn trắng + icon teal. Panel thả xuống: lưới
   link bo 8px nền #17171a (5 cột desktop / 3 cột mobile). */
.ah-tabbar {
  margin: 50px auto 0; max-width: 1050px; background: #28282d;
  padding: 6px 12px 0; /* 1.2.12: đệm trên 8->6 cho header gọn, liền khối với topbar */
}
.tab-links {
  display: flex; background: #1e1e22; border: 1px solid #3a3a40;
  border-radius: 10px; overflow: hidden;
}
.tab-cell {
  flex: 1; min-width: 0; height: 54px; background: transparent;
  border-right: 1px solid #333338; padding: 4px 2px; color: #ccc;
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  text-align: center;
}
.tab-cell:last-child { border-right: 0; }
.tab-cell.has-panel { padding: 0; }
.tab-toggle {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; width: 100%; height: 100%;
  background: none; border: 0; padding: 4px 2px;
  color: inherit; font: inherit; cursor: pointer; text-align: center;
}
.tab-cell .ah-ic { width: 20px; height: 20px; display: block; margin: 0; }
.tab-cell .item-label {
  display: block; margin: 0; min-width: 0; max-width: 100%;
  text-align: center; font-weight: 700; font-size: 13px;
  color: #e8e8e8; line-height: 1.2; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tab-cell:hover { background: #2b2b31; color: #fff; }
.tab-cell:hover .ah-ic { color: #02d5bd; }
.tab-cell.active, .tab-cell.open {
  background: #26262b; box-shadow: inset 0 -3px 0 #02d5bd;
}
.tab-cell.active .item-label, .tab-cell.open .item-label { color: #fff; }
.tab-cell.active .ah-ic, .tab-cell.open .ah-ic { color: #02d5bd; }
.tab-avatar, .tab-avatar-letter {
  width: 22px; height: 22px; border-radius: 50%; display: block;
  margin: 0; object-fit: cover; flex: none;
}
.tab-avatar-letter {
  background: #ff8a00; color: #fff; font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.tab-panel { background: transparent; }
.tab-panel-in { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 2px; }
.tab-panel-in a {
  flex: 1 1 18%; box-sizing: border-box; text-align: center;
  padding: 9px 6px; background: #17171a; border: 1px solid #3a3a40;
  border-radius: 8px; font-size: 13.5px; color: #ddd;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tab-panel-in a:hover { background: #232327; border-color: #02d5bd; color: #02d5bd; }
@media (max-width: 640px) {
  .ah-tabbar { padding: 6px 6px 0; }
  .tab-cell { height: 52px; padding: 4px 0; }
  .tab-toggle { padding: 4px 0; }
  .tab-cell .ah-ic { width: 19px; height: 19px; }
  /* Nhãn dài nhất "Ngẫu Nhiên" đo 59px ở 11px trong ô ~50px ->
     bị ellipsis (rà 1.2.0 phát hiện). 10.5px + bỏ đệm ngang ô +
     tabbar đệm 6px: nhãn còn ~55px, ô khả dụng ~57px -> đủ chỗ,
     không cắt chữ (đo lại bằng Playwright sau khi sửa). */
  .tab-cell .item-label { font-size: 10.5px; letter-spacing: -.3px; }
  .tab-avatar, .tab-avatar-letter { width: 20px; height: 20px; }
}

/* ---------- Khung trang ---------- */
#ah_wrapper {
  max-width: 1050px; margin: 0 auto; background: #28282d;
  padding: 12px 12px 20px; min-height: 60vh;
}
.ah-main { display: block; }
/* Khung nội dung: nền #404040 (sáng hơn nền wrapper #28282d).
   1.2.0: bo 10px + viền 1px #4a4a50 + padding 12px — token khung
   thống nhất toàn theme. */
.ah-frame {
  background: #404040; border: 1px solid #4a4a50; border-radius: 10px;
  padding: 12px; margin: 0 0 12px;
}
/* Tiêu đề trong khung theo .ah-frame-bg .heading của demo: 16px,
   gạch đứt #2f2f2f phía dưới. */
.ah-frame-heading {
  font-size: 16px; font-weight: 700; color: #f0f0f0;
  border-bottom: 1px dashed #2f2f2f; padding-bottom: 10px; margin-bottom: 10px;
}
.block-title {
  margin: 0 0 10px; font-size: 17px; font-weight: 700; color: #f0f0f0;
  border-left: 4px solid #02d5bd; padding-left: 9px; line-height: 1.35;
}
.block-title a { color: #f0f0f0; }
.ah-alert {
  background: #33331f; border: 1px solid #6b6a2a; color: #eee8b0;
  padding: 8px 12px; border-radius: 5px; margin-bottom: 12px;
}
.ah-alert a { color: #02d5bd; }
.ah-more { text-align: center; margin: 12px 0 2px; }

/* ---------- Hộp thông báo + nút nhanh + ribbon (demo trang chủ) ---------- */
/* Hộp thông báo: khung padding 0, list bullet disc 15px, mỗi mục
   margin-left 25px + margin-bottom 10px, link teal — đúng .ul-lich-phim
   của demo (đặt class riêng để khỏi đụng list lịch chiếu bên dưới). */
/* Khung thông báo = .ah-frame-bg của demo: nền #404040, bo 5px,
   padding 0 (list bên trong tự đệm 5px), không viền. */
/* Khối dưới menu — 1.2.0: hộp thông báo gọn + 3 nút nhanh 1 HÀNG
   flex (desktop căn giữa gói dòng, mobile cuộn ngang). 1.2.6
   (điểm J): hộp thông báo bỏ list dọc gạch teal -> chip ngang,
   xem rule .ah-notice bên dưới. Nội dung từ setting phim_notice. */
/* 1.2.6 (điểm J): BỎ list dọc + vạch teal trái (hộp cao ~103px,
   nửa phải chết) -> dòng thông báo (nếu có) + HÀNG CHIP NGANG pill
   cùng ngôn ngữ chip của theme; hộp co theo nội dung (~50px khi
   không có thông báo). */
.ah-notice { padding: 10px 12px; }
.ah-notice-alert { font-size: 13.5px; line-height: 1.45; margin-bottom: 8px; }
.ah-notice-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ah-nlink {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: #2b2b30; border: 1px solid #4c4c52; border-radius: 999px;
  padding: 6px 12px; color: #ececec; font-size: 13px; font-weight: 600;
}
.ah-nlink .ah-ic { width: 14px; height: 14px; color: #02d5bd; flex: none; }
.ah-nlink:hover { border-color: #02d5bd; color: #02d5bd; text-decoration: none; }
.ah-quick {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin: 0 0 12px;
}
.ah-quick-btn {
  display: inline-flex; align-items: center; border: 1px solid #52525a;
  background: rgb(17 17 17 / 70%); color: #fff; border-radius: 8px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.ah-quick-btn:hover { border-color: #02d5bd; color: #02d5bd; }
@media (max-width: 640px) {
  .ah-quick {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    padding-bottom: 4px; scrollbar-width: none;
  }
  .ah-quick::-webkit-scrollbar { display: none; }
  .ah-quick-btn { flex: none; }
}
/* Ribbon "Mới Cập Nhật": khối đen cao 40px + mũi tên nhọn bên phải
   (:after border-left-color đen), nút refresh viền teal, cặp nút
   2D đỏ / 3D xanh bên phải — đúng demo. */
.ah-latest { margin: 0 0 14px; }
/* 1.2.7 (điểm 3): thêm gap 48px — mũi tên ::after của .ah-ribbon-main
   thò 40px khỏi hộp main; bản cũ chỉ dựa vào space-between nên khi
   tiêu đề dài (vd "Đánh Giá Cao") khoảng trống còn ~16px < 40px ->
   mũi tên ĐÈ nút ‹ của rail (đo trên live + t7: tip 198 > prev.x 169).
   gap 48px = 40px mũi tên + 8px hở; main đã có min-width:0 +
   flex-shrink nên tiêu đề dài sẽ ellipsis thay vì đè. */
.ah-ribbon { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; margin-bottom: 10px; }
.ah-ribbon-main {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  background: #000; height: 40px; padding: 0 20px; border-radius: 6px 0 0 6px;
  border-left: 4px solid #02d5bd;
  /* 1.2.2: min-width:0 để tiêu đề ribbon dài (vd "Phim của <tên
     diễn viên dài>") bị ellipsis thay vì ép phình trang ngang;
     max-width chừa 40px cho mũi tên ::after (border 20px ở
     left:100%) — thiếu chỗ chừa này mũi tên thò khỏi khung, tràn
     ngang đo được +28px ở trang diễn viên 360px (bisect: ẩn
     ::after thì tràn = 0). */
  min-width: 0; max-width: calc(100% - 40px);
}
.ah-ribbon-main::after {
  content: ""; position: absolute; left: 100%; top: 0;
  border: 20px solid transparent; border-left-color: #000;
}
.ah-ribbon-title { margin: 0; font-size: 17px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ah-refresh {
  background: transparent; border: 1px solid #02d5bd; color: #02d5bd;
  border-radius: 5px; padding: 2px 5px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: all .3s;
}
.ah-refresh .ah-ic { width: 18px; height: 18px; }
.ah-refresh.spinning .ah-ic { animation: ahspin .8s linear infinite; }
@keyframes ahspin { to { transform: rotate(360deg); } }
.ah-ribbon-side { display: flex; gap: 6px; margin-right: 5px; padding-top: 6px; flex: none; }
.ah-chip23 {
  padding: 5px 10px; border: 1px solid #525151; border-radius: 5px;
  font-weight: 500; color: #fff;
}
@media (hover: hover) and (pointer: fine) { .ah-chip23:hover { color: #fff; filter: brightness(1.12); } }

/* ---------- Khối Top + lịch chiếu rút gọn ---------- */
.ah-top-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ah-top-col h3 { margin: 0 0 8px; font-size: 14px; color: #cc8d4c; }
.ah-top-list { margin: 0; padding-left: 20px; }
.ah-top-list li { margin: 0 0 6px; }
.ah-top-list li a { color: #e6e6e6; }
.ah-top-list li span { display: block; color: #999; font-size: 12px; }
/* Tab lịch chiếu — REDESIGN 1.2.0: nhãn ĐẦY ĐỦ trên desktop,
   nhãn GỌN (T2..CN, biến short của plugin) trên mobile <=640px —
   bản cũ ép nhãn "Thứ..." 15px vào ô ~48px nên bị cắt chữ. Hàng
   tab bo góc, ô active teal đậm + chữ trắng, viền trên teal. */
.ah-sched { margin: 0 0 14px; }
.tab-lichchieu {
  display: flex; gap: 4px; border-top: 2px solid #02d5bd;
  padding-top: 8px; margin-bottom: 10px;
}
.sched-tab {
  flex: 1; min-width: 0; background: #1e1e22; border: 1px solid #3a3a40;
  border-radius: 8px; padding: 7px 2px; text-align: center; color: #ccc;
  font: inherit; cursor: pointer;
}
.sched-tab .item-label {
  display: block; font-weight: 700; font-size: 13.5px; color: #f5f5f5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}
.sched-tab .label-short { display: none; }
.sched-tab.active { background: #02a08d; border-color: #02a08d; }
.sched-tab.active .item-label { color: #fff; }
.sched-tab:hover { border-color: #02d5bd; }
.sched-tab.active:hover { border-color: #02a08d; }
@media (max-width: 640px) {
  .sched-tab .label-full { display: none; }
  .sched-tab .label-short { display: block; font-size: 13px; }
}
.sched-panel .movie-grid { margin-top: 0; }

/* ---------- Lưới + card phim — REDESIGN 1.1.0 ----------
   Dũng lệnh thiết kế lại list (không ép 1:1 demo): card thoáng với
   khe lưới đều, poster 2:3 bo 10px, thông tin gắn THẲNG lên poster
   bằng chip pill: tiến độ tập (trái-trên, chữ teal), chất lượng +
   ngôn ngữ rút gọn (phải-trên), loại 2D/3D nền teal (trái-dưới),
   badge đang theo dõi (phải-dưới). Dưới poster: tên clamp ĐÚNG 2
   dòng (mọi card cao bằng nhau) + dòng meta gọn năm • số tập •
   điểm, tách bằng dấu • vẽ bằng CSS.
   Cột: >=768px: 5; 651-767: 4; 451-650: 3; <=450: 2. */
.movie-grid { display: grid; gap: 22px 12px; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 767px) { .movie-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 650px) { .movie-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 450px) { .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 10px; } }
.movie-item { min-width: 0; }
.mi-link { display: block; color: inherit; border-radius: 12px; }
.mi-link:hover { color: inherit; }
.mi-link:focus-visible { outline: 2px solid #02d5bd; outline-offset: 2px; }
.mi-poster {
  position: relative; display: block; aspect-ratio: 2/3; overflow: hidden;
  background: #1a1a1d; border-radius: 12px; border: 1px solid #3a3a40;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.mi-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
/* 1.2.13: link poster là <a> TUYỆT ĐỐI phủ kín .mi-poster (nút
   play là link riêng đặt cạnh, ngoài link này — xem .mi-play). */
.mi-link-poster { position: absolute; inset: 0; }
.movie-item:active .mi-poster { border-color: #02d5bd; box-shadow: 0 6px 18px rgb(0 0 0 / 55%); }
/* 1.2.23: hover card CHỈ dành thiết bị có hover thật + pointer
   fine (chuột/trackpad). Safari iOS có bẫy "tap 1 = hover": rule
   :hover không bọc media làm đổi transform img trong link poster
   khiến chạm đầu chỉ kích hover, chạm 2 mới đi link (Dũng báo
   iPhone 20:28 23/11). */
@media (hover: hover) and (pointer: fine) {
  .movie-item:hover .mi-poster { border-color: #02d5bd; box-shadow: 0 6px 18px rgb(0 0 0 / 55%); }
  .movie-item:hover .mi-poster img { transform: scale(1.05); }
}
.no-cover {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  color: #fff; font-size: 34px; font-weight: 800;
}
.no-cover-lg { aspect-ratio: 2/3; }
.mi-chip {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 3px;
  background: rgb(0 0 0 / 72%); color: #fff; font-size: 11px; font-weight: 700;
  line-height: 1.45; padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
/* Hàng chip trên poster (1.2.3, nhóm A): bỏ tiền tố "Tập" ở chip
   tiến độ (plugin sinh ep_chip: "5/10", phim lẻ "Full"), thu
   padding/font hàng trên, 2 chip thẳng nóc cùng hàng khi dữ liệu
   vừa.
   1.2.6 (Dũng 10:48, điểm C): WRAP trở lại — dữ liệu dài thật trên
   live (tiến độ 4 chữ số "1221/1500" + "FHD · Vietsub") ép nowrap
   làm chip chất lượng bị CẮT CHỮ ("Vietsu" mất b) và chip tiến độ
   lòi mép poster trên card rail hẹp 132px. Nay: vừa thì 1 hàng như
   1.2.3, chật thì chip chất lượng xuống hàng 2 (margin-left:auto
   nên neo phải, gọn trong poster) — không chip nào bị cắt chữ,
   không chip nào giao nhau hay tràn khỏi poster. Ellipsis chỉ còn
   là lưới an toàn cuối cùng cho 1 chip đơn lẻ dài hơn cả hàng. */
.mi-chips-top {
  position: absolute; top: 6px; left: 6px; right: 6px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 5px; align-items: flex-start;
  pointer-events: none;
}
.mi-chips-top .mi-chip { position: static; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; padding: 2px 7px; }
.mi-chip-ep { flex: 0 1 auto; color: #02d5bd; }
.mi-chip-q { flex: 0 1 auto; margin-left: auto; }
/* Hàng chip DƯỚI poster (1.2.2, điểm 1 sửa): [2D/3D] [Năm] —
   [★ Điểm] [theo dõi]; cùng cơ chế flex + wrap như hàng trên nên
   không chip nào đè chip nào; hàng neo đáy nên khi gói dòng thì
   mọc thêm hàng LÊN TRÊN, không tràn ra ngoài poster. Chip điểm
   margin-left:auto về phía phải; chip theo dõi chỉ tự đẩy phải
   khi hàng không có chip điểm (tránh 2 margin auto chia đôi
   khoảng trống làm chip điểm trôi giữa). */
.mi-chips-bottom {
  position: absolute; bottom: 6px; left: 6px; right: 6px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end;
  pointer-events: none;
}
.mi-chips-bottom .mi-chip { position: static; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mi-chip-type { flex: 0 1 auto; background: #02d5bd; color: #05302a; }
.mi-chip-year { flex: 0 1 auto; }
.mi-chip-score { flex: 0 1 auto; margin-left: auto; color: #ffb400; }
.mi-chip-score .ah-ic { width: 11px; height: 11px; }
.mi-chip-fol { flex: 0 1 auto; color: #02d5bd; padding: 4px 6px; }
.mi-chips-bottom:not(:has(.mi-chip-score)) .mi-chip-fol { margin-left: auto; }
.mi-chip-fol .ah-ic { width: 14px; height: 14px; }
/* Nút PLAY giữa poster: vòng tròn kính tối + viền teal, glyph
   play_circle trắng; căn giữa TUYỆT ĐỐI bằng top/left 50% +
   translate(-50%,-50%) nên tâm nút == tâm poster (lệch < 1px đo
   rect). 1.2.13: nút là LINK THẬT <a class="mi-play"> đặt NGOÀI
   link poster (z 3, trên chip z 2, trên lớp tối ::after z 1) —
   KHÔNG còn JS chặn chạm. Luật hiện/ẩn (Dũng sửa lệnh 16:47
   23/11, thay "hiện thường trực" của 1.2.13): bình thường nút
   ẨN ở MỌI thiết bị. Desktop (có hover): hover/focus card ->
   fade+scale hiện + poster tối nhẹ. Cảm ứng (1.2.22): theme.js
   CHỈ gắn .mi-touched khi ngón tay RÀ = touchmove di chuyển
   thật qua card -> nút hiện hình + pointer-events auto ngay
   trong cùng class, tự ẩn sau ~2.5s kể từ khi nhấc tay. KHÔNG
   reveal ở touchstart, KHÔNG cơ chế arm 2 nhịp (bản 1.2.14 làm
   vậy bị Chrome Android nuốt click đầu trên điện thoại thật —
   Dũng báo 20:07 23/11). Rail hẹp: nút 40px. */
.mi-poster::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgb(0 0 0 / 30%); opacity: 0; transition: opacity .18s ease;
}
.mi-play {
  position: absolute; top: 50%; left: 50%; z-index: 3;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgb(8 8 10 / 52%); border: 1.5px solid rgb(2 213 189 / 85%);
  color: #fff; cursor: pointer; box-shadow: 0 4px 16px rgb(0 0 0 / 45%);
  text-decoration: none;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  /* 1.2.23: trạng thái ẩn phải đủ bộ ba opacity 0 + visibility
     hidden + pointer-events none. Bản <= 1.2.22 THIẾU visibility:
     hidden — nút vẫn "hiện diện" với engine (đo computed trên t7:
     visibility: visible) và Safari iOS coi phần tử chỉ mờ bằng
     opacity là đích hover/click mập mờ, góp phần vào bệnh chạm
     2 lần mới đi link. visibility chuyển chậm 0s sau .18s khi ẩn
     (đợi fade xong mới khuất hẳn), hiện thì delay 0 (xem 2 rule
     trạng thái hiện bên dưới). */
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, -50%) scale(.75);
  transition: opacity .18s ease, transform .18s ease, background .18s ease, visibility 0s linear .18s;
}
.mi-play svg { width: 30px; height: 30px; display: block; }
@media (hover: hover) and (pointer: fine) {
  .movie-item:hover .mi-play, .movie-item:focus-within .mi-play {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -50%) scale(1);
    transition-delay: 0s, 0s, 0s, 0s;
  }
  .movie-item:hover .mi-poster::after { opacity: 1; }
  .mi-play:hover { background: rgb(2 160 141 / 45%); }
}
.ah-hot-track .mi-play { width: 40px; height: 40px; }
.ah-hot-track .mi-play svg { width: 23px; height: 23px; }
@media (max-width: 450px) {
  .mi-play { width: 44px; height: 44px; }
  .mi-play svg { width: 26px; height: 26px; }
  .ah-hot-track .mi-play { width: 38px; height: 38px; }
  .ah-hot-track .mi-play svg { width: 22px; height: 22px; }
}
/* Cảm ứng — .mi-touched (theme.js CHỈ gắn khi ngón tay RÀ =
   touchmove di chuyển thật qua card; 1.2.22 bỏ hẳn reveal ở
   touchstart + bỏ cơ chế .mi-armed 2 nhịp của 1.2.14 vì Chrome
   Android nuốt click khi visibility/pointer-events đổi giữa
   cú chạm) cho nút HIỆN hình + BẬT LUÔN pointer-events +
   poster tối nhẹ. Lúc ẩn, rule gốc .mi-play đã pointer-events:
   none nên chạm tĩnh giữa poster rơi vào link poster như
   thường — không có link tàng hình, không có thay đổi DOM nào
   xảy ra trong 1 cú chạm tĩnh. Chỉ 1 card hiện nút tại 1 thời
   điểm (theme.js gỡ class khỏi card trước), tự ẩn ~2.5s. */
.movie-item.mi-touched .mi-play {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -50%) scale(1);
  transition-delay: 0s, 0s, 0s, 0s;
}
.movie-item.mi-touched .mi-poster::after { opacity: 1; }
.name-movie {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere;
  margin-top: 7px; color: #f2f2f2; font-weight: 700; font-size: 14.5px; line-height: 1.35;
  /* 1.2.2: BỎ chiều cao cố định 2 dòng của 1.2.0 (ép để meta thẳng
     hàng ngang) — Dũng: tên ngắn 1 dòng thì meta bị cách 1 khoảng
     trống vô nghĩa. Tên mấy dòng thì meta bám ngay dưới tên với
     margin-top cố định của .mi-meta. */
  text-align: left;
}
.mi-link:hover .name-movie { color: #02d5bd; }
.mi-meta {
  display: block; margin-top: 3px; font-size: 12px; color: #9d9d9d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mi-meta i { font-style: normal; }
.mi-meta i + i::before { content: "•"; margin: 0 5px; color: #5c5c60; }
.mi-meta-score { color: #ffb400; font-weight: 700; }
.mi-meta-score .ah-ic { width: 11px; height: 11px; vertical-align: -1px; margin-right: 2px; }

/* ---------- Trạng thái trống CHUNG (1.2.2) ----------
   Một mẫu duy nhất cho mọi nơi không có dữ liệu (lịch chiếu ngày
   trống, tìm/lọc không kết quả, tường chat, BXH, bình luận, danh
   sách tập, Theo Dõi, Lịch Sử, Bình Luận Của Tôi, lưới trang chủ):
   icon glyph teal + 1 dòng chữ chính (+ nút hành động khi hợp lý),
   khung nét đứt gọn, đệm đều, chiều cao vừa nội dung — thay kiểu cũ
   mỗi nơi 1 dòng .muted trơ hoặc khung đen khổng lồ.
   .ah-empty-sm = bản gọn (trong khung con như tường chat/bình luận);
   .ah-empty-flat = bỏ nền/viền khi đã nằm trong khung có nền riêng. */
.ah-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 26px 16px; margin: 0;
  background: rgb(17 17 17 / 45%); border: 1px dashed #525151; border-radius: 10px;
  color: #c9c9c9; font-size: 14px; list-style: none;
}
.ah-empty p { margin: 0; }
.ah-empty .ah-empty-ic { width: 38px; height: 38px; color: #02d5bd; opacity: .9; flex: none; }
.ah-empty-a {
  margin-top: 2px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid #02d5bd; border-radius: 20px;
  color: #02d5bd; font-weight: 700; font-size: 13px;
}
.ah-empty-a:hover { background: #02d5bd; color: #05302a; text-decoration: none; }
.ah-empty-sm { padding: 16px 12px; font-size: 13.5px; }
.ah-empty-sm .ah-empty-ic { width: 28px; height: 28px; }
.ah-empty-flat { background: none; border: 0; border-radius: 0; }

/* ---------- Phân trang kiểu demo (.pagination) ---------- */
.ah-pagination { display: flex; justify-content: center; padding: 10px 0; }
.ah-pagination-in { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; }
.ah-pagination .page-link {
  color: #f3dede; background: #585858; padding: 8px 16px; margin: 5px;
  display: inline-flex; align-items: center; border-radius: 8px;
}
.ah-pagination .page-link.active_page { background: #02a08d; color: #fff; font-weight: 700; }
.ah-pagination a.page-link:hover { background: #02a08d; color: #fff; }
/* 1.2.1: form GO bo góc khớp 2 đầu (trước vuông góc 0px trông
   lạc), input + nút ép cùng cao 38px như các ô trang. */
.ah-pagination .go_page { display: inline-flex; margin: 5px; }
.ah-pagination .go_page input {
  background: #28282d; border: 1px solid gray; color: #fff;
  padding: 0 10px; width: 180px; max-width: 46vw; height: 38px;
  border-radius: 8px 0 0 8px; margin: 0;
}
.ah-pagination .go_page button {
  background: #585858; border: 0; color: #fff; padding: 0 12px; cursor: pointer;
  display: inline-flex; align-items: center; height: 38px;
  border-radius: 0 8px 8px 0; margin: 0;
}
.ah-pagination .go_page button .ah-ic { width: 20px; height: 20px; }
.ah-pagination .go_page button:hover { background: #02a08d; }

/* Phân trang tròn cũ — chỉ còn khối phân trang bình luận của lõi dùng. */
.page_redirect { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0 4px; }
.page_redirect p {
  margin: 0; min-width: 38px; height: 38px; padding: 0 8px; border: 1px solid #525151;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #ddd;
}
.page_redirect a:hover p { border-color: #02d5bd; color: #02d5bd; }
.page_redirect p.active { background: #02d5bd; border-color: #02d5bd; color: #06302a; font-weight: 800; }
.page_redirect p.dots { border: 0; }

/* ---------- Chi tiết phim — REDESIGN 1.1.0 ----------
   Bỏ hẳn bảng hàng 30/70: khối đầu có backdrop thumb mờ phủ sau,
   poster trái (nút phát phủ — bấm mở tập mới nhất), bên phải tiêu
   đề lớn + tên gốc + chip nhanh + hàng nút hành động. Thông tin
   chi tiết xuống LƯỚI Ô (.rd-grid): nhãn nhỏ hoa trên, giá trị đậm
   dưới; ô dài (thể loại/đạo diễn/diễn viên) chiếm 2 cột. Tên Khác
   là hàng chip gói dòng. Khung .ah-frame (#404040) giữ nguyên làm
   nền; nội dung nằm trong .rd-inner nổi trên backdrop. */
.rd-detail { position: relative; overflow: hidden; }
.rd-backdrop { position: absolute; inset: 0; z-index: 0; }
.rd-backdrop img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: blur(16px) saturate(1.25); transform: scale(1.25); opacity: .5;
}
.rd-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(64 64 64 / 35%) 0%, rgb(64 64 64 / 82%) 62%, #404040 100%);
}
.rd-inner { position: relative; z-index: 1; }
/* 1.2.2 (điểm 7): hero dựng lại bằng GRID — poster ôm cả 3 hàng ở
   cột trái; cột phải lần lượt: .rd-side (tên + tên gốc + dải meta
   ngắn + tóm tắt rút gọn) / hàng chip / hàng nút hành động.
   align-content: space-between dãn phần chiều cao dư (khi poster
   cao hơn tổng nội dung cột phải) đều giữa các hàng, nên đáy cột
   phải luôn chạm đáy poster — hết khoảng trống chết mà bản 1.2.0
   tạo ra khi đẩy chips + nút xuống full-width dưới poster.
   Mobile: chips + nút về full-width dưới hàng đầu (cột phải hẹp
   không chứa nổi hàng nút), cột phải chỉ còn tên/meta/tóm tắt. */
.rd-main {
  display: grid; grid-template-columns: 172px minmax(0, 1fr);
  grid-template-areas: "poster side" "poster chips" "poster actions";
  column-gap: 16px; row-gap: 10px; align-content: space-between;
}
.rd-poster {
  grid-area: poster; align-self: start;
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid #55555c; box-shadow: 0 10px 26px rgb(0 0 0 / 55%); background: #1a1a1d;
}
.rd-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.rd-poster a { display: block; position: relative; }
.rd-play-overlay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%; background: rgb(2 213 189 / 92%);
  color: #05302a; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgb(0 0 0 / 5); transition: transform .18s ease;
}
/* 1.2.3 (G1): dịch glyph ▶ theo tâm THỊ GIÁC (centroid của tam
   giác lệch trái tâm bbox 1,83/24 bề ngang icon): margin-left 3px
   cũ đo trên t7 vẫn dư +1,1..1,2px sang phải; 2px đưa lệch về
   ~+0,2px ở cả 2 cỡ icon 30px (desktop) và 24px (mobile). */
.rd-play-overlay .ah-ic { width: 30px; height: 30px; margin-left: 2px; }
@media (hover: hover) and (pointer: fine) { .rd-poster a:hover .rd-play-overlay { transform: translate(-50%, -50%) scale(1.1); } }
.rd-side { grid-area: side; min-width: 0; }
.rd-head { min-width: 0; }
.rd-title { font-size: 25px; line-height: 1.25; color: #fff; margin: 2px 0 4px; font-weight: 800; overflow-wrap: anywhere; }
.rd-origin { margin: 0 0 8px; color: #c9c9c9; font-size: 13.5px; font-style: italic; overflow-wrap: anywhere; }
/* Dải meta ngắn trong cột phải hero (điểm 7): Năm • Chất lượng •
   Ngôn ngữ • Thời lượng • Tập • Lịch chiếu — chấm ngăn cách bằng
   ::before nên thiếu mục nào cũng không hở dấu thừa. */
.rd-metaline { margin: 0 0 8px; color: #bcbcbc; font-size: 13px; line-height: 1.5; }
.rd-metaline span:not(:first-child)::before { content: "•"; margin: 0 7px; color: #777; }
/* Tóm tắt rút gọn trong cột phải hero (điểm 7): clamp 4 dòng
   desktop / 3 dòng mobile; nội dung đầy đủ vẫn ở mục Nội Dung
   Phim phía dưới như cũ. */
.rd-excerpt {
  margin: 0; color: #d9d9d9; font-size: 13.5px; line-height: 1.55;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
/* Dải 3 tập mới nhất (1.2.3, G3): ngay dưới hàng nút hành động —
   nhãn nhỏ + chip tập bấm thẳng vào trang xem của tập đó. */
.rd-latest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.rd-latest-label { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #a9a9a9; margin-right: 2px; }
.rd-latest-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgb(2 213 189 / 12%); border: 1px solid rgb(2 213 189 / 55%);
  color: #7deadd; border-radius: 16px; padding: 4px 12px;
  font-size: 13px; font-weight: 700;
}
.rd-latest-chip .ah-ic { width: 12px; height: 12px; }
.rd-latest-chip:hover { background: rgb(2 213 189 / 22%); text-decoration: none; }
.rd-latest-chip.watched { opacity: .55; }
.rd-chips { grid-area: chips; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rd-chip {
  display: inline-flex; align-items: center; gap: 5px; background: rgb(0 0 0 / 45%);
  border: 1px solid #5a5a61; border-radius: 20px; padding: 4px 11px;
  font-size: 12.5px; color: #ececec; font-family: inherit;
}
.rd-chip .ah-ic { width: 14px; height: 14px; color: #02d5bd; }
button.rd-chip { cursor: pointer; }
button.rd-chip:hover { border-color: #02d5bd; }
.rd-chip-rate .ah-ic { color: #ffb400; }
.rd-chip-live { border-color: #02d5bd; color: #02d5bd; font-weight: 700; }
.rd-chip-done { border-color: #369e69; color: #7ed3a5; font-weight: 700; }
.rd-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 5px; }
.rd-btn {
  display: inline-flex; align-items: center; gap: 5px; background: #2c2c31;
  border: 1px solid #4c4c52; color: #fff; border-radius: 8px; padding: 7px 10px;
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; line-height: 1.3;
}
.rd-btn:hover { border-color: #02d5bd; color: #02d5bd; }
.rd-btn .ah-ic { width: 17px; height: 17px; }
.rd-btn-primary { background: linear-gradient(180deg, #02d5bd, #02ab97); border-color: transparent; color: #fff; }
/* 1.2.27: BẪY MỜ CHỮ — .rd-btn:hover ở trên (không bọc media, specificity
   0-2-0) thắng color #fff của .rd-btn-primary (0-1-0) mỗi khi :hover dính,
   mà rule bảo vệ cũ lại bọc (hover:hover)+(pointer:fine) nên điện thoại
   không được bảo vệ: chạm vào là chữ thành #02d5bd TRÙNG màu nền gradient
   -> chữ chìm hẳn (đo: tương phản 1.00-1.55). Rule dưới KHÔNG bọc media,
   cùng specificity + đứng sau nên thắng ở mọi thiết bị; hover desktop
   cũng bỏ brightness(1.07) làm NHẠT nền (1.87 -> 1.62), thay bằng đậm
   nhẹ .97. */
.rd-btn-primary:hover, .rd-btn-primary:active { color: #fff; }
@media (hover: hover) and (pointer: fine) { .rd-btn-primary:hover { filter: brightness(.97); } }
.rd-btn.bg-green { background: #369e69; border-color: #2c7f55; color: #fff; }
@media (hover: hover) and (pointer: fine) { .rd-btn.bg-green:hover { color: #fff; filter: brightness(.97); } }
.rd-btn.bg-red { background: #b73a3a; border-color: #8c2c2c; color: #fff; }
@media (hover: hover) and (pointer: fine) { .rd-btn.bg-red:hover { color: #fff; filter: brightness(.97); } }
/* 1.2.1: grid-auto-flow dense để ô 1 cột (vd Điểm Nguồn) lấp vào
   lỗ trống của hàng trước thay vì để thủng nửa hàng; Quốc Gia nay
   cũng span 2 (rd-tile-wide ở detail.html) nên cặp Thể Loại/Quốc
   Gia kín một hàng ở desktop và full-width có chủ đích ở mobile. */
/* 1.2.3 (G2): lưới GỌN — bỏ các ô trùng dải meta hero (Tập/Trạng
   Thái/Năm/Chất Lượng/Ngôn Ngữ/Thời Lượng/Lịch Chiếu; mỗi thông
   tin chỉ còn 1 chỗ hiển thị) + giảm đệm ô/khe lưới. */
.rd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; grid-auto-flow: dense; }
.rd-tile {
  background: rgb(0 0 0 / 30%); border: 1px solid #52525a; border-radius: 10px;
  padding: 6px 9px; min-width: 0;
}
.rd-tile-wide { grid-column: span 2; }
/* Thể Loại thành chip (1.2.1) — vẫn là link bấm được như cũ. */
.rd-gchip {
  display: inline-block; background: #2b2b30; border: 1px solid #4c4c52;
  border-radius: 12px; padding: 1px 9px; margin: 0 4px 5px 0;
  font-size: 13px; font-weight: 600; color: #02d5bd;
}
.rd-gchip:hover { border-color: #02d5bd; text-decoration: none; }
/* Đạo Diễn / Diễn Viên: clamp 3 dòng + nút Xem thêm (theme.js chỉ
   hiện nút khi nội dung thật sự tràn) — hết ô chữ khổng lồ.
   Selector 2 class để thắng display:block của .rd-tvalue. */
.rd-tvalue.rd-clamp {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.rd-tvalue.rd-clamp.open { display: block; -webkit-line-clamp: unset; }
.rd-more {
  background: none; border: 0; color: #02d5bd; font: inherit; font-size: 12.5px;
  font-weight: 700; padding: 3px 0 0; cursor: pointer;
}
.rd-more:hover { text-decoration: underline; }
/* Điểm Nguồn: 1.2.3 mỗi nguồn 1 dòng riêng; 1.2.4 (điểm 1) đổi
   thành BADGE nhỏ nằm NGANG 1 hàng trong ô span 2 — nhãn hãng
   (màu hãng: TMDB xanh #01b4e4, IMDb vàng #f5c518) + điểm đậm,
   hết cảnh ô nửa cột cao lênh khênh 2 dòng thô. */
/* 1.2.6 (điểm H1): selector 2 class để THẮNG .rd-tvalue
   (display:block khai báo SAU trong file, cùng specificity 1 class
   nên bản cũ bị đè -> flex chết, gap không ăn, 2 badge dính sát
   nhau — đo computed display = block, khoảng cách thực = 0px).
   Nay: flex thắng + gap cố định 8px. */
.rd-tvalue.rd-srcrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rd-src-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #2b2b30; border: 1px solid #4c4c52; border-radius: 12px;
  padding: 2px 10px; font-size: 13.5px; font-weight: 700; color: #f4f4f4;
  white-space: nowrap;
}
.rd-src-name { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; }
.rd-src-tmdb { color: #01b4e4; }
.rd-src-imdb { color: #f5c518; }
/* Khung gộp phân loại (1.2.4, điểm 2 + 5): Năm / Quốc Gia / Đạo
   Diễn chung MỘT ô — mỗi nhóm 1 hàng (nhãn nhỏ cố định bên trái +
   chip chảy theo), ngăn nhau bằng hairline; cả 3 nhóm đều ít chip
   nên gộp lại gọn hơn hẳn 2 ô full-width lẻ loi như trước. */
.rd-tile-duo { padding-top: 3px; padding-bottom: 3px; }
/* 1.2.6 (điểm H2): MỘT cấu trúc duy nhất cho cả 6 nhóm — nhãn cột
   trái CỐ ĐỊNH 74px + vùng chip bên phải (flex 1, cuộn ngang).
   Bản cũ flex-wrap:wrap ở cấp nhóm: nhóm ít chip thì nhãn+chip
   cùng hàng, nhóm nhiều chip thì TOÀN BỘ dải chip rớt xuống dòng
   dưới nhãn (đo: Thể Loại/Diễn Viên/Tên Khác chipsX=35 lệch hẳn
   Năm/Quốc Gia/Đạo Diễn chipsX=115). Nay cấm wrap cấp nhóm. */
.rd-duo-group { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 6px; padding: 5px 0; }
.rd-duo-group + .rd-duo-group { border-top: 1px solid rgb(255 255 255 / 8%); }
.rd-duo-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: #a9a9a9; min-width: 74px; flex: 0 0 74px;
}
.rd-duo-chips { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.rd-tile-duo .rd-gchip { margin: 0; }
.rd-tlabel {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: #a9a9a9; margin-bottom: 3px;
}
.rd-tvalue { display: block; font-size: 14.5px; font-weight: 600; color: #f4f4f4; overflow-wrap: anywhere; line-height: 1.45; }
.rd-tvalue a { color: #02d5bd; }
.rd-tvalue a:hover { text-decoration: underline; }
.rd-aka { margin-top: 12px; }
.rd-aka-title { font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #a9a9a9; margin: 0 0 8px; }
/* Tên Khác dài (fixture 10 bí danh): clamp 2 hàng + Xem thêm (data-clamp) */
.rd-aka-list.rd-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rd-aka-list.rd-clamp2.open { display: flex; -webkit-line-clamp: unset; }
.rd-aka-chip {
  display: inline-block; background: #2b2b30; border: 1px solid #4c4c52; color: #dedede;
  border-radius: 16px; padding: 3px 11px; font-size: 12.5px; margin: 0 5px 6px 0;
  max-width: 100%; overflow-wrap: anywhere;
}
/* 1.2.17: chip Tên Khác có tag thật -> là <a> trỏ /tag/<slug>
   (phim_tools 1.0.21); giữ nguyên mặt chip, hover teal như chip
   thể loại. Chip không link vẫn là <span> như cũ. */
a.rd-aka-chip { text-decoration: none; cursor: pointer; }
a.rd-aka-chip:hover { border-color: #02d5bd; color: #02d5bd; text-decoration: none; }
/* 1.2.18: MÀU THEO NHÓM trong khung thông tin chi tiết (lệnh Dũng
   19:02 "mỗi thứ mỗi màu") — mỗi nhóm CHIP 1 tông riêng: chữ chip
   + viền tint cùng tông, nền chip giữ #2b2b30, kích thước/cấu
   trúc chip KHÔNG đổi. Thể Loại giữ teal chủ đạo (mặc định
   .rd-gchip vốn teal). Năm = hổ phách, Quốc Gia = xanh dương,
   Đạo Diễn = tím, Diễn Viên = hồng, Tên Khác = cam.
   1.2.19 (Dũng sửa lệnh 19:13): màu CHỈ trong chip — NHÃN nhóm
   (.rd-duo-label) về lại màu trung tính gốc #a9a9a9 như trước
   1.2.18, KHÔNG tô màu nhãn nữa. */
.rd-duo-group.g-year .rd-gchip { color: #ffb020; border-color: rgb(255 176 32 / 45%); }
.rd-duo-group.g-year .rd-gchip:hover { border-color: #ffb020; }
.rd-duo-group.g-country .rd-gchip { color: #4db2ff; border-color: rgb(77 178 255 / 45%); }
.rd-duo-group.g-country .rd-gchip:hover { border-color: #4db2ff; }
.rd-duo-group.g-director .rd-gchip { color: #b78cff; border-color: rgb(183 140 255 / 45%); }
.rd-duo-group.g-director .rd-gchip:hover { border-color: #b78cff; }
.rd-duo-group.g-actor .rd-gchip { color: #ff7d9c; border-color: rgb(255 125 156 / 45%); }
.rd-duo-group.g-actor .rd-gchip:hover { border-color: #ff7d9c; }
.rd-duo-group.g-aka .rd-aka-chip { color: #ffa25e; border-color: rgb(255 162 94 / 45%); }
.rd-duo-group.g-aka a.rd-aka-chip:hover { border-color: #ffa25e; color: #ffa25e; }
@media (max-width: 768px) {
  .rd-main {
    grid-template-columns: 116px minmax(0, 1fr);
    grid-template-areas: "poster side" "chips chips" "actions actions";
    column-gap: 12px;
  }
  .rd-main { row-gap: 8px; }
  .rd-excerpt { -webkit-line-clamp: 2; }
  .rd-title { font-size: 19px; }
  .rd-play-overlay { width: 42px; height: 42px; }
  .rd-play-overlay .ah-ic { width: 24px; height: 24px; }
  .rd-grid { grid-template-columns: repeat(2, 1fr); }
  /* 1.2.3 (G2): 6 nút (member có Xem Tiếp) ép tối đa 2 hàng ở 360 —
     lưới 3 cột đều nhau, nút căn giữa, cỡ chữ/đệm gọn lại. */
  .rd-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .rd-btn { justify-content: center; padding: 7px 5px; font-size: 12.5px; }
  .rd-btn .ah-ic { width: 14px; height: 14px; }
}
/* Modal chấm điểm (demo giấu 10 sao trong hộp thoại, mở từ hàng Điểm). */
.ah-rate-modal {
  position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
}
.ah-rate-modal[hidden] { display: none; }
.ah-rate-box {
  background: #232327; border: 1px solid #404040; border-radius: 10px;
  padding: 18px; width: min(430px, 92vw); text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,.7);
}
.ah-rate-title { font-weight: 700; color: #fff; margin: 0 0 10px; }
.ah-rate { margin: 6px 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px; }
.ah-rate-cur { color: #bbb; margin: 8px 0 12px; }
.ah-star {
  background: none; border: 0; color: #555; font-size: 21px; cursor: pointer; padding: 0 1px; line-height: 1;
}
.ah-star .ah-ic { width: 26px; height: 26px; }
.ah-star.on { color: #ffb400; }
.ah-star:hover { color: #ffb400; }
.ah-follow-line { color: #ddd; margin: 0 0 8px; }
/* Modal Trailer (1.2.0): phát YouTube NGAY trong trang — khung
   16/9 tối đa 880px, tiêu đề + nút X ở thanh đầu; đóng bằng X /
   chạm nền / Esc và theme.js gỡ src iframe để dừng phát. */
.ah-trailer-modal {
  position: fixed; inset: 0; z-index: 115; background: rgba(0,0,0,.78);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.ah-trailer-modal[hidden] { display: none; }
.ah-trailer-box {
  width: min(880px, 100%); background: #17171a; border: 1px solid #4a4a50;
  border-radius: 12px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.75);
}
.ah-trailer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
}
.ah-trailer-title {
  font-weight: 700; color: #fff; font-size: 15px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ah-trailer-body { aspect-ratio: 16/9; background: #000; }
.ah-trailer-body iframe { width: 100%; height: 100%; border: 0; display: block; }
/* Popup chia sẻ (1.2.4, điểm 4): cùng khuôn modal Trailer — hộp
   tối bo 12px, lưới 5 nút MXH (vòng tròn tối + glyph SVG màu hãng
   thật + nhãn dưới), dưới là hàng Copy Link (ô readonly + nút
   teal). Đóng bằng X / chạm nền / Esc (theme.js). */
.ah-share-modal {
  position: fixed; inset: 0; z-index: 116; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.ah-share-modal[hidden] { display: none; }
.ah-share-box {
  width: min(430px, 100%); background: #232327; border: 1px solid #4a4a50;
  border-radius: 12px; padding: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.75);
}
.ah-share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ah-share-title { font-weight: 700; color: #fff; font-size: 15px; }
.ah-share-movie {
  margin: 6px 0 14px; color: #bbb; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ah-share-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ah-share-net {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: #ddd; min-width: 0;
}
.ah-share-net:hover { text-decoration: none; color: #fff; }
.ah-share-ic {
  width: 46px; height: 46px; border-radius: 50%; background: #2b2b30;
  border: 1px solid #4c4c52; display: flex; align-items: center; justify-content: center;
}
.ah-share-net:hover .ah-share-ic { border-color: #02d5bd; }
.ah-share-ic svg { width: 24px; height: 24px; }
.ah-share-ic.fb { color: #0866ff; }
.ah-share-ic.zalo { color: #0068ff; }
.ah-share-ic.tg { color: #26a5e4; }
.ah-share-ic.x { color: #fff; }
.ah-share-ic.wa { color: #25d366; }
.ah-share-copy { display: flex; gap: 6px; margin-top: 16px; }
.ah-share-copy input {
  flex: 1; min-width: 0; background: #17171a; border: 1px solid #4c4c52;
  border-radius: 8px; color: #ccc; padding: 8px 10px;
  font-size: 12.5px; font-family: inherit;
}
.ah-share-copybtn {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  background: #02a08d; border: 1px solid #02a08d; color: #fff;
  border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer;
}
/* 1.2.27: brightness(1.1) -> .97 (tương phản chữ trắng 3.27 -> 2.73 khi hover). */
@media (hover: hover) and (pointer: fine) { .ah-share-copybtn:hover { filter: brightness(.97); } }
.ah-share-copybtn .ah-ic { width: 16px; height: 16px; }
.ah-content { color: #ddd; }
.ah-content img { height: auto; }
/* Danh Sách Phần (.bind_movie): chip gói dòng căn giữa như demo. */
.bind_row { text-align: center; }
.bind_row a {
  background: #6b6a6a; color: #fff; padding: 8px 15px; display: inline-block;
  border-radius: 4px; margin: 0 5px 10px 0;
}
.bind_row a.active { background: #27867d; color: #fff; }
@media (hover: hover) and (pointer: fine) { .bind_row a:hover { opacity: .7; color: #fff; } }

/* ---------- Danh sách tập — REDESIGN 1.1.0 ----------
   Trang chi tiết: TAB theo server (mỗi server 1 panel, chỉ panel
   đang chọn hiện) + lưới tập CSS grid ô đều nhau trong KHUNG CUỘN
   riêng (chi tiết 320px desktop / 240px mobile; trang xem 400px).
   Ô tập: nền #2e2e33 bo 8px; hover viền teal; tập ĐÃ XEM nền tối
   hơn + chữ xám + dấu tick teal ở góc (member: plugin ghi từng
   tập; khách: localStorage); tập đang xem ở trang xem nền đỏ
   #ce6464. Thứ tự HTML đã xếp mới nhất lên đầu ở tầng plugin. */
.rd-sv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rd-sv-tab {
  background: #2b2b30; border: 1px solid #4c4c52; color: #dedede; border-radius: 20px;
  padding: 7px 15px; font-size: 13.5px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.rd-sv-tab .rd-sv-count { font-weight: 400; opacity: .7; font-size: 12px; }
.rd-sv-tab:hover { border-color: #02d5bd; color: #02d5bd; }
.rd-sv-tab.active { background: #02a08d; border-color: #02a08d; color: #fff; }
.rd-sv-tab.active:hover { color: #fff; }
.rd-ep-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 6px; max-height: 320px; overflow: auto; overflow-x: hidden; padding-right: 6px;
}
.rd-ep-list-watch { max-height: 400px; }
.rd-ep-list a {
  position: relative; background: #2e2e33; color: #f0f0f0; border: 1px solid #4c4c52;
  border-radius: 8px; padding: 9px 4px; text-align: center; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-ep-list a:hover { border-color: #02d5bd; color: #02d5bd; }
.rd-ep-list a.watched { background: #202024; color: #8d8d8d; }
.rd-ep-list a.watched::after {
  /* 1.2.5 (điểm 8): huy hiệu đã-xem THIẾT KẾ LẠI — trước đây là dấu
     ✓ trần 12px nằm chơ vơ ở góc trên-phải chip, nhìn như lệch/ra
     ngoài. Nay: vòng tròn teal đặc 16px, dấu ✓ đậm #052e2b nằm
     chính giữa huy hiệu (SVG căn center, glyph 10px), cách đều mép
     trên + mép phải chip 4px, đổ bóng nhẹ tách khỏi nền chip.
     1 rule chung cho cả trang chi tiết + trang xem, member (class
     từ template) lẫn khách (theme.js gắn class từ localStorage).
     1.2.6 (điểm F2): đo pixel trên ảnh live của Dũng — badge VẪN
     nằm trong hộp chip (inset ~4px) nhưng dính sát CUNG BO GÓC
     8px của chip nên mắt đọc thành "vắt góc, lòi nửa ra ngoài".
     Tăng inset đều lên 7px: badge tách hẳn khỏi cung góc, nằm
     trọn trong chip cả về hộp lẫn về sơn. */
  /* 1.2.7 (điểm 2): top cố định (7px) vẫn làm badge DÍNH MÉP TRÊN
     trên chip cao ~39.5px (đáy thừa ~16.5px, tâm badge lệch tâm
     chip ~4.8px — Dũng vẫn bắt "vắt góc" trên lưới trang xem).
     Đổi sang CĂN GIỮA DỌC: top 50% + translateY(-50%), right 6px —
     badge trọn trong chip ở mọi chiều cao chip và thẳng hàng với
     chữ tập (vốn căn giữa), hết hẳn cảm giác vắt góc. */
  content: ""; position: absolute; top: 50%; transform: translateY(-50%); right: 6px; width: 16px; height: 16px;
  border-radius: 50%; background-color: #02d5bd;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23052e2b' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-position: center; background-repeat: no-repeat; background-size: 10px 10px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 45%);
}
.rd-ep-list a.active { background: #ce6464 !important; border-color: #ce6464; color: #fff !important; }
/* Đảo Chiều (1.2.0): theme.js đảo THẬT thứ tự DOM của các ô tập
   trong panel đang hiện và đánh dấu .is-reversed lên danh sách —
   không còn hack direction:rtl của bản cũ (chỉ soi gương trong
   từng hàng, ô đầu không bao giờ thành tập cũ nhất). */
@media (max-width: 768px) {
  .rd-ep-list { max-height: 240px; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .rd-ep-list-watch { max-height: 400px; }
}
.scroll-bar::-webkit-scrollbar { width: 8px; background-color: #2b2b34; }
.scroll-bar::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 10px; }
.scroll-bar::-webkit-scrollbar-thumb:hover { background-color: #fff; }
.ah-ep-heading { display: flex; justify-content: space-between; align-items: center; }
/* Hộp Tìm Nhanh Tập — REDESIGN 1.2.0: gọn 1 hàng trên desktop
   (nhãn + ô nhập co flex + 2 nút nhỏ), mobile nhãn lên hàng riêng
   rồi ô nhập + 2 nút cùng hàng thứ 2 (bản cũ ô nhập min-width 130
   + 2 nút to làm tràn khỏi khung ở 360px). Nút Đảo Chiều khi đang
   bật đảo: viền teal + sáng nền để thấy rõ trạng thái. Kết quả
   khớp kiểu ô lưới, hiện ngay dưới hàng nhập. */
.ah-qf-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
}
.ah-qf-title { font-weight: 700; font-size: 15px; color: #f0f0f0; white-space: nowrap; }
/* 1.2.1: selector nâng specificity thắng rule generic
   ".ah-frame input[type=text]" (nó rò margin 4px/10px + width 100%
   vào ô này làm hàng lệch nhịp) + ép ô nhập và 2 nút CÙNG cao 36px. */
.ah-qf .ah-qf-head input[type="text"] {
  background: #28282d; border: 1px solid #525151; border-radius: 8px;
  height: 36px; padding: 0 12px; color: #fff; flex: 1; min-width: 0; width: auto;
  margin: 0; font-size: 13.5px;
}
.ah-qf-head input:focus { border-color: #02d5bd; outline: 0; }
.ah-qf-head .button-default {
  height: 36px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; font-size: 13px; white-space: nowrap; border-bottom-width: 2px;
  line-height: 1; margin: 0;
}
.ah-qf-head [data-qf-reverse].on {
  box-shadow: inset 0 0 0 2px #02d5bd; filter: brightness(1.3);
}
.ah-qf-result { display: flex; flex-wrap: wrap; gap: 6px; max-height: 400px; overflow: auto; overflow-x: hidden; margin-top: 10px; }
.ah-qf-result:empty { display: none; margin-top: 0; }
@media (max-width: 560px) {
  .ah-qf-head { flex-wrap: wrap; }
  .ah-qf-title { flex: 0 0 100%; }
}
.ah-qf-result a {
  background: #2e2e33; color: #f0f0f0; border: 1px solid #4c4c52; border-radius: 8px;
  padding: 9px 14px; text-align: center; font-size: 13px;
}
.ah-qf-result a:hover { background: #ce6464; border-color: #ce6464; color: #fff; }
.ah-qf-none {
  /* 1.2.5 (điểm 9): thông báo "Không thấy tập khớp." — trước đây là
     1 dòng chữ xám trơ (#999, không khung không nền) lạc nhịp hẳn
     dưới ô nhập. Nay thành banner inline tử tế theo ngôn ngữ theme:
     nền + viền tông cảnh báo nhẹ của .ah-alert, icon info 18px,
     padding đều 8px 12px, chữ #eee8b0 dễ đọc, chiếm trọn hàng kết
     quả. Trạng thái KHỚP giữ nguyên chip tập như cũ (đã đồng bộ với
     chip danh sách tập). */
  flex: 1 1 100%; display: flex; align-items: center; gap: 8px;
  background: #33331f; border: 1px solid #6b6a2a; border-radius: 8px;
  color: #eee8b0; font-size: 13px; line-height: 1.4; padding: 8px 12px;
}
.ah-qf-none::before {
  content: ""; flex: none; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23eee8b0' d='M12 2.015C6.468 2.015 2.015 6.468 2.015 12.0C2.015 17.531 6.468 21.984 12 21.984C17.531 21.984 21.984 17.531 21.984 12.0C21.984 6.468 17.531 2.015 12 2.015ZM12 17.015C11.437 17.015 11.015 16.546 11.015 15.984V12.0C11.015 11.437 11.437 11.015 12 11.015C12.562 11.015 12.984 11.437 12.984 12.0V15.984C12.984 16.546 12.562 17.015 12 17.015ZM12.984 9.0H11.015V6.984H12.984V9.0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Trang xem — REDESIGN 1.2.0 ----------
   Toàn bộ cụm xem nằm trong 1 thẻ .ah-watch-card (khung .ah-frame
   đệm 0): thanh tiêu đề đen dính sát mép trên của thẻ, player bo
   8px trong vùng đệm, DECK điều khiển ngay dưới player gồm hàng
   Server (pill, active teal) + hàng Nguồn phát M3U8/Embed (pill,
   chỉ hiện khi tập có đủ 2 nguồn) + hàng Trước / Night / Tiếp;
   cuối thẻ là hàng chip thông tin phụ. */
.ah-watch-card { padding: 0; overflow: hidden; }
/* 1.2.6 (điểm E): watch-bar THIẾT KẾ LẠI 3 hàng gọn — tiêu đề
   (clamp 2 dòng) / meta (Cập Nhật + chip trạng thái, chip chuyển
   từ hàng meta dưới player lên đây) / hành động (3 nút ĐỒNG NHẤT
   .ah-wb-btn cao 40px, icon + chữ, nút Theo Dõi hơi giãn flex vì
   nhãn "Bỏ Theo Dõi" dài). [1.2.25: Dũng chê 3 nút hơi cao -> hạ
   height còn 32px, khớp chiều cao đo thật của hàng nút .rd-btn
   trang chi tiết (~31.6px ở 360px).] Bản cũ flex-wrap tự do cao 139.5px với
   2 nút vuông icon trơ + khoảng đen chết bên phải. */
.ah-watch-bar {
  background: #000; display: flex; flex-direction: column;
  gap: 6px; padding: 9px 12px 10px;
}
.ah-wb-title { display: inline-flex; align-items: flex-start; gap: 8px; color: #ffb970; min-width: 0; }
.ah-wb-title .ah-ic { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.ah-watch-title {
  font-size: 16px; margin: 0; color: #ffb970; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.ah-wb-metarow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ah-wb-updated { color: #bdbdbd; font-size: 12.5px; }
.ah-wb-status {
  font-size: 11px; font-weight: 700; letter-spacing: .3px; white-space: nowrap;
  padding: 2px 9px; border-radius: 999px; border: 1px solid #02d5bd; color: #02d5bd;
}
.ah-wb-status.is-done { border-color: #369e69; color: #7ed3a5; }
/* 1.2.7 (điểm 5): lưới 3 cột BẰNG NHAU 1fr/1fr/1fr (bản cũ flex +
   flex-grow 1.3 cho nút Theo Dõi -> 114px vs 90/90px đo thật).
   Màu nền theo chức năng ở khối §1.2.7 cuối file. */
.ah-wb-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ah-wb-btn {
  min-width: 0; height: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #1e1e22; border: 1px solid #3a3a40; border-radius: 9px;
  color: #eee; font-size: 13px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.ah-wb-btn .ah-ic { width: 16px; height: 16px; flex: none; }
.ah-wb-btn:hover { border-color: #02d5bd; color: #02d5bd; }
@media (max-width: 640px) { .ah-wb-btn { font-size: 12.5px; letter-spacing: -.3px; padding: 0 4px; } }
.ah-player-wrap { padding: 12px 12px 12px; }
.ah-player { background: #000; aspect-ratio: 16/9; width: 100%; border-radius: 8px; overflow: hidden; }
.ah-player iframe, .ah-player video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.ah-player-empty { padding: 30px; text-align: center; }
/* 1.2.2: "chưa có nguồn phát" dùng mẫu empty chung — lấp đầy khung
   player, căn giữa, bỏ viền/nền riêng trong khung đen. */
.ah-player .ah-empty { height: 100%; justify-content: center; background: none; border: 0; border-radius: 0; padding: 16px; }
.ah-src-pane { height: 100%; }
.ah-src-pane[hidden] { display: none; }
.ah-deck { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ah-deck-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ah-deck-label {
  flex: 0 0 76px; font-size: 11.5px; font-weight: 700; letter-spacing: .7px;
  text-transform: uppercase; color: #a9a9a9;
}
.ah-deck-btns { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ah-pill {
  background: #2b2b30; border: 1px solid #4c4c52; color: #dedede; border-radius: 20px;
  padding: 6px 14px; font-size: 13px; font-weight: 700; font-family: inherit;
  cursor: pointer; display: inline-block; line-height: 1.35;
}
.ah-pill:hover { border-color: #02d5bd; color: #02d5bd; }
.ah-pill.active { background: #02a08d; border-color: #02a08d; color: #fff; }
.ah-pill.active:hover { color: #fff; }
.ah-watch-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.ah-watch-meta .rd-chip { background: #2b2b30; border-color: #4c4c52; }
a.rd-chip:hover { border-color: #02d5bd; color: #02d5bd; }
/* Night: lớp phủ tối toàn trang, player nổi lên trên (cơ chế .light-off
   của demo: phủ z-index 11, player z-index 12). */
.light-off { position: fixed; inset: 0; background: rgba(0,0,0,.93); z-index: 90; }
body.night-on .ah-player { position: relative; z-index: 100; }
.ah-ep-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; justify-content: center; }
.ah-sched-line { font-weight: 700; color: #f0f0f0; }

/* ---------- Lịch chiếu (2 bảng 2D/3D) — REDESIGN 1.2.0 ---------- */
.ah-dow-line { font-size: 15px; margin: 0 0 10px; color: #ccc; }
.ah-dow-line .dow2 { font-weight: 700; color: #fff; }
.ah-lich-title {
  margin: 14px 0 8px; font-size: 16px; font-weight: 700; color: #f0f0f0;
  border-left: 4px solid #02d5bd; padding-left: 9px; line-height: 1.35;
}
.ah-lich-title:first-of-type { margin-top: 2px; }
.ah-lich { width: 100%; border-collapse: collapse; margin: 0 0 14px; background: #404040; }
.ah-lich th, .ah-lich td { border: 1px solid #525151; padding: 8px 10px; text-align: left; vertical-align: top; }
.ah-lich th { background: #000; color: #fff; }
.ah-lich .c1 { width: 180px; font-weight: 700; color: #f0f0f0; white-space: nowrap; }
.ah-lich tr.today td { background: rgb(2 213 189 / 10%); }
.ah-lich tr.today .c1 { color: #02d5bd; }
.ah-today-tag {
  display: inline-block; background: #02a08d; color: #fff; font-size: 10.5px;
  font-weight: 700; border-radius: 10px; padding: 1px 7px; margin-left: 6px;
  vertical-align: 2px; letter-spacing: .3px;
}
.ah-lich td a.dow { display: inline-block; margin: 0 10px 4px 0; color: #e8e8e8; }
.ah-lich td a.dow:hover { color: #02d5bd; }
@media (max-width: 600px) { .ah-lich .c1 { width: 96px; white-space: normal; } }

/* ---------- Dải lọc #filter-movie (trang danh sách) ---------- */
.ah-strip { margin: 0 0 14px; }
.ah-strip-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ah-strip-btns button {
  background: #313131; color: #ccc; border: 1px solid #525151; border-radius: 5px;
  padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.ah-strip-btns button.open { background: #02a08d; color: #fff; border-color: #02a08d; }
.ah-strip-group { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ah-strip-group[hidden] { display: none; }
.ah-strip-group a {
  background: #17171a; border: 1px solid #404040; border-radius: 4px;
  padding: 5px 10px; font-size: 13px; color: #ddd;
}
.ah-strip-group a:hover { border-color: #02d5bd; color: #02d5bd; }

/* ---------- Chat tường trang chủ + BXH — REDESIGN 1.2.0 ----------
   2 tab thật (Bình Luận / BXH) dạng pill: tab đang chọn nền teal,
   tab còn lại nền tối (bản cũ cả 2 tab cùng gradient cam-hồng nên
   không phân biệt được). Danh sách chat cao TỰ NHIÊN theo nội
   dung, trần 450px desktop / 340px mobile rồi cuộn trong khung —
   trạng thái trống chỉ là 1 dòng gọn, hết khung đen 450px rỗng.
   BXH: hàng hạng có huy hiệu số (top 3 viền vàng), tên phim co
   ellipsis, điểm sao + số lượt đánh giá bên phải. */
.ah-chat-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ah-chat-tab {
  padding: 7px 16px; border-radius: 20px; font-weight: 700; font-size: 13.5px;
  color: #ddd; background: #2b2b30; border: 1px solid #4c4c52;
  display: inline-block; cursor: pointer; font-family: inherit; line-height: 1.35;
}
.ah-chat-tab:hover { border-color: #02d5bd; color: #02d5bd; }
.ah-chat-tab.active {
  background: linear-gradient(180deg, #02d5bd, #02ab97); border-color: transparent;
  color: #05302a;
}
.ah-chat-tab.active:hover { color: #05302a; }
.chat_div {
  list-style: none; margin: 0; padding: 5px; max-height: 540px; overflow: auto;
  background: rgb(17 17 17 / 70%); border-radius: 8px;
}
@media (max-width: 640px) { .chat_div { max-height: 440px; } }
.chat-item { display: flex; gap: 10px; padding: 9px 6px; border-bottom: 1px solid #2f2f2f; }
.chat-item:last-child { border-bottom: 0; }
.chat-ava { flex: none; }
.chat-ava img, .chat-letter { width: 34px; height: 34px; display: block; border-radius: 50%; }
.chat-letter { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px; }
.chat-main { flex: 1; min-width: 0; }
.box-chat-nickname { display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; }
.box-chat-nickname b { color: #02d5bd; }
.Time-cmt-home { color: #888; font-size: 12px; padding-left: 10px; }
.boxchat-content { display: block; color: #e2e2e2; overflow-wrap: anywhere; margin-top: 2px; font-size: 14.5px; line-height: 1.5; }
.chat-empty { color: #999; padding: 12px 5px; text-align: center; }
/* 1.2.1: chặn rule generic ".ah-frame input[type=text] /
   button[type=submit]" rò vào form chat (nó cộng margin 4px/10px
   cho ô nhập và padding 9px 22px cho nút Gửi -> nút cao 52px lệch
   hẳn ô nhập 38px). Selector dưới specificity cao hơn + ép 2 phần
   tử CÙNG cao 38px, thẳng hàng trên/dưới.
   1.2.9: Dũng chê form chat NHỎ/chật -> cả hàng nhập lên nhịp
   pill 42px (nút sticker tròn 42 + ô nhập pill + nút Gửi pill
   cùng cao), cỡ chữ ô nhập 14.5px. */
.ah-chat-form { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.ah-frame .ah-chat-form input[type="text"] {
  flex: 1; min-width: 0; width: auto; height: 42px; margin: 0; background: #28282d;
  border: 1px solid #525151; border-radius: 999px; color: #fff; padding: 0 16px;
  font-size: 14.5px;
}
.ah-chat-form input:focus { border-color: #02d5bd; outline: 0; }
.ah-frame .ah-chat-form button[type="submit"] {
  height: 42px; padding: 0 22px; margin: 0; display: inline-flex;
  align-items: center; justify-content: center; line-height: 1; flex: none;
  border-radius: 999px;
}
/* Nút mở panel sticker của Chat Box (1.2.9): tròn 42px cùng nhịp
   hàng nhập; panel là .ph-emo-panel dùng chung của bình luận. */
.ah-frame .ah-chat-form .ah-chat-stk {
  flex: none; width: 42px; height: 42px; margin: 0; padding: 0; border-radius: 50%;
  background: #28282d; border: 1px solid #525151; color: #a7a7a7; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.ah-chat-stk .ah-ic { width: 22px; height: 22px; }
.ah-chat-stk:hover, .ah-chat-stk.is-open { border-color: #02d5bd; color: #02d5bd; }
.ah-chat-login { margin: 10px 0 0; }
.ah-bxh { list-style: none; margin: 0; padding: 0; }
.bxh-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px;
  border-bottom: 1px solid #2f2f2f;
}
.bxh-row:last-child { border-bottom: 0; }
.bxh-rank {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: #2b2b30;
  border: 1px solid #4c4c52; color: #ddd; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.bxh-rank.top { border-color: #ffb400; color: #ffb400; }
.bxh-title {
  flex: 1; min-width: 0; color: #f0f0f0; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bxh-title:hover { color: #02d5bd; }
.bxh-score { flex: none; color: #ffb400; font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 3px; }
.bxh-score .ah-ic { width: 14px; height: 14px; }
.bxh-score small { color: #999; font-weight: 400; }
.ah-bxh-more { margin: 10px 0 0; text-align: right; }
.ah-bxh-more a { color: #02d5bd; font-size: 13.5px; }
/* 1.2.6 (điểm L): pane Bình Luận (feed comment thật) + pane BXH
   THÀNH VIÊN trong khối tường 3 tab. Dòng phim của feed: link
   teal nhỏ ngay dưới tên; BXH member: avatar 32px + tên/chip ở
   giữa, EXP đậm + Linh Thạch mờ bên phải; hạng dùng lại
   .bxh-rank (top 3 viền vàng). */
.cf-movie {
  display: block; color: #02d5bd; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 1px 0;
}
.cf-movie:hover { text-decoration: underline; }
.bxh-ava { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: inline-flex; background: #333; }
.bxh-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bxh-ava .chat-letter { width: 100%; height: 100%; font-size: 13px; }
/* Tên + chip XẾP CỘT (tên trên, chip dưới): bản ngang bị chip ép
   tên cụt còn ~55px ở 360 (đo từ ảnh test) — cột cho tên gần như
   trọn bề ngang phần giữa, chip xuống dòng 2 không tranh chỗ. */
.bxh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; overflow: hidden; }
.bxh-main .chat-name { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bxh-main .cmt-chip { margin-left: 0; }
.bxh-exp { flex: none; text-align: right; display: flex; flex-direction: column; line-height: 1.25; }
.bxh-exp b { color: #ffb400; font-size: 13.5px; }
.bxh-exp small { color: #999; font-size: 11.5px; }

/* ---------- Lọc phim ---------- */
.ah-filter { background: #232327; border: 1px solid #3a3a40; border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.ah-filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.ah-filter label { display: flex; flex-direction: column; gap: 4px; color: #999; font-size: 12.5px; flex: 1; min-width: 130px; }
.ah-filter select {
  height: 36px; background: #141416; color: #eee; border: 1px solid #404040; border-radius: 6px; padding: 0 8px; width: 100%;
}

/* ---------- Select tự chế (theme.js bọc quanh <select> gốc) ----------
   Thay popup trắng hệ thống của Android bằng panel tối/teal của
   theme. Select gốc bị ẩn thị giác nhưng VẪN nằm trong form nên
   name/value nộp đi không đổi. Panel neo dưới ô, cuộn trong panel,
   không tràn ngang. */
.ah-select { position: relative; width: 100%; }
.ah-select-native {
  position: absolute !important; left: 0; bottom: 0; width: 100% !important;
  height: 0 !important; opacity: 0; pointer-events: none; border: 0 !important;
  padding: 0 !important; margin: 0 !important;
}
.ah-select-btn {
  width: 100%; height: 36px; background: #28282d; color: #eee;
  border: 1px solid #404040; border-radius: 6px; padding: 0 8px 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; font-size: 14px; text-align: left;
}
.ah-select-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-select-ic { display: flex; color: #a7a7a7; }
.ah-select-ic .ah-ic { width: 20px; height: 20px; }
.ah-select.open .ah-select-btn { border-color: #02d5bd; }
.ah-select.open .ah-select-ic { color: #02d5bd; }
.ah-select-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 75;
  background: #1c1c1f; border: 1px solid #404040; border-radius: 8px;
  max-height: 240px; overflow: auto; padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
}
.ah-select-opt {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: 5px; cursor: pointer; color: #ddd; font-size: 14px;
}
.ah-select-opt:hover { background: #28282d; }
.ah-select-opt .ah-ic { width: 18px; height: 18px; visibility: hidden; flex: none; }
.ah-select-opt.sel { color: #02d5bd; font-weight: 700; }
.ah-select-opt.sel .ah-ic { visibility: visible; }

/* ---------- Modal tự chế (Báo Lỗi / xác nhận xoá) ---------- */
#ah_modal { position: fixed; inset: 0; z-index: 120; }
.ah-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
/* 1.2.6 (điểm G): modal đồng bộ khuôn Share 1.2.4 — box radius
   12px + viền #4a4a50 + padding 16px; textarea theo ngôn ngữ input
   của theme (nền #28282d như ô tìm kiếm, viền mảnh #4c4c52, bo 8px,
   cao ~110px, placeholder #a7a7a7 — bỏ hẳn vẻ viền trắng mặc định);
   hàng chip lý do nhanh phía trên textarea; nút chân modal cao
   38px như nút Sao chép của Share. */
.ah-modal-box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(420px, 92vw); background: #232327; border: 1px solid #4a4a50;
  border-radius: 12px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.75);
}
.ah-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid #3a3a40;
  font-weight: 700; color: #fff; font-size: 15px;
}
.ah-modal-x { background: none; border: 0; color: #ccc; cursor: pointer; display: flex; padding: 4px; }
.ah-modal-x .ah-ic { width: 20px; height: 20px; }
.ah-modal-body { padding: 16px; }
.ah-modal-body p { margin: 0; color: #ddd; }
.ah-modal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ah-modal-chips[hidden] { display: none; }
.ah-mchip {
  padding: 6px 12px; border-radius: 999px; background: #2b2b30;
  border: 1px solid #4c4c52; color: #ddd; font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.ah-mchip:hover { border-color: #02d5bd; color: #02d5bd; }
.ah-mchip.active { background: #02a08d; border-color: #02a08d; color: #fff; }
.ah-modal-body textarea {
  width: 100%; min-height: 110px; background: #28282d; border: 1px solid #4c4c52; border-radius: 8px;
  color: #eee; padding: 10px 12px; font-size: 14px; resize: vertical; font-family: inherit;
}
.ah-modal-body textarea::placeholder { color: #a7a7a7; }
.ah-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }
.ah-modal-foot .button-default { height: 38px; display: inline-flex; align-items: center; padding: 0 16px; }

/* ---------- Tabs / lịch sử / hồ sơ — 1.2.0 đồng bộ token ---------- */
.ah-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ah-tab { padding: 8px 16px; border-radius: 20px; background: #2b2b30; border: 1px solid #4c4c52; color: #ddd; font-weight: 700; }
.ah-tab:hover { border-color: #02d5bd; color: #02d5bd; }
.ah-tab.active { background: #02a08d; border-color: #02a08d; color: #fff; box-shadow: none; }
.ah-tab.active-red { background: #b73a3a; border-color: #b73a3a; color: #fff; }
.ah-history-bar { text-align: right; margin: 0 0 10px; }
.ah-history-list { display: flex; flex-direction: column; gap: 10px; }
.ah-history-item { display: flex; gap: 12px; background: #232327; border: 1px solid #3a3a40; border-radius: 10px; padding: 10px; }
.hi-poster { flex: 0 0 62px; }
.hi-poster img { width: 62px; aspect-ratio: 2/3; object-fit: cover; display: block; border-radius: 3px; }
.hi-poster .no-cover { aspect-ratio: 2/3; font-size: 20px; }
.hi-info { min-width: 0; }
.hi-title { font-weight: 700; color: #cc8d4c; font-size: 15px; }
.hi-info p { margin: 5px 0; }
.ah-profile-banner {
  background: #17171a; border: 1px solid #3a3a40; border-radius: 10px; text-align: center;
  padding: 14px; font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 12px;
}
.ah-profile-head { display: flex; gap: 16px; background: #232327; border: 1px solid #3a3a40; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.ah-profile-avatar { flex: 0 0 100px; width: 100px; height: 100px; border-radius: 10px; overflow: hidden; background: #333; }
.ah-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ah-profile-meta { flex: 1; min-width: 0; }
.ah-profile-meta h1 { margin: 0 0 4px; font-size: 20px; color: #fff; }
.ah-profile-meta p { margin: 3px 0; }
.ah-expbar { height: 10px; background: #17171a; border-radius: 6px; overflow: hidden; margin: 8px 0 4px; max-width: 420px; }
.ah-expbar span { display: block; height: 100%; background: linear-gradient(to right, #FF512F, #DD2476); }
.inline-form { display: inline; }
.ah-profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.ah-stat { background: #232327; border: 1px solid #3a3a40; border-radius: 10px; padding: 12px; text-align: center; }
.ah-stat b { display: block; font-size: 20px; color: #02d5bd; }
.ah-stat span { color: #999; font-size: 12.5px; }
.ah-profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ah-profile-links a { background: #17171a; border: 1px solid #404040; border-radius: 20px; padding: 7px 14px; font-weight: 600; }
.ah-profile-links a:hover { border-color: #02d5bd; color: #02d5bd; }
.ah-ledger { list-style: none; margin: 0; padding: 0; }
.ah-ledger li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #3a3a40; }
.ah-ledger li:last-child { border-bottom: 0; }
.ah-ledger b { margin-left: auto; }
.ah-mycomments .ah-myc-item { background: #232327; border: 1px solid #3a3a40; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.ah-myc-item p { margin: 0 0 5px; }
.ah-myc-item a { color: #02d5bd; }

/* ---------- Bình luận (vỏ tối, ruột lõi) — 1.2.0 gọn lại ---------- */
.comment-container { background: #404040; border: 1px solid #4a4a50; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.cmt-empty {
  color: #999; text-align: center; padding: 14px 10px; margin: 4px 0 0;
  background: rgb(17 17 17 / 45%); border: 1px dashed #525151; border-radius: 8px;
  font-size: 13.5px; list-style: none;
}
.comment-container .block-title { border: 0; padding: 0; font-size: 17px; color: #fff; margin: 0 0 10px; }
/* 1.2.22: hộp mời đăng nhập thay form bình luận cho KHÁCH
   (partials/comments.html nhánh else) — khách không được bình
   luận ở phim (luật Dũng 20:08 23/11; chặn cả phía server ở
   phim_tools 1.0.26). Nút xanh #369e69 như nút Gửi bình luận
   mà nó thay thế. */
.cmt-login-box {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; padding: 18px 14px; margin: 0 0 6px;
  background: rgb(17 17 17 / 45%); border: 1px dashed #525151; border-radius: 8px;
}
.cmt-login-box .ah-ic { width: 30px; height: 30px; color: #02d5bd; }
.cmt-login-txt { margin: 0; color: #bbb; font-size: 14px; }
.cmt-login-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 9px 20px; border-radius: 20px;
  background: #369e69; color: #fff; font-weight: 700; font-size: 14.5px;
  text-decoration: none;
}
.cmt-login-btn:hover { background: #2f8a5c; }
/* Form bình luận LÕI (Comments::formHtml): style bám theo class
   của chính form (.comment-form + .cf-*) chứ KHÔNG bám theo div
   bọc .form-comment của theme — JS lõi dời #comment-form vào
   trong <li> của bình luận được trả lời, form đi đâu style phải
   theo đó. Mọi ô nhập nền #28282d như ô nhập của demo, viền
   #525151, bo 6px; ô Website của lõi là type="url" (bản trước
   chỉ style text/email nên ô này trắng mặc định trình duyệt). */
.comment-form { margin: 0 0 6px; }
/* 1.2.3 (nhóm B): bỏ hiển thị dòng tiêu đề "✎ Để lại bình luận"
   (icon + chữ) và nhãn "Nội dung bình luận *" của form lõi — chỉ
   ẩn PHẦN TRÌNH BÀY, form + POST giữ nguyên. Link "Huỷ trả lời"
   nằm TRONG chính <h3> tiêu đề nên giữ lại: h3 thu về 0 khi không
   trả lời (mọi con đều ẩn), hiện đúng mỗi link huỷ khi đang trả
   lời để người dùng thoát được trạng thái reply. */
.comment-form-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 16px; font-weight: 700; color: #fff; margin: 0;
}
.comment-form-title > svg, .comment-form-title > span { display: none; }
.comment-form-title .cancel-reply {
  margin-left: auto; font-size: 13px; font-weight: 400; color: #f09191;
  display: inline-flex; align-items: center; gap: 4px;
}
.comment-form .cf-field label[for="cf-content"] { display: none; }
/* Lõi để sẵn thuộc tính hidden trên link này (JS chỉ gỡ khi đang
   trả lời) — display ở trên không được đè mất trạng thái ẩn. */
.comment-form-title .cancel-reply[hidden] { display: none; }
.comment-form-title .cancel-reply svg { width: 15px; height: 15px; color: inherit; }
.comment-form .cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .comment-form .cf-grid { grid-template-columns: 1fr; } }
/* 1.2.2: member đã đăng nhập — ẩn cả hàng Họ tên + Website (ô tên
   của member trong form lõi là readonly trang trí, submit() luôn
   lấy danh tính tài khoản). Neo theo .comment-container (JS lõi dời
   #comment-form vào bình luận được trả lời nhưng vẫn trong
   container này) nên trạng thái ẩn giữ nguyên cả khi trả lời. */
.comment-container.is-member .comment-form .cf-grid { display: none; }
.comment-form .cf-field { margin: 0 0 10px; }
.comment-form .cf-field label { display: block; color: #bbb; font-size: 13.5px; margin: 0 0 5px; }
.comment-form .cf-input {
  display: flex; align-items: center; gap: 8px;
  background: #28282d; border: 1px solid #525151; border-radius: 6px; padding: 0 10px;
}
.comment-form .cf-input:focus-within { border-color: #02d5bd; }
.comment-form .cf-input svg { width: 18px; height: 18px; color: #999; flex: none; }
.comment-form .cf-input input {
  flex: 1; min-width: 0; width: auto; background: transparent; border: 0; outline: 0;
  color: #fff; padding: 9px 0; font-size: 14px; margin: 0;
}
.comment-form .cf-input input[readonly] { color: #ccc; }
.comment-form textarea {
  width: 100%; box-sizing: border-box; background: #28282d; border: 1px solid #525151;
  border-radius: 6px; color: #eee; padding: 10px 11px; font-size: 14px; line-height: 1.5;
  height: 88px; min-height: 88px; resize: vertical; margin: 0;
}
.comment-form textarea:focus { border-color: #02d5bd; outline: 0; }
/* 1.2.3 (E1): dòng trạng thái sau khi gửi của lõi (.cf-status do
   minicms.js điền + gắn is-ok/is-err) — bản cũ chỉ là chữ hồng trần
   (kể cả khi THÀNH CÔNG) nằm lạc giữa ô nhập và nút Gửi, sát mép
   trái như bị cắt chữ. Nay là banner gọn trong khung form: nền
   tint theo kết quả, bo góc, đủ padding 2 phía, không tràn. */
.comment-form .cf-status {
  display: block; box-sizing: border-box; width: 100%;
  margin: 10px 0 0; padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere;
  background: #2b2b30; border: 1px solid #4a4a50; color: #ddd;
}
.comment-form .cf-status[hidden] { display: none; }
.comment-form .cf-status.is-ok { background: #1d3a2a; border-color: #369e69; color: #b7e4c7; }
.comment-form .cf-status.is-err { background: #3a1d1d; border-color: #b73a3a; color: #f3c1c1; }
.comment-form .cf-submit { margin: 2px 0 0; }
.comment-form .cf-submit button {
  display: inline-flex; align-items: center; gap: 7px;
  background: #369e69; color: #fff; border: 0; border-bottom: 3px solid #256e49;
  border-radius: 5px; padding: 9px 22px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.comment-form .cf-submit button svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .comment-form .cf-submit button:hover { opacity: .85; } }
.comment-form .comments-closed { color: #bbb; margin: 0; }
/* Form sau khi bị JS lõi dời vào trong 1 bình luận (đang trả lời):
   đóng khung riêng để tách khỏi nội dung bình luận cha. */
.list-comment .comment-form {
  background: #232327; border: 1px solid #3a3a40; border-radius: 6px;
  padding: 12px; margin: 10px 0 4px;
}
/* Dòng thông tin member phía trên form bình luận (1.2.1): chip
   pill gọn nền tối + viền, thay cho dòng chữ cam trần nằm dưới
   nút Gửi ở bản cũ. */
/* Dòng thông tin member trên form bình luận (1.2.6, điểm F1):
   bản cũ là 1 pill TEXT THÔ ("<tên> (Bạn), Cấp…, Linh Thạch:…,
   Cảnh Giới:…") chữ cam wrap 2 dòng cao 50px. Nay: HÀNG CHIP 1
   dòng — avatar mini 24px + tên màu theo cấp (class name_* dùng
   chung item bình luận) + chip Cảnh Giới .cmt-chip + chip Cấp +
   chip Linh Thạch kèm icon; không wrap (chật cực đoan thì cuộn
   ngang ẩn thanh cuộn, tên co ellipsis trước). */
.cmt-self {
  /* 1.2.7 (điểm 1): BỎ nowrap + overflow-x auto — với mọi chip
     flex:none, tên là phần tử co được duy nhất nên bị bóp còn
     17px ("a...", đo t7 đúng bộ dữ liệu live). Nay flex-wrap:
     wrap + gap 5px: tên giữ trọn bề ngang tự nhiên ở dòng 1,
     chip Linh Thạch (rộng nhất) tự xuống dòng 2 — không đè,
     không cắt, không cuộn ngang. */
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  overflow: visible; scrollbar-width: none;
  margin: 0 0 10px; padding-bottom: 2px;
}
.cmt-self::-webkit-scrollbar { display: none; }
.cmt-self-ava { flex: none; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; display: inline-flex; background: #333; }
.cmt-self-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmt-self-ava .cmt-letter { font-size: 12px; }
.cmt-self-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.cmt-self-tag { color: #999; font-size: 11.5px; flex: none; }
.cmt-self .cmt-chip { margin-left: 0; flex: none; }
.cmt-self-chip {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  background: #1e1e22; border: 1px solid #3a3a40; color: #ddd;
  border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
}
.cmt-self-chip .ah-ic { width: 12px; height: 12px; color: #ffb400; }
.list-comment { list-style: none; margin: 12px 0 0; padding: 0; }
.list-comment .comment { list-style: none; margin: 0 0 12px; }
/* Item bình luận (1.2.3, nhóm E4/F2): CẤU TRÚC chép hentaiqq —
   avatar + bong bóng (tên màu theo cấp + chip Cảnh Giới cạnh tên,
   nội dung) + hàng hành động (like / Trả lời / thời gian) + dòng
   "N phản hồi"; VỎ theo ngôn ngữ tối/teal của hhphim. */
.cmt-row { display: flex; gap: 10px; }
.cmt-avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #333; }
.cmt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cmt-letter { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #3a79af; color: #fff; font-weight: 800; font-size: 18px; }
.cmt-item { flex: 1; min-width: 0; }
.cmt-bubble { background: #17171a; border: 1px solid #333338; border-radius: 10px; padding: 8px 12px 10px; }
.cmt-name { color: #f2f2f2; font-weight: 700; font-size: 14px; }
/* MÀU TÊN + CHIP CẤP BẬC — 1.2.5 (việc 4) CHÉP ĐÚNG hentaiqq,
   thay bộ màu phẳng tự chế của 1.2.3 (Dũng yêu cầu hiển thị như
   hentaiqq): nguồn = CSS gốc của theme truyenqq (styles/style.css
   + minicms-bridge.css):
   - Tên member: name_1 = màu #0a86db; name_2..name_9 = GIF rank
     chạy chữ (assets/images/rank/*.gif chép nguyên từ truyenqq,
     background-clip:text đúng kỹ thuật gốc).
   - Tên staff: gradient neo màu chip gốc (bridge truyenqq):
     admin #ff2853 -> #ff8a5c; owner #bd10e0 -> #7a5cff.
   - Chip cấp bậc: KHÔNG nền đặc — viền 1px + chữ màu theo cấp
     (.title-user-comment của gốc): L1 #f18121, L2 #2196f3,
     L3 #009688, L4 #9c27b0, L5 #e00b87, L6 #1af26e, L7–L11 chữ
     gradient + viền theo màu neo; Admin #ff2853, Smod #bd10e0.
   Áp cho cả tên ở tường chat trang chủ (.chat-name) — cùng 1 hệ
   class name_N do plugin trả về. */
.cmt-name.name_1, .chat-name.name_1 { color: #0a86db; }
.cmt-name.name_2, .chat-name.name_2 { background-image: url(images/rank/2.gif); }
.cmt-name.name_3, .chat-name.name_3 { background-image: url(images/rank/3-1.gif); }
.cmt-name.name_4, .chat-name.name_4 { background-image: url(images/rank/4.gif); }
.cmt-name.name_5, .chat-name.name_5 { background-image: url(images/rank/5.gif); }
.cmt-name.name_6, .chat-name.name_6 { background-image: url(images/rank/6-1.gif); }
.cmt-name.name_7, .chat-name.name_7 { background-image: url(images/rank/7.gif); }
.cmt-name.name_8, .chat-name.name_8 { background-image: url(images/rank/8.gif); }
.cmt-name.name_9, .chat-name.name_9 { background-image: url(images/rank/9.gif); }
.cmt-name.name_2, .cmt-name.name_3, .cmt-name.name_4, .cmt-name.name_5,
.cmt-name.name_6, .cmt-name.name_7, .cmt-name.name_8, .cmt-name.name_9,
.chat-name.name_2, .chat-name.name_3, .chat-name.name_4, .chat-name.name_5,
.chat-name.name_6, .chat-name.name_7, .chat-name.name_8, .chat-name.name_9 {
  background-size: auto; background-position: center;
  color: transparent; -webkit-text-fill-color: transparent;
  -webkit-background-clip: text; background-clip: text;
}
.cmt-name.name_admin, .chat-name.name_admin { background-image: linear-gradient(90deg, #ff2853, #ff8a5c); color: transparent; -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-clip: text; }
.cmt-name.name_owner, .chat-name.name_owner { background-image: linear-gradient(90deg, #bd10e0, #7a5cff); color: transparent; -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-clip: text; }
.cmt-chip {
  /* 1.2.7 (điểm 1): margin-left 7px -> 5px — gap cụm tên+chip
     thống nhất 5px ở bề mặt inline (item bình luận); các hàng
     flex (chat, cmt-self, bxh) đã tự zero margin này. */
  display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 5px;
  border: 1px solid #8a8a92; background: transparent; color: #ccc;
  font-size: 11px; font-weight: 700; line-height: 1.55;
  vertical-align: 2px; white-space: nowrap;
}
.cmt-chip.level_1 { color: #f18121; border-color: #f18121; }
.cmt-chip.level_2 { color: #2196f3; border-color: #2196f3; }
.cmt-chip.level_3 { color: #009688; border-color: #009688; }
.cmt-chip.level_4 { color: #9c27b0; border-color: #9c27b0; }
.cmt-chip.level_5 { color: #e00b87; border-color: #e00b87; }
.cmt-chip.level_6 { color: #1af26e; border-color: #1af26e; }
.cmt-chip.level_7 { background: linear-gradient(90deg, #9C27B0 0%, #e822f2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; border-color: #9C27B0; }
.cmt-chip.level_8 { background: linear-gradient(90deg, #fdea0a 0%, #f8a50c 50%, #fd08ab 70%, #fd08ab 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; border-color: #f8a50c; }
.cmt-chip.level_9 { background: linear-gradient(-100deg, #e23e57 0%, rgba(131, 58, 180, 1) 25%, #fd1d1d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; border-color: #e23e57; }
.cmt-chip.level_10 { background: linear-gradient(90deg, #474747 0%, #999999 50%, #dadae0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; border-color: #999999; }
.cmt-chip.level_11 { background: linear-gradient(90deg, rgba(131, 58, 180, 1) 0%, rgba(253, 29, 29, 1) 50%, rgba(252, 176, 69, 1) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; border-color: #fd1d1d; }
.cmt-chip.title-admin { color: #ff2853; border-color: #ff2853; }
.cmt-chip.title-owner { color: #bd10e0; border-color: #bd10e0; }
.cmt-content { margin-top: 4px; color: #e6e6e6; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.cmt-content img.ph-emo, .boxchat-content img.ph-emo { max-width: 92px; max-height: 92px; vertical-align: middle; }
.cmt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 7px; font-size: 12.5px; color: #999; }
/* JS lõi dời #comment-form vào div gần nhất của nút Trả lời (có
   thể là chính .cmt-actions): cho form chiếm trọn 1 dòng riêng
   trong hàng hành động, không ép các nút like/trả lời co lại. */
.cmt-actions > .comment-form { flex: 1 1 100%; margin: 4px 0 2px; }
.ph-like { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: #999; }
.ph-like .ah-ic { width: 14px; height: 14px; }
.ph-like b { font-weight: 600; }
.ph-like:hover { color: #02d5bd; }
.ph-like.is-liked { color: #02d5bd; }
.reply-comment { color: #999; cursor: pointer; }
.reply-comment:hover { color: #02d5bd; }
.cmt-time { color: #888; font-size: 12px; }
.cmt-replies-toggle { color: #8fd8cf; cursor: pointer; font-size: 12.5px; margin-top: 7px; }
.cmt-replies-toggle:hover { color: #02d5bd; }
.comment-kids { margin: 10px 0 0 54px; padding: 0; }
@media (max-width: 560px) { .comment-kids { margin-left: 30px; } .cmt-avatar { flex-basis: 38px; width: 38px; height: 38px; } }
.link-btn { background: none; border: 0; color: #02d5bd; cursor: pointer; padding: 4px 0; }

/* ---------- Sticker bình luận (nhóm C, cơ chế chép truyenqq):
   dải pack nằm TRONG #comment-form (đi theo form khi lõi dời đi
   trả lời), panel lưới treo ở <body> neo theo dải (không tổ tiên
   nào cắt được), vỏ tối/teal của hhphim. ---------- */
.ph-emo-strip { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.ph-emo-pack {
  width: 34px; height: 34px; padding: 3px; box-sizing: border-box;
  background: #28282d; border: 1px solid #4a4a50; border-radius: 8px; cursor: pointer;
}
.ph-emo-pack img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ph-emo-pack:hover, .ph-emo-pack.is-open { border-color: #02d5bd; }
.ph-emo-panel {
  position: absolute; z-index: 90; display: none; box-sizing: border-box;
  background: #232327; border: 1px solid #4a4a50; border-radius: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 55%); max-height: 300px; overflow-y: auto; padding: 8px;
}
.ph-emo-panel.open { display: block; }
.ph-emo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.ph-emo-cell { background: transparent; border: 0; border-radius: 6px; padding: 3px; cursor: pointer; }
.ph-emo-cell:hover { background: #333338; }
.ph-emo-cell img { width: 100%; height: auto; max-height: 46px; object-fit: contain; display: block; }

/* ---------- Trang cá nhân: nhiệm vụ ngày + đổi hệ (nhóm F1) ---------- */
.ah-mission-list { list-style: none; margin: 0; padding: 0; }
.ah-mission {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  border-bottom: 1px solid #333338;
}
.ah-mission:last-child { border-bottom: 0; }
.ah-mission-name { flex: 1; min-width: 0; color: #eee; font-size: 14px; }
.ah-mission-exp { color: #e8c48a; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ah-mission-state { color: #999; font-size: 13px; white-space: nowrap; }
.ah-mission-state.done { color: #02d5bd; }
.ah-mission-claim { padding: 6px 14px; font-size: 13px; }
.ah-rank-form { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ah-rank-form label { display: inline-flex; align-items: center; gap: 7px; color: #bbb; font-size: 13.5px; margin: 0; }
.ah-rank-form select {
  background: #28282d; color: #eee; border: 1px solid #525151; border-radius: 6px;
  padding: 7px 9px; font-size: 13.5px; margin: 0; width: auto;
}

/* ---------- Trang tĩnh / auth / members ---------- */
.ah-auth-card {
  max-width: 460px; margin: 18px auto; background: #232327; border: 1px solid #3a3a40;
  border-top: 3px solid #02d5bd; /* 1.2.12: viền nhấn teal trên thẻ auth */
  border-radius: 12px; padding: 20px;
}
.ah-auth-card h1 { margin: 0 0 14px; font-size: 20px; color: #fff; text-align: center; }
/* Auth (1.2.12): nút nộp form full-width trong thẻ auth; hàng link
   dưới form — "Đăng ký" ở trang đăng nhập thành NÚT RIÊNG nền teal
   nổi rõ (bản cũ là link chữ thường bị gãy dòng), "Đăng nhập" ở
   trang đăng ký thành nút viền teal. Markup do members sinh, theme
   chỉ style qua CSS (không sửa plugin). */
.ah-auth-card .mb-wrap .mb-btn { width: 100%; }
.ah-auth-card .mb-links { margin: 14px 0 0; text-align: center; color: #999; font-size: 13.5px; line-height: 2; }
.ah-auth-card .mb-links a[href*="dang-ky"] {
  display: inline-block; margin-left: 8px; padding: 8px 22px; border-radius: 8px;
  background: linear-gradient(180deg, #02d5bd, #02ab97); color: #05302a;
  font-weight: 800; border-bottom: 3px solid #01796a; line-height: 1.3;
}
@media (hover: hover) and (pointer: fine) { .ah-auth-card .mb-links a[href*="dang-ky"]:hover { filter: brightness(1.08); color: #05302a; } }
.ah-auth-card .mb-links a[href*="dang-nhap"] {
  display: inline-block; margin-left: 8px; padding: 7px 20px; border-radius: 8px;
  border: 1px solid #02d5bd; color: #02d5bd; font-weight: 700; line-height: 1.3;
}
.ah-auth-card .mb-links a[href*="dang-nhap"]:hover { background: #02d5bd; color: #05302a; }
.ah-static .ah-content { color: #ddd; }
.ah-auth-card input[type="text"], .ah-auth-card input[type="email"], .ah-auth-card input[type="password"],
.ah-frame input[type="text"], .ah-frame input[type="email"], .ah-frame input[type="password"],
.ah-frame textarea, .ah-frame select {
  width: 100%; background: #141416; border: 1px solid #404040; border-radius: 6px;
  color: #eee; padding: 9px 11px; margin: 4px 0 10px; font-size: 14px;
}
.ah-auth-card button[type="submit"], .ah-auth-card input[type="submit"],
.ah-frame button[type="submit"], .ah-frame input[type="submit"] {
  background: #369e69; color: #fff; border: 0; border-bottom: 3px solid #256e49;
  border-radius: 5px; padding: 9px 22px; font-weight: 700; cursor: pointer;
}
.ah-auth-card label, .ah-frame label { color: #bbb; }
.ah-404 { text-align: center; padding: 34px 14px; }
.ah-404 h1 { font-size: 54px; margin: 0 0 6px; color: #02d5bd; }

/* ---------- Ads ---------- */
.ah-ad-wrap { max-width: 1050px; margin: 0 auto 12px; text-align: center; }
.ad-label { display: block; color: #888; font-size: 11px; padding: 4px 0; }
.phim-catfish { position: fixed; left: 0; right: 0; z-index: 55; text-align: center; }
.phim-catfish-top { top: 50px; }
.phim-catfish-bottom { bottom: 0; }

/* ---------- Footer (dựng lại 1.2.12) ----------
   3 tầng: thương hiệu căn giữa (logo + giới thiệu + liên hệ QC) ->
   hàng cột link (Khám Phá / Menu Chính / Chính Sách — cột nào
   không có dữ liệu CMS thì template không render) -> thanh bản
   quyền có viền trên riêng. Mobile: cột co 2/hàng, căn trái. */
.ah_footer {
  max-width: 1050px; margin: 0 auto; border-top: 1px solid #525151; color: #999;
  padding: 20px 16px 0;
}
.ah-foot-brand { text-align: center; margin-bottom: 16px; }
.ah-foot-logo { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.ah-foot-intro { max-width: 560px; margin: 4px auto; font-size: 13.5px; line-height: 1.55; }
.ah-foot-contact { margin: 4px 0; font-size: 13px; }
.ah-foot-cols {
  display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: center;
  padding: 14px 0 16px; border-top: 1px solid #333338;
}
.ah-foot-col { min-width: 130px; display: flex; flex-direction: column; gap: 7px; }
.ah-foot-col h4 {
  margin: 0 0 3px; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .6px; color: #02d5bd;
}
.ah-foot-col a { color: #bbb; font-size: 13.5px; }
.ah-foot-col a:hover { color: #02d5bd; }
.ah-foot-bottom {
  border-top: 1px solid #333338; text-align: center;
  padding: 12px 0 20px; font-size: 13px;
}
.ah-foot-bottom p { margin: 0; }
@media (max-width: 560px) {
  .ah-foot-cols { justify-content: flex-start; }
  .ah-foot-col { min-width: 42%; }
}
#top-up {
  position: fixed; right: 14px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%;
  background: #02d5bd; color: #06302a; display: flex; align-items: center; justify-content: center;
  font-weight: 800; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
#ah_toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
  background: #17171a; border: 1px solid #02d5bd; color: #eee; padding: 10px 18px;
  border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.6); max-width: 92vw; text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 859px) {
  /* Panel MenuHeader mobile: link 3 cột. */
  .tab-panel-in a { flex-basis: 30%; }
  .ah-top-cols { grid-template-columns: 1fr; }
  .ah-profile-stats { grid-template-columns: repeat(2, 1fr); }
  .ah-profile-head { flex-direction: column; }
  /* Topbar 360px: logo + search + tài khoản phải vừa 1 hàng — search
     là flex item nên cần min-width:0 mới co được, logo/nút thu nhỏ. */
  .ah-topbar-in { gap: 8px; padding: 0 8px; }
  /* 1.2.6 (điểm K): logo 17px -> 20px. 1.2.12: form tìm KHÔNG còn
     nằm trong topbar (chuyển vào panel xổ) nên bỏ rule thu 232px —
     panel dùng max-width riêng 720px ở mọi bề ngang. */
  .ah-logo { font-size: 20px; }
  .ah-account { flex-shrink: 0; }
  .ah-btn-login { padding: 6px 9px; font-size: 13px; }
}

/* ---------- Icon SVG (1.0.1) — glyph Material Icons Round trích nguyên từ
   font demo hhninja load (materialiconsround v73), thay toàn bộ icon dạng
   text/emoji trước đây. Mặc định 1em = đúng cỡ glyph chữ cũ tại chỗ đó;
   các nút theo demo thì lấy cỡ icon của demo. ---------- */
.ah-ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex: none; }
.button-default .ah-ic { width: 24px; height: 24px; vertical-align: -7px; }
.ah-search button .ah-ic { width: 24px; height: 24px; vertical-align: middle; }
#top-up .ah-ic { width: 24px; height: 24px; }
.page_redirect .ah-ic { width: 20px; height: 20px; }

/* ---------- Trang Members (Tài Khoản / Đăng nhập / Đăng ký) — 1.2.2 điểm 10 ----------
   Markup + CSS nền do plugin members sinh (mb_css theo tông sáng
   của lõi). Theme ghi đè bằng selector specificity cao hơn
   (.ah-main .mb-wrap …) cho mọi control theo ngôn ngữ tối của
   theme: ô nhập #28282d viền #525151, focus teal; nút teal; ô
   thống kê .ac-stat cùng nhịp .ah-stat của Trang Cá Nhân; huy
   hiệu máy ảnh teal; checkbox tự chế; input file gốc ẩn thị giác
   (theme.js dựng bộ chọn ảnh .ah-filepick thay thế — input gốc
   vẫn nằm trong form và nộp file như cũ, nhãn hero bấm để đổi
   ảnh của members vẫn hoạt động). */
.ah-main .mb-wrap label { color: #e6e6e6; }
.ah-main .mb-wrap input[type="text"], .ah-main .mb-wrap input[type="email"],
.ah-main .mb-wrap input[type="password"], .ah-main .mb-wrap input[type="url"],
.ah-main .mb-wrap textarea {
  background: #28282d; border-color: #525151; border-radius: 6px; color: #f2f2f2;
}
.ah-main .mb-wrap input[type="text"]:focus, .ah-main .mb-wrap input[type="email"]:focus,
.ah-main .mb-wrap input[type="password"]:focus, .ah-main .mb-wrap input[type="url"]:focus,
.ah-main .mb-wrap textarea:focus { border-color: #02d5bd; outline: none; }
.ah-main .mb-wrap .mb-btn {
  background: linear-gradient(180deg, #02d5bd, #02ab97); color: #05302a; border-radius: 8px;
}
@media (hover: hover) and (pointer: fine) { .ah-main .mb-wrap .mb-btn:hover { filter: brightness(1.07); } }
.ah-main .mb-wrap .mb-sec { border-top-color: #3a3a40; }
.ah-main .mb-wrap .mb-alert.error { background: rgb(183 58 58 / 18%); color: #f3b1b1; border-color: #7e3434; }
.ah-main .mb-wrap .mb-alert.success { background: rgb(54 158 105 / 16%); color: #a9e5c3; border-color: #2c7f55; }
.ah-main .mb-wrap .ac-hero { background: #232327; border-color: #3a3a40; border-radius: 12px; }
.ah-main .mb-wrap .ac-cam { background: #02d5bd; color: #05302a; border-color: #232327; }
.ah-main .mb-wrap .ac-stat { background: #232327; border-color: #3a3a40; border-radius: 10px; padding: 12px 4px; }
.ah-main .mb-wrap .ac-stat b { font-size: 20px; color: #02d5bd; }
.ah-main .mb-wrap .ac-stat span { color: #999; font-size: 12.5px; }
/* Input file gốc: ẩn thị giác nhưng vẫn kích hoạt được qua label
   hero + bộ chọn tự chế (không display:none để JS xem trước của
   members và việc nộp form không bị ảnh hưởng). */
.ah-main .mb-wrap input[type="file"] {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); opacity: 0; overflow: hidden; white-space: nowrap;
}
.ah-filepick { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-weight: 400; }
.ah-filepick-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  background: #2c2c31; border: 1px solid #4c4c52; border-radius: 8px;
  color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.ah-filepick-btn:hover { border-color: #02d5bd; color: #02d5bd; }
.ah-filepick-btn .ah-ic { width: 16px; height: 16px; }
.ah-filepick-name { color: #9d9d9d; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Checkbox tự chế theo theme (thay ô vuông mặc định của trình duyệt). */
.ah-main .mb-wrap .mb-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 19px; height: 19px; margin: 0; border: 1.5px solid #6d6d74; border-radius: 5px;
  background: #28282d; cursor: pointer; position: relative;
}
.ah-main .mb-wrap .mb-check input[type="checkbox"]:checked { background: #02d5bd; border-color: #02d5bd; }
.ah-main .mb-wrap .mb-check input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5.5px; top: 2px; width: 5px; height: 9px;
  border: solid #05302a; border-width: 0 2.5px 2.5px 0; transform: rotate(42deg);
}
.ah-main .mb-wrap .mb-check input[type="checkbox"]:focus-visible { outline: 2px solid #02d5bd; outline-offset: 2px; }

/* ---------- Gợi ý tìm kiếm — bổ sung 1.2.2 điểm 11 ----------
   (Khung .ah-suggest có từ bản cũ; bổ sung: meta năm/tiến độ, trạng
   thái chọn bằng phím, dòng "Xem tất cả kết quả", dòng không có kết
   quả, giới hạn chiều cao cuộn.) */
.ah-suggest { max-height: min(70vh, 470px); overflow-y: auto; }
.ah-suggest a.active { background: #28282d; color: #02d5bd; }
.ah-suggest .sg-main { flex: 1; min-width: 0; }
.ah-suggest .sg-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-suggest .sg-meta { display: block; color: #999; font-size: 12px; margin-top: 1px; }
.ah-suggest .sg-nocover {
  width: 34px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center;
  border-radius: 3px; color: #e8e8e8; font-weight: 800; font-size: 15px;
}
.ah-suggest a.ah-suggest-all {
  justify-content: center; font-weight: 700; color: #02d5bd;
  border-top: 1px solid #333; padding: 9px 10px;
}
.ah-suggest-empty { padding: 12px 10px; text-align: center; color: #999; font-size: 13px; }

/* ================================================================
   1.2.5 — Rail Phim Hot trang chủ + tab trang Top + 2 mục cuối
   trang chi tiết/xem (Phim Liên Quan / Phim Ngẫu Nhiên).
   ================================================================ */
/* Rail cuộn ngang: track flex + scroll-snap; card giữ nguyên
   component .movie-item, chỉ thu bề ngang cố định nên hẹp hơn
   card lưới (lưới 2 cột mobile ~165px, rail 132px). */
.ah-hot { margin: 0 0 20px; }
.ah-hot-track {
  display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; padding: 6px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
.ah-hot-track .movie-item { flex: 0 0 158px; width: 158px; scroll-snap-align: start; }
@media (max-width: 560px) { .ah-hot-track .movie-item { flex-basis: 132px; width: 132px; } }
.ah-hot-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; padding: 0;
  background: #000; border: 1px solid #525151; color: #e8e8e8;
}
.ah-hot-nav:hover { border-color: #02d5bd; color: #02d5bd; }
.ah-hot-nav .ah-ic { width: 16px; height: 16px; }
/* 1.2.6 (điểm M, bắt từ ảnh test): ở 360 tiêu đề rail dài
   "Đánh Giá Cao" bị ellipsis cụt vì hàng ribbon chật — nén đồng
   bộ cả hàng ở mobile: chữ tiêu đề 15.5px, nút mũi tên 28px và
   nút xem tất cả cũng 28px (vẫn BẰNG nhau theo luật điểm B),
   padding nút thu lại. Desktop giữ nguyên 30px/17px. */
@media (max-width: 640px) {
  .ah-hot .ah-ribbon-title { font-size: 15.5px; }
  .ah-hot-nav { width: 28px; height: 28px; }
  .ah-hot .ah-topbtn { height: 28px; padding: 0 11px; font-size: 12.5px; }
  /* 1.2.7 (điểm 3): gap 48px toàn cục ép ribbon "Đánh Giá Cao"
     tới mức CẮT CỤT tiêu đề ở 360 (main còn 109px). Nới chỗ
     trong phạm vi rail mobile: gap 44 (mũi tên 40 + hở 4),
     padding main 20->12, side bỏ margin-right + gap 5, topbtn
     padding 9 — tổng nới ~30px, tiêu đề hiện đủ, mũi tên vẫn
     không đè nút ‹ (kiểm chứng đo ở RESULTS_127). */
  .ah-hot .ah-ribbon { gap: 44px; }
  .ah-hot .ah-ribbon-main { padding: 0 8px; }
  .ah-hot .ah-ribbon-side { gap: 5px; margin-right: 0; }
  .ah-hot .ah-topbtn { padding: 0 9px; }
  /* Mũi tên rail thu còn 32px (border 16, căn giữa dọc top 4px
     trên ribbon cao 40): nhường thêm 8px cho tiêu đề hết cụt mà
     khoảng hở tới nút ‹ vẫn ~12px. Ribbon thường (Mới Cập Nhật,
     trang danh sách) giữ mũi tên 40px gốc. */
  .ah-hot .ah-ribbon-main::after { border-width: 16px; top: 4px; }
}
/* Nút "Top Phim" (1.2.6, Dũng 10:44): pill cùng ngôn ngữ với 2 nút
   mũi tên tròn của ribbon — nền đen, viền + chữ teal, cao 30px
   bằng đúng nút tròn; hover lật nền teal/chữ tối như trạng thái
   active của theme. Bỏ hẳn khối chữ nhật đỏ .ah-chip23 cũ. */
.ah-topbtn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  background: #000; border: 1px solid #02d5bd; color: #02d5bd;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.ah-topbtn:hover { background: #02d5bd; color: #05302a; }
/* Tab cửa sổ trang Top Phim. 1.2.20 (vòng thiết kế lại /top-phim):
   SEGMENTED CONTROL 1 hàng — 5 ô flex đều nhau phủ kín ngang trong
   1 khung pill, KHÔNG wrap (bản cũ pill rời + flex-wrap làm 4+1 rớt
   dòng ở 360 như ảnh Dũng chụp 17:07). Ô active nền teal chữ trắng
   đậm; ô thường chữ xám trên nền khung #1b1b1e. */
.ah-top-tabs {
  display: flex; flex-wrap: nowrap; gap: 2px; margin: 2px 0 16px;
  background: #1b1b1e; border: 1px solid #3a3a40; border-radius: 999px; padding: 3px;
}
.ah-top-tab {
  flex: 1 1 0; min-width: 0; text-align: center;
  padding: 8px 2px; border-radius: 999px; text-decoration: none;
  background: transparent; border: 0; color: #b9b9be;
  font-size: 13.5px; font-weight: 700; line-height: 1.2; white-space: nowrap;
}
.ah-top-tab:hover { color: #02d5bd; }
.ah-top-tab.active { background: #02a08d; color: #fff; }
.ah-top-tab.active:hover { color: #fff; }
/* 2 mục chốt cuối trang chi tiết/xem: khung .ah-frame sẵn có +
   lưới card chuẩn; chỉ cần nhịp cách trên. */
.ah-more { margin-top: 16px; }
.ah-more .movie-grid { margin-top: 4px; }
/* ---------- Điểm 5: hàng copy trong popup Share ----------
   Gốc lỗi: modal Share nằm trong article.ah-frame nên rule generic
   ".ah-frame input[type=text]" (margin 4px 0 10px, padding/font
   khác) rò vào ô URL — margin dọc của ô làm hàng flex phình lên
   38+14 = 52px, nút Sao chép (flex item, stretch mặc định) bị kéo
   theo lên 52px trong khi ô chỉ cao 38px -> khối teal to gần gấp
   đôi. Vá: vô hiệu margin generic cho đúng ô này + KHÓA cả 2 phần
   tử cùng chiều cao 38px, nút giữ icon + chữ 1 dòng, không phình. */
.ah-share-copy { align-items: stretch; }
.ah-share-copy input[data-share-input] {
  margin: 0; height: 38px; padding: 8px 10px; font-size: 12.5px;
}
.ah-share-copy .ah-share-copybtn {
  height: 38px; padding: 0 14px; white-space: nowrap; justify-content: center;
}
/* ---------- Điểm 6: khung phân loại gộp + dải chip cuộn ngang ----
   Khung .rd-tile-duo mở rộng full-width lưới (1 / -1). Mỗi nhóm
   (Thể Loại/Năm/Quốc Gia/Đạo Diễn/Diễn Viên/Tên Khác) = 1 hàng:
   nhãn cố định + dải chip flex nowrap CUỘN NGANG (hết clamp +
   "Xem thêm"); mép phải dải chip mờ dần 26px (mask) báo hiệu còn
   chip — mờ nằm trên hộp hiển thị nên cuộn tới đâu vẫn thấy gợi ý.
   Placeholder "Đang cập nhật" hiện dạng .rd-duo-none (chữ mờ,
   không chip/link). */
.rd-tile-full { grid-column: 1 / -1; }
.rd-duo-chips {
  display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  flex: 1 1 auto; min-width: 0; gap: 5px; padding: 2px 0;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent 100%);
}
.rd-duo-chips::-webkit-scrollbar { display: none; }
.rd-duo-chips .rd-gchip, .rd-duo-chips .rd-aka-chip { flex: none; margin: 0; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; word-break: normal; }
/* Điểm 13: nút Theo Dõi bọc icon + nhãn trong 2 span — span nhãn bị flex
   sizing rộng hơn chữ thật khiến chữ căn giữa trong span, khoảng sơn
   icon–chữ phình 14.5px (các nút khác 5px) và cả cụm lệch trái. Cho 2 span
   display:contents để svg + text thành flex item trực tiếp của .rd-btn
   như mọi nút khác; JS vẫn query được [data-follow-icon]/[data-follow-label]. */
.ah-follow-ic, .rd-btn [data-follow-label] { display: contents; }
/* Điểm 13 (gốc thật): nhãn "Bỏ Theo Dõi" (chữ 72px @12.5 + icon 14 + gap 5
   + đệm 10 + viền 2 = 103px) KHÔNG vừa ô lưới 100px ở 360 nên wrap 2 dòng,
   cả cụm nút lệch hẳn. Cấm wrap nhãn nút hành động; mobile giảm cỡ chữ +
   letter-spacing để nhãn dài nhất vừa đúng 1 dòng (đo lại: ~98px ≤ 100px). */
.rd-btn { white-space: nowrap; }
@media (max-width: 640px) { .rd-btn { font-size: 12px; letter-spacing: -.3px; } }
.rd-duo-none { color: #8f8f8f; font-size: 13px; font-style: italic; padding: 2px 0; flex: 1 1 auto; min-width: 0; }
/* ---------- Điểm 10a: nút 2D trên ribbon mất nền đỏ ----------
   HTML nút là .ah-chip23.bg-red nhưng CSS chỉ có
   .button-default.bg-red + .rd-btn.bg-red — KHÔNG rule nào cho
   .ah-chip23.bg-red, trong khi .bg-blue lại là rule đứng riêng
   (trúng nút 3D) -> nút 2D render nền trong suốt/tối, 3D xanh
   bình thường. Thêm rule đối xứng đúng màu demo #b73a3a. (Setting
   thể loại ribbon_genre_left/right của 1.2.2 không đụng.) */
.ah-chip23.bg-red { background: #b73a3a; }
/* ---------- Điểm 10b: nhãn menu 6 ô sát mép ở 360 ----------
   Đo BEFORE trên t7 (khách): "Ngẫu Nhiên" dư 0.4/1.4px, "Đăng
   Nhập" dư 0.3/0.3px mỗi bên; ảnh live của Dũng còn thấy "Tổng
   Hợp" cắt mép trái. Thu nhãn 10.5 -> 9.5px + letter-spacing
   -.5px + đệm ngang tabbar 6 -> 4px: mọi nhãn dư >= 2px mỗi bên,
   không nhãn nào ellipsis (số đo AFTER trong RESULTS_125). Chỉ
   áp mobile <= 640px như block gốc, desktop giữ nguyên. */
@media (max-width: 640px) {
  .ah-tabbar { padding: 6px 4px 0; }
  .tab-cell .item-label { font-size: 9.5px; letter-spacing: -.5px; }
}
/* ---------- Điểm 11: panel Tổng Hợp gọn + popup cấp 2 ----------
   Panel không còn là tường nút: 4 lối tắt cố định (hàng chip đơn
   giản như .tab-panel-in cũ) + danh sách NHÓM dạng hàng gọn. Popup
   cấp 2 là lớp phủ căn giữa (như modal Share), hộp tối đa 400px,
   danh sách mục cuộn dọc tối đa 55vh — không bao giờ phá khung. */
/* 1.2.7 (điểm 8): hàng lối tắt CUỘN NGANG — bản cũ flex 1 1 18% +
   ellipsis làm 2 nhãn bị cắt ("Phim Sắp...", "Top Lượt ...", đo
   scrollW 111/98 > ô 83.5px). Nay: nowrap + overflow-x auto, chip
   flex:none hiện ĐỦ nhãn, mask mờ mép phải 26px như các hàng chip
   khác của theme (§ khung gộp chi tiết). */
.ah-cat-shortcuts {
  display: flex; flex-wrap: nowrap; gap: 6px; padding: 8px 0 2px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent 100%);
}
.ah-cat-shortcuts::-webkit-scrollbar { display: none; }
.ah-cat-shortcuts a {
  flex: none; box-sizing: border-box; text-align: center;
  padding: 9px 12px; background: #17171a; border: 1px solid #3a3a40;
  border-radius: 8px; font-size: 13.5px; color: #ddd;
  white-space: nowrap;
}
.ah-cat-shortcuts a:hover { border-color: #02d5bd; color: #02d5bd; text-decoration: none; }
.ah-cat-groups { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 2px; }
.ah-cat-group {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; background: #17171a; border: 1px solid #3a3a40;
  border-radius: 8px; color: #eee; font: inherit; font-size: 14px;
  font-weight: 700; cursor: pointer; text-align: left;
}
.ah-cat-group:hover { border-color: #02d5bd; }
.ah-cat-group .ah-cat-meta { margin-left: auto; color: #999; font-size: 12px; font-weight: 400; }
.ah-cat-group .ah-ic { width: 18px; height: 18px; color: #02d5bd; flex: none; }
.ah-cat-pop {
  position: fixed; inset: 0; z-index: 118; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ah-cat-pop[hidden] { display: none; }
.ah-cat-pop-box {
  width: min(400px, 100%); background: #232327; border: 1px solid #4a4a50;
  border-radius: 12px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.75);
}
.ah-cat-pop-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-bottom: 1px solid #3a3a40;
}
.ah-cat-pop-title { flex: 1; text-align: center; font-weight: 700; color: #fff; font-size: 15px; }
.ah-cat-pop-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: #2b2b30; border: 1px solid #4c4c52; color: #e8e8e8; cursor: pointer;
}
.ah-cat-pop-btn:hover { border-color: #02d5bd; color: #02d5bd; }
.ah-cat-pop-btn .ah-ic { width: 18px; height: 18px; }
/* 1.2.6 (điểm I): popup nhóm cấp 2 đổi từ LIST DỌC (tên trái, số
   phải, hộp cao 491px với 15 mục) sang CHIP NGANG flex-wrap — số
   đếm thành hậu tố mờ "· N" trong chip; hộp co theo nội dung,
   giữ max-height 55vh + cuộn khi nhóm quá dài. */
.ah-cat-pop-list { max-height: 55vh; overflow-y: auto; padding: 12px; display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start; }
.ah-cat-pop-list a {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 6px 11px; border-radius: 999px; background: #2b2b30;
  border: 1px solid #4c4c52; color: #e8e8e8; font-size: 13px; font-weight: 600;
}
.ah-cat-pop-list a:hover { border-color: #02d5bd; color: #02d5bd; text-decoration: none; }
.ah-cat-cnt { color: #999; font-size: 12px; font-weight: 400; }
.ah-cat-cnt::before { content: "·"; margin: 0 5px 0 7px; }

/* ---------- 1.2.6: ArtPlayer + lớp chờ + cổng TVC (port source18) ----------
   Khung .ah-player vốn là hộp 16:9; 2 lớp phủ nằm TRONG hộp (bản gốc
   /play phủ kín iframe = đúng hộp player này). Màu nhấn theo theme
   (teal #02d5bd) thay đỏ #e50914 của javhd; nhãn "Quảng cáo" giữ đỏ
   như quy ước source18. */
.ah-player { position: relative; }
.ah-artbox { position: relative; width: 100%; height: 100%; background: #000; }
#ah-art { position: absolute; inset: 0; }
#ah-art .art-video-player { width: 100%; height: 100%; }
/* 1.2.14: thanh điều khiển ArtPlayer TRÀN khỏi khung player ở bề
   rộng điện thoại (Dũng chụp thật 16:52 23/11: nút fullscreen ở
   mép phải bị cắt mất). Đo trên t7: 8 nút bề rộng cố định — trái:
   phát 46 + âm lượng 46 + giờ 105 = 197px; phải: chụp hình 46 +
   cài đặt 46 + PiP 46 + fullscreen web 46 + fullscreen 46 =
   230px; tổng 427px trong khi thanh chỉ rộng 290px (màn 360) /
   342px (màn 412). Nhóm phải không co được (mỗi nút min-width
   46px, flex-shrink 0, min-content của nhóm = 230px) -> tràn
   85–137px, bị .ah-player overflow:hidden cắt mất nút
   fullscreen. Phần còn lại của trang xem (deck, watch-bar, hộp
   thông tin) đo vừa khít ở cả 2 bề rộng — thủ phạm duy nhất là
   thanh này. Màn ≤520px: ẩn 3 nút phụ ít dùng trên mobile (chụp
   hình, PiP, fullscreen web — bản iOS vốn đã tắt cả 3 trong cấu
   hình player), thu nhẹ đệm nút + cỡ chữ giờ -> tổng ~273px,
   lọt hẳn cả 360 lẫn 412; desktop giữ nguyên đủ 8 nút. */
@media (max-width: 520px) {
  /* Chuỗi 4 class: CSS của ArtPlayer được artplayer.js chèn thành
     thẻ <style> SAU stylesheet của theme với độ ưu tiên ngang
     (0,3,0) cho .art-control display:flex — selector 3 class sẽ
     thua theo thứ tự tài liệu, phải nâng lên (0,4,0) mới thắng
     chắc (đã đo: bản 3 class bị flex đè, nút không ẩn). */
  .ah-player .art-video-player .art-controls .art-control-screenshot,
  .ah-player .art-video-player .art-controls .art-control-pip,
  .ah-player .art-video-player .art-controls .art-control-fullscreenWeb { display: none; }
  .ah-player .art-video-player .art-controls .art-control { padding-left: 4px; padding-right: 4px; min-width: 0; }
  .ah-player .art-video-player .art-controls .art-control-time { font-size: 12px; }
}
#ah-load { position: absolute; inset: 0; z-index: 5; background: #000; background-size: cover; background-position: center; box-shadow: inset 0 0 0 999px rgba(0,0,0,.6); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; transition: opacity .2s; }
#ah-load.is-hide { opacity: 0; visibility: hidden; }
#ah-load.is-mini { inset: auto; left: 10px; bottom: 10px; flex-direction: row; gap: 8px; background: rgba(0,0,0,.55); padding: 7px 12px 7px 9px; border-radius: 999px; justify-content: flex-start; box-shadow: none; }
#ah-load.is-mini .ah-spin { width: 18px; height: 18px; border-width: 2px; }
#ah-load.is-mini .ah-load-txt { font-size: 11px; }
#ah-load .ah-spin { width: 50px; height: 50px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: #02d5bd; animation: ahspin .7s linear infinite; box-sizing: border-box; }
.ah-load-txt { color: #eee; font-weight: 600; font-size: 13px; letter-spacing: .04em; }
@keyframes ahspin { to { transform: rotate(360deg); } }
#ah-tvc { position: absolute; inset: 0; z-index: 6; background: #000; }
#ah-tvc .ah-tvc-body { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#ah-tvc .ah-tvc-body video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
#ah-tvc .ah-tvc-tag { position: absolute; top: 10px; left: 10px; z-index: 4; display: flex; gap: 6px; align-items: center; pointer-events: none; }
#ah-tvc .ah-tvc-time { font-weight: 600; font-size: 11px; line-height: 1; color: #fff; background: rgba(0,0,0,.65); padding: 4px 8px; border-radius: 4px; }
#ah-tvc .ah-tvc-label { font-weight: 700; font-size: 11px; line-height: 1; color: #fff; background: rgba(225,29,72,.92); padding: 4px 10px; border-radius: 4px; }
#ah-tvc .ah-tvc-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 14px; background: linear-gradient(transparent, rgba(0,0,0,.7)); pointer-events: none; }
#ah-tvc .ah-tvc-bar > * { pointer-events: auto; }
#ah-tvc .ah-tvc-skip { border: 1px solid rgba(255,255,255,.4); border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 13px; line-height: 1; padding: 9px 14px; background: rgba(0,0,0,.72); color: #fff; }
#ah-tvc .ah-tvc-skip:disabled { cursor: default; opacity: .85; }
#ah-tvc .ah-tvc-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.22); z-index: 8; pointer-events: none; }
#ah-tvc .ah-tvc-progress i { display: block; height: 100%; width: 0; background: #02d5bd; }
#ah-tvc .ah-tvc-mute { position: relative; flex: none; width: 44px; height: 34px; border-radius: 4px; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.72); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
#ah-tvc .ah-tvc-mute[hidden] { display: none !important; }
#ah-tvc .ah-tvc-mute svg { display: block; }
#ah-tvc .ah-tvc-mute .ic-on { display: none; }
#ah-tvc .ah-tvc-mute.is-on .ic-on { display: block; }
#ah-tvc .ah-tvc-mute.is-on .ic-off { display: none; }

/* ================= 1.2.7 ================= */
/* (1) Cụm tên + chip ở dòng CHAT: gốc chung của khoảng trống vô
   lý là .cmt-chip còn margin-left (đã zero ở .cmt-self/.bxh-main
   nhưng sót ở chat) CỘNG với gap flex 5px -> 12px, và giờ còn
   padding-left 10px riêng -> chữ giờ cách chip 15px. Zero cả hai
   trong ngữ cảnh flex này: gap 5px của .box-chat-nickname là
   nguồn khoảng cách DUY NHẤT (tên->chip 5px, chip->giờ 5px). */
.box-chat-nickname .cmt-chip { margin-left: 0; }
.box-chat-nickname .Time-cmt-home { padding-left: 0; }

/* (5) Watch-bar: MÀU NỀN THEO CHỨC NĂNG (lưới 3 cột bằng nhau ở
   rule .ah-wb-actions phía trên). Theo Dõi = xanh dương #3a79af
   (tông nút Đảo Chiều/.bg-blue); trạng thái ĐÃ theo dõi (class
   is-following do template + theme.js gắn) = xanh ĐẬM hơn cùng
   họ #2e5f87, chỉ đổi nhãn. Thông tin = vàng #ffb400 (tông sao
   đánh giá của theme). [1.2.25: chữ Thông tin ĐỔI #212121 -> #fff
   theo lệnh Dũng — bệnh chữ đen trên nút filled y hệt nút Xem Từ
   Đầu đã sửa ở 1.2.24; 2 nút kề đều chữ trắng.] Báo lỗi = đỏ
   #b73a3a. Hover: sáng nhẹ + viền sáng, giữ nguyên màu chữ từng
   nút (ghi đè hover teal chung). */
.ah-wb-btn[data-follow-btn] { background: #3a79af; border-color: #2c5f88; color: #fff; }
.ah-wb-btn[data-follow-btn].is-following { background: #2e5f87; border-color: #22486a; color: #fff; }
.ah-wb-btn.wb-info { background: #ffb400; border-color: #cf9200; color: #fff; }
.ah-wb-btn[data-report-btn] { background: #b73a3a; border-color: #8c2c2c; color: #fff; }
/* 1.2.27: bỏ filter brightness(1.12) — nó làm NHẠT nền cả 3 nút filled
   (vàng #ffb400: tương phản chữ trắng 1.78 -> 1.53; xanh dương 4.63 ->
   3.79; đỏ 5.71 -> 4.74). Hover chỉ còn đổi viền. */
@media (hover: hover) and (pointer: fine) { .ah-wb-actions .ah-wb-btn:hover { border-color: rgb(255 255 255 / 45%); } }
.ah-wb-actions .ah-wb-btn[data-follow-btn]:hover,
.ah-wb-actions .ah-wb-btn[data-report-btn]:hover { color: #fff; }
.ah-wb-actions .ah-wb-btn.wb-info:hover { color: #fff; }

/* (6) Dòng tổng kết kết quả (trang tìm kiếm): pill tối có icon
   kính lúp teal + số lượng vàng đậm + từ khoá trắng — thay dòng
   .muted xám trơ trụi. Căn thẳng mép trái với ribbon (cùng hệ
   lề 0 của .ah-main), nhịp trên/dưới theo section (ribbon cách
   10px ở trên, lưới cách 12px ở dưới). */
.ah-result-line {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  margin: 0 0 12px; padding: 6px 13px 6px 11px;
  background: #1e1e22; border: 1px solid #3a3a40; border-radius: 999px;
  color: #d8d8d8; font-size: 13px; line-height: 1.35;
}
.ah-result-line .ah-ic { width: 15px; height: 15px; color: #02d5bd; flex: none; }
.ah-result-line b { color: #ffb400; font-weight: 800; }
.ah-result-line .ah-result-q {
  color: #fff; font-weight: 700; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* (7) Panel Ngẫu Nhiên: mini-card có poster (44x66, tỉ lệ 2:3
   như card chuẩn thu nhỏ) + tên clamp 2 dòng + meta nhỏ; hàng
   hành động: "Xem Ngẫu Nhiên" teal nổi bật + "Đổi lượt" viền
   (AJAX /phim/random-set, không reload). Danh sách cuộn dọc
   tối đa 46vh khi dài. Ghi đè rule link trơn của .tab-panel-in. */
.tab-panel-in.ah-rand-in { display: block; }
.ah-rand-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.ah-rand-go {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: #02d5bd; border: 0; border-radius: 9px; color: #05302a;
  font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.ah-rand-go .ah-ic { width: 17px; height: 17px; flex: none; }
@media (hover: hover) and (pointer: fine) { .ah-rand-go:hover { filter: brightness(1.08); } }
.ah-rand-new {
  flex: none; height: 38px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: #1e1e22; border: 1px solid #3a3a40; border-radius: 9px; color: #eee;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.ah-rand-new .ah-ic { width: 17px; height: 17px; color: #ffb400; flex: none; }
.ah-rand-new:hover { border-color: #02d5bd; }
.ah-rand-new[disabled] { opacity: .55; cursor: wait; }
.ah-rand-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 46vh; overflow-y: auto; scrollbar-width: thin;
}
.tab-panel-in a.ah-rand-card {
  display: flex; align-items: center; gap: 10px; width: 100%; flex: none;
  box-sizing: border-box; padding: 6px; text-decoration: none; text-align: left;
  background: #17171a; border: 1px solid #3a3a40; border-radius: 10px; color: #eee;
}
.tab-panel-in a.ah-rand-card:hover { background: #1e1e22; border-color: #02d5bd; color: #eee; }
.ah-rand-poster {
  flex: none; width: 44px; height: 66px; border-radius: 6px;
  overflow: hidden; background: #232327; display: block;
}
.ah-rand-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-rand-poster .no-cover {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 800; font-size: 17px;
}
.ah-rand-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ah-rand-name {
  color: #f0f0f0; font-size: 13.5px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.ah-rand-meta {
  color: #999; font-size: 12px; display: flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ah-rand-meta .ah-ic { width: 12px; height: 12px; color: #ffb400; flex: none; }
.ah-rand-meta .ah-rand-score { color: #ffb400; font-weight: 700; }

/* (9) Card 2 rail trang chủ: hàng chip trên về ĐÚNG 1 HÀNG —
   bản cũ wrap làm chip chất lượng tụt hàng 2 lệch hẳn (Dũng bắt
   trên live). Rail: nowrap; chip tập flex:none (không bị bóp),
   chip mới (lượt xem/hạng) neo phải, ellipsis chỉ là lưới an
   toàn cuối. Card LƯỚI giữ nguyên hành vi wrap của 1.2.6. */
.ah-hot-track .mi-chips-top { flex-wrap: nowrap; }
.ah-hot-track .mi-chip-ep { flex: none; }
.mi-chip-views { flex: 0 1 auto; margin-left: auto; }
.mi-chip-views .ah-ic { width: 12px; height: 12px; }
.mi-chip-rank {
  flex: none; margin-left: auto;
  background: #ffb400; color: #212121; font-weight: 800;
}

/* ================= 1.2.20 — Thiết kế lại /top-phim =================
   (lệnh Dũng 17:07 23/11: tab bọc 4+1 rớt dòng + card không số
   hạng, nhìn đơn sơ). Chip HẠNG trên poster card trang Top: đứng
   đầu hàng chip trên, TRƯỚC chip tập; hạng 4+ nền tối trung tính
   như chip thường, top 3 tô màu huy chương (vàng/bạc/đồng, chữ
   tối). Trang 1 lưới bắt đầu từ #4 (top 3 ở dải spotlight dưới)
   nên màu huy chương ở lưới chủ yếu gặp khi per trang < 4. */
.mi-chip-toprank { flex: none; font-weight: 800; }
.mi-chip-toprank.medal1 { background: #f5c518; color: #231a00; }
.mi-chip-toprank.medal2 { background: #cfd4d9; color: #1c1e22; }
.mi-chip-toprank.medal3 { background: #d08a4e; color: #241305; }
/* Dải TOP 3 nổi bật: desktop 3 cột poster lớn; viền poster + số
   hạng lớn theo màu huy chương; tên 2 dòng + dòng meta (tiến độ
   tập + lượt xem thật của cửa sổ). Mobile: xem block 1.2.21 ở
   dưới (podium 3 cột) — bản hàng ngang <=720px của 1.2.20 bị
   Dũng chê "lỏ" 19:54 23/11 (mỗi hàng cao 138px mà chữ chỉ
   chiếm phần trên, trống tối nửa dưới, 3 phim nuốt nửa màn). */
.ah-spot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 22px; }
.spot-item { min-width: 0; }
.ah-spot .spot-poster { border-width: 2px; }
.ah-spot .spot-r1 .spot-poster { border-color: #f5c518; }
.ah-spot .spot-r2 .spot-poster { border-color: #cfd4d9; }
.ah-spot .spot-r3 .spot-poster { border-color: #d08a4e; }
@media (hover: hover) and (pointer: fine) { .ah-spot .movie-item:hover .spot-poster { box-shadow: 0 6px 18px rgb(0 0 0 / 55%); } }
.spot-rank {
  position: absolute; left: 10px; bottom: 4px; z-index: 2; pointer-events: none;
  font-size: 46px; font-weight: 900; line-height: 1; color: #f5c518;
  text-shadow: 0 2px 12px rgb(0 0 0 / 85%), 0 0 2px rgb(0 0 0 / 60%);
}
.spot-r2 .spot-rank { color: #e8ecf0; }
.spot-r3 .spot-rank { color: #eda55f; }
.spot-info { margin-top: 8px; min-width: 0; }
.spot-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere;
  color: #f2f2f2; font-weight: 700; font-size: 15.5px; line-height: 1.35;
  text-decoration: none; text-align: left;
}
.spot-name:hover { color: #02d5bd; }
.spot-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: center; margin-top: 5px; font-size: 12.5px; color: #9d9d9d; }
.spot-ep { color: #02d5bd; font-weight: 700; }
.spot-views { display: inline-flex; align-items: center; gap: 4px; }
.spot-views .ah-ic { width: 13px; height: 13px; }
/* 1.2.21 — PODIUM 3 CỘT cho spotlight mobile (<=640px), thay
   hàng ngang của 1.2.20 (Dũng chê 19:54 23/11: "trên PC thì
   đẹp, trên mobile nhìn lỏ quá"). Mỗi cột = card thu nhỏ đúng
   ngôn ngữ lưới: poster 2:3 phủ kín cột (khung .mi-poster
   chung), viền huy chương giữ nguyên, SỐ HẠNG LỚN ở đáy poster
   thu thành CHIP "#N" góc trên-trái (đúng kiểu .mi-chip-toprank
   của lưới: nền huy chương, chữ tối); dưới poster: tên clamp 2
   dòng + 1 dòng meta (tiến độ tập + lượt xem rút gọn — chữ
   "lượt xem" nằm trong .spot-views-txt, ẩn ở mobile cho vừa 1
   dòng). Đo t7 @360: dải 438px -> ~218px. Desktop (>=641px)
   KHÔNG đổi: vẫn số hạng lớn + poster 333px như 1.2.20. */
@media (max-width: 640px) {
  .ah-spot { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
  .spot-item { display: block; }
  .spot-rank {
    top: 6px; left: 6px; bottom: auto;
    font-size: 11px; font-weight: 800; line-height: 1.45;
    padding: 2px 8px; border-radius: 20px;
    background: #f5c518; color: #231a00; text-shadow: none;
  }
  .spot-rank::before { content: "#"; }
  .spot-r2 .spot-rank { background: #cfd4d9; color: #1c1e22; }
  .spot-r3 .spot-rank { background: #d08a4e; color: #241305; }
  .spot-info { margin-top: 6px; }
  .spot-name { font-size: 13px; line-height: 1.3; }
  .spot-meta { flex-wrap: nowrap; gap: 4px 6px; margin-top: 3px; font-size: 11px; }
  .spot-views { white-space: nowrap; min-width: 0; }
  .spot-views .ah-ic { width: 12px; height: 12px; flex: none; }
  .spot-views-txt { display: none; }
  .ah-spot .mi-play { width: 40px; height: 40px; }
  .ah-spot .mi-play svg { width: 23px; height: 23px; }
}

/* ================= 1.2.8 =================
   Vòng thiết kế lại theo "phong cách mới" (lệnh Dũng 12:34–12:43
   23/11, từ ảnh live 1.2.7): (1) bỏ badge ✓ nổi trên chip tập ->
   trạng thái đã xem tích hợp trong thân chip; (2) nút Bộ/Lẻ thành
   pill tông tối viền/chữ màu; (3) Danh Sách Phần thành hàng pill
   ngang cuộn được; (4) Tìm Nhanh Tập dạng pill; (5) toast đếm
   ngược tự chuyển tập; (6) form Lọc Phim pill; (7) dải lọc trang
   list pill; (8) nới nhịp watch-bar; (9) hero Trang Cá Nhân ngang
   gọn + EXP mảnh + pill điểm danh/đổi hệ; (10) glyph Trailer đã
   sửa ở tầng path trong detail.html (dịch tam giác -0.42 đơn vị).
   Màu nền trang/khung GIỮ NGUYÊN toàn vòng. */

/* (1) Chip tập đã xem: BỎ hẳn vòng tròn ::after nổi (3 vòng sửa vị
   trí vẫn bị chê) — thay bằng viền teal mảnh + nền tint nhẹ + glyph
   MẮT 13px nằm CÙNG DÒNG chữ (chip chuyển sang flex căn giữa, glyph
   là ::before inline). Tập đang xem (.active, đỏ) vẫn nổi bật hơn
   hẳn và KHÔNG mang glyph mắt. Áp cả member (class từ template)
   lẫn khách (theme.js gắn class từ localStorage), cả trang chi
   tiết lẫn trang xem — 1 rule chung .rd-ep-list. */
.rd-ep-list a { display: flex; align-items: center; justify-content: center; gap: 5px; }
.rd-ep-list a.watched {
  background: #222227; border-color: rgb(2 213 189 / 45%); color: #9a9a9a;
}
.rd-ep-list a.watched::after { content: none; display: none; }
.rd-ep-list a.watched::before {
  content: ""; flex: none; width: 13px; height: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2302d5bd' d='M12 3.984C6.984 3.984 2.718 7.125.984 11.484C2.718 15.89 6.984 18.984 12 18.984C17.015 18.984 21.281 15.89 23.015 11.484C21.281 7.125 17.015 3.984 12 3.984ZM12 16.5C9.234 16.5 6.984 14.25 6.984 11.484C6.984 8.718 9.234 6.515 12 6.515C14.765 6.515 17.015 8.718 17.015 11.484C17.015 14.25 14.765 16.5 12 16.5ZM12 8.484C10.359 8.484 9 9.843 9 11.484C9 13.171 10.359 14.484 12 14.484C13.64 14.484 15 13.171 15 11.484C15 9.843 13.64 8.484 12 8.484Z'/%3E%3C/svg%3E");
  background-position: center; background-repeat: no-repeat; background-size: 13px 13px;
}
.rd-ep-list a.active::before { content: none; display: none; }

/* (2) Nút Bộ / Lẻ ở ribbon Mới Cập Nhật: pill tông tối như nút Top
   Phim (.ah-topbtn: nền tối + viền/chữ màu, cao 30px, radius 999)
   nhưng giữ mã màu nhận diện — Bộ viền/chữ đỏ trên nền tint đỏ rất
   nhẹ, Lẻ viền/chữ xanh trên nền tint xanh. Bản cũ: 2 khối chữ nhật
   đặc #b73a3a/#3a79af radius 5 lệch tông cả hàng ribbon. */
.ah-chip23 {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none;
}
.ah-chip23.bg-red { background: rgb(183 58 58 / 15%); border: 1px solid #b73a3a; color: #ff9d9d; }
.ah-chip23.bg-blue { background: rgb(58 121 175 / 15%); border: 1px solid #3a79af; color: #a9cdf0; }
.ah-chip23.bg-red:hover { background: #b73a3a; color: #fff; text-decoration: none; }
.ah-chip23.bg-blue:hover { background: #3a79af; color: #fff; text-decoration: none; }
@media (max-width: 767px) { .ah-chip23 { height: 28px; padding: 0 11px; font-size: 12.5px; } }

/* (3) Danh Sách Phần: hàng pill ngang 1 dòng, cuộn ngang khi nhiều
   phần (thay 2 nút full-width xếp dọc cao ~90px của bản cũ). Pill
   active = teal đặc như tab server; nhãn dài (nhóm hậu truyện
   không hậu tố -phan-) tự ellipsis ở 230px, tên đầy đủ ở title. */
.bind_row {
  display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto;
  text-align: left; padding-bottom: 2px; scrollbar-width: thin;
}
.bind_row a {
  flex: none; display: inline-flex; align-items: center; height: 32px;
  max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #2b2b30; border: 1px solid #4c4c52; color: #dedede;
  border-radius: 999px; padding: 0 14px; margin: 0; font-size: 13px; font-weight: 700;
}
.bind_row a.active { background: #02a08d; border-color: #02a08d; color: #fff; }
@media (hover: hover) and (pointer: fine) { .bind_row a:hover { border-color: #02d5bd; color: #02d5bd; opacity: 1; text-decoration: none; } }
.bind_row a.active:hover { color: #fff; }

/* (4) Tìm Nhanh Tập: ô nhập pill (radius 999, theo ngôn ngữ ô tìm
   kiếm header) + 2 nút pill màu chức năng đồng bộ watch-bar (Nhập
   Lại đỏ #b73a3a, Đảo Chiều xanh #3a79af — bỏ cạnh đáy 3D của
   .button-default). Chuẩn 1.2.1 giữ nguyên: 3 phần tử CÙNG cao
   (nay 38px), placeholder "Nhập số tập…" hiện đủ; trạng thái đang
   đảo vẫn viền teal inset + sáng nền. Áp cả chi tiết + trang xem
   (cùng partial). */
.ah-qf .ah-qf-head input[type="text"] {
  border-radius: 999px; height: 38px; padding: 0 16px;
}
.ah-qf-head .button-default {
  height: 38px; border-radius: 999px; padding: 0 16px;
  border: 1px solid #4c4c52; box-shadow: none; font-size: 13px;
}
.ah-qf-head [data-qf-reset] { background: #b73a3a; border-color: #8c2c2c; color: #fff; }
.ah-qf-head [data-qf-reverse] { background: #3a79af; border-color: #2c5f88; color: #fff; }
.ah-qf-head [data-qf-reverse].on { box-shadow: inset 0 0 0 2px #02d5bd; filter: brightness(1.3); }

/* (5) Toast đếm ngược tự chuyển tập (theme.js dựng): pill tối viền
   teal bám đáy giữa màn hình — icon skip_next + chữ "Sắp chuyển
   sang Tập X" + huy hiệu giây + nút Huỷ viền đỏ. Bấm thân toast =
   chuyển ngay; Huỷ = ở lại, không hỏi lại trong cùng tập. */
.ah-nextui {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 9990;
  display: flex; align-items: center; gap: 10px; max-width: min(94vw, 440px);
  background: #17171a; border: 1px solid #02d5bd; border-radius: 999px;
  padding: 7px 7px 7px 14px; box-shadow: 0 8px 28px rgb(0 0 0 / 55%);
  color: #f0f0f0; cursor: pointer; animation: ah-next-in .25s ease;
}
.ah-nextui[hidden] { display: none; }
.ah-nextui .ah-ic { width: 18px; height: 18px; color: #02d5bd; flex: none; }
.ah-nextui-txt { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-nextui-txt b { color: #02d5bd; }
.ah-nextui-sec {
  flex: none; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px;
  background: #02a08d; color: #fff; font-size: 12.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.ah-nextui-cancel {
  flex: none; height: 30px; padding: 0 12px; border-radius: 999px;
  background: transparent; border: 1px solid #b73a3a; color: #ff9d9d;
  font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.ah-nextui-cancel:hover { background: #b73a3a; color: #fff; }
@keyframes ah-next-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* (6) Form Lọc Phim: panel gọn, nhãn nhỏ in hoa gọn nhịp, mọi ô
   chọn = pill 40px ĐỒNG NHẤT (qua .ah-select-btn của dropdown tuỳ
   biến + select native dự phòng), nút Lọc Phim = pill teal ở cuối
   hàng (không full-width). Tên tham số + hành vi lọc giữ nguyên. */
.ah-filter { border-radius: 14px; padding: 14px; }
.ah-filter label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #a9a9a9; gap: 6px;
}
.ah-filter select { height: 40px; border-radius: 999px; padding: 0 14px; }
.ah-filter .ah-select-btn {
  height: 40px; border-radius: 999px; padding: 0 14px;
  background: #28282d; border-color: #4c4c52;
  font-size: 13.5px; font-weight: 600; text-transform: none; letter-spacing: 0;
}
.ah-filter .button-default {
  height: 40px; border-radius: 999px; padding: 0 22px; box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center;
}

/* (7) Dải lọc #filter-movie ở trang list: 4 nút thành pill 34px
   đều nhau (bản cũ chữ nhật xám radius 5, cao không đều theo chữ),
   active = teal đặc rõ; chip trong nhóm mở cũng bo pill đồng bộ. */
.ah-strip-btns { gap: 6px; }
.ah-strip-btns button {
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: #232327; border: 1px solid #4c4c52; color: #ddd;
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center;
}
.ah-strip-btns button.open { background: #02a08d; border-color: #02a08d; color: #fff; }
.ah-strip-group a { border-radius: 999px; padding: 5px 12px; }

/* (8) Watch-bar: nới nhịp hàng 3 nút — Dũng bắt trên live 1.2.7:
   nút gần như chạm nhau + chạm mép khung, nhãn "Bỏ Theo Dõi" ôm
   sát mép nút. Tăng gap lên 10px, giảm đệm ngang khung, cỡ chữ/
   icon nhỏ lại 1 nấc để khoảng trống icon/chữ tới mép nút rộng
   hẳn; lưới 3 cột bằng nhau + 3 màu chức năng 1.2.7 giữ nguyên. */
.ah-watch-bar { padding: 10px 10px 11px; }
.ah-wb-actions { gap: 10px; }
.ah-wb-btn { padding: 0 6px; gap: 5px; }
.ah-wb-btn .ah-ic { width: 15px; height: 15px; }
@media (max-width: 640px) { .ah-wb-btn { font-size: 10.5px; letter-spacing: -.4px; padding: 0 3px; gap: 4px; } .ah-wb-btn .ah-ic { width: 14px; height: 14px; } }

/* (9) Trang Cá Nhân: hero danh tính ngang gọn (xem profile.html).
   Avatar 84px bo góc 18px — hết cảnh avatar vuông khổng lồ + biển
   đen trống của bản cũ; chip danh tính pill; EXP thanh mảnh teal
   đặc (bỏ gradient hồng) + số cùng cụm; điểm danh pill teal/muted
   theo trạng thái; đổi hệ: nhãn 1 dòng trên + hàng select pill +
   nút Đổi hệ pill đen viền teal (ngôn ngữ .ah-topbtn). */
.ah-profile-head { display: block; padding: 14px; }
.ah-pf-top { display: flex; gap: 12px; align-items: center; }
.ah-profile-avatar { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 18px; }
.ah-avatar-letter.big { font-size: 30px; }
.ah-pf-id { flex: 1; min-width: 0; }
.ah-pf-id h1 { margin: 0 0 2px; font-size: 19px; color: #fff; line-height: 1.25; }
.ah-pf-sub { margin: 0 0 7px; color: #999; font-size: 12.5px; }
.ah-pf-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ah-pf-chip {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: #17171a; border: 1px solid #404040; border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 700; color: #ddd;
}
.ah-pf-chip .ah-ic { width: 13px; height: 13px; color: #ffb400; flex: none; }
.ah-pf-rankname.lv1 { color: #f18121; }
.ah-pf-rankname.lv2 { color: #2196f3; }
.ah-pf-rankname.lv3 { color: #009688; }
.ah-pf-rankname.lv4 { color: #9c27b0; }
.ah-pf-rankname.lv5 { color: #e00b87; }
.ah-pf-rankname.lv6 { color: #1af26e; }
.ah-pf-rankname.lv7, .ah-pf-rankname.lv8, .ah-pf-rankname.lv9,
.ah-pf-rankname.lv10, .ah-pf-rankname.lv11 { color: #02d5bd; }
.ah-pf-exp { margin-top: 12px; }
.ah-expbar { height: 6px; border-radius: 999px; max-width: none; margin: 0 0 5px; }
.ah-expbar span { background: #02a08d; border-radius: 999px; }
.ah-pf-expnum { margin: 0; font-size: 12.5px; color: #a9a9a9; }
.ah-pf-expnum b { color: #ddd; }
.ah-pf-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.ah-pf-checkin {
  height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: #02a08d; border: 1px solid #02a08d; color: #fff;
  font-weight: 700; font-size: 13px; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.ah-pf-checkin .ah-ic { width: 15px; height: 15px; }
.ah-pf-checkin.done { background: #232327; border-color: #3a3a40; color: #8d8d8d; cursor: default; }
.ah-rank-form {
  display: flex; flex-direction: column; gap: 6px; margin: 0;
  flex: 1 1 220px; min-width: 200px; flex-wrap: nowrap; align-items: stretch;
}
.ah-rank-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #a9a9a9; white-space: nowrap;
}
.ah-rank-row { display: flex; gap: 8px; align-items: center; }
.ah-rank-row .ah-select { flex: 1; min-width: 0; }
.ah-rank-form .ah-select-btn { height: 38px; border-radius: 999px; }
.ah-rank-btn {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: #000; border: 1px solid #02d5bd; color: #02d5bd;
  font-weight: 700; font-size: 13px; font-family: inherit; white-space: nowrap;
}
.ah-rank-btn:hover { background: #02d5bd; color: #05302a; }
/* Khối dưới trang cá nhân đồng bộ nhịp mới: ô thống kê bo 12px,
   nút Nhận thưởng nhiệm vụ thành pill. */
.ah-stat { border-radius: 12px; }
.ah-mission-claim { border-radius: 999px; }

/* ================= 1.2.22: CHỐNG iOS TỰ ZOOM KHI FOCUS Ô NHẬP =================
   iOS Safari tự phóng to màn hình khi focus vào ô nhập có
   font-size < 16px (luật cứng của iOS). Phủ 16px cho MỌI ô
   nhập focus được (input/textarea/select — gồm ô tìm kiếm ở
   panel search, Tìm Nhanh Tập, form bình luận lõi, chat box,
   form đăng nhập/đăng ký của members render trong khung theme,
   textarea modal Báo Lỗi, select trang lọc phim) nhưng CHỈ
   trên thiết bị cảm ứng (hover: none) để desktop giữ nguyên
   thiết kế từng component. !important vì nhiều rule component
   đang ghim 13–15px bằng selector mạnh hơn selector phần tử.
   Chỉ đổi cỡ chữ trong ô, không đổi kích thước ô (ô cao cố
   định như search pill 38px / chat 42px đã đo lại ở t7). */
@media (hover: none) {
  input, textarea, select { font-size: 16px !important; }
}
