/* Xin xăm và Lục hào (boi.js). Dùng lại khung, đồng xu và bốn mẫu của que.css. */
.b-box{width:min(640px,100%);max-height:94vh;overflow:auto}
.b-tray2{margin:10px auto 6px;padding:14px 10px}
.b-tray2 .q-coin,.b-tray3 .q-coin{width:74px;height:74px}
.b-tray2 .q-face b,.b-tray3 .q-face b{font-size:20px;top:9px}
.b-tray2 .q-face span,.b-tray3 .q-face span{font-size:9px;bottom:9px}
.b-tray2 .q-lo,.b-tray3 .q-lo{width:16px;height:16px}
.b-tray3{gap:24px;margin:14px auto 6px;padding:18px 10px}
.hidden.x-the,.x-keo.hidden{display:none}

/* Ống xăm */
.x-san{display:flex;align-items:flex-end;justify-content:center;gap:26px;min-height:170px;margin-top:14px}
.x-ong{position:relative;width:86px;height:130px;border-radius:10px 10px 14px 14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transform-origin:50% 90%;-webkit-tap-highlight-color:transparent}
.x-ong .x-que{position:absolute;bottom:100%;width:6px;height:46px;border-radius:3px 3px 0 0}
.x-ong .x-que:nth-child(1){left:10px;height:38px}.x-ong .x-que:nth-child(2){left:17px;height:50px}.x-ong .x-que:nth-child(3){left:24px;height:42px}
.x-ong .x-que:nth-child(4){left:31px;height:54px}.x-ong .x-que:nth-child(5){left:38px;height:40px}.x-ong .x-que:nth-child(6){left:45px;height:52px}
.x-ong .x-que:nth-child(7){left:52px;height:44px}.x-ong .x-que:nth-child(8){left:59px;height:56px}.x-ong .x-que:nth-child(9){left:66px;height:39px}
.x-ong .x-que:nth-child(10){left:73px;height:47px;display:none}.x-ong .x-que:nth-child(11){left:41px;height:60px;display:none}
.x-chu{font-size:34px;font-family:"KaiTi","STKaiti","Noto Serif CJK SC","SimSun",serif}
.x-ong.x-lac{animation:x-lac 1.25s ease-in-out}
@keyframes x-lac{0%,100%{transform:rotate(0)}10%{transform:rotate(-14deg)}20%{transform:rotate(12deg)}30%{transform:rotate(-15deg)}40%{transform:rotate(13deg)}50%{transform:rotate(-12deg)}60%{transform:rotate(14deg)}70%{transform:rotate(-9deg)}80%{transform:rotate(7deg)}90%{transform:rotate(-3deg)}}
.x-the{width:34px;height:118px;border-radius:5px 5px 2px 2px;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;padding-top:10px;animation:x-roi .5s cubic-bezier(.3,1.4,.5,1) both;transform:rotate(-8deg)}
.x-the b{font-size:19px;line-height:1}
@keyframes x-roi{from{transform:translateY(-70px) rotate(25deg);opacity:0}to{transform:translateY(0) rotate(-8deg);opacity:1}}
.x-kq{min-height:96px}
.x-tho{margin:12px auto 6px;padding:12px 16px;max-width:400px;border-radius:8px;font-size:16px;line-height:1.7;font-style:italic}
.x-giai{margin:6px;font-size:14px;line-height:1.5}

