:root { --c: #0096C7; --c2: #FFB703; --bg: #0A2540; --ink: #14203d; --mut: #5d6a8a; --sand: #FFF6E5; --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; }
button:disabled { cursor: default; }

.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + 64px) 16px 24px; max-width: 520px; margin: 0 auto; }
.logo { text-align: center; color: #fff; text-shadow: 0 3px 16px rgba(0,30,60,.55); }
.logo h1 { margin: 0; font-size: clamp(44px, 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(230px, calc(56vh - 170px)); width: 100%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; cursor: pointer; }
.hint { background: rgba(255,255,255,.78); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 800; color: var(--mut); text-align: center; }
.sheet { width: 100%; background: rgba(255,250,240,.97); border-radius: 26px; padding: 14px; box-shadow: 0 -6px 30px rgba(0,30,60,.25); display: flex; flex-direction: column; gap: 8px; }
.moon { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 0 4px; }
.moon b { font-size: 17px; font-weight: 900; }
.moon span { color: #0077B6; font-weight: 800; font-size: 14px; }
.tideln { background: #E6F6FC; color: #14506b; border-radius: 14px; padding: 8px 12px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.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(0,30,60,.12); }
.btn.main { background: linear-gradient(180deg, #2EC4E6, #0077B6); color: #fff; box-shadow: 0 8px 20px rgba(0,119,182,.4); }
.btn.big { min-height: 78px; font-size: 27px; font-weight: 900; }
.btn small { display: block; font-size: 14px; font-weight: 700; opacity: .93; }
.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: 100px; box-shadow: 0 4px 14px rgba(0,30,60,.08); display: flex; flex-direction: column; gap: 2px; }
.tile.wide { grid-column: 1 / -1; min-height: 76px; }
.tile i { font-style: normal; font-size: 26px; }
.tile b { font-size: 17px; }
.tile small { color: var(--mut); font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.tile.hot { background: linear-gradient(180deg, #FFF6D6, #FFE3A3); }
.quests { background: #fff; border-radius: 18px; padding: 10px 12px; box-shadow: 0 4px 14px rgba(0,30,60,.06); }
.quests > b { display: block; margin-bottom: 4px; font-size: 15px; }
.q { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; padding: 4px 0; }
.q em { font-style: normal; color: var(--mut); white-space: nowrap; }
.q.done { color: #2f8f4f; }
.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(0,30,60,.07); }
.foot { color: var(--mut); font-size: 13px; text-align: center; margin: 6px 0 0; }
.foot a { color: var(--c); }

.page { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 68px) 16px 40px; min-height: 100%; background: var(--sand); }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.top h2 { margin: 0; font-size: 24px; font-weight: 900; }
.back { border: 0; background: #fff; border-radius: 14px; min-height: 44px; padding: 0 14px; font-weight: 800; box-shadow: 0 3px 10px rgba(0,30,60,.1); }
.mut { color: var(--mut); font-size: 14px; margin: 4px 0 10px; font-weight: 600; line-height: 1.45; }
.page h3 { margin: 18px 0 8px; font-size: 18px; }
.page ul { padding-left: 20px; margin: 0; }
.page li { margin: 6px 0; line-height: 1.5; font-weight: 600; color: #34405e; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { border: 0; background: #fff; border-radius: 18px; padding: 12px; display: flex; align-items: center; gap: 12px; text-align: left; box-shadow: 0 3px 12px rgba(0,30,60,.07); min-height: 56px; width: 100%; }
.row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row b { font-size: 17px; }
.row .tinh { font-weight: 700; color: var(--mut); font-size: 14px; }
.row small { color: var(--mut); font-weight: 600; font-size: 13px; line-height: 1.4; }
.row small.goal { color: #34405e; }
.row small.nuoc { color: #0077B6; }
.row > em { font-style: normal; font-weight: 900; color: #F2A900; font-size: 18px; letter-spacing: 1px; white-space: nowrap; }
.row.lock { opacity: .55; }
.row.bai { align-items: flex-start; }
.mini { width: 96px; height: 72px; border-radius: 14px; flex: none; }
.row.shop.cur { background: #EAF7FB; }
.buy { border: 0; border-radius: 14px; min-height: 48px; min-width: 104px; padding: 0 12px; background: linear-gradient(180deg, #FFC94A, #F59E0B); color: #4a2a00; font-weight: 900; font-size: 15px; flex: none; }
.buy:disabled { background: #E9ECEF; color: #8a93a8; font-size: 12.5px; max-width: 150px; }
.own { font-style: normal; color: #2f8f4f; font-weight: 900; font-size: 15px; flex: none; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 10px; }
.tabs button { border: 0; border-radius: 14px; min-height: 44px; background: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 2px 8px rgba(0,30,60,.07); }
.tabs button.on { background: var(--c); color: #fff; }
.items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.it { border: 0; background: #fff; border-radius: 16px; padding: 6px 4px 8px; text-align: center; position: relative; box-shadow: 0 2px 8px rgba(0,30,60,.07); }
.it img { width: 100%; max-width: 120px; aspect-ratio: 120 / 84; display: block; margin: 0 auto 4px; border-radius: 12px; }
.it small { font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.2; display: block; }
.it em { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; background: rgba(0,119,182,.85); border-radius: 999px; padding: 1px 7px; }
.it.no small { color: #a0a8ba; }
img.big { width: 100%; max-width: 360px; display: block; margin: 0 auto 8px; border-radius: 16px; }
.panel { background: #fff; border-radius: 22px; padding: 20px; max-width: 480px; margin: calc(var(--sat) + 120px) auto 24px; width: calc(100% - 32px); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.panel h2 { margin: 0 0 6px; }
.panel p { color: var(--mut); font-weight: 700; margin: 0 0 10px; }
