:root { --c: #D62828; --c2: #FCBF49; --bg: #160A0A; --ink: #14203d; --mut: #5d6a8a; --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; }
.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: calc(var(--sat) + 76px) 16px 32px; max-width: 520px; margin: 0 auto; }
.logo { text-align: center; color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.3); }
.logo .mark { width: 76px; height: 76px; margin: 0 auto 6px; border-radius: 24px; display: grid; place-items: center; font-size: 42px; background: linear-gradient(135deg, var(--c2), var(--c)); box-shadow: 0 10px 30px rgba(0,0,0,.3); transform: rotate(-8deg); }
.logo h1 { margin: 0; font-size: clamp(40px, 11vw, 60px); font-weight: 900; letter-spacing: -1px; line-height: 1; }
.logo p { margin: 4px 0 0; font-weight: 800; font-size: 18px; }
.story { color: #fff; text-align: center; font-weight: 600; margin: 0; opacity: .92; }
.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); }
.btn.main { background: linear-gradient(180deg, var(--c2), var(--c)); color: #fff; }
.btn.big { min-height: 72px; font-size: 24px; font-weight: 900; }
.btn.big small { display: block; font-size: 14px; font-weight: 700; opacity: .9; }
.link { border: 0; background: rgba(255,255,255,.88); border-radius: 14px; padding: 12px 16px; font-weight: 800; width: 100%; }
.panel { background: #fff; border-radius: 22px; padding: 20px; max-width: 480px; margin: calc(var(--sat) + 70px) auto 24px; width: calc(100% - 32px); }
.panel h2 { margin: 0 0 8px; }
.panel p, .panel li { color: var(--mut); font-weight: 600; line-height: 1.5; }
.foot { color: #fff; font-size: 13px; text-align: center; opacity: .85; }
.foot a { color: #fff; }
/* Đương Đầu — trang chủ cuộn được (CUON_MENU_v1: không pointer-events:none trên #menu) */
.logo h1 { font-size: clamp(46px, 13vw, 68px); text-shadow: 0 4px 0 #7a1f2b, 0 10px 26px rgba(0,0,0,.45); color: #fff3b0; }
.logo p { color: #fff; }
.stage { width: 100%; height: min(38vh, 330px); flex: none; cursor: pointer; }
.home { gap: 12px; }
.btn small { display: block; font-size: 13px; font-weight: 700; opacity: .9; }
.btn.off { background: rgba(255,255,255,.7); color: #5d6a8a; }
.card { width: 100%; background: rgba(255,255,255,.94); border-radius: 22px; padding: 14px 16px; box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.kicker { font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.mut { color: var(--mut); font-weight: 600; font-size: 14px; line-height: 1.45; margin: 6px 0; }
.card.daily { background: linear-gradient(160deg, #fff8e1, #ffe0e0); border: 3px solid #ffd166; }
.drow { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.drow b { font-size: 20px; }
.dic { width: 54px; height: 54px; border-radius: 16px; background: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: 0 4px 12px rgba(0,0,0,.12); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips span { background: var(--c); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.tile { border: 0; background: #fff7ed; border-radius: 16px; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 10px rgba(0,0,0,.1); min-height: 44px; }
.tile canvas { width: 100%; aspect-ratio: 1; border-radius: 12px; display: block; }
.tile b { font-size: 12px; line-height: 1.2; text-align: center; }
.tile small { font-size: 11px; color: #c77d00; font-weight: 800; }
.tile.lock { opacity: .7; }
.tile.lock small { color: #8a8fa8; }
.row2 { display: flex; gap: 10px; width: 100%; }
.row2 .link { flex: 1; min-height: 48px; }
.panel h3 { margin: 14px 0 6px; font-size: 16px; }
.charms { display: flex; flex-direction: column; gap: 8px; }
.charm { display: flex; gap: 12px; align-items: center; text-align: left; border: 3px solid transparent; background: #f5f6fb; border-radius: 16px; padding: 10px 12px; min-height: 56px; }
.charm.on { border-color: var(--c); background: #fff4e6; }
.charm.lock { opacity: .55; }
.charm .ci { font-size: 28px; width: 40px; text-align: center; flex: none; }
.charm .ct { display: flex; flex-direction: column; }
.charm small { font-size: 13px; font-weight: 700; color: var(--mut); }
.charm small.plus { color: #2a9d8f; }
.charm small.minus { color: #d62828; }
.legend { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 10px; }
.legend li { display: flex; gap: 12px; align-items: flex-start; color: #333 !important; }
.rg { flex: none; width: 38px; height: 38px; border-radius: 50%; display: block; margin-top: 2px; }
.rg.gold { border: 6px solid #ffd166; box-shadow: 0 0 8px #ffd166; }
.rg.dash { border: 5px dashed #c77dff; }
.rg.band { border-radius: 8px; height: 22px; margin-top: 8px; background: linear-gradient(180deg, transparent, #ff9f1c, transparent); }
.rg.red { border: 6px solid #ff3b30; box-shadow: 0 0 8px #ff3b30; }
.rg.hold { background: radial-gradient(circle, #fff3b0, #ffd166 60%, transparent 70%); }
.rg.khi { border-radius: 8px; height: 16px; margin-top: 10px; background: linear-gradient(90deg, #c77dff, #ff8fab); }
.panel.gap .btn { margin: 10px 0; }
