/* Chùa Việt · kiểu dáng trang con, dùng chung biến màu của style.css */
body.nen-tri-tue{--nen-noi-dung:url(../img/nen-tri-tue.webp)}
body.nen-tu-tap{--nen-noi-dung:url(../img/nen-tu-tap.webp)}
body.nen-kham-pha{--nen-noi-dung:url(../img/nen-kham-pha.webp)}
body.nen-tien-ich{--nen-noi-dung:url(../img/nen-kham-pha.webp)}
main#noi-dung{position:relative;isolation:isolate}
main#noi-dung::before{content:"";position:absolute;inset:330px 0 0;z-index:-1;pointer-events:none;opacity:.84;background-image:linear-gradient(180deg,var(--nen) 0,transparent 9%,transparent 72%,var(--nen) 100%),var(--nen-noi-dung);background-size:100% 100%,100% auto;background-position:center top;background-repeat:no-repeat,repeat-y}
body.nen-tien-ich main#noi-dung::before{opacity:.38}
@media(max-width:720px){main#noi-dung::before{top:350px;opacity:.48;background-size:100% 100%,100% 950px}}
@media(max-width:720px){body.nen-tien-ich main#noi-dung::before{opacity:.18}}
body[class*="nen-"] footer.chan{margin-top:0}
body[class*="nen-"] footer.chan .chan__anh{background-image:url(../img/chan-trang-con-hoang-hon.webp);background-position:center top;background-size:cover;opacity:1}
body[class*="nen-"] footer.chan .chan__anh::after{background:linear-gradient(180deg,var(--nen) 0,rgba(20,11,5,.92) 34px,rgba(20,11,5,.68) 100px,rgba(20,11,5,.28) 185px,rgba(20,11,5,.12) 260px,rgba(20,11,5,.25) 68%,#100803 100%)}
@media(max-width:720px){body[class*="nen-"] footer.chan .chan__anh{background-image:url(../img/chan-trang-con-mobile.webp);background-position:60% top}body[class*="nen-"] footer.chan .chan__anh::after{background:linear-gradient(180deg,var(--nen) 0,rgba(20,11,5,.9) 30px,rgba(20,11,5,.55) 90px,rgba(20,11,5,.18) 170px,rgba(20,11,5,.18) 70%,#100803 100%)}body[class*="nen-"] footer.chan .chan__cuoi{padding-bottom:160px}}
.dau-phu{position:relative;isolation:isolate;padding:128px 0 34px;text-align:center}
.dau-phu::before{content:"";position:absolute;inset:0;z-index:-2;background:var(--anh) center 40%/cover no-repeat}
.dau-phu::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(20,11,5,.72) 0,rgba(20,11,5,.55) 40%,var(--nen) 100%)}
.duong-dan{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;font-size:12.5px;color:var(--chu-mo)}
.duong-dan a:hover{color:var(--vang-sang)}
.duong-dan a::after{content:"›";margin-left:6px;color:var(--vang-dam)}
.dau-phu h1{margin:10px 0 8px;font:500 clamp(30px,4.4vw,50px)/1.15 var(--font-serif);text-wrap:balance;
  background:linear-gradient(180deg,#fdebb6 10%,#e8b860 62%,#c8913f);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 3px 12px rgba(0,0,0,.6))}
.dau-phu p{max-width:660px;margin:0 auto;color:var(--chu);font-size:15.5px;text-shadow:0 1px 8px rgba(0,0,0,.8)}
.nhom-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:22px}
.nhom-nav a{padding:6px 14px;border:1px solid var(--vien);border-radius:999px;font-size:13px;color:var(--chu-mo);background:rgba(30,17,8,.55);transition:.2s}
.nhom-nav a:hover{border-color:var(--vang);color:var(--vang-sang)}
.nhom-nav a[aria-current]{background:linear-gradient(180deg,#f8dc97,#d9a44e);color:#2a1606;font-weight:600;border-color:transparent}

.than{padding:26px 0 10px;display:grid;gap:22px}
.td2{display:flex;align-items:center;gap:12px;font:500 22px/1.3 var(--font-serif);color:var(--vang-sang);margin-top:6px}
.td2::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--vang-dam),transparent)}
.van{max-width:760px}
.van p{margin-bottom:12px;font-size:15.5px;line-height:1.8;color:var(--chu)}
.van blockquote{margin:14px 0;padding:10px 18px;border-left:2px solid var(--vang);font:italic 400 17px/1.65 var(--font-serif);color:var(--vang-sang)}
.van ul{list-style:disc;padding-left:22px;margin-bottom:12px}
.van li{margin-bottom:6px;line-height:1.7}
.van a,.the-chu a{color:var(--vang-sang);text-decoration:underline;text-underline-offset:3px}
.giua{margin-inline:auto}
.kinh{font:400 18px/2 var(--font-serif)!important;text-align:center}

.hop-o{padding:20px 22px;border-radius:var(--bo);background:linear-gradient(180deg,rgba(78,48,23,.60),rgba(34,20,10,.80));border:1px solid var(--vien);box-shadow:inset 0 1px 0 rgba(255,220,150,.07),0 16px 34px rgba(0,0,0,.30)}
.hop-o>h3{font:500 18px/1.3 var(--font-serif);color:var(--vang-sang);margin-bottom:10px}
.hai{display:grid;grid-template-columns:1.1fr 1fr;gap:22px;align-items:start}

.luoi-the{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}
.the{display:flex;flex-direction:column;gap:4px;height:100%;padding:18px 18px 16px;border-radius:14px;background:linear-gradient(180deg,rgba(74,46,22,.62),rgba(36,21,10,.78));border:1px solid var(--vien);transition:.25s}
.the>.ic{width:32px;height:32px;color:var(--vang);stroke-width:1.3;margin-bottom:6px}
.the b{font:500 16.5px/1.35 var(--font-serif);color:var(--chu)}
.the span{font-size:13.5px;color:var(--chu-mo);line-height:1.55}
.the em{font-style:normal;font-size:12px;color:var(--vang);margin-top:auto;padding-top:8px}
a.the:hover{border-color:var(--vang);transform:translateY(-3px);box-shadow:0 14px 28px rgba(0,0,0,.4),0 0 26px rgba(233,160,60,.14)}
a.the:hover b{color:var(--vang-sang)}

.buoc{counter-reset:b;display:grid;gap:10px}
.buoc li{counter-increment:b;position:relative;padding:10px 14px 10px 50px;border-radius:12px;border:1px solid rgba(222,176,98,.18);background:rgba(24,13,6,.40);line-height:1.6}
.buoc li::before{content:counter(b);position:absolute;left:12px;top:9px;width:27px;height:27px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--vang-dam);color:var(--vang);font:500 14px/1 var(--font-serif)}

.san{position:relative;isolation:isolate;min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:14px;padding:26px 20px 24px;border-radius:var(--bo);overflow:hidden;text-align:center;
  border:1px solid var(--vang-dam);box-shadow:0 0 0 4px rgba(20,11,5,.9),0 0 0 5px rgba(222,176,98,.35),0 16px 34px rgba(0,0,0,.45)}
.san::before{content:"";position:absolute;inset:0;z-index:-2;background:var(--anh) center/cover no-repeat}
.san::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(20,11,5,.05) 0,rgba(20,11,5,.25) 45%,rgba(20,11,5,.88) 100%)}
.san--cao{min-height:min(62vh,560px)}
.san__chu{font:italic 400 17px/1.6 var(--font-serif);color:var(--chu);max-width:560px;text-shadow:0 1px 8px #000}
.thanh-canh{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.thanh-canh a{padding:8px 16px;border-radius:999px;border:1px solid var(--vien);background:rgba(30,17,8,.7);font-size:13.5px;color:var(--chu)}
.thanh-canh a:hover,.thanh-canh a[aria-current]{border-color:var(--vang);color:var(--vang-sang)}

/* --- Tiện ích thực hành --- */
.w{display:flex;flex-direction:column;align-items:center;gap:12px}
.w__chu{min-height:24px;color:var(--vang-sang);font:italic 400 16px/1.5 var(--font-serif);text-shadow:0 1px 8px #000}
.w__nut{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.w .nut{height:42px;padding:0 22px;font-size:14px}
.w-huong__bat{display:flex;gap:26px;align-items:flex-end;height:170px}
.nen{position:relative;width:5px;height:120px;border-radius:3px;background:linear-gradient(180deg,#7a2f1c,#a8482a);cursor:pointer}
.nen::before{content:"";position:absolute;left:-4px;top:-5px;width:13px;height:9px;border-radius:50%;background:#3a2416;transition:.4s}
.nen.chay::before{background:#ff9a3c;box-shadow:0 0 14px 4px rgba(255,150,60,.8)}
.nen.chay::after{content:"";position:absolute;left:-8px;bottom:100%;width:22px;height:70px;border-radius:50%;background:linear-gradient(0deg,rgba(255,255,255,.35),transparent);filter:blur(6px);animation:khoi 3.4s ease-in-out infinite}
@keyframes khoi{0%{transform:translateY(8px) scaleX(.6);opacity:0}30%{opacity:.8}100%{transform:translateY(-46px) translateX(10px) scaleX(1.5);opacity:0}}
.w-chuong__nut{width:130px;height:130px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--vang);background:radial-gradient(circle,#8a5a1e,#3c2410);color:var(--vang-sang);box-shadow:0 0 30px rgba(233,160,60,.35)}
.w-chuong__nut .ic{width:60px;height:60px;stroke-width:1.2}
.w-chuong__nut.rung{animation:rung 1.6s ease-out}
@keyframes rung{0%{box-shadow:0 0 0 0 rgba(246,217,143,.7)}100%{box-shadow:0 0 0 70px rgba(246,217,143,0)}}
.vong{--p:0;width:150px;height:150px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--vang) calc(var(--p)*1%),rgba(222,176,98,.18) 0)}
.vong>div{width:128px;height:128px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#1c1008}
.vong b{font:500 38px/1 var(--font-serif);color:var(--vang-sang)}
.vong span{font-size:12.5px;color:var(--chu-mo);margin-top:4px}
.w-tho__vong{width:150px;height:150px;border-radius:50%;border:2px solid var(--vang);background:radial-gradient(circle,rgba(246,217,143,.35),rgba(246,217,143,.05));transform:scale(.6);transition:transform 4s ease-in-out}
.w-tho__vong.vao{transform:scale(1)}
.w-tho__vong.ra{transform:scale(.6);transition-duration:6s}
.w-dang__hinh{color:var(--vang-sang);opacity:0;transform:translateY(-20px);transition:1s}
.w-dang__hinh .ic{width:90px;height:60px;stroke-width:1.1;filter:drop-shadow(0 0 14px rgba(255,190,90,.8))}
.w-dang.xong .w-dang__hinh{opacity:1;transform:none}
.chon-phut{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.chon-phut button{padding:6px 14px;border-radius:999px;border:1px solid var(--vien);font-size:13px;color:var(--chu-mo)}
.chon-phut button[aria-pressed="true"]{background:var(--vang);color:#2a1606;font-weight:600}

/* --- Biểu mẫu, ghi chép --- */
.bieu{display:grid;gap:14px;max-width:460px}
.bieu--rong{max-width:none}
.bieu label{display:grid;gap:6px;font-size:13.5px;color:var(--chu-mo)}
.bieu input:not([type=checkbox]),.bieu textarea,.bieu select{width:100%;padding:11px 14px;border-radius:10px;border:1px solid var(--vien);background:rgba(15,8,3,.55);color:var(--chu);font:400 15px/1.5 var(--font-chu)}
.bieu textarea{min-height:140px;resize:vertical}
.bieu input:focus,.bieu textarea:focus,.bieu select:focus{outline:0;border-color:var(--vang)}
.bieu .nut{height:44px;justify-content:center;font-size:14px}
.bieu .hang{display:flex;align-items:center;gap:10px;color:var(--chu)}
.bieu input[type=checkbox]{width:18px;height:18px;accent-color:#d9a44e}
.ds-ghi{display:grid;gap:12px}
.ds-ghi li{position:relative;padding:14px 44px 14px 16px;border-radius:12px;border:1px solid rgba(222,176,98,.18);background:rgba(24,13,6,.40)}
.ds-ghi time{display:block;font-size:12px;color:var(--vang);margin-bottom:4px}
.ds-ghi p{white-space:pre-wrap;line-height:1.65}
.ds-ghi a{font:500 16px/1.4 var(--font-serif);color:var(--chu)}
.ds-ghi button{position:absolute;right:8px;top:8px;width:30px;height:30px;border-radius:50%;color:var(--chu-nhat)}
.ds-ghi button:hover{color:var(--vang-sang);background:rgba(233,195,123,.12)}
.trong{padding:26px 20px;text-align:center;border:1px dashed var(--vien);border-radius:14px;color:var(--chu-mo)}
.trong .ic{width:40px;height:28px;color:var(--vang-dam);margin:0 auto 8px;display:block}
.ghi-chu{padding:12px 16px;border-radius:12px;border:1px solid var(--vien);background:rgba(233,195,123,.08);font-size:13.5px;color:var(--chu-mo);max-width:760px}
.ghi-chu b{color:var(--vang)}
.so-lieu{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px}
.so-lieu div{padding:16px;border-radius:14px;border:1px solid var(--vien);background:rgba(24,13,6,.45);text-align:center}
.so-lieu b{display:block;font:500 30px/1.1 var(--font-serif);color:var(--vang-sang)}
.so-lieu span{font-size:12.5px;color:var(--chu-mo)}
.cot{display:flex;align-items:flex-end;gap:10px;height:150px;padding-top:10px}
.cot div{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:6px;height:100%;font-size:11.5px;color:var(--chu-mo)}
.cot i{display:block;width:100%;max-width:38px;min-height:3px;border-radius:6px 6px 0 0;background:linear-gradient(180deg,#f6d98f,#b8873c)}
.bang-cuon{overflow-x:auto;border:1px solid var(--vien);border-radius:14px}
.bang{width:100%;border-collapse:collapse;font-size:14px;min-width:560px}
.bang th,.bang td{padding:11px 14px;text-align:left;border-bottom:1px solid rgba(222,176,98,.14)}
.bang th{font:500 13px/1.3 var(--font-chu);color:var(--vang);background:rgba(24,13,6,.6)}
.bang tr:last-child td{border-bottom:0}
.tem{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11.5px;border:1px solid var(--vien);color:var(--vang)}
details.hoi{border:1px solid var(--vien);border-radius:12px;background:rgba(24,13,6,.40);padding:0 16px}
details.hoi summary{cursor:pointer;padding:13px 0;font:500 16px/1.4 var(--font-serif);color:var(--chu)}
details.hoi[open] summary{color:var(--vang-sang)}
details.hoi p{padding-bottom:14px;color:var(--chu-mo);line-height:1.7}
.truoc-sau{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
@media (max-width:860px){.hai{grid-template-columns:1fr}.dau-phu{padding-top:104px}.san{min-height:340px}}
.than>*,.hai>*,.hop-o,.hop-o>*{min-width:0}
.chon-phut button,.w .nut--vien{background:rgba(30,17,8,.78)}

/* ---------- Đồng bộ theo mockup trang chủ ---------- */
.dau-phu{padding:150px 0 40px}
.dau-phu::before{background-position:center 34%}
.dau-phu::after{background:linear-gradient(180deg,rgba(20,11,5,.62) 0,rgba(20,11,5,.50) 45%,rgba(20,11,5,.82) 80%,var(--nen) 100%)}
.dau-phu p{font-size:17.5px}
.duong-dan{font-size:14px}
.nhom-nav a{font-size:15px;padding:7px 16px}
.nhom-nav a[aria-current]{font-weight:400;-webkit-text-stroke:.4px currentColor}
.the b,.hop-o>h3,details.hoi summary,.ds-ghi a,.vong b,.so-lieu b,.buoc li::before,.lich__ngay b{font-family:var(--font-chu);font-weight:400;-webkit-text-stroke:.3px currentColor}
.the,.hop-o{box-shadow:inset 0 22px 30px -24px rgba(255,205,120,.26),inset 0 0 0 1px rgba(255,225,160,.05),0 14px 30px rgba(0,0,0,.30)}
.the>.ic{width:40px;height:40px}
.the b{font-size:18.5px}.the span{font-size:15px}.the em{font-size:13px}
.hop-o>h3{font-size:20px}
.van p,.van li{font-size:17px}
.buoc li{font-size:16px}
.san__chu{font-family:var(--font-chu);font-size:18.5px}
.w__chu{font-family:var(--font-chu);font-size:17px}
.thanh-canh a{font-size:15px}
.kinh{font-family:var(--font-chu)!important;font-size:19px!important}
.bang{font-size:15px}.bang th{font-size:14px}
.bieu label{font-size:15px}
.ghi-chu{font-size:14.5px}
.tem{font-size:12.5px}
@media (max-width:860px){.dau-phu{padding-top:112px}}
.dau-phu::before{background-position:center 78%}
.dau-phu::after{background:linear-gradient(180deg,rgba(20,11,5,.82) 0,rgba(20,11,5,.66) 50%,rgba(20,11,5,.86) 82%,var(--nen) 100%)}

/* Design system trang con: cùng ánh sáng, viền đồng và độ sâu với trang chủ. */
.dau-phu{border-bottom:1px solid transparent;border-image:linear-gradient(90deg,transparent,rgba(233,195,123,.38),transparent) 1}
.dau-phu::before{filter:saturate(.9)}
.dau-phu h1{letter-spacing:.01em}
.dau-phu p{line-height:1.7;text-wrap:balance}
.than{padding-block:34px 64px}
.nhom-nav a,.thanh-canh a{backdrop-filter:blur(8px)}
.nhom-nav a:focus-visible,.thanh-canh a:focus-visible{border-color:var(--vang-sang)}
.the,.hop-o,.so-lieu div,.trong,details.hoi{position:relative}
.the::before,.hop-o::before,.so-lieu div::before{content:"";position:absolute;inset:0 0 auto;height:1px;background:linear-gradient(90deg,transparent,rgba(255,221,155,.38),transparent);pointer-events:none}
.the{min-height:156px;box-shadow:inset 0 1px 0 rgba(255,221,155,.08),0 12px 26px rgba(0,0,0,.24)}
a.the:hover,a.the:focus-visible{background:linear-gradient(180deg,rgba(99,62,28,.82),rgba(43,25,12,.9));box-shadow:0 18px 34px rgba(0,0,0,.4),0 0 24px rgba(233,160,60,.12)}
.hop-o{background:linear-gradient(145deg,rgba(83,52,25,.72),rgba(34,20,10,.88) 72%)}
.bieu input:not([type=checkbox]),.bieu textarea,.bieu select{min-height:44px;transition:border-color .2s,box-shadow .2s,background .2s}
.bieu input:not([type=checkbox]):focus,.bieu textarea:focus,.bieu select:focus{background:rgba(15,8,3,.8);box-shadow:0 0 0 3px rgba(233,195,123,.15)}
.bieu input::placeholder,.bieu textarea::placeholder{color:#a99677}
.bang-cuon{box-shadow:0 14px 30px rgba(0,0,0,.18)}
.bang tbody tr{transition:background .2s}
.bang tbody tr:hover{background:rgba(233,195,123,.07)}
.trong{background:radial-gradient(circle at 50% 0,rgba(233,195,123,.1),transparent 70%),rgba(28,17,8,.45);border-color:rgba(233,195,123,.36)}
.ghi-chu{border-left:3px solid var(--vang-dam)}
@media(max-width:720px){.than{padding-block:24px 48px}.dau-phu{padding-bottom:30px}.dau-phu p{font-size:15.5px}.luoi-the{grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr))}.the{min-height:0}}
@media(prefers-reduced-motion:reduce){.the,.bang tbody tr,.bieu input,.bieu textarea,.bieu select{transition:none}}

/* Làn khói chuyển động rất nhẹ ở cảnh Chính điện, độc lập với ảnh nền. */
.san--khoi .khoi-dong{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.san--khoi::before{background-position:center}
@media(min-width:721px){.san--khoi{min-height:0;aspect-ratio:1586/992}}
.san--khoi .san__chu,.san--khoi .thanh-canh{position:relative;z-index:1}
.san--khoi .khoi-dong i{position:absolute;left:50%;bottom:15%;width:16px;height:38%;border-radius:50%;opacity:0;filter:blur(9px);background:linear-gradient(0deg,transparent 0%,rgba(238,229,207,.16) 30%,rgba(250,240,219,.33) 62%,transparent 100%);transform-origin:center bottom;animation:khoi-chinh-dien 7s ease-in-out infinite}
.san--khoi .khoi-dong i:nth-child(2){left:48.5%;animation-delay:-2.3s;animation-duration:8s}
.san--khoi .khoi-dong i:nth-child(3){left:51.5%;animation-delay:-4.7s;animation-duration:9s}
@keyframes khoi-chinh-dien{0%{opacity:0;transform:translate3d(0,16px,0) scale(.5)}25%{opacity:.5}75%{opacity:.22}100%{opacity:0;transform:translate3d(24px,-70px,0) scale(2.2)}}
@media(prefers-reduced-motion:reduce){.san--khoi .khoi-dong i{animation:none;opacity:.18;transform:translateY(-30px)}}

/* 15/11 khuya: màn rộng (từ 1200px) không kéo ảnh nền theo cả bề ngang nữa (ảnh gốc rộng 1024px, kéo lên 1920px thì cây đèn đá, tán lá to gấp đôi và phần dưới ảnh bị đẩy khỏi trang).
   Vẽ ảnh hai lần ở cỡ 800–1000px, một bản neo mép trái, một bản neo mép phải; phần giữa che đi để chi tiết của bản này không lọt vào giữa trang. */
@media(min-width:1200px){
  main#noi-dung::before{--w:clamp(800px,46vw,1000px);
    background-image:linear-gradient(180deg,var(--nen) 0,transparent 9%,transparent 72%,var(--nen) 100%),var(--nen-noi-dung),var(--nen-noi-dung);
    background-size:100% 100%,var(--w) auto,var(--w) auto;
    background-position:center top,left top,right top;
    background-repeat:no-repeat,repeat-y,repeat-y;
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(var(--w) * .27),transparent calc(var(--w) * .41),transparent calc(100% - var(--w) * .41),#000 calc(100% - var(--w) * .27),#000 100%);
    mask-image:linear-gradient(90deg,#000 0,#000 calc(var(--w) * .27),transparent calc(var(--w) * .41),transparent calc(100% - var(--w) * .41),#000 calc(100% - var(--w) * .27),#000 100%)}
}

/* 16/11: dòng báo giọng đọc ở phần Tụng theo nhịp mõ */
.tung__giong{max-width:620px;margin:10px auto 0;padding:9px 14px;border-radius:10px;font-size:13.5px;line-height:1.6;text-align:center}
.tung__giong.co{color:var(--chu-mo)}
.tung__giong.thieu{color:#f3dfb5;background:rgba(120,60,20,.28);border:1px solid rgba(236,194,116,.4);text-align:left}
.tung__giong b{color:var(--vang-sang);font-weight:600}

/* ===== 16/11 · Các khối đều nhau =====
   1) Hai cột trong .hai luôn cao bằng nhau. 2) Biểu mẫu rộng hết khung chứa nó.
   3) Lưới thẻ 5, 6, 9, 10 thẻ chia cột cho hàng cuối không bị lẻ. */
.hai{align-items:stretch}
.hai>div:not([class]){align-content:stretch}
.hai>div:not([class]):has(>.hop-o:first-child+.ghi-chu:last-child){grid-template-rows:1fr auto}
.hai .ghi-chu{max-width:none}
.hai>.hop-o,.hai>div:not([class])>.hop-o{display:flex;flex-direction:column}
.hai>.san{height:100%}
.hop-o .bieu,.hop-o form.bieu{max-width:none}
/* Lưới thẻ: số cột chọn theo SỐ THẺ, không theo bề ngang (auto-fill cũ để lại hàng cuối lẻ và cột trống, vd. 3 thẻ trong khung 4 cột).
   Số thẻ chia hết thì mọi hàng đầy; số nguyên tố (7, 11, 13) thì hàng cuối căn giữa. Thẻ trong một hàng cao bằng nhau.
   Gộp và thay luật 5/6/9/10 thẻ của phiên Tài khoản (16/11), giữ cùng kết quả. */
.luoi-the{--cot:1;display:flex;flex-wrap:wrap;justify-content:center;gap:16px}
.luoi-the>li{flex:0 0 calc((100% - (var(--cot) - 1) * 16px) / var(--cot));min-width:0}
@media(min-width:561px){.luoi-the{--cot:2}.luoi-the:has(>li:nth-child(3):last-child),.luoi-the:has(>li:nth-child(9):last-child){--cot:3}}
@media(min-width:721px){
  .luoi-the{--cot:3}
  .luoi-the:has(>li:nth-child(4):last-child),.luoi-the:has(>li:nth-child(8):last-child),.luoi-the:has(>li:nth-child(10):last-child),.luoi-the:has(>li:nth-child(16):last-child){--cot:2}
  .luoi-the:has(>li:nth-child(7):last-child),.luoi-the:has(>li:nth-child(11):last-child){--cot:4}
}
@media(min-width:1000px){
  .luoi-the{--cot:4}
  .luoi-the:has(>li:nth-child(3):last-child),.luoi-the:has(>li:nth-child(6):last-child),.luoi-the:has(>li:nth-child(9):last-child),.luoi-the:has(>li:nth-child(18):last-child),.luoi-the:has(>li:nth-child(5):last-child),.luoi-the:has(>li:nth-child(15):last-child){--cot:3}
  .luoi-the:has(>li:nth-child(10):last-child){--cot:5}
}
@media(min-width:1200px){
  .luoi-the:has(>li:nth-child(5):last-child){--cot:5}
}
.luoi-the:has(>li:nth-child(2):last-child){--cot:2}
.luoi-the:has(>li:only-child){--cot:1}
@media(max-width:560px){.luoi-the,.luoi-the:has(>li:nth-child(2):last-child){--cot:1}}
