:root { --c: #F77F00; --c2: #4CC9F0; --bg: #2a1d3a; --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(0,0,0,.28); padding: 6px 14px; border-radius: 99px; }
.spacer { width: 100%; height: 300px; border-radius: 24px; cursor: pointer; flex: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.tile { border: 0; border-radius: 18px; background: rgba(255,255,255,.95); 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; }
.panel.wide { max-width: 560px; }
.panel h3 { margin: 14px 0 4px; font-size: 17px; }
.panel .mut { color: var(--mut); font-weight: 800; }
.chap { margin: 10px 0; border-radius: 18px; background: #f6f2ff; overflow: hidden; }
.chap summary { list-style: none; display: flex; gap: 12px; align-items: center; padding: 12px; cursor: pointer; min-height: 64px; }
.chap summary::-webkit-details-marker { display: none; }
.chap .ci { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex: none; }
.chap .cb b { display: block; font-weight: 900; }
.chap .cb small { display: block; color: var(--mut); font-weight: 700; font-size: 13px; }
.lvgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 10px 12px; }
.lv { border: 0; border-radius: 14px; background: #fff; padding: 8px 4px; min-height: 92px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 8px rgba(0,0,0,.08); }
.lv b { font-size: 17px; font-weight: 900; }
.lv small { font-size: 11px; font-weight: 700; color: var(--ink); line-height: 1.2; text-align: center; }
.lv .kd { font-size: 10px; font-weight: 800; color: #7b61ff; }
.lv.rg { background: linear-gradient(180deg, #fff3d6, #ffe0a3); }
.lv.rg .kd { color: #c45a00; }
.lv i { font-style: normal; color: #f5a623; font-size: 14px; letter-spacing: 1px; }
.lv.lock { opacity: .5; }
.dl { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.di { display: flex; gap: 12px; align-items: center; background: #f6f2ff; border-radius: 14px; padding: 10px 12px; }
.di b { width: 34px; height: 34px; border-radius: 99px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }
.di span { font-weight: 800; }
.di small { display: block; color: var(--mut); font-weight: 700; font-size: 12.5px; }
.list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.myrow { display: flex; gap: 6px; align-items: center; background: #f6f2ff; border-radius: 14px; padding: 8px 10px; }
.myrow span { flex: 1; min-width: 0; }
.myrow b { display: block; font-weight: 900; }
.myrow small { color: var(--mut); font-weight: 700; font-size: 12px; }
.chip { border: 0; border-radius: 99px; padding: 10px 12px; min-height: 44px; font-weight: 800; font-size: 13px; background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.chip.on { background: var(--c); color: #fff; }
