:root { --c: #B5179E; --c2: #FFD166; --bg: #0E0A26; --ink: #2B1B3D; --mut: #6B5B7B; --paper: #FFF8F0; --sat: env(safe-area-inset-top, 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; }
#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; }

/* trang chủ */
.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + 62px) 16px 22px; max-width: 520px; margin: 0 auto; }
.logo { text-align: center; color: #fff; text-shadow: 0 3px 16px rgba(10, 0, 40, .6); }
.logo .mark { width: 78px; height: 78px; display: block; margin: 0 auto 6px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transform: rotate(-6deg); }
.logo h1 { margin: 0; font-size: clamp(42px, 12vw, 60px); font-weight: 900; letter-spacing: -1px; line-height: 1; }
.logo p { margin: 6px 0 0; font-weight: 800; font-size: 16px; }
.spacer { height: max(150px, calc(42vh - 190px)); width: 100%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; cursor: pointer; }
.hint { background: rgba(255, 255, 255, .16); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 800; }
.sheet { width: 100%; background: rgba(255, 248, 240, .97); border-radius: 26px; padding: 14px; box-shadow: 0 -6px 30px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 8px; }
.btn { display: block; width: 100%; min-height: 52px; border: 0; border-radius: 18px; background: #fff; font-weight: 800; font-size: 17px; margin: 6px 0; box-shadow: 0 6px 16px rgba(40, 0, 60, .12); }
.btn.main { background: linear-gradient(180deg, #D63AB8, #8E1279); color: #fff; box-shadow: 0 8px 20px rgba(181, 23, 158, .4); }
.btn.big { min-height: 74px; font-size: 25px; font-weight: 900; }
.btn small { display: block; font-size: 14px; font-weight: 700; opacity: .92; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border: 0; border-radius: 20px; background: #fff; padding: 12px; text-align: left; min-height: 92px; box-shadow: 0 4px 14px rgba(40, 0, 60, .1); display: flex; flex-direction: column; gap: 4px; }
.tile b { font-size: 16px; }
.tile small { color: var(--mut); font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.tile.hot { background: linear-gradient(180deg, #FFF4D1, #FFE29A); }
.tile.lock { opacity: .55; }
.nghia { background: linear-gradient(135deg, #2B1B5E, #5A189A); color: #fff; border-radius: 20px; padding: 14px; }
.nghia b { font-size: 17px; }
.nghia p { margin: 6px 0 8px; font-weight: 600; line-height: 1.5; font-size: 14.5px; }
.han, .han-big { font-family: "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Noto Serif CJK SC", "Microsoft YaHei", serif; }
.han { font-size: 22px; font-weight: 900; color: #FFD166; }
.link { border: 0; background: #fff; border-radius: 14px; min-height: 48px; padding: 10px 16px; font-weight: 800; width: 100%; box-shadow: 0 3px 10px rgba(40, 0, 60, .08); }
.link.sm { min-height: 44px; background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.foot { color: var(--mut); font-size: 13px; text-align: center; margin: 6px 0 0; }
.foot a { color: var(--c); }

/* trang con */
.page { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 68px) 16px 40px; min-height: 100%; background: var(--paper); }
.page.dimbg { background: rgba(10, 4, 30, .6); display: flex; align-items: center; }
.page.dimbg .card { width: 100%; }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.top h2 { margin: 0; font-size: 22px; }
.link.back { width: auto; min-width: 96px; background: #F3E6FF; }
.muted { color: var(--mut); font-weight: 600; line-height: 1.5; }
.center { text-align: center; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; border: 0; background: #fff; border-radius: 18px; padding: 12px; text-align: left; min-height: 64px; box-shadow: 0 3px 10px rgba(40, 0, 60, .08); }
.row.lock { opacity: .5; }
.num { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 900; color: #fff; background: linear-gradient(135deg, #7B2CBF, #B5179E); }
.tx { flex: 1; display: flex; flex-direction: column; }
.tx b { font-size: 15.5px; }
.tx small { color: var(--mut); font-weight: 600; font-size: 12.5px; }
.st { color: #E09F00; font-size: 17px; white-space: nowrap; font-weight: 800; }
.tabs { display: flex; gap: 6px; margin: 6px 0 12px; }
.tab { flex: 1; min-height: 46px; border: 0; border-radius: 14px; background: #F3E6FF; font-weight: 800; }
.tab.on { background: var(--c); color: #fff; }
.card { background: #fff; border-radius: 18px; padding: 14px 16px; margin: 10px 0; box-shadow: 0 3px 10px rgba(40, 0, 60, .08); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: #4A3B57; font-weight: 600; line-height: 1.55; }
.card.dim { opacity: .55; }
.card .btn { margin-top: 10px; }
.han-big { display: flex; justify-content: center; gap: 18px; font-size: 64px; font-weight: 900; color: var(--c); margin-top: 6px; }
.stars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.sao { border-radius: 16px; padding: 10px 12px; background: #2B1B3D; color: rgba(255, 255, 255, .5); min-height: 70px; display: flex; flex-direction: column; gap: 3px; }
.sao.on { background: linear-gradient(135deg, #1B1340, #3C1A6E); color: #fff; box-shadow: inset 0 0 0 2px var(--c); }
.sao b { font-size: 14.5px; }
.sao small { font-size: 12px; font-weight: 600; opacity: .85; }
