:root { --c: #6a3fd0; --c2: #ff6fa8; --bg: #fffdf6; --ink: #2b2650; --mut: #5d5a80; --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: 12px; padding: calc(var(--sat) + 70px) 16px 32px; max-width: 520px; margin: 0 auto; }
.logo { text-align: center; color: var(--ink); text-shadow: 0 2px 0 #fff, 0 0 14px #fff; }
.logo .mark { width: 78px; height: 78px; margin: 0 auto 6px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, #9b7bff, var(--c)); box-shadow: 0 10px 26px rgba(106,63,208,.35); transform: rotate(-8deg); }
.logo h1 { margin: 0; font-size: clamp(40px, 11vw, 60px); font-weight: 900; letter-spacing: -1px; line-height: 1; color: var(--c); }
.logo p { margin: 6px 0 0; font-weight: 800; font-size: 18px; }
.spacer { height: 34vh; width: 100%; }
.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 18px rgba(40,30,80,.16); }
.btn.main { background: linear-gradient(180deg, #8f6bff, var(--c)); color: #fff; box-shadow: 0 8px 22px rgba(106,63,208,.4); }
.btn.big { min-height: 74px; font-size: 25px; font-weight: 900; }
.btn.big small { display: block; font-size: 14px; font-weight: 700; opacity: .92; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.tile { border: 0; border-radius: 20px; background: rgba(255,255,255,.95); padding: 14px 12px; text-align: left; min-height: 100px; box-shadow: 0 6px 18px rgba(40,30,80,.14); display: flex; flex-direction: column; gap: 2px; }
.tile i { font-style: normal; font-size: 28px; }
.tile b { font-size: 17px; }
.tile small { color: var(--mut); font-weight: 700; font-size: 13px; }
.tile.off { opacity: .6; }
.link { border: 0; background: rgba(255,255,255,.92); border-radius: 14px; padding: 12px 16px; font-weight: 800; width: 100%; min-height: 48px; box-shadow: 0 3px 10px rgba(40,30,80,.1); }
.panel { background: #fff; border-radius: 22px; padding: 20px; max-width: 480px; margin: calc(var(--sat) + 70px) auto 24px; width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(40,30,80,.18); }
.panel h2 { margin: 0 0 8px; color: var(--c); }
.panel p, .panel li { color: var(--mut); font-weight: 600; line-height: 1.5; }
.panel li b { color: var(--ink); }
.foot { color: var(--mut); font-size: 13px; text-align: center; }
.foot a { color: var(--c); }
.page { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 70px) 16px 40px; min-height: 100%; background: rgba(255,253,246,.97); }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.top h2 { margin: 0; font-size: 21px; }
.btn.back { width: auto; min-height: 48px; padding: 0 16px; margin: 0; }
.muted { color: var(--mut); font-weight: 600; }
.chap { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-left: 8px solid var(--t); border-radius: 18px; background: #fff; padding: 14px; margin: 10px 0; text-align: left; box-shadow: 0 4px 14px rgba(40,30,80,.1); min-height: 76px; }
.chap i { font-style: normal; font-size: 32px; }
.chap span { flex: 1; display: flex; flex-direction: column; }
.chap b { font-size: 17px; }
.chap small { color: var(--mut); font-weight: 700; }
.chap em { font-style: normal; font-weight: 900; color: #e09a00; white-space: nowrap; }
.chap.off { opacity: .55; }
.lvg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lvt { position: relative; border: 0; border-radius: 18px; background: #fff; padding: 12px; text-align: left; box-shadow: 0 4px 14px rgba(40,30,80,.1); display: flex; flex-direction: column; gap: 2px; min-height: 112px; }
.lvt b { font-size: 24px; font-weight: 900; color: var(--c); line-height: 1; }
.lvt span { font-weight: 800; font-size: 16px; }
.lvt em { font-style: normal; color: #ffb000; font-size: 18px; letter-spacing: 2px; }
.lvt small { color: var(--mut); font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.lvt .la { position: absolute; top: 10px; right: 10px; font-style: normal; font-weight: 900; font-size: 13px; color: #e0303f; border: 2px solid #e0303f; border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; transform: rotate(-14deg); }
.lvt.off { opacity: .5; }
.lvt.off em { color: var(--mut); font-size: 14px; letter-spacing: 0; }
