:root { --c: #2a6f8f; --c2: #f2c14e; --bg: #0e2430; --ink: #14203d; --mut: #5d6a8a; --nau: #3a2412; --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; }
canvas#c { position: fixed; inset: 0; touch-action: none; display: block; width: 100%; height: 100%; }
#menu { position: fixed; inset: 0; z-index: 20; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#menu.on { display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
.btn { display: block; width: 100%; min-height: 52px; border: 0; border-radius: 18px; background: #fff; font-weight: 800; font-size: 17px; margin: 8px 0; box-shadow: 0 6px 18px rgba(0,0,0,.18); color: var(--nau); }
.btn.main { background: linear-gradient(180deg, #f6cf6a, #d99a2b); color: #2a1608; }
.btn.big { min-height: 72px; font-size: 24px; font-weight: 900; }
.btn.big small { display: block; font-size: 14px; font-weight: 700; opacity: .85; }
.link { border: 0; background: rgba(255,255,255,.88); border-radius: 14px; padding: 12px 16px; font-weight: 800; width: 100%; }
.panel { background: #fffaf2; border-radius: 22px; padding: 20px; max-width: 480px; margin: calc(var(--sat) + 70px) auto 24px; width: calc(100% - 32px); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.panel h2 { margin: 0 0 8px; color: var(--nau); }
.panel h3 { margin: 16px 0 6px; font-size: 15px; color: var(--c); }
.panel p, .panel li { color: var(--mut); font-weight: 600; line-height: 1.5; }
.panel ul { padding-left: 18px; }
.panel input, #panel input { width: 100%; min-height: 48px; border: 1px solid #d9cdb6; border-radius: 14px; padding: 0 14px; font: inherit; font-size: 16px; margin: 8px 0; background: #fff; }
.nho { font-size: 13px; color: var(--mut); font-weight: 600; margin: 6px 0; }
.foot { color: #fff; font-size: 12px; text-align: center; opacity: .85; margin: 8px 0 0; }
.foot a { color: #fff; }
.an { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* trang chính: cảnh 3D phía trên, thẻ phía dưới */
.home { min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 14px; padding: calc(var(--sat) + 64px) 16px calc(var(--sab) + 18px); max-width: 520px; margin: 0 auto; }
.home .dau { text-align: center; }
.lich { color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 2px 8px rgba(0,0,0,.55); }
.lich b { font-weight: 900; }
.lich .le { display: block; margin: 6px auto 0; width: max-content; max-width: 90%; background: rgba(242,193,78,.94); color: var(--nau); padding: 4px 12px; border-radius: 999px; font-weight: 800; }
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.4); }
.logo img { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.logo h1 { margin: 0; font-size: 36px; font-weight: 900; letter-spacing: -.5px; }
.khau { color: #fff; font-weight: 800; font-size: 15px; margin: 4px 0 0; text-shadow: 0 2px 8px rgba(0,0,0,.55); }
.the { width: 100%; background: rgba(10,30,44,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 24px; padding: 14px; color: #e8f3f6; }
.the .song { margin: 0 0 6px; font-size: 13px; text-align: center; line-height: 1.5; }
.the .link { background: rgba(255,255,255,.12); color: #e8f3f6; margin-top: 6px; min-height: 44px; padding: 8px 12px; font-size: 14px; }
.the .vlhome { background: rgba(242,193,78,.2); color: #ffe2a6; }
.bon { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 0; }
.bon button { border: 0; border-radius: 14px; min-height: 60px; background: #f4f8f6; color: var(--nau); font-weight: 800; font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; }
.bon i { font-style: normal; font-size: 22px; }
/* trong Phật đài */
#tren { position: fixed; z-index: 15; left: 8px; right: 8px; top: calc(var(--sat) + 58px); display: none; align-items: center; gap: 6px; }
#tren.on { display: flex; }
#tren button { border: 0; min-height: 44px; border-radius: 12px; padding: 0 11px; font-weight: 800; background: rgba(255,250,240,.92); color: var(--nau); font-size: 14px; flex: none; }
#tren .tt { flex: 1; min-width: 0; text-align: center; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.7); line-height: 1.25; }
#tren .tt b { display: block; font-size: 13px; } #tren .tt small { font-size: 11px; font-weight: 700; opacity: .95; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tren .vlb { background: rgba(242,193,78,.95); }
#loi { position: fixed; z-index: 16; left: 50%; top: calc(var(--sat) + 112px); transform: translate(-50%, -6px); max-width: calc(100% - 32px); width: max-content; background: rgba(10,26,38,.82); color: #fff; font-weight: 800; font-size: 14px; line-height: 1.4; text-align: center; padding: 9px 16px; border-radius: 16px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#loi.on { opacity: 1; transform: translate(-50%, 0); }
#goiy { position: fixed; z-index: 14; left: 12px; bottom: calc(var(--sab) + 152px); width: max-content; max-width: calc(100% - 82px); display: none; background: rgba(255,250,240,.95); color: var(--nau); border-radius: 18px; padding: 12px 16px; font-weight: 700; font-size: 14px; text-align: center; line-height: 1.5; box-shadow: 0 10px 28px rgba(0,0,0,.35); pointer-events: none; }
#goiy.on { display: block; }
#goiy .tay { display: inline-block; font-size: 22px; margin-right: 6px; animation: cham 1.2s ease-in-out infinite; }
@keyframes cham { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px) scale(.92); } }
#dock { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; display: none; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 8px calc(var(--sab) + 8px); background: linear-gradient(180deg, rgba(8,24,34,0), rgba(8,24,34,.88) 24%); max-width: 640px; margin: 0 auto; }
#dock.on { display: grid; }
#dock button { position: relative; border: 0; border-radius: 14px; min-height: 56px; background: rgba(255,250,240,.95); color: var(--nau); font-weight: 800; font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 2px; }
#dock button i { font-style: normal; font-size: 21px; line-height: 1; }
#dock button.on { background: linear-gradient(180deg, #f6cf6a, #d99a2b); color: #2a1608; }
#dock button em { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #f2c14e; box-shadow: 0 0 0 2px #fff; }
#panel { position: fixed; z-index: 17; left: 8px; right: 8px; bottom: calc(var(--sab) + 140px); display: none; background: rgba(255,250,242,.97); border-radius: 18px; padding: 12px; max-width: 560px; margin: 0 auto; max-height: 52dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
#panel.on { display: block; }
#panel h3 { margin: 0 0 8px; font-size: 16px; color: var(--nau); }
#panel .lon { border: 0; min-height: 52px; padding: 0 18px; border-radius: 16px; font-weight: 900; font-size: 16px; color: #fff; background: linear-gradient(180deg, #3a8fb4, #2a6f8f); width: 100%; margin: 6px 0; }
#panel .lon:disabled { opacity: .5; }
#panel .chip { border: 1px solid #d9cdb6; background: #fff; border-radius: 999px; min-height: 44px; padding: 0 14px; font-weight: 800; font-size: 13px; color: var(--nau); }
#panel .chip.on { background: var(--c2); border-color: #d99a2b; }
#panel .pr { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
#panel .dong { border: 0; background: transparent; color: var(--c); font-weight: 800; min-height: 44px; width: 100%; }
.loai { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.loai button { border: 0; background: #f2f6f4; border-radius: 14px; padding: 8px 10px; text-align: left; min-height: 64px; display: grid; grid-template-columns: 30px 1fr; column-gap: 6px; align-items: center; }
.loai i { font-style: normal; font-size: 24px; grid-row: span 2; }
.loai b { font-size: 14px; color: var(--nau); } .loai small { font-size: 11px; color: var(--mut); font-weight: 600; line-height: 1.3; }
.noi { display: grid; gap: 6px; margin: 8px 0; }
.noi button { border: 0; background: #eaf4f8; border-radius: 14px; min-height: 56px; padding: 8px 14px; text-align: left; }
.noi b { display: block; font-size: 16px; color: var(--nau); } .noi small { color: var(--c); font-weight: 700; }
.sai { background: #fff3dc; border-left: 4px solid var(--c2); padding: 10px 12px; border-radius: 10px; color: var(--nau) !important; font-weight: 700; font-size: 14px; line-height: 1.5; }
.vl { display: grid; gap: 6px; margin: 10px 0; }
.vl div { display: flex; align-items: center; gap: 10px; background: #f2f4f1; border-radius: 12px; padding: 10px 12px; }
.vl div.xong { background: #fff3d6; } .vl i { font-style: normal; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 16px; flex: none; } .vl .xong i { background: var(--c2); color: var(--nau); font-weight: 900; }
.vl b { color: var(--nau); font-size: 14px; }
/* sổ */
.so .chuoi { font-size: 18px; font-weight: 900; color: var(--nau); margin: 0; }
.so .luoi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.so .luoi div { background: #f1f6f4; border-radius: 12px; padding: 8px; text-align: center; }
.so .luoi b { display: block; font-size: 20px; color: var(--nau); }
.so .luoi span { font-size: 11px; color: var(--mut); font-weight: 700; }
.lich28 { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.lich28 i { aspect-ratio: 1; border-radius: 4px; background: #e6ece9; }
.lich28 .m1 { background: #bfe0d8; } .lich28 .m2 { background: #7fc0b4; } .lich28 .m3 { background: #3e9a8c; } .lich28 .m4 { background: #2a6f8f; }
.lich28 i.sen { box-shadow: inset 0 0 0 2px var(--c2); }
.huy { display: grid; gap: 6px; }
.huy div { background: #f3f3ef; border-radius: 12px; padding: 8px 10px; opacity: .55; }
.huy div.co { background: #fff3d6; opacity: 1; }
.huy b { color: var(--nau); } .huy small { display: block; color: var(--mut); font-weight: 600; }
.cayds { display: grid; gap: 6px; }
.cayds div { position: relative; background: #eef6ea; border-radius: 12px; padding: 8px 10px 14px; }
.cayds b { color: var(--nau); display: block; } .cayds small { color: var(--mut); font-weight: 600; }
.cayds i { position: absolute; left: 10px; right: 10px; bottom: 6px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #5e9a48 var(--p), #d8e6d2 var(--p)); }
.ao { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; }
.ao button { border: 2px solid #e6dccb; background: #fff; border-radius: 12px; min-height: 44px; font-weight: 700; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 13px; color: var(--nau); }
.ao button.on { border-color: var(--c); }
.ao i { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid #d9cdb6; background: #fff; border-radius: 999px; min-height: 44px; padding: 0 14px; font-weight: 800; font-size: 14px; color: var(--nau); }
.chips button.on { background: var(--c2); border-color: #d99a2b; }
.hai { display: flex; gap: 8px; } .hai .btn { margin: 4px 0; font-size: 15px; min-height: 48px; }
/* nút camera */
#camNut { position: fixed; z-index: 14; right: 10px; bottom: calc(var(--sab) + 150px); display: none; flex-direction: column; gap: 6px; }
#camNut.on { display: flex; }
#camNut button { width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(255,250,240,.9); color: var(--nau); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#panel.on ~ #camNut { display: none; }
/* ngồi thiền */
#tho { position: fixed; z-index: 16; inset: calc(var(--sat) + 116px) 0 calc(var(--sab) + 26px); display: none; flex-direction: column; align-items: center; justify-content: space-between; pointer-events: none; }
#tho.on { display: flex; }
#tho .tren { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#tho .vong { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
#tho .vong i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255,240,200,.5), rgba(255,210,140,.14) 62%, rgba(255,210,140,0) 72%); border: 2px solid rgba(255,244,220,.8); transition: transform .2s linear; transform: scale(.55); }
#tho .vong b { position: relative; color: #fff; font-size: 17px; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
#tho p { margin: 0; color: #fff; font-weight: 700; font-size: 13px; text-shadow: 0 2px 6px rgba(0,0,0,.7); }
#tho button { pointer-events: auto; border: 0; border-radius: 999px; min-height: 48px; padding: 0 26px; font-weight: 800; background: rgba(255,250,240,.92); color: var(--nau); }
body.thien #dock, body.thien #camNut, body.thien #panel { display: none !important; }
.khong3d { position: fixed; inset: auto 16px 40% 16px; z-index: 30; background: #fff; border-radius: 16px; padding: 16px; font-weight: 700; text-align: center; }
