/* ===== Tìm Quanh Đây — bản mẫu, mobile-first ===== */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fdf2f8;
  color: #1f2430;
  -webkit-text-size-adjust: 100%;
}

.khung {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 12px calc(20px + env(safe-area-inset-bottom));
}

.dauTrang { text-align: center; padding: 14px 4px 4px; }
.dauTrang h1 { margin: 0; font-size: clamp(26px, 7vw, 36px); color: #be185d; }
.phuDe { margin: 6px 0 0; color: #6b7280; font-size: 15px; }

.the {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
  box-shadow: 0 2px 10px rgba(190, 24, 93, 0.08);
}
.the h2 { margin: 0 0 12px; font-size: 20px; }

.nhan { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 15px; }
.moTa { color: #6b7280; font-size: 14px; margin: 4px 0; }
.loi { color: #dc2626; font-size: 14px; min-height: 18px; margin: 6px 0 0; }

input[type="text"], input[type="number"], input[type="tel"] {
  width: 100%;
  padding: 13px 12px;
  font-size: 17px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="tel"]:focus { border-color: #ec4899; outline: none; }

input[type="range"] { width: 100%; height: 40px; accent-color: #ec4899; }

/* Giới tính dạng 2 ô to */
.chonGioi { display: flex; gap: 10px; }
.oGioi {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  border: 2px solid #e5e7eb; border-radius: 12px;
  font-size: 17px; font-weight: 600; cursor: pointer;
}
.oGioi:has(input:checked) { border-color: #ec4899; background: #fdf2f8; }
.oGioi input { width: 20px; height: 20px; accent-color: #ec4899; }

/* Lưới emoji */
.luoiEmoji { display: flex; flex-wrap: wrap; gap: 8px; }
.nutEmoji {
  width: 52px; height: 52px;
  font-size: 28px; line-height: 1;
  border: 2px solid #e5e7eb; border-radius: 14px;
  background: #fff; cursor: pointer; padding: 0;
}
.nutEmoji.dangChon { border-color: #ec4899; background: #fdf2f8; transform: scale(1.06); }

/* Nút bấm */
.nutChinh, .nutLon, .nutPhu {
  display: block; width: 100%;
  border: none; border-radius: 14px; cursor: pointer;
  font-weight: 700; color: #fff; background: #ec4899;
  min-height: 54px; font-size: 18px; padding: 12px;
  margin-top: 14px;
}
.nutLon { min-height: 62px; font-size: 20px; background: #db2777; }
.nutPhu { background: #f3f4f6; color: #374151; border: 2px solid #e5e7eb; }
.nutChinh:active, .nutLon:active { transform: scale(0.99); }

/* Thẻ hồ sơ của tôi */
.hangHoSo { display: flex; gap: 14px; align-items: center; }
.avatarLon { font-size: 52px; line-height: 1; }
.loiChao { font-size: 19px; font-weight: 700; margin: 0 0 2px; }

.congTac { border-top: 1px dashed #e5e7eb; margin-top: 16px; padding-top: 12px; }
.hangCongTac { display: flex; align-items: center; gap: 10px; font-size: 16px; cursor: pointer; min-height: 40px; }
.hangCongTac input { width: 26px; height: 26px; accent-color: #ec4899; flex: none; }
.giaiThich { color: #6b7280; font-size: 13.5px; margin: 4px 0 0 36px; }

.trangThai { font-size: 14.5px; color: #374151; margin: 10px 0 0; }
.trangThai.macDinh { color: #b45309; }

/* Bộ lọc */
.doanChon { display: flex; gap: 8px; }
.doanChon button {
  flex: 1; min-height: 52px;
  font-size: 16px; font-weight: 600;
  border: 2px solid #e5e7eb; border-radius: 12px;
  background: #fff; cursor: pointer; padding: 8px 4px;
}
.doanChon button.dangChon { border-color: #ec4899; background: #ec4899; color: #fff; }

.haiCot { display: flex; gap: 10px; }
.haiCot > div { flex: 1; }

/* Kết quả */
.nhanDemo {
  background: #fef3c7; border: 1px solid #f59e0b; color: #92400e;
  border-radius: 10px; padding: 10px 12px; font-size: 14.5px; font-weight: 600;
  margin: 0 0 12px;
}
.danhSach { display: flex; flex-direction: column; gap: 10px; }
.theNguoi {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid #f3f4f6; border-radius: 14px; padding: 12px;
}
.theNguoi .avatarLon { font-size: 46px; }
.thongTinNguoi { flex: 1; min-width: 0; }
.tenNguoi { font-size: 18px; font-weight: 700; margin: 0; }
.chiTietNguoi { margin: 2px 0 0; color: #6b7280; font-size: 14.5px; }
.cotPhai { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.huyHieuKm {
  background: #fdf2f8; color: #be185d; font-weight: 700;
  border-radius: 999px; padding: 5px 10px; font-size: 14px; white-space: nowrap;
}
.nutChao {
  border: 2px solid #ec4899; background: #fff; color: #be185d;
  font-weight: 700; font-size: 15px; border-radius: 999px;
  min-height: 44px; padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.goiY { color: #6b7280; font-size: 15px; text-align: center; padding: 8px 0; }

.chanTrang { text-align: center; color: #6b7280; font-size: 13.5px; padding: 16px 8px 4px; }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(92vw, 560px);
  background: #111827; color: #fff;
  border-radius: 12px; padding: 14px 16px; font-size: 15.5px; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 50;
}
.an { display: none !important; }

/* ===== v2: luồng số điện thoại + OTP ===== */
#inpOTP {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 8px;
}
.maHien {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 5px;
  color: #b45309;
  white-space: nowrap;
}
.hangGuiLai { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.nutPhu.nho { width: auto; min-height: 48px; margin-top: 0; padding: 10px 16px; font-size: 15.5px; }
.nutDangXuat { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 380px) {
  .the { padding: 13px; }
  .nutChao { padding: 8px 10px; font-size: 14px; }
  .avatarLon { font-size: 42px; }
}

/* ============ V4: khung 5 tab + tầng xã hội + tiện ích ============ */

/* Textarea (ô đăng bài) — bám kiểu chung với input */
textarea {
  width: 100%;
  min-height: var(--cham);
  padding: 12px 14px;
  font-size: 17px;
  font-family: inherit;
  color: var(--chu);
  background: var(--nen);
  border: 2px solid var(--vien);
  border-radius: var(--bo);
  resize: vertical;
  -webkit-tap-highlight-color: transparent;
}

textarea:focus-visible {
  outline: 3px solid var(--xanh);
  outline-offset: 2px;
}

/* Khi thanh tab hiện, chừa khoảng dưới để nội dung không bị che */
.khung.coTab {
  padding-bottom: 96px;
}

/* Thanh tab đáy cố định kiểu Zalo */
.thanhTab {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: var(--the);
  border-top: 2px solid var(--vien);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.10);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabBtn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px 2px;
  background: none;
  border: none;
  color: var(--chu-mo);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tabBtn .tabIcon {
  font-size: 23px;
  line-height: 1.1;
}
.tabBtn.dangChon {
  color: var(--xanh);
}

/* Thẻ người dùng chung (danh bạ / bạn bè / trò chuyện / chặn) */
.cotPhai {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  max-width: 46%;
}
.hangHaiNut {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hangHaiNut .nutChinh.nho,
.hangHaiNut .nutPhu.nho {
  width: 100%;
}
.theNguoi.bamDuoc {
  cursor: pointer;
}
.gioNho {
  font-size: 12px;
  color: var(--chu-mo);
  white-space: nowrap;
}
.chamChuaDoc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hong);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

/* Nút chính cỡ nhỏ (khớp .nutPhu.nho) */
.nutChinh.nho {
  width: auto;
  min-height: 48px;
  margin-top: 0;
  padding: 10px 16px;
  font-size: 15.5px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Màn chat */
.dauChat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--vien);
  margin-bottom: 10px;
}
.dauChat .thongTinNguoi {
  min-width: 0;
}
.avatarChat {
  font-size: 36px;
  line-height: 1.1;
  flex: 0 0 auto;
}
.dauChat .nutDangXuat {
  margin-left: auto;
}
.hopTinNhan {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 6px 2px;
}
.dongTin {
  display: flex;
}
.dongTin.cuaToi {
  justify-content: flex-end;
}
.dongTin.cuaHo {
  justify-content: flex-start;
}
.bongBong {
  max-width: 78%;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}
.dongTin.cuaToi .bongBong {
  background: var(--xanh);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.dongTin.cuaHo .bongBong {
  background: var(--nen);
  border: 1px solid var(--vien);
  border-bottom-left-radius: 4px;
}
.gioTin {
  margin-top: 3px;
  font-size: 11px;
  opacity: 0.75;
  text-align: right;
}
.dongTin.cuaHo .gioTin {
  text-align: left;
}
.hangNhapChat {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.hangNhapChat input {
  flex: 1 1 auto;
  min-width: 0;
}
.nutGuiTin {
  width: auto;
  flex: 0 0 auto;
  padding: 10px 16px;
  white-space: nowrap;
}

/* Tường nhà */
.theBaiDang {
  background: var(--the);
  border: 1px solid var(--vien);
  border-radius: var(--bo);
  padding: 12px;
}
.dauBaiDang {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.noiDungBai {
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* Lưới tiện ích ô vuông (tab Khám phá) */
.luoiTienIch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.oTienIch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 76px;
  padding: 10px 4px;
  background: var(--nen);
  border: 1px solid var(--vien);
  border-radius: var(--bo);
  color: var(--chu);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.oTienIch .iconTienIch {
  font-size: 28px;
  line-height: 1.1;
}
.chiTietTienIch {
  margin-top: 12px;
  padding: 12px;
  background: var(--nen);
  border: 1px solid var(--vien);
  border-radius: var(--bo);
}
.soLonTienIch {
  font-size: 30px;
  font-weight: 800;
  color: var(--xanh-dam);
  margin-bottom: 4px;
}
.dongTienIch {
  font-size: 16px;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 1px dashed var(--vien);
}
.dongTienIch:last-of-type {
  border-bottom: none;
}
.dongTinTuc {
  display: block;
  padding: 9px 2px;
  border-bottom: 1px solid var(--vien);
  color: var(--xanh-dam);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
}
.dongTinTuc:last-child {
  border-bottom: none;
}

/* Khối công tắc riêng tư sát trên (không kẻ đường phân cách thừa) */
.congTac.khongVienTren {
  border-top: none;
  margin-top: 4px;
  padding-top: 4px;
}
.tieuDeCon {
  font-size: 17px;
  margin: 18px 0 10px;
}

/* ============ V4.1: Gói VIP (màu cứng theo tông chung, không phụ thuộc biến) ============ */
.dsGoiVip { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.theGoiVip {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid #fde68a; background: #fffbeb;
  border-radius: 14px; padding: 12px;
}
.giaGoi { font-size: 21px; font-weight: 800; color: #b45309; margin: 2px 0 0; }
.panelThanhToan {
  border: 2px dashed #f59e0b; background: #fffbeb;
  border-radius: 14px; padding: 12px; margin-top: 14px;
}
.panelThanhToan .tieuDeCon { margin-top: 2px; }
.maDonLon {
  font-size: 27px; font-weight: 800; letter-spacing: 2px;
  color: #b45309; text-align: center; margin: 8px 0 4px;
  overflow-wrap: break-word;
}
.theDonVip {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid #f3f4f6; border-radius: 14px; padding: 12px;
}
.huyHieuSao { color: #f59e0b; font-size: 16px; }
#bannerHetLuot .nutChinh.nho { display: inline-block; margin-left: 8px; vertical-align: middle; }
#dsDonVip { margin-top: 10px; }
#btnDonCuaToi { margin-top: 14px; }

/* ============ V4.2: Nút thanh toán MoMo / ZaloPay ============ */
.nutMomo { background: #a50064; }
.nutZaloPay { background: #0068ff; }
.nutMomo:disabled, .nutZaloPay:disabled { background: #9ca3af; }
#pcMoLai { display: inline-block; text-decoration: none; margin-top: 6px; }

/* ===== V5: GỌI THOẠI / VIDEO + MEDIA TRONG CHAT ===== */
.nutMedia { font-size: 17px; padding: 6px 9px; }
.nutMedia.dangGhi { background: #e53935; color: #fff; animation: nhapNhayGhi 1s infinite; }
@keyframes nhapNhayGhi { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.hopGhiAm {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding: 8px; border: 1px dashed var(--xanh, #1e88e5);
  border-radius: 12px; background: rgba(30, 136, 229, .06);
}
.nhanGhiAm { font-size: 14px; font-weight: 600; }
.audioXemTruoc { flex: 1 1 160px; height: 36px; }
.anhTrongChat { display: block; max-width: 220px; width: 100%; border-radius: 10px; cursor: pointer; }
.amTrongChat { width: 210px; max-width: 100%; height: 38px; display: block; }

/* V5 bổ sung (19:18): video trong bong bóng + thanh tiến trình tải lên */
.videoTrongChat { width: 100%; max-width: 230px; border-radius: 10px; display: block; background: #000; }
.hopTaiLen { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #eef4ff; border-top: 1px solid #dbe7f7; }
.hopTaiLen.an { display: none !important; }
.thanhNenTaiLen { flex: 1; height: 8px; background: #d5e2f5; border-radius: 99px; overflow: hidden; }
#thanhTienTrinh { height: 100%; width: 0%; background: #0084ff; border-radius: 99px; transition: width 0.15s linear; }
#nhanTaiLen { font-size: 12px; color: #333; white-space: nowrap; }
.tepTrongChat { color: inherit; font-weight: 600; text-decoration: underline; word-break: break-all; }
.metaTep { display: block; font-size: 12px; opacity: .8; margin-top: 2px; }
.lopPhuGoi {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(10, 16, 28, .88);
  display: flex; align-items: center; justify-content: center;
}
.theGoiDen { text-align: center; color: #fff; padding: 24px; }
.nhanGoiDen { font-size: 16px; opacity: .85; margin: 0 0 14px; }
.avatarGoiLon { font-size: 84px; line-height: 1.1; }
.tenGoiLon { font-size: 24px; font-weight: 700; margin: 10px 0 4px; color: #fff; }
.hangNutGoi { display: flex; gap: 26px; justify-content: center; margin-top: 26px; }
.nutGoi {
  width: 74px; height: 74px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 26px; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.nutGoi span { font-size: 11px; font-weight: 600; }
.nutGoiXanh { background: #2eaf4a; }
.nutGoiDo { background: #e53935; }
.nutGoiXam { background: rgba(255, 255, 255, .22); }
.nutGoiXam.tat { background: #e53935; }
.manGoi { flex-direction: column; }
.videoXa { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.videoGan {
  position: absolute; right: 14px; top: 14px; width: 104px; height: 140px;
  object-fit: cover; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .7); background: #222; z-index: 3;
}
.avatarDangGoi { position: absolute; top: 34%; left: 0; right: 0; text-align: center; }
.dauManGoi { position: absolute; top: 18px; left: 0; right: 0; text-align: center; z-index: 2; }
.trangThaiGoi { color: #fff; opacity: .85; margin: 2px 0; font-size: 15px; }
.dieuKhienGoi { position: absolute; bottom: 30px; left: 0; right: 0; z-index: 2; margin-top: 0; }

/* ============ V5.1: TRUNG TÂM CÁ NHÂN (hub kiểu Zalo) ============ */

/* Thẻ hồ sơ trên cùng + nút bánh răng Cài đặt */
.theHub { position: relative; }
.nutBanhRang {
  position: absolute; top: -6px; right: -6px;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: transparent; font-size: 24px; cursor: pointer;
}
.thongTinHub { flex: 1; min-width: 0; }
.bongTrangThai {
  display: inline-block; max-width: 100%;
  margin: 2px 0 4px; padding: 5px 12px;
  border: 1.5px solid #e5e7eb; border-radius: 999px;
  background: #f9fafb; color: #6b7280; font-size: 14px;
  cursor: pointer; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bongTrangThai.coTrangThai { color: #1f2430; background: #fdf2f8; border-color: #f9a8d4; }
#hopSuaTrangThai { margin-top: 12px; }
#hopSuaTrangThai .hangHaiNut { margin-top: 8px; }

/* Danh sách menu (Cá nhân + Cài đặt) */
.dsMenuCaNhan { display: flex; flex-direction: column; margin-top: 14px; background: #fff; border-radius: 16px; box-shadow: 0 2px 10px rgba(190, 24, 93, 0.08); overflow: hidden; }
.mucMenu {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 16px;
  background: transparent; border: none; border-bottom: 1px solid #f3f4f6;
  font-family: inherit; text-align: left; cursor: pointer; min-height: 60px;
}
.mucMenu:last-child { border-bottom: none; }
.mucMenu:active { background: #fdf2f8; }
.iconMenu { font-size: 24px; flex: none; width: 30px; text-align: center; }
.chuMenu { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chuMenu strong { font-size: 16.5px; color: #1f2430; font-weight: 600; }
.chuMenu small { font-size: 13px; color: #6b7280; margin-top: 1px; }
.chevronMenu { font-size: 24px; color: #9ca3af; flex: none; }

/* Trang con trong tab Cá nhân */
.trangCon { margin-top: 4px; }
.dauTrangCon { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.dauTrangCon h3 { margin: 0; font-size: 20px; }
.trangCon .dsMenuCaNhan { box-shadow: none; border: 1px solid #f3f4f6; }
.nutDangXuatLon {
  display: block; width: 100%; margin-top: 18px; min-height: 54px;
  background: #fff; color: #dc2626; font-size: 17px; font-weight: 700;
  border: 2px solid #fecaca; border-radius: 14px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(190, 24, 93, 0.08);
}
.chonSelect {
  width: 100%; padding: 13px 12px; font-size: 16px;
  border: 2px solid #e5e7eb; border-radius: 12px; background: #fff;
}
.tenAppLon { font-size: 30px; font-weight: 800; color: #be185d; margin: 8px 0 4px; }
.mucFaq { border-top: 1px dashed #e5e7eb; padding: 10px 0; }
.mucFaq summary { font-weight: 600; font-size: 15.5px; cursor: pointer; min-height: 32px; }
.mucFaq p { color: #4b5563; font-size: 14.5px; margin: 6px 0 2px; line-height: 1.5; }

/* Nút Lưu dưới mỗi tin nhắn trong chat */
.nutLuuTin {
  align-self: flex-end; flex: none;
  margin-left: 6px; padding: 3px 8px;
  border: none; border-radius: 999px;
  background: transparent; color: #9ca3af; font-size: 12px; cursor: pointer;
}
.nutLuuTin:active { background: #fdf2f8; color: #be185d; }
/* Cài đặt "Hiện giờ dưới tin nhắn" tắt -> ẩn hẳn dòng giờ */
body.anGioTin .gioTin { display: none; }

/* Thẻ mục đã lưu (Tài liệu của tôi) + dòng media trong hCloud */
.theMucLuu {
  background: #fff; border: 1px solid #f3f4f6; border-radius: 14px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.noiDungLuuChu { margin: 0; font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: break-word; }
.theMucLuu .nutPhu.nho { align-self: flex-end; }

/* Ví QR */
.theViQR {
  background: #fff; border: 1px solid #f3f4f6; border-radius: 14px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.anhViQR { width: 190px; max-width: 100%; border-radius: 10px; border: 1px solid #e5e7eb; cursor: zoom-in; align-self: center; }
.noiDungViQR { margin: 0; font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: break-word; }
.theViQR .nutPhu.nho { align-self: flex-end; }

/* hCloud */
.luoiDamMay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oDamMay { min-width: 0; }
.anhDamMay { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; cursor: zoom-in; display: block; }
.videoDamMay { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; background: #000; display: block; }
.metaDamMay { overflow-wrap: break-word; }

/* hStyle: ô chọn nền + xem trước */
.luoiNenGoi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 10px; }
.oNenGoi {
  height: 74px; border-radius: 12px; border: 3px solid #e5e7eb;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 6px; cursor: pointer; font-family: inherit;
  color: #fff; font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6);
  background: #374151;
}
.oNenGoi.dangChon { border-color: #ec4899; }
.oNenGoi.nenMacDinh { background: #1f2937; }
.nen-grad-1 { background: linear-gradient(160deg, #7c3aed, #db2777) !important; }
.nen-grad-2 { background: linear-gradient(160deg, #0ea5e9, #22c55e) !important; }
.nen-grad-3 { background: linear-gradient(160deg, #f97316, #ef4444) !important; }
.nen-grad-4 { background: linear-gradient(160deg, #0f766e, #134e4a) !important; }
.xemTruocNenGoi {
  height: 150px; border-radius: 14px; margin-top: 12px;
  background: #1f2937; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px; text-shadow: 0 1px 4px rgba(0,0,0,.7);
}

/* Nền cuộc gọi đến theo hStyle (áp lên lớp phủ cuộc gọi đến) */
#hopGoiDen.nen-grad-1, #hopGoiDen.nen-grad-2, #hopGoiDen.nen-grad-3, #hopGoiDen.nen-grad-4 {
  background-color: transparent;
}
#hopGoiDen[style*="background-image"] .theGoiDen { text-shadow: 0 1px 4px rgba(0,0,0,.75); }

/* Màn hình khóa PIN */
.lopPhuKhoa {
  position: fixed; inset: 0; z-index: 2000;
  background: #fdf2f8;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.theKhoaPin {
  background: #fff; border-radius: 18px; padding: 26px 20px;
  max-width: 360px; width: 100%; text-align: center;
  box-shadow: 0 8px 30px rgba(190, 24, 93, 0.15);
}
.theKhoaPin h2 { margin: 6px 0; }
#inpKhoaPin { text-align: center; font-size: 24px; letter-spacing: 6px; margin: 10px 0; }

/* ===== V5.1: GIAO DIỆN TỐI (html.toi) ===== */
html.toi body { background: #101319; color: #e5e7eb; }
html.toi .the { background: #1b1f2a; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
html.toi .dauTrang h1 { color: #f472b6; }
html.toi .phuDe, html.toi .moTa, html.toi .giaiThich, html.toi .goiY, html.toi .chanTrang { color: #9aa3b2; }
html.toi input[type="text"], html.toi input[type="number"], html.toi input[type="tel"],
html.toi input[type="password"], html.toi textarea, html.toi .chonSelect {
  background: #232837; color: #f3f4f6; border-color: #39415a;
}
html.toi .oGioi { border-color: #39415a; }
html.toi .oGioi:has(input:checked) { border-color: #ec4899; background: #2b2130; }
html.toi .nutPhu { background: #232837; color: #e5e7eb; border-color: #39415a; }
html.toi .nutDangXuat { color: #fca5a5; border-color: #7f1d1d; background: #2b1a1e; }
html.toi .dsMenuCaNhan { background: #1b1f2a; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
html.toi .mucMenu { border-bottom-color: #262c3d; }
html.toi .mucMenu:active { background: #2b2130; }
html.toi .chuMenu strong { color: #f3f4f6; }
html.toi .chuMenu small { color: #9aa3b2; }
html.toi .bongTrangThai { background: #232837; border-color: #39415a; color: #9aa3b2; }
html.toi .bongTrangThai.coTrangThai { background: #2b2130; border-color: #9d2464; color: #f3f4f6; }
html.toi .congTac { border-top-color: #262c3d; }
html.toi .theMucLuu, html.toi .theViQR { background: #1b1f2a; border-color: #262c3d; }
html.toi .nutDangXuatLon { background: #1b1f2a; border-color: #7f1d1d; color: #f87171; }
html.toi .mucFaq { border-top-color: #262c3d; }
html.toi .mucFaq p { color: #c3cad6; }
html.toi .trangCon .dsMenuCaNhan { border-color: #262c3d; }
html.toi .lopPhuKhoa { background: #101319; }
html.toi .theKhoaPin { background: #1b1f2a; }
html.toi .thanhTab { background: #1b1f2a; border-top-color: #262c3d; }
html.toi .tenAppLon { color: #f472b6; }