/* Lục hào */
.l-tien{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;font-size:12px;opacity:.85}
.l-dem{font-weight:700;font-size:13px}
.l-que{display:flex;flex-direction:column;gap:7px;align-items:center;margin:12px 0 4px;min-height:20px}
.l-h{display:flex;align-items:center;gap:8px;width:220px}
.l-h .l-vi{width:16px;font-size:11px;opacity:.6;text-align:right}
.l-h i{flex:1;height:13px;border-radius:2px;background:currentColor}
.l-duong i+i{margin-left:-8px}
.l-am i:first-of-type{margin-right:10px}
.l-h em{width:16px;font-style:normal;font-weight:700}
.l-dong i{box-shadow:0 0 0 2px rgba(255,200,0,.6)}
.l-tom p{margin:5px 0;font-size:13.5px;line-height:1.45}
.l-bang{overflow-x:auto;margin-top:8px}
.l-bang table{border-collapse:collapse;width:100%;font-size:12.5px;white-space:nowrap}
.l-bang th,.l-bang td{padding:5px 6px;border-bottom:1px solid rgba(127,127,127,.3);text-align:left}
.l-bang th{font-size:11px;opacity:.75}
.l-sym{font-family:monospace;letter-spacing:-1px}
.l-dg td{font-weight:700}
.l-phu{justify-content:center;gap:8px}
.l-phu .q-th{opacity:.85}

