/* Tấm CHI TIẾT CUNG – trang Tử Vi. CHỦ FILE: Coder 3 từ v3.58 (trước là Coder 4, v3.37). v3.58c: thêm phần LS30 cuối file.
   Theo mẫu HDTK-TV1 (2.2, Hội đồng 9,1) dòng 140–163 + ≥1024 (dòng 227–228). Tiền tố "ctc-" để không đụng lớp cũ của index
   (.dong, .sao, .hoa, #ct …). Màu/chữ lấy biến css/he-thong.css (Brand v3.0); có giá trị dự phòng nếu biến chưa nạp.
   Dưới 1024px: tấm trượt lên từ đáy (hộp thoại, nút Đóng 44px, Esc đóng). Từ 1024px: cột phải, dính khi cuộn.
   Không Times, không xanh/tím; chữ ≥ 12px; nút ≥ 44px. Nạp: <link rel="stylesheet" href="/la-so-chi-tiet.css"> */
#ctCho{--ctc-son:var(--do-son,#B8322A);--ctc-do:var(--do-do,#9E2A22);--ctc-son-nhat:var(--son-nhat,#FBE9E4);--ctc-kim:var(--vang-kim,#B0812A);
 --ctc-kem:var(--kem,#FFF6E3);--ctc-kem-sang:var(--kem-sang,#FFFAF0);--ctc-muc:var(--muc,#2A1A15);--ctc-muc-nhat:var(--muc-nhat,#6B5648);--ctc-vien:var(--vien,#EBDDC3);
 --ctc-vien-kim:rgba(176,129,42,.45);--ctc-focus:#0a3d91;
 --ctc-tieu-de:var(--font-tieu-de,"Noto Serif",Georgia,serif);--ctc-than:var(--font-than,"Be Vietnam Pro",system-ui,sans-serif)}

