:root { --c: #B83280; --c2: #2FB5A8; --vang: #f2c94c; --bg: #1E1530; --ink: #1d1428; --mut: #6a5a78; --kem: #fbf6ef; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); font-family: "Be Vietnam Pro", system-ui, sans-serif; color: var(--ink); overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
#menu { position: fixed; inset: 0; z-index: 20; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#menu.on { display: block; }
#menu.nen { background: rgba(24, 14, 34, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
button { font: inherit; cursor: pointer; color: inherit; }

/* ---------- màn chính: mỏ 3D phía sau, bảng nút phía dưới (cuộn được) ---------- */
.home { min-height: 100%; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: calc(var(--sat) + 62px) 14px calc(var(--sab) + 18px); }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; background: rgba(30, 16, 44, .8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 22px; padding: 8px 18px 8px 8px; align-self: flex-start; box-shadow: 0 6px 24px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); }
.logo img { width: 52px; height: 52px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.logo h1 { margin: 0; font-size: 34px; font-weight: 900; letter-spacing: -1px; line-height: 1; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.logo p { margin: 3px 0 0; font-weight: 800; font-size: 12.5px; color: #ffc2e2; white-space: nowrap; }
.home .mo { flex: 1; min-height: 50vh; }
.sheet { background: rgba(251, 246, 239, .97); border-radius: 26px; padding: 14px; box-shadow: 0 -6px 34px rgba(20,8,30,.5); display: flex; flex-direction: column; gap: 9px; }
.sheet h3 { margin: 6px 2px 0; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.sheet h3 small { font-size: 13px; color: var(--mut); }
.btn { display: block; width: 100%; min-height: 52px; border: 0; border-radius: 18px; background: #fff; font-weight: 800; font-size: 17px; box-shadow: 0 5px 14px rgba(40,20,50,.14); margin: 6px 0; }
.btn.main { background: linear-gradient(180deg, #e0559e, #B83280 55%, #8a1f5e); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.btn.big { min-height: 76px; font-size: 26px; font-weight: 900; margin: 0; }
.btn small { display: block; font-size: 13.5px; font-weight: 700; opacity: .93; }
.btn.hn, .btn.ks { color: #fff; text-align: left; padding: 10px 16px; margin: 0; }
.btn.hn { background: linear-gradient(180deg, #3cc4b4, #22887c); }
.btn.ks { background: linear-gradient(180deg, #5b5ea8, #3a3c7a); }
.btn.hn b, .btn.ks b { font-size: 17px; }
.btn.hn small, .btn.ks small { opacity: .92; line-height: 1.35; margin-top: 2px; }
.btn[disabled] { opacity: .5; }
.luoi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.luoi .o { border: 2px solid transparent; background: #fff; border-radius: 14px; min-height: 66px; padding: 6px; text-align: left; box-shadow: 0 3px 10px rgba(40,20,50,.08); display: flex; flex-direction: column; justify-content: center; }
.luoi .o small { font-size: 11px; font-weight: 800; color: var(--mut); }
.luoi .o b { font-size: 12.5px; font-weight: 900; line-height: 1.2; }
.luoi .o em { font-style: normal; font-size: 12.5px; color: #d99a10; letter-spacing: 1px; }
.luoi .o.chon { border-color: var(--c); background: #fff0f7; }
.luoi .o.khoa { opacity: .55; }
.viec { display: flex; flex-direction: column; gap: 6px; }
.viec div { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; background: #fff; border-radius: 12px; padding: 7px 10px; font-size: 13.5px; font-weight: 700; }
.viec div i { grid-column: 1; height: 6px; border-radius: 4px; background: #f0e2ec; overflow: hidden; }
.viec div i em { display: block; height: 100%; background: linear-gradient(90deg, var(--c), #ffb3d6); }
.viec div b { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: #b07a10; font-size: 13px; }
.viec div.xong { background: #eefbea; }
.hang { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.link { border: 0; background: #fff; border-radius: 14px; padding: 10px 8px; font-weight: 800; width: 100%; min-height: 48px; box-shadow: 0 2px 8px rgba(40,20,50,.08); }
.link small { display: block; font-size: 12px; font-weight: 700; color: var(--mut); }
.foot { color: var(--mut); font-size: 12.5px; text-align: center; margin: 2px 0 0; }
.foot a { color: inherit; }

/* ---------- bảng phụ ---------- */
.panel { background: var(--kem); border-radius: 22px; padding: 18px 16px; max-width: 520px; margin: calc(var(--sat) + 64px) auto 24px; width: calc(100% - 24px); box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.panel h2 { margin: 0 0 6px; font-size: 22px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.panel h2 small { font-size: 14px; color: var(--c); }
.panel h3 { margin: 16px 0 6px; font-size: 16px; }
.panel p, .panel li { color: var(--mut); font-weight: 600; line-height: 1.5; font-size: 14.5px; }
.panel ul { padding-left: 18px; margin: 4px 0; }
.panel li b { color: var(--ink); }
.bst { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bst .k { border: 0; border-radius: 14px; background: linear-gradient(180deg, #2a1e38, #3a2a4a); color: #fff; padding: 6px 2px 8px; min-height: 92px; display: flex; flex-direction: column; align-items: center; }
.bst .k img { width: 56px; height: 56px; }
.bst .k b { font-size: 11px; line-height: 1.2; font-weight: 800; text-align: center; }
.bst .k small { font-size: 10px; color: #ffd27a; font-weight: 800; }
.bst .k.chua { opacity: .6; }
.huyds { list-style: none; padding: 0 !important; }
.huyds li { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 8px 10px; margin: 5px 0; }
.huyds li span { font-size: 22px; } .huyds li b { display: block; color: var(--ink); } .huyds li em { font-style: normal; font-size: 13px; }
.huyds li.chua { opacity: .6; }
.kv { text-align: center; }
.kv img { width: 150px; height: 150px; }
.kv .qt { margin: 0; font-weight: 800; color: var(--c); }
.kv dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; text-align: left; background: #fff; border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.kv dt { color: var(--mut); font-weight: 700; } .kv dd { margin: 0; font-weight: 800; }
.kv .y { text-align: left; background: #fff4d6; border-radius: 12px; padding: 10px 12px; color: #6a4a10; }
.nc { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 9px 10px; margin: 6px 0; }
.nc i { font-style: normal; font-size: 26px; width: 34px; text-align: center; }
.nc span { flex: 1; } .nc b { display: block; } .nc em { font-style: normal; font-size: 12.5px; color: var(--mut); font-weight: 700; }
.nc button { border: 0; border-radius: 12px; min-height: 44px; min-width: 84px; font-weight: 900; background: linear-gradient(180deg, #e0559e, #B83280); color: #fff; }
.nc button.thieu { background: #e8dce6; color: #8a7a88; } .nc button[disabled] { background: #d8f0e0; color: #2a7a4a; }

/* ---------- HUD khoan ---------- */
#hTop { position: fixed; z-index: 10; left: 8px; right: 8px; top: calc(var(--sat) + 8px); display: none; align-items: center; gap: 8px; background: rgba(24, 14, 34, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; border-radius: 18px; padding: 6px 8px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
#hTop.on { display: flex; }
#hTop .dung { border: 0; background: rgba(255,255,255,.12); border-radius: 12px; min-width: 48px; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#hTop .dung small { font-size: 10px; font-weight: 800; }
#hTop .ten { flex: 1; min-width: 0; } #hTop .ten b { display: block; font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #hTop .ten small { display: block; font-size: 11.5px; font-weight: 700; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hTop .dong { width: 88px; } #hTop .nl { display: block; height: 10px; border-radius: 6px; background: rgba(255,255,255,.18); overflow: hidden; } #hTop .nl i { display: block; height: 100%; background: linear-gradient(90deg, #3ad07a, #b8f06a); transition: width .2s; }
#hTop .nl i.vang { background: linear-gradient(90deg, #f2a23a, #ffd24a); } #hTop .nl i.do { background: linear-gradient(90deg, #e0403a, #ff7a5a); }
#hTop .dong small { font-size: 12px; font-weight: 800; }
#hTop .gio { text-align: center; min-width: 46px; } #hTop .gio b { display: block; font-size: 20px; font-weight: 900; line-height: 1; } #hTop .gio small { font-size: 10px; font-weight: 700; opacity: .8; }
#hLop { position: fixed; z-index: 9; left: 12px; right: 12px; top: calc(var(--sat) + 74px); display: none; color: #fff; font-size: 12px; font-weight: 600; background: rgba(24,14,34,.55); border-radius: 12px; padding: 5px 10px; text-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; }
#hLop.on { display: block; } #hLop b { color: #ffd27a; }
#hKhay { position: fixed; z-index: 10; left: 8px; right: 8px; bottom: calc(var(--sab) + 8px); display: none; flex-direction: column; gap: 6px; }
#hKhay.on { display: flex; }
#hKhay .da { min-height: 54px; background: rgba(24,14,34,.82); border-radius: 16px; padding: 4px 8px; display: flex; align-items: center; gap: 2px; overflow: hidden; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
#hKhay .da img { width: 46px; height: 46px; flex: none; } #hKhay .da b { margin-left: auto; font-size: 13px; padding-left: 6px; white-space: nowrap; } #hKhay .da .rong { font-size: 13px; font-weight: 700; opacity: .75; }
#hKhay .nut { display: flex; gap: 6px; }
#hKhay .nut button { flex: 1; border: 0; border-radius: 16px; min-height: 52px; background: linear-gradient(180deg, #ffffff, #efe4ee); color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
#hKhay .nut button b { display: block; font-size: 15px; } #hKhay .nut button small { font-size: 11px; font-weight: 700; color: var(--mut); }
#hKhay .nut .uv { background: linear-gradient(180deg, #8a5aff, #5a2ad0); color: #fff; } #hKhay .nut .uv small { color: #e0d0ff; }
#hCanh { position: fixed; z-index: 12; left: 50%; bottom: calc(var(--sab) + 150px); transform: translateX(-50%) translateY(-8px); opacity: 0; transition: .25s; background: #fff; color: var(--ink); font-weight: 800; font-size: 14px; border-radius: 14px; padding: 9px 14px; max-width: calc(100% - 32px); width: max-content; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); pointer-events: none; }
#hCanh.on { opacity: 1; transform: translateX(-50%); } #hCanh.cam { background: #fff1d6; } #hCanh.do { background: #ffe0dc; } #hCanh.xanh { background: #dcf8e6; } #hCanh.vang { background: #fff6c8; }
#hBan { position: fixed; z-index: 11; left: 16px; right: 16px; top: calc(var(--sat) + 124px); text-align: center; color: #fff; pointer-events: none; opacity: 0; }
#hBan.on { animation: ban 3s ease forwards; }
#hBan b { display: inline-block; font-size: 26px; font-weight: 900; background: rgba(24,14,34,.78); padding: 8px 16px; border-radius: 16px; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
#hBan span { display: block; margin: 8px auto 0; max-width: 340px; font-size: 14px; font-weight: 700; background: rgba(24,14,34,.7); padding: 6px 12px; border-radius: 12px; }
@keyframes ban { 0% { opacity: 0; transform: scale(.9); } 10% { opacity: 1; transform: scale(1.04); } 18% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
#hTay { position: fixed; z-index: 13; left: 0; top: 0; pointer-events: none; display: none; }
#hTay.on { display: block; }
#hTay i { font-style: normal; font-size: 40px; display: block; transform: translate(-12px, -4px); filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
#hTay span { position: absolute; left: 30px; top: 40px; white-space: nowrap; background: #fff; color: var(--ink); font-weight: 900; font-size: 14px; border-radius: 12px; padding: 6px 10px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
#hBay { position: fixed; inset: 0; z-index: 14; pointer-events: none; }
#hBay img.bay { position: absolute; left: 0; top: 0; width: 56px; height: 56px; transition: transform .55s cubic-bezier(.3,.7,.4,1), opacity .55s; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }

/* ---------- hoàn thổ ---------- */
#hHoan { position: fixed; inset: 0; z-index: 15; display: none; pointer-events: none; }
#hHoan.on { display: block; }
#hHoan .the { pointer-events: auto; position: absolute; left: 12px; right: 12px; bottom: calc(var(--sab) + 12px); background: var(--kem); border-radius: 22px; padding: 14px; box-shadow: 0 -6px 30px rgba(0,0,0,.4); }
#hHoan h3 { margin: 0 0 4px; font-size: 20px; } #hHoan p { margin: 0 0 10px; color: var(--mut); font-weight: 600; font-size: 14px; } #hHoan p.ok { color: #2a7a4a; font-weight: 900; font-size: 16px; }
#hHoan .giu { position: relative; overflow: hidden; width: 100%; min-height: 64px; border: 0; border-radius: 18px; background: #6a4a32; color: #fff; font-size: 19px; font-weight: 900; touch-action: none; }
#hHoan .giu span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #a0764a, #5cc04a); }
#hHoan .giu b { position: relative; }
#hHoan .bo { margin-top: 8px; width: 100%; min-height: 44px; border: 0; border-radius: 14px; background: transparent; color: var(--mut); font-weight: 800; }
#hHoan .cay button { pointer-events: auto; position: absolute; transform: translate(-50%, -100%); border: 0; border-radius: 16px; min-width: 76px; min-height: 64px; background: rgba(255,255,255,.95); box-shadow: 0 6px 18px rgba(0,0,0,.35); animation: nhun 1s ease-in-out infinite; }
#hHoan .cay b { display: block; font-size: 26px; } #hHoan .cay small { font-size: 12px; font-weight: 900; }
@keyframes nhun { 50% { transform: translate(-50%, -108%); } }

/* ---------- bàn thử ---------- */
#ban { position: fixed; inset: 0; z-index: 16; display: flex; flex-direction: column; background: #22162c; color: #fff; padding: calc(var(--sat) + 8px) 8px calc(var(--sab) + 8px); gap: 6px; }
#ban .bTop { display: flex; align-items: center; gap: 8px; }
#ban .bTop div { flex: 1; min-width: 0; } #ban .bTop b { display: block; font-size: 17px; font-weight: 900; } #ban .bTop small { font-size: 12px; font-weight: 600; opacity: .88; } #ban .bTop small b { display: inline; font-size: 12px; color: #ffd27a; }
#ban .bTho { border: 0; border-radius: 12px; min-height: 44px; padding: 0 12px; background: rgba(255,255,255,.12); color: #fff; font-weight: 800; font-size: 13px; }
#ban .bUng { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: 44vh; flex: none; }
#ban .u { position: relative; display: flex; align-items: center; gap: 6px; border: 2px solid transparent; border-radius: 14px; background: #fbf6ef; color: var(--ink); min-height: 46px; padding: 2px 6px 2px 4px; text-align: left; transition: opacity .3s, transform .3s; }
#ban .u img { width: 40px; height: 40px; flex: none; }
#ban .u .t { width: 29%; flex: none; min-width: 0; } #ban .u .t b { display: block; font-size: 13px; font-weight: 900; line-height: 1.15; } #ban .u .t em { font-style: normal; font-size: 11px; color: var(--mut); font-weight: 700; }
#ban .u .c { flex: 1; display: flex; flex-wrap: wrap; gap: 2px 3px; } #ban .u .c i { font-style: normal; font-size: 10px; font-weight: 700; background: #efe4ee; border-radius: 6px; padding: 0 4px; line-height: 1.55; color: #5a4a68; } #ban .u .c i.da { background: #ffe9a8; color: #5a3a00; }
#ban .u.bo .t em { visibility: hidden; }
#ban .u s { position: absolute; left: 50px; right: 8px; bottom: 3px; text-decoration: none; font-size: 10.5px; font-weight: 800; color: #d03a3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ban .u.bo { opacity: .42; filter: grayscale(.8); } #ban .u.bo .t b { text-decoration: line-through; text-decoration-color: #d03a3a; text-decoration-thickness: 2px; } #ban .u.bo .c { visibility: hidden; }
#ban .u.chon { border-color: var(--vang); transform: scale(1.01); }
#ban .u.dung { border-color: #3ad07a; background: #e6fbee; animation: lat .6s ease; } #ban .u.sai { border-color: #ff6a5a; background: #ffe6e2; animation: rung .4s ease; }
#ban .u u { text-decoration: none; position: absolute; right: 8px; top: 4px; font-size: 12px; font-weight: 900; color: #2a8a4a; } #ban .u.sai u { color: #c03a3a; }
@keyframes lat { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes rung { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
#ban .bVung { position: relative; flex: 1; min-height: 200px; border-radius: 18px; overflow: hidden; }
#ban canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
#ban .bKq { position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(20,12,28,.86); border-radius: 12px; padding: 7px 10px; font-size: 13px; font-weight: 600; line-height: 1.4; pointer-events: none; }
#ban .bKq b { color: #ffd27a; } #ban .bKq.dung { background: rgba(20,80,48,.92); } #ban .bKq.sai { background: rgba(110,24,24,.92); } #ban .bKq.loai { box-shadow: 0 0 0 2px rgba(255,210,122,.6) inset; }
#ban .bTay { position: absolute; left: 0; top: 0; pointer-events: none; display: none; }
#ban .bTay.on { display: block; }
#ban .bTay i { font-style: normal; font-size: 38px; display: block; transform: translate(-12px, -4px); filter: drop-shadow(0 3px 6px rgba(0,0,0,.6)); }
#ban .bTay i::after { content: attr(data-s); position: absolute; left: 34px; top: 34px; white-space: nowrap; background: #fff; color: var(--ink); font-size: 13px; font-weight: 900; border-radius: 10px; padding: 5px 9px; }
#ban .bPhep { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; flex: none; }
#ban .bPhep .p { border: 0; border-radius: 14px; min-height: 58px; background: rgba(255,255,255,.12); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
#ban .bPhep .p i { font-style: normal; font-size: 20px; } #ban .bPhep .p b { font-size: 12.5px; font-weight: 900; }
#ban .bPhep .p.on { background: linear-gradient(180deg, #e0559e, #B83280); box-shadow: 0 0 0 2px #ffd27a inset; } #ban .bPhep .p.xong { opacity: .5; } #ban .bPhep .p[disabled] { opacity: .3; }
#ban .bPhep .p.goi:not(.on) { animation: goi 1.2s ease-in-out infinite; }
@keyframes goi { 50% { box-shadow: 0 0 0 3px #ffd27a inset; } }
#ban .bPhep .tiep { grid-column: 1 / -1; border: 0; border-radius: 16px; min-height: 58px; background: linear-gradient(180deg, #3cc4b4, #22887c); color: #fff; font-size: 18px; font-weight: 900; }
#ban .bChot { position: absolute; left: 8px; right: 8px; bottom: calc(var(--sab) + 8px); display: none; align-items: center; gap: 8px; background: #fbf6ef; color: var(--ink); border-radius: 18px; padding: 8px 8px 8px 14px; box-shadow: 0 -6px 24px rgba(0,0,0,.5); }
#ban .bChot.on { display: flex; }
#ban .bChot div { flex: 1; } #ban .bChot b { display: block; font-size: 16px; } #ban .bChot small { font-size: 12px; color: var(--mut); font-weight: 700; }
#ban .bChot button { border: 0; border-radius: 14px; min-height: 52px; padding: 0 16px; font-weight: 900; font-size: 16px; }
#ban .bChot .thoi { background: #efe4ee; } #ban .bChot .chot { background: linear-gradient(180deg, #e0559e, #B83280); color: #fff; }

/* ---------- xưởng mài ---------- */
#hMai { position: fixed; inset: 0; z-index: 15; display: none; pointer-events: none; color: #fff; }
#hMai.on { display: block; }
#hMai .chon { pointer-events: auto; position: absolute; left: 8px; right: 8px; bottom: calc(var(--sab) + 8px); max-height: 74vh; overflow-y: auto; background: var(--kem); color: var(--ink); border-radius: 22px; padding: 12px; box-shadow: 0 -6px 30px rgba(0,0,0,.5); }
#hMai h3 { margin: 0 0 8px; font-size: 19px; } #hMai h3 small { font-size: 12.5px; color: var(--mut); font-weight: 700; }
#hMai .ds { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
#hMai .ds .d { flex: none; width: 96px; border: 2px solid transparent; border-radius: 14px; background: #fff; padding: 4px; display: flex; flex-direction: column; align-items: center; min-height: 110px; }
#hMai .ds .d img { width: 54px; height: 54px; } #hMai .ds .d b { font-size: 12px; line-height: 1.15; text-align: center; } #hMai .ds .d small { font-size: 10.5px; color: var(--mut); font-weight: 700; text-align: center; }
#hMai .ds .d.on { border-color: var(--c); background: #fff0f7; }
#hMai .goi { font-size: 13.5px; color: var(--mut); font-weight: 600; margin: 8px 2px; } #hMai .goi b { color: var(--ink); }
#hMai .cut { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#hMai .cut .c { border: 2px solid transparent; border-radius: 14px; background: #fff; display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 6px; text-align: left; padding: 6px; min-height: 64px; align-items: center; }
#hMai .cut .c img { grid-row: 1 / span 2; width: 46px; height: 46px; } #hMai .cut .c b { font-size: 14px; } #hMai .cut .c small { font-size: 10.5px; color: var(--mut); font-weight: 600; line-height: 1.25; }
#hMai .cut .c.on { border-color: var(--c); background: #fff0f7; }
#hMai .hang { margin-top: 10px; }
#hMai .hang button { border: 0; border-radius: 16px; min-height: 54px; font-weight: 900; font-size: 15px; }
#hMai .hang .bo { background: #efe4ee; } #hMai .hang .di { background: linear-gradient(180deg, #e0559e, #B83280); color: #fff; } #hMai .hang .di[disabled] { opacity: .45; }
#hMai .mai { position: absolute; inset: 0; }
#hMai .tren { position: absolute; left: 12px; right: 12px; top: calc(var(--sat) + 10px); background: rgba(24,14,34,.75); border-radius: 16px; padding: 8px 12px; }
#hMai .tren b { display: block; font-size: 17px; } #hMai .tren small { font-size: 12.5px; opacity: .88; font-weight: 600; }
#hMai .dong { position: absolute; left: 12px; right: 92px; bottom: calc(var(--sab) + 70px); background: rgba(24,14,34,.8); border-radius: 18px; padding: 8px; display: flex; align-items: center; gap: 8px; }
#hMai .dh { position: relative; width: 150px; flex: none; } #hMai .dh svg { width: 150px; display: block; } #hMai .dh b { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font-size: 15px; font-weight: 900; }
#hMai .so { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; } #hMai .so b { color: #ffd27a; font-size: 15px; }
#hMai .can { pointer-events: auto; position: absolute; right: 12px; bottom: calc(var(--sab) + 92px); width: 72px; height: 290px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.08)); border: 2px solid rgba(255,255,255,.3); touch-action: none; }
#hMai .can i { position: absolute; left: 6px; right: 6px; top: calc(50% - 22px); height: 44px; border-radius: 14px; background: linear-gradient(180deg, #ffd27a, #e0a02a); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
#hMai .can span { position: absolute; left: -10px; right: -10px; bottom: -4px; transform: translateY(100%); font-size: 11px; font-weight: 800; text-align: center; line-height: 1.2; text-shadow: 0 1px 3px #000; }
#hMai .loi { position: absolute; left: 12px; right: 12px; bottom: calc(var(--sab) + 8px); margin: 0; background: rgba(24,14,34,.8); border-radius: 14px; padding: 8px 12px; font-size: 13px; font-weight: 600; min-height: 52px; display: flex; align-items: center; }
#hMai .loi b { color: #ffd27a; margin-right: 4px; }

/* ---------- khoan sâu: đoán nhanh ---------- */
#hNhanh { position: fixed; inset: 0; z-index: 15; display: none; background: rgba(20,10,30,.55); }
#hNhanh.on { display: block; }
#hNhanh .the { position: absolute; left: 10px; right: 10px; bottom: calc(var(--sab) + 10px); background: var(--kem); color: var(--ink); border-radius: 22px; padding: 12px; box-shadow: 0 -6px 30px rgba(0,0,0,.5); }
#hNhanh h3 { margin: 0 0 6px; font-size: 17px; }
#hNhanh .da { display: flex; gap: 10px; align-items: center; } #hNhanh .da img { width: 84px; height: 84px; } #hNhanh .da p { margin: 0; font-size: 13.5px; color: var(--mut); font-weight: 600; } #hNhanh .da i { font-style: normal; display: inline-block; background: #ffe9a8; color: #5a3a00; border-radius: 6px; padding: 1px 6px; margin: 2px 3px 0 0; font-size: 12px; font-weight: 800; }
#hNhanh .ds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
#hNhanh .ds button { border: 2px solid transparent; border-radius: 14px; background: #fff; padding: 6px 4px; min-height: 96px; display: flex; flex-direction: column; align-items: center; }
#hNhanh .ds img { width: 46px; height: 46px; } #hNhanh .ds b { font-size: 12.5px; line-height: 1.15; text-align: center; } #hNhanh .ds small { font-size: 10.5px; color: var(--mut); font-weight: 700; }
#hNhanh .ds button.bo { opacity: .35; text-decoration: line-through; }
#hNhanh .thu { width: 100%; border: 0; border-radius: 14px; min-height: 50px; background: linear-gradient(180deg, #5b5ea8, #3a3c7a); color: #fff; font-weight: 900; font-size: 15px; } #hNhanh .thu small { font-weight: 700; opacity: .85; }
#hTuLen { position: fixed; z-index: 12; left: 50%; bottom: calc(var(--sab) + 196px); transform: translateX(-50%); display: none; }
#hTuLen.on { display: block; animation: nhan 1s ease-in-out infinite; }
#hTuLen button { border: 0; border-radius: 16px; min-height: 52px; padding: 6px 16px; background: #ffd27a; color: #1d1428; box-shadow: 0 8px 22px rgba(0,0,0,.4); }
#hTuLen b { display: block; font-size: 15px; } #hTuLen small { font-size: 12px; font-weight: 700; }
@keyframes nhan { 50% { transform: translateX(-50%) scale(1.04); } }