/* Màu theo mẫu */
.q-dinh .x-ong{background:linear-gradient(90deg,#5a1a10,#a8401f 40%,#6b2412);box-shadow:inset 0 0 0 3px #d8a945;color:#f6dc9a}
.q-dinh .x-que,.q-dinh .x-the{background:linear-gradient(#e9c47a,#b88a3c);color:#5a1a10}
.q-dinh .x-tho{background:rgba(0,0,0,.25);border:1px solid #b8862f}
.q-dinh .l-h i{background:#f2cf6f}
.q-muc .x-ong{background:#fbf8f0;border:3px solid #1d1b18;color:#a3261e}
.q-muc .x-que{background:#1d1b18}.q-muc .x-the{background:#fbf8f0;border:2px solid #1d1b18;color:#a3261e}
.q-muc .x-tho{border-left:3px solid #a3261e;background:rgba(0,0,0,.03)}
.q-muc .l-h i{background:#1d1b18}
.q-neon .x-ong{background:#120a2c;border:2px solid #ff3df2;box-shadow:0 0 18px #ff3df2;color:#39f3ff}
.q-neon .x-que{background:#39f3ff;box-shadow:0 0 6px #39f3ff}.q-neon .x-the{background:#120a2c;border:2px solid #7dff9a;color:#7dff9a;box-shadow:0 0 12px #7dff9a}
.q-neon .x-tho{border:1px solid #5b3bd6;background:rgba(57,243,255,.06)}
.q-neon .l-h i{background:#39f3ff;box-shadow:0 0 8px #39f3ff}
.q-kin .x-ong{background:#e8f0fa;border:2px solid #0b5cad;color:#0b5cad}
.q-kin .x-que{background:#0b5cad}.q-kin .x-the{background:#fff;border:2px solid #0b5cad;color:#0b5cad}
.q-kin .x-tho{background:#f4f6f9;border:1px solid #dde3ea;font-style:normal}
.q-kin .l-h i{background:#1d2733}
.q-wrap.x-tot .q-ten{color:#2e7d32}.q-dinh.x-tot .q-ten{color:#ffe28a}.q-neon.x-tot .q-ten{color:#7dff9a}
.q-wrap.x-xau .q-ten{color:#c62828}.q-neon.x-xau .q-ten{color:#ff3df2}.q-dinh.x-xau .q-ten{color:#ffb3a0}
@media (max-width:520px){.b-tray3{gap:12px}.b-tray3 .q-coin{width:64px;height:64px}.l-h{width:180px}}
@media (prefers-reduced-motion:reduce){.x-ong.x-lac,.x-the{animation-duration:.01s}}
.x-the-chu{font-size:15px;font-family:"KaiTi","STKaiti","Noto Serif CJK SC","SimSun",serif;opacity:.8}
.l-bang table,.l-bang thead,.l-bang tbody,.l-bang tr,.l-bang th,.l-bang td{background:transparent!important;color:inherit!important}
.l-bang tr:hover td{background:rgba(127,127,127,.12)!important}
@media (max-width:520px){.l-bang table{font-size:11.5px}.l-bang th,.l-bang td{padding:4px 3px}.l-sym{letter-spacing:-2px}}
.q-dinh .b-box::before{display:none}.l-sym b{font-family:inherit;letter-spacing:0;font-size:11px}

/* Bốn kiểu phong cảnh cho Xin xăm và Lục hào */
.q-co .x-ong{background:linear-gradient(90deg,#4a0b0a,#9a1c12 40%,#5a1a10);box-shadow:inset 0 0 0 3px #e8c063,0 0 18px rgba(255,200,90,.35);color:#ffd77a}
.q-co .x-que,.q-co .x-the{background:linear-gradient(#f2d38a,#b88a3c);color:#4a0b0a}
.q-co .x-tho{background:rgba(30,6,4,.6);border:1px solid #d8a945}
.q-co .l-h i{background:#ffd77a}
.q-co.x-tot .q-ten{color:#ffe28a}.q-co.x-xau .q-ten{color:#ffb3a0}
.q-son .x-ong{background:linear-gradient(90deg,#d8e8e4,#ffffff 45%,#cfe0dc);border:3px solid #1f4f52;color:#1f6f6a}
.q-son .x-que{background:#1f4f52}.q-son .x-the{background:#fbf8f0;border:2px solid #1f4f52;color:#1f6f6a}
.q-son .x-tho{background:rgba(255,255,255,.6);border-left:3px solid #1f6f6a}
.q-son .l-h i{background:#1f4f52}
.q-son.x-tot .q-ten{color:#1f6f6a}.q-son.x-xau .q-ten{color:#a3261e}
.q-pho .x-ong{background:radial-gradient(circle at 50% 35%,#fff2b0,#ff9a3c 45%,#c2410c);box-shadow:0 0 22px rgba(255,154,60,.7);color:#4a1a04;border-radius:40% 40% 30% 30%}
.q-pho .x-que{background:#ffd23c;box-shadow:0 0 6px #ffb347}.q-pho .x-the{background:#0b1436;border:2px solid #ffb347;color:#ffd23c;box-shadow:0 0 12px rgba(255,179,71,.7)}
.q-pho .x-tho{background:rgba(11,20,54,.7);border:1px solid #c2410c}
.q-pho .l-h i{background:#ffb347;box-shadow:0 0 8px rgba(255,179,71,.8)}
.q-pho.x-tot .q-ten{color:#ffd23c}.q-pho.x-xau .q-ten{color:#ff7ab8}
.q-sen .x-ong{background:linear-gradient(90deg,#2f7a3a,#7fbf6a 45%,#2f7a3a);border:2px solid #1f5a28;color:#fce4ec}
.q-sen .x-que{background:#d6457a}.q-sen .x-the{background:#fff;border:2px solid #d6457a;color:#b0305f}
.q-sen .x-tho{background:rgba(255,255,255,.7);border-left:3px solid #d6457a}
.q-sen .l-h i{background:#2f7a3a}
.q-sen.x-tot .q-ten{color:#2f7a3a}.q-sen.x-xau .q-ten{color:#b0305f}
.q-co .l-dong i,.q-pho .l-dong i{box-shadow:0 0 0 2px rgba(255,230,120,.9)}

/* Chuyển giữa ba trò; bảng Lục hào không dính tiêu đề như bảng của app */
.q-tros{display:flex;gap:6px;width:100%;order:2;margin-top:2px}
.q-tro{flex:1;padding:7px 6px;border-radius:10px;border:1px solid rgba(127,127,127,.45);background:rgba(127,127,127,.12);color:inherit;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.q-tro.on{background:rgba(212,160,60,.85);border-color:rgba(212,160,60,1);color:#2a1606}
.q-tro:hover{filter:brightness(1.12)}
.l-bang th{position:static!important;top:auto!important}
