/* Bản 14 · agent man-nho · chỉ sửa trong file này
   Mục tiêu: mọi cỡ màn điện thoại (320–430 rộng, 568–932 cao) và màn ngang (667x375, 844x390).
   Không đổi chữ, không đổi màu, giữ hiệu ứng. Chữ xuống dòng / chữ to do fix-chu-zoom.css lo. */

/* ---------- 1 · Nút Thư ký A.I nổi (.g10-fab) không che phần cuối trang ----------
   Nút nằm cách đáy 98px, cao 48px → chừa đủ chỗ dưới cùng để cuộn hết nội dung qua khỏi nút. */
.appv .ab{padding-bottom:calc(170px + env(safe-area-inset-bottom))!important}

/* ---------- 2 · Bàn phím ảo: ô nhập được cuộn tới không nằm dưới thanh dính đỉnh/đáy ---------- */
input,textarea,select{scroll-margin-top:96px;scroll-margin-bottom:140px}
/* Hộp thoại theo chiều cao thật của màn (khi bàn phím bật hay thanh địa chỉ co giãn) */
#sheet{max-height:92vh;max-height:92dvh!important}
#sheet .shc{overscroll-behavior:contain}

/* ---------- 3 · Thẻ thành viên trang chủ ở màn hẹp (≤360) ---------- */
@media (max-width:360px){
  .card10{padding:16px 16px!important}
  .card10 .r1{gap:10px}
  .card10 .r1 em{letter-spacing:.18em!important;min-width:0}
  .card10 .co{font-size:25px!important}
  .card10 .no{flex-wrap:wrap;row-gap:6px}
  .memo10-h{gap:8px;flex-wrap:wrap;row-gap:4px}
}

/* ---------- 4 · Màn mở đầu trên màn thấp (cao ≤ 700): nút chính lên gần giữa màn (luật 22) ---------- */
@media (max-height:700px) and (orientation:portrait){
  .i10{padding-top:22px!important;padding-bottom:40px!important}
  .i10-line{margin-bottom:16px!important}
  .i10-logo b{font-size:46px!important}
  .i10-logo small{margin-top:8px!important}
  .i10-tel{margin-top:18px!important}
  .i10-hi{margin-top:18px!important}
  .i10-h{margin-top:10px!important;font-size:27px!important}
  .i10-h i{font-size:31px!important;margin-top:4px!important}
  .i10-sub{margin-top:14px!important;font-size:16px!important}
  .i10-cta{margin-top:22px!important}
}
@media (max-height:600px) and (orientation:portrait){
  .i10{padding-top:14px!important}
  .i10-line{margin-bottom:10px!important}
  .i10-logo b{font-size:38px!important}
  .i10-logo small{letter-spacing:.32em!important}
  .i10-tel{margin-top:12px!important}
  .i10-hi{margin-top:12px!important}
  .i10-h{font-size:24px!important}
  .i10-h i{font-size:27px!important}
  .i10-sub{margin-top:10px!important;line-height:1.45!important}
  .i10-cta{margin-top:16px!important}
}