.ctc{box-sizing:border-box;background:var(--ctc-kem-sang);border:1px solid var(--ctc-vien);border-radius:var(--bo-the,16px);box-shadow:0 1px 2px rgba(42,26,21,.06),0 4px 14px rgba(42,26,21,.05);padding:16px;color:var(--ctc-muc);font:400 16px/1.6 var(--ctc-than);text-align:left}
.ctc *{box-sizing:border-box}
.ctc :focus-visible{outline:2px solid var(--ctc-focus);outline-offset:2px}
.ctc-keo{display:none}
.ctc-dau{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.ctc-nhan{margin:0 0 2px;font:600 12px/1.4 var(--ctc-than);letter-spacing:.12em;text-transform:uppercase;color:var(--ctc-kim)}
.ctc-td{margin:0;font:700 20px/1.25 var(--ctc-tieu-de);color:var(--ctc-muc);text-wrap:balance}
.ctc-td:focus{outline:none}
.ctc-phu{margin:2px 0 0;font-size:14px;line-height:1.45;color:var(--ctc-muc-nhat)}
.ctc-dong{flex:none;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid var(--ctc-son);border-radius:var(--bo-nut,12px);background:var(--ctc-kem-sang);color:var(--ctc-son);cursor:pointer;touch-action:manipulation}
.ctc-dong:hover{background:var(--ctc-son-nhat)}
.ctc-ic{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.ctc-dl{margin:12px 0 0}
.ctc-hang{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px;padding:8px 0;border-top:1px dotted var(--ctc-vien-kim);font-size:15px;line-height:1.5}
.ctc-hang dt{font-size:14px;color:var(--ctc-muc-nhat)}
.ctc-hang dd{margin:0;min-width:0;overflow-wrap:anywhere}
.ctc-hang dd.xau{color:var(--ctc-do)}
.ctc-cs{display:block}
.ctc-cs b{font-weight:600}
.ctc-ds{font-style:normal;font-size:14px;color:var(--ctc-muc-nhat)}
.ctc-hang dd.xau .ctc-ds{color:var(--ctc-muc-nhat)}
.ctc-vcd{color:var(--ctc-muc-nhat)}
.ctc-sp{white-space:normal}
/* Tứ Hóa – 4 kiểu trong hệ son / vàng / mực (mẫu HDTK-TV1, 2.1 đồng ý YC-CM-TV06) */
.ctc-hoa{display:inline-block;padding:0 4px;border-radius:4px;font:600 12px/1.45 var(--ctc-than);font-style:normal;vertical-align:1px;white-space:nowrap}
.ctc-hoa.loc{background:#F3E3BF;color:var(--ctc-muc);border:1px solid var(--ctc-kim)}
.ctc-hoa.quyen{background:var(--ctc-son);color:var(--ctc-kem);border:1px solid var(--ctc-son)}
.ctc-hoa.khoa{background:var(--ctc-kem-sang);color:var(--ctc-son);border:1px solid var(--ctc-son)}
.ctc-hoa.ky{background:var(--ctc-kem-sang);color:var(--ctc-muc);border:1px dashed var(--ctc-muc)}

/* nút viền son (kiểu nut-phu của he-thong) */
.ctc-nut{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 12px;border:1px solid var(--ctc-son);border-radius:var(--bo-nut,12px);background:var(--ctc-kem-sang);color:var(--ctc-son);font:600 15px/1.2 var(--ctc-than);text-align:center;text-decoration:none;cursor:pointer;touch-action:manipulation;transition:background-color .15s}
.ctc-nut:hover{background:var(--ctc-son-nhat)}
.ctc-nut.rong{display:flex;width:100%;margin-top:8px}
.ctc-nuthang{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}

.ctc-man{position:fixed;inset:0;z-index:40;background:rgba(42,26,21,.38)}

@media (max-width:1023px){
 #ctCho:not(.ctc-mo){display:none}
 .ctc.truot{position:fixed;left:0;right:0;bottom:0;z-index:41;max-height:82vh;max-height:82dvh;overflow:auto;overscroll-behavior:contain;border-radius:20px 20px 0 0;border-bottom:0;padding:8px 16px calc(16px + env(safe-area-inset-bottom));box-shadow:0 -8px 24px rgba(42,26,21,.18);animation:ctcLen .2s ease-out}
 .ctc.truot .ctc-keo{display:block;width:44px;height:4px;margin:0 auto 8px;border-radius:2px;background:var(--ctc-vien)}
 html.ctc-khoa,html.ctc-khoa body{overflow:hidden}
}
@media (min-width:768px) and (max-width:1023px){
 .ctc.truot{left:50%;right:auto;width:min(640px,100%);transform:translateX(-50%);animation-name:ctcLenGiua}
}
@keyframes ctcLen{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@keyframes ctcLenGiua{from{transform:translate(-50%,24px);opacity:.6}to{transform:translateX(-50%);opacity:1}}

/* máy tính ≥1024: cột phải, dính khi cuộn (lưới 2 cột .ls-than do Coder 3 dựng) */
@media (min-width:1024px){
 #ctCho{position:sticky;top:76px;align-self:start}  /* ô lưới dính; tấm bên trong cuộn riêng nếu dài */
 .ctc{max-height:calc(100vh - 92px);overflow:auto}
 .ctc-man{display:none}
}
@media (prefers-reduced-motion:reduce){.ctc.truot{animation:none}.ctc-nut{transition:none}}

/* ===== v3.58c Coder 3 – tấm chạm cung theo LS30 ===== */
#ctCho{--h-kim:#5F6B7A;--h-moc:#2E7D32;--h-thuy:#1E5AA8;--h-hoa:#B84A00;--h-tho:#8A5A00}
.ctc30 .n30-kim{color:var(--h-kim)}.ctc30 .n30-moc{color:var(--h-moc)}.ctc30 .n30-thuy{color:var(--h-thuy)}.ctc30 .n30-hoa{color:var(--h-hoa)}.ctc30 .n30-tho{color:var(--h-tho)}
.ctc30{font-family:"Be Vietnam Pro",Arial,sans-serif;padding:14px}
.ctc30.truot{padding:8px 14px calc(12px + env(safe-area-inset-bottom))}
.ctc30 .ctc-td{font:700 1.1rem/1.25 "Be Vietnam Pro",Arial,sans-serif}
.ctc30 .ctc-nhan{display:inline-block;margin:0 0 3px;padding:2px 10px;border-radius:999px;background:#FDE7E3;color:#B8322A;font:700 12px/1.4 "Be Vietnam Pro",Arial,sans-serif;letter-spacing:0;text-transform:none}
.ctc-nhom{margin-top:8px}
.ctc-nhom h3{margin:0 0 3px;font:700 12px/1.3 "Be Vietnam Pro",Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#6F5F57}
.ctc-cs30{padding:4px 0;border-top:1px dashed rgba(176,129,42,.3);font-size:.95rem;line-height:1.45}
.ctc-cs30 b{font-size:1.1rem;font-weight:700}
.ctc-cs30 i{font-style:normal;font-size:.875rem;color:#5E4A42}
.ctc-chips{display:flex;flex-wrap:wrap;gap:4px}
.ctc-chip{display:inline-flex;align-items:baseline;gap:4px;padding:1px 9px;border-radius:999px;background:rgba(255,255,255,.85);border:1px solid rgba(176,129,42,.25);font:600 .9rem/1.4 "Be Vietnam Pro",Arial,sans-serif}
.ctc-chip small{font-size:12px;font-weight:500;color:#5E4A42}
.ctc-vong{display:grid;grid-template-columns:1fr 1fr;gap:4px}
.ctc-vong>div{padding:4px 9px;border-radius:12px;background:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.95);font-size:.9rem;font-weight:600}
.ctc-vong span{display:block;font-size:12px;font-weight:500;color:#5E4A42}
.ctc-tp{display:grid;gap:2px;margin:0;font-size:.9rem}
.ctc-tp>div{display:flex;gap:8px}
.ctc-tp dt{flex:0 0 78px;font-size:12px;font-weight:600;color:#5E4A42;padding-top:2px}
.ctc-tp dd{margin:0;min-width:0}
.ctc30 .ctc-nut.rong{margin-top:8px}
.ctc-man{z-index:59}
html:not(#t1):not(#t2):not(#t3):not(#t4):not(#t5):not(#t6):not(#t7):not(#t8):not(#t9):not(#t10):not(#t11):not(#t12):not(#t13):not(#t14):not(#t15):not(#t16):not(#t17):not(#t18):not(#t19):not(#t20):not(#t21):not(#t22):not(#t23):not(#t24):not(#t25):not(#t26) body #kq .grid .o.tam30{background:rgba(207,229,250,.75)!important;background-image:none!important}
html:not(#t1):not(#t2):not(#t3):not(#t4):not(#t5):not(#t6):not(#t7):not(#t8):not(#t9):not(#t10):not(#t11):not(#t12):not(#t13):not(#t14):not(#t15):not(#t16):not(#t17):not(#t18):not(#t19):not(#t20):not(#t21):not(#t22):not(#t23):not(#t24):not(#t25):not(#t26) body #kq .grid .o.xung30{background:repeating-linear-gradient(135deg,rgba(255,226,150,.6) 0 6px,rgba(255,255,255,.3) 6px 12px)!important}

/* v3.58c lần 4 Coder 3: nền tấm trắng ngà đặc (Sếp: "màu nền lạ" – xám do kính mờ trên lớp tối) */
html:not(#n1):not(#n2):not(#n3):not(#n4):not(#n5):not(#n6):not(#n7):not(#n8):not(#n9):not(#n10):not(#n11):not(#n12):not(#n13):not(#n14):not(#n15):not(#n16):not(#n17):not(#n18):not(#n19):not(#n20):not(#n21):not(#n22):not(#n23):not(#n24):not(#n25):not(#n26):not(#n27):not(#n28):not(#n29):not(#n30) body #ctCho .ctc.ctc30{background:#FFFBF6!important;background-image:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;border:1px solid rgba(255,255,255,.92)!important}
html:not(#n1):not(#n2):not(#n3):not(#n4):not(#n5):not(#n6):not(#n7):not(#n8):not(#n9):not(#n10):not(#n11):not(#n12):not(#n13):not(#n14):not(#n15):not(#n16):not(#n17):not(#n18):not(#n19):not(#n20):not(#n21):not(#n22):not(#n23):not(#n24):not(#n25):not(#n26):not(#n27):not(#n28):not(#n29):not(#n30) body #ctCho .ctc.ctc30.truot{box-shadow:0 -8px 24px rgba(42,26,21,.15)!important;border-radius:20px 20px 0 0!important}
html:not(#n1):not(#n2):not(#n3):not(#n4):not(#n5):not(#n6):not(#n7):not(#n8):not(#n9):not(#n10):not(#n11):not(#n12):not(#n13):not(#n14):not(#n15):not(#n16):not(#n17):not(#n18):not(#n19):not(#n20):not(#n21):not(#n22):not(#n23):not(#n24):not(#n25):not(#n26):not(#n27):not(#n28):not(#n29):not(#n30) body .ctc-man{background:rgba(42,26,21,.35)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html:not(#n1):not(#n2):not(#n3):not(#n4):not(#n5):not(#n6):not(#n7):not(#n8):not(#n9):not(#n10):not(#n11):not(#n12):not(#n13):not(#n14):not(#n15):not(#n16):not(#n17):not(#n18):not(#n19):not(#n20):not(#n21):not(#n22):not(#n23):not(#n24):not(#n25):not(#n26):not(#n27):not(#n28):not(#n29):not(#n30) body #ctCho .ctc30 .ctc-vong>div{background:#FFF3EA!important;border-color:#F6E6DA!important}
html:not(#n1):not(#n2):not(#n3):not(#n4):not(#n5):not(#n6):not(#n7):not(#n8):not(#n9):not(#n10):not(#n11):not(#n12):not(#n13):not(#n14):not(#n15):not(#n16):not(#n17):not(#n18):not(#n19):not(#n20):not(#n21):not(#n22):not(#n23):not(#n24):not(#n25):not(#n26):not(#n27):not(#n28):not(#n29):not(#n30) body #ctCho .ctc30.truot .ctc-keo{background:#E8D6CB!important}
html:not(#n1):not(#n2):not(#n3):not(#n4):not(#n5):not(#n6):not(#n7):not(#n8):not(#n9):not(#n10):not(#n11):not(#n12):not(#n13):not(#n14):not(#n15):not(#n16):not(#n17):not(#n18):not(#n19):not(#n20):not(#n21):not(#n22):not(#n23):not(#n24):not(#n25):not(#n26):not(#n27):not(#n28):not(#n29):not(#n30) body #ctCho .ctc30 .ctc-chip{background:#fff!important}

/* ===== v3.60 Coder 3 – PC ≥1024: tấm chi tiết = NGĂN KÉO phải (Sếp: lá số vuông, chạm cung mở ngăn kéo) ===== */
@media (min-width:1024px){
html:not(#k1):not(#k2):not(#k3):not(#k4):not(#k5):not(#k6):not(#k7):not(#k8):not(#k9):not(#k10):not(#k11):not(#k12):not(#k13):not(#k14):not(#k15):not(#k16):not(#k17):not(#k18):not(#k19):not(#k20):not(#k21):not(#k22):not(#k23):not(#k24):not(#k25):not(#k26):not(#k27):not(#k28):not(#k29):not(#k30) body #ctCho{position:fixed!important;top:88px!important;right:24px!important;left:auto!important;bottom:auto!important;width:396px!important;z-index:45!important;display:none!important;align-self:auto!important}
html.ct60-mo:not(#k1):not(#k2):not(#k3):not(#k4):not(#k5):not(#k6):not(#k7):not(#k8):not(#k9):not(#k10):not(#k11):not(#k12):not(#k13):not(#k14):not(#k15):not(#k16):not(#k17):not(#k18):not(#k19):not(#k20):not(#k21):not(#k22):not(#k23):not(#k24):not(#k25):not(#k26):not(#k27):not(#k28):not(#k29):not(#k30) body #ctCho{display:block!important}
html:not(#k1):not(#k2):not(#k3):not(#k4):not(#k5):not(#k6):not(#k7):not(#k8):not(#k9):not(#k10):not(#k11):not(#k12):not(#k13):not(#k14):not(#k15):not(#k16):not(#k17):not(#k18):not(#k19):not(#k20):not(#k21):not(#k22):not(#k23):not(#k24):not(#k25):not(#k26):not(#k27):not(#k28):not(#k29):not(#k30) body #ctCho .ctc.ctc30{max-height:calc(100vh - 24px - var(--ct-top,88px))!important;overflow:auto!important;overscroll-behavior:contain!important;border-radius:20px!important;box-shadow:0 12px 32px rgba(42,26,21,.16)!important;animation:ct60Vao .18s ease-out}
html:not(#k1):not(#k2):not(#k3):not(#k4):not(#k5):not(#k6):not(#k7):not(#k8):not(#k9):not(#k10):not(#k11):not(#k12):not(#k13):not(#k14):not(#k15):not(#k16):not(#k17):not(#k18):not(#k19):not(#k20):not(#k21):not(#k22):not(#k23):not(#k24):not(#k25):not(#k26):not(#k27):not(#k28):not(#k29):not(#k30) body #ctCho .ctc-dong{display:inline-flex!important}
}
@keyframes ct60Vao{from{transform:translateX(24px);opacity:.4}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){#ctCho .ctc.ctc30{animation:none!important}}
