/* Hà Lạc bản giao diện chốt (phiếu nhập v01, trang kết quả v05, 18/11/2026). Chỉ nạp ở trang /cong-cu/ha-lac. */
/* Phiếu nhập */
  /* C1. Bớt khoảng trống trên đường dẫn: 40px -> 14px */
  .wrap.section:has(> .ml-san){padding-top:14px}
  /* C2. Đường dẫn nền kem mờ, không bị hoa mai đè (cả máy tính và điện thoại) */
  nav.crumb{display:inline-block;white-space:nowrap;width:max-content;max-width:100%;background:rgba(248,244,236,.9);border-radius:8px;padding:3px 10px}
  /* C4. Dải "Xem lại lá số gần nhất" đầu phiếu: dùng lại .tv2-quay của Tử Vi */
  .ml-phieu > .tv2-quay{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
  /* C5. Khối Lần xem gần đây: bằng bề ngang phiếu, gấp lại một dòng, nút không bẻ dòng */
  #kq-lich-su{max-width:var(--hl-rong,880px);margin-left:auto;margin-right:auto}
  #kq-lich-su .btn.small{white-space:nowrap}
  #kq-lich-su > details > summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:15px}
  #kq-lich-su > details > summary::-webkit-details-marker{display:none}
  #kq-lich-su > details > summary::after{content:"▾";color:#8A6620}
  #kq-lich-su > details[open] > summary::after{content:"▴"}
  /* C6. Lá số đã lưu: tối đa 3 dòng, mỗi dòng một ô bấm, còn lại vào Hồ Sơ */
  .hl-da-luu{margin-top:4px;grid-column:1 / -1}
  .hl-da-luu .t{font-size:13px;color:#74665A;margin-bottom:6px}
  .hl-da-luu a.r{display:block;padding:9px 12px;border:1px solid #EAD9BD;border-radius:10px;background:#FDFBF6;color:#2B2118;text-decoration:none;margin-bottom:6px;min-height:42px}
  .hl-da-luu a.r b{display:block;font-weight:600;color:#79200F;font-size:14px}
  .hl-da-luu a.r span{display:block;color:#74665A;font-size:13px}
  .hl-da-luu a.het{display:block;text-align:right;font-size:13px;color:#79200F;font-weight:600;padding:4px 2px}
  .ml-phieu .hl-help-ngan{display:none}
  @media (min-width:641px){ .hl-da-luu{display:grid;grid-template-columns:repeat(3,1fr);gap:0 8px} .hl-da-luu .t,.hl-da-luu a.het{grid-column:1 / -1} }
  @media (max-width:640px){
    /* D1. Bỏ hoa sen, mây; tiêu đề 24px một dòng; đầu trang nền kem mờ để chữ không bị hoa mai đè */
    .ml-sen,.ml-san-dau .ml-may{display:none!important}
    .ml-san{padding-top:4px}
    .ml-san-dau{margin-bottom:10px;background:rgba(248,244,236,.86);border-radius:12px;padding:6px 8px}
    .ml-san-dau h1{font-size:24px!important;white-space:nowrap;line-height:1.25}
    .ml-san-dau p{font-size:13px;line-height:1.4;margin-top:2px}
    /* D2. Dải giờ một dòng: giờ · ngày âm · giờ can chi · tiết. Bấm để mở đủ */
    #dong-ho{cursor:pointer;margin-bottom:10px}
    #dong-ho:not(.dh-mo) .dh-dong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12.5px}
    #dong-ho:not(.dh-mo) [data-dh=duong],#dong-ho:not(.dh-mo) [data-dh=ngay],#dong-ho:not(.dh-mo) [data-dh=con],#dong-ho:not(.dh-mo) .dh-chu{display:none}
    #dong-ho:not(.dh-mo) [data-dh=am]::before,#dong-ho:not(.dh-mo) [data-dh=chi]::before,#dong-ho:not(.dh-mo) [data-dh=tiet]::before{content:" · ";font-weight:400}
    /* D3. Giờ sinh một hàng; Phút sinh + Hạn năm chung một hàng; hướng dẫn 2 dòng */
    .ml-gio-luoi{grid-template-columns:1fr 1fr!important;gap:10px!important}
    .ml-gio-luoi > .field:first-child{grid-column:1 / -1}
    .ml-phieu .hl-help-ngan{display:block}
    .ml-phieu .hl-help-dai{display:none}
    #tool-form{padding-top:14px}
    .ml-phan{margin-bottom:6px}
    /* C4 trên điện thoại: một dòng, bỏ tên quẻ */
    .ml-phieu > .tv2-quay{padding:8px 10px!important}
    .ml-phieu > .tv2-quay .tv2-quay-di{font-size:15px;text-align:left}
    .ml-phieu > .tv2-quay .tv2-quay-khong{font-size:12.5px;white-space:nowrap}
    .hl-que-ngan{display:none}
  }
/* Trang kết quả */
  /* K1. Bỏ đường dẫn ở trang kết quả (như Tử Vi đã chốt) */
  .wrap.section:has(.result) > nav.crumb{display:none}
  /* K2. Thanh tên + nút: bỏ dòng thông tin lặp, nút cao 34px, điện thoại hiện nút Sửa */
  .tv2-thanh .tv2-thanh-tt{display:none}
  .tv2-thanh{padding:10px 14px!important;gap:8px!important}
  .tv2-thanh .tv2-n,.tv2-thanh .tv2-tai,.tv2-thanh .kk-chuyen-n{min-height:34px!important;height:34px;padding-top:0!important;padding-bottom:0!important}
  .tv2-thanh .tv2-sua-nut{display:inline-flex!important}
  /* K5. Hai quẻ: ghi Vận n (chỉ NĐ được đánh dấu, không đánh dấu chặng đang đi); Tam Phúc Thần giữ màu cũ */
  .hl2-hao .hl-van{font-weight:600;color:#4F4234}
  .hl2-hao small,.hl2-hao .hl2-hao-nam b{white-space:nowrap}
  /* Nhãn CÓ / KHÔNG CÓ luôn nằm đáy ô, ba ô thẳng một hàng */
  .hl2-phuc{align-items:stretch!important}
  .hl2-phuc > div{display:flex!important;flex-direction:column;align-items:center}
  .hl2-phuc > div > em{margin-top:auto!important;white-space:nowrap;border:1px solid transparent;box-sizing:border-box}
  .hl2-phuc > .co{border:1px solid transparent!important}
  /* K5b. Hai quẻ liền nhau: 2 đoạn mời mở chương gom xuống khối "Đọc sâu hai quẻ" */
  .hl-doc-sau{margin:12px 0 16px;background:#FDFBF6;border:1px solid #EAD9BD;border-radius:14px;padding:14px 16px}
  .hl-doc-sau > .t{font-size:12px;letter-spacing:.14em;font-weight:700;color:#8A6620;margin-bottom:8px}
  .hl-doc-sau .hl2-he{background:#F1EADD;border-radius:12px;padding:12px 14px;margin:0 0 10px}
  .hl-doc-sau .hl2-he:last-child{margin-bottom:0}
  .hl-doc-sau .hl-nua{display:block;font-size:12px;font-weight:700;letter-spacing:.08em;color:#79200F;margin-bottom:4px}
  .hl-doc-sau .hl2-he p{font-size:14.5px;line-height:1.5;margin:0 0 8px}
  .hl-doc-sau .hl2-he small{display:block;margin-top:4px}
  @media (min-width:900px){.hl-doc-sau .hl-hai{display:grid;grid-template-columns:1fr 1fr;gap:12px}.hl-doc-sau .hl2-he{margin:0}}
  /* K5c. Máy tính: hai quẻ đời đầu, đời sau nằm ngang nhau, từng hàng thẳng nhau (subgrid) */
  @media (min-width:900px){
    #hai-que{display:grid!important;grid-template-columns:1fr 1fr;column-gap:20px;align-items:stretch}
    #hai-que > .hl2-que{display:grid!important;grid-row:span 8;grid-template-rows:subgrid;row-gap:0;align-content:start}
    #hai-que > .hl2-que > *{margin-top:0;margin-bottom:10px}
  }
  /* K8b. Gói dài hạn hiện sẵn; điện thoại thu gọn từng ô (không gấp) */
  @media (max-width:640px){
    .tv2-gdh-o{padding:12px 14px!important}
    .tv2-gdh-luoi{gap:10px!important}
    .tv2-gdh-o p:not(:first-of-type){margin:4px 0!important}
  }
  /* K6. Bốn trụ giữ chỗ cũ; phép cộng số gấp vào "Cách ra quẻ" */
  .hl-so-gon{margin-top:10px;font-size:14px;color:#4F4234}
  .hl-so-gon > span{display:block;line-height:1.6}
  .hl-so-gon b{font-family:Spectral,Lora,serif;color:#79200F;font-size:16px}
  details.hl-cach-ra{margin-top:8px}
  details.hl-cach-ra > summary{cursor:pointer;color:#79200F;font-weight:600;font-size:14px}
  /* K7. Vận trình chia tab, mỗi lúc một tầng */
  .hl-vt-tang{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 12px}
  .hl-vt-tang button{flex:none;font:600 13.5px Inter,sans-serif;border:1px solid #D8BF8A;background:#FDFBF6;color:#79200F;border-radius:16px;padding:6px 11px;cursor:pointer}
  .hl-vt-tang button{white-space:nowrap}
  .hl-vt-tang button.on{background:#79200F;border-color:#79200F;color:#FDFBF6}
  [data-hl-tang]:not(.hl-on){display:none!important}
  /* K10. Gói: gói dài hạn gấp lại */
  /* K11. Gộp các khối "Sắp mở" */
  .hl2-song,.tv2-tam-khoi{display:none!important}
  /* K14. Gấp phần Giới thiệu và Câu hỏi thường gặp */
  details.hl-seo > summary{cursor:pointer;font-family:Spectral,Lora,serif;font-size:20px;font-weight:600;color:#79200F;list-style:none;display:flex;justify-content:space-between}
  details.hl-seo > summary::after{content:"▾";color:#8A6620}
  details.hl-seo[open] > summary::after{content:"▴"}
  @media (max-width:640px){
    /* K3. Khối "đang ở đâu" gọn lại trên điện thoại */
    .hl2-hero{padding:14px 16px!important}
    .hl2-hero h2{font-size:20px!important;line-height:1.3!important;margin:4px 0!important}
    .hl2-hero p{font-size:14px!important;margin:4px 0!important}
    .hl2-hero .hl2-hero-pill{font-size:13px!important;padding:6px 10px!important}
    .hl2-hero .hl2-cam{min-height:40px;padding:8px 14px!important;font-size:14px!important}
    .hl2-dau .hl2-meta{font-size:13px}
    /* K5 điện thoại: Tam Phúc Thần thấp lại */
    .hl2-phuc > div{padding:8px 6px!important}
    .hl2-phuc > div span{display:none}
    .hl2-phuc > div{padding:8px 4px!important}
    .hl2-phuc > div > em{font-size:9px!important;letter-spacing:.02em!important;padding:3px 5px!important;max-width:100%}
    /* Hào: vạch hẹp lại để dòng "Vận n · tuổi" không bị nhãn NĐ che */
    .hl2-hao{grid-template-columns:20px 80px minmax(0,1fr) auto!important;column-gap:8px}
    /* K2 điện thoại: 5 nút một hàng */
    .tv2-thanh .tv2-thanh-nut{gap:6px!important;flex-wrap:nowrap}
    .tv2-thanh .tv2-n,.tv2-thanh .tv2-tai{padding-left:10px!important;padding-right:10px!important;font-size:13px!important;white-space:nowrap}
    .tv2-thanh .tv2-tai svg{display:none}
    .hl2-doi details > summary{white-space:nowrap}
  }