/* ---------- 5 · Màn ngang (cao ≤ 500) ---------- */
@media (max-height:500px) and (orientation:landscape){
  /* 5a · Màn mở đầu: 2 cột. Trái = logo, phải = câu chính + nút chính ngay dưới */
  .i10{max-width:820px!important;min-height:100vh;display:grid!important;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);
    column-gap:36px;align-content:center;padding:18px 28px 18px!important}
  .i10-line,.i10-logo,.i10-tel{grid-column:1}
  .i10-hi,.i10-h,.i10-sub,.i10 .vps,.i10-cta{grid-column:2}
  .i10-line{grid-row:1;align-self:end;margin-bottom:14px!important}
  .i10-logo{grid-row:2 / span 3;align-self:start}
  .i10-tel{grid-row:5;align-self:start;margin-top:14px!important}
  .i10-hi{grid-row:1;margin-top:0!important}
  .i10-h{grid-row:2;margin-top:8px!important;font-size:24px!important}
  .i10-h i{font-size:27px!important;margin-top:2px!important}
  .i10-sub{grid-row:3;margin-top:8px!important;font-size:15px!important;line-height:1.45!important}
  .i10 .vps{grid-row:4}
  .i10-cta{grid-row:5;margin-top:14px!important}
  .i10-logo b{font-size:44px!important}

  /* 5b · Thanh dính đỉnh/đáy gọn lại để còn chỗ cho nội dung */
  .formbar{padding-top:8px!important;padding-bottom:8px!important;margin-bottom:14px!important}
  .formbar .row{margin-bottom:6px!important}
  .foot-nav{padding-top:8px!important;padding-bottom:calc(8px + env(safe-area-inset-bottom))!important}
  .foot-nav .back{min-width:48px!important;min-height:48px!important}
  .foot-nav .btn{min-height:48px;padding-top:10px!important;padding-bottom:10px!important}
  .ah{min-height:52px!important;padding-top:6px!important;padding-bottom:6px!important}
  .top10{padding-top:8px!important;padding-bottom:8px!important}

  /* 5c · Nút Thư ký nổi: về sát đáy, nhỏ lại, nằm ngoài cột nội dung khi đủ rộng */
  .g10-fab{bottom:calc(12px + env(safe-area-inset-bottom))!important;width:44px!important;height:44px!important;right:max(10px,env(safe-area-inset-right))!important}
  body:has(.dock7,.appv .fab) .g10-fab{bottom:calc(80px + env(safe-area-inset-bottom))!important}
  .appv .ab{padding-bottom:calc(90px + env(safe-area-inset-bottom))!important}
  .appv .ab:has(.fab){padding-bottom:calc(130px + env(safe-area-inset-bottom))!important}

  /* 5d · Hộp thoại: gần hết chiều cao, nút đóng không mất */
  #sheet{max-height:96dvh!important}
  #sheet .shc{padding-top:16px!important}
}

/* ---------- 6 · Thanh đầu + thanh đáy trang chủ ở màn hẹp (≤360): không để tên công ty dựng 4 dòng ---------- */
@media (max-width:360px){
  .top10{gap:8px!important;padding-left:14px!important;padding-right:12px!important}
  .top10>b{font-size:16px!important}
  .top10>span{letter-spacing:.02em!important;padding-left:8px!important}
  .top10>button{gap:4px!important;padding-left:0!important;padding-right:0!important}
  .dock7{gap:6px!important;padding-left:10px!important;padding-right:10px!important;max-width:calc(100vw - 20px)}
  .dk7{padding-right:10px!important}
}

/* ---------- 7 · Bàn phím ảo bật (Android co màn còn ≤ 300px cao): thả các thanh dính để ô nhập không bị kẹp giữa ---------- */
@media (max-height:300px){
  .formbar,.ah,.top10,.rp8-nav,.fw7-play .fw7-lock{position:relative!important;top:auto!important}
  .foot-nav{position:relative!important;bottom:auto!important}
  .g10-fab{width:40px!important;height:40px!important;bottom:8px!important}
  #toast{bottom:auto!important;top:8px!important}
}

/* ---------- 8 · Câu 6/6 (nút Kích hoạt): dòng đồng ý nằm trong thanh đáy cố định ----------
   Gặp 30/11 ở 375x812: thanh đáy cao 229px mà trang chỉ chừa 130px → nửa dưới ô "Việc lặp lại nhiều nhất"
   bị che, cuộn không ra. Chữ dòng đồng ý nhỏ lại và chừa đủ chỗ cuộn. Từ 768px thanh đáy là sticky, không cần. */
.foot-nav .dy13{font-size:13px!important;line-height:1.45!important;margin:8px auto 0!important;max-width:716px}
@media (max-width:767px){#app>.wrap:has(+ .foot-nav .dy13){padding-bottom:calc(210px + env(safe-area-inset-bottom))!important}}
