:root { --c: #3B4BFF; --c2: #FFB627; --bg: #141B3D; --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; }
.sao { color: #fff; font-weight: 800; background: rgba(255,255,255,.14); padding: 6px 14px; border-radius: 99px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.tile { border: 0; border-radius: 18px; background: rgba(255,255,255,.94); padding: 14px 10px; min-height: 76px; text-align: left; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.tile b { display: block; font-size: 16px; font-weight: 900; }
.tile small { display: block; font-size: 12.5px; color: var(--mut); font-weight: 700; margin-top: 4px; }
.gsel { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; color: #fff; font-weight: 800; font-size: 14px; }
.chip { border: 0; border-radius: 99px; padding: 10px 14px; min-height: 44px; font-weight: 800; font-size: 14px; background: rgba(255,255,255,.85); color: var(--ink); }
.chip.on { background: var(--c2); color: #2a1a00; box-shadow: 0 0 0 3px #fff inset; }
.panel.center { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.mini { position: relative; width: 44px; height: 44px; display: grid; place-items: center; font-size: 26px; border-radius: 12px; background: #eef2ff; }
.mini i { position: absolute; right: -3px; bottom: -3px; font-style: normal; font-size: 11px; font-weight: 900; background: #7b61ff; color: #fff; border-radius: 99px; min-width: 18px; height: 18px; display: grid; place-items: center; }
.list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.stage { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; background: #f3f5ff; border-radius: 16px; padding: 12px; min-height: 64px; }
.stage.lock { opacity: .55; }
.stage .si { font-size: 32px; width: 44px; text-align: center; flex: none; }
.stage .sb { flex: 1; min-width: 0; }
.stage .sb b { display: block; font-weight: 900; }
.stage .sb small { display: block; color: var(--mut); font-weight: 700; font-size: 13px; line-height: 1.35; }
.stage .sb small.fr { color: #7b61ff; }
.stage .ss i { font-style: normal; color: #cfd5ea; font-size: 20px; }
.stage .ss i.on { color: #ffb627; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.tool { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; border: 0; background: #f3f5ff; border-radius: 16px; padding: 12px 8px; min-height: 110px; }
.tool.lock { background: #eceef5; }
.tool.lock .ti { filter: grayscale(1); opacity: .6; }
.tool .ti { font-size: 34px; }
.tool b { font-weight: 900; font-size: 14px; }
.tool small { color: var(--mut); font-weight: 700; font-size: 12px; line-height: 1.3; }
.buy { border: 0; border-radius: 12px; background: var(--c); color: #fff; font-weight: 800; padding: 8px 12px; min-height: 44px; margin-top: 6px; flex: none; }
.buy:disabled { background: #b9bfd6; }
.buy.on { background: #2ec4b6; }
.tabs { display: flex; gap: 8px; margin: 8px 0; }
.tabs .chip { background: #eef2ff; }
