:root { --c: #E8505B; --c2: #FFC857; --bg: #2B1B3D; --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; }
button:disabled { cursor: default; }
.logo .mark { width: 96px; height: 96px; background: linear-gradient(135deg, #fff3c9, var(--c2)); }
.logo .mark canvas { width: 92px; height: 92px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.tile { border: 0; border-radius: 20px; background: rgba(255,255,255,.94); padding: 14px 12px; text-align: left; min-height: 104px; box-shadow: 0 6px 18px rgba(20,0,40,.22); display: flex; flex-direction: column; gap: 2px; }
.tile i { font-style: normal; font-size: 28px; }
.tile b { font-size: 17px; color: var(--ink); }
.tile small { color: var(--mut); font-weight: 700; font-size: 13px; line-height: 1.35; }
.tile.day { background: linear-gradient(160deg, #fff7da, #ffe3a3); }
.page { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 70px) 16px 40px; min-height: 100%; background: #f6f1ff; }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.top h2 { margin: 0; font-size: 26px; 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(40,10,80,.12); }
.mut { color: var(--mut); font-size: 14px; font-weight: 600; margin: 4px 0 12px; line-height: 1.45; }
h3 { margin: 16px 0 8px; font-size: 18px; }
.lvls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lvl { border: 0; border-radius: 20px; background: #fff; padding: 12px 10px; min-height: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 4px 14px rgba(40,10,80,.08); }
.lvl b { font-size: 26px; font-weight: 900; color: var(--c); line-height: 1; }
.lvl span { font-size: 15px; font-weight: 800; }
.lvl.boss { background: linear-gradient(180deg, #fff, #e9eefa); border: 2px solid #8FA3C8; }
.lvl.lock { opacity: .5; }
.st { font-style: normal; color: #f5a700; letter-spacing: 2px; font-size: 18px; }
.st i { font-style: normal; color: #ddd3ee; }
.mini { display: flex; gap: 2px; }
.pt.sm { width: 34px; height: 34px; }
.brief { background: #fff; border-radius: 22px; padding: 16px; border-left: 8px solid var(--c); box-shadow: 0 6px 18px rgba(40,10,80,.08); margin-bottom: 12px; }
.brief > small { color: var(--c); font-weight: 800; }
.brief h2 { margin: 2px 0 6px; font-size: 26px; }
.goals { list-style: none; padding: 0; margin: 6px 0; }
.goals li { padding: 4px 0; font-weight: 800; color: var(--mut); }
.goals li.on { color: #d79400; }
.tipx { background: #fff6dc; border-radius: 14px; padding: 10px 12px; font-weight: 700; margin: 8px 0 0; font-size: 14px; }
.foes { display: flex; flex-direction: column; gap: 10px; }
.foe { display: flex; gap: 10px; align-items: center; background: #f6f1ff; border-radius: 18px; padding: 8px 10px; }
.page > .foes .foe { background: #fff; box-shadow: 0 4px 12px rgba(40,10,80,.06); }
.foe .pt { width: 72px; height: 72px; flex: none; background: radial-gradient(circle, #fff, #ece4fa); border-radius: 18px; }
.foe b { font-size: 17px; }
.foe small { display: block; color: var(--c); font-weight: 800; font-size: 12px; }
.foe p { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--mut); line-height: 1.4; }
.foe.lock { opacity: .6; }
.foe .q { width: 72px; height: 72px; border-radius: 18px; background: #ddd3ee; display: grid; place-items: center; font-size: 34px; font-weight: 900; color: #fff; flex: none; }
.bars { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; margin-top: 6px; font-size: 12px; font-weight: 700; }
.bars i { display: block; height: 7px; background: #ece4fa; border-radius: 4px; overflow: hidden; }
.bars u { display: block; height: 100%; background: linear-gradient(90deg, var(--c2), var(--c)); }
.list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.row { border: 0; background: #fff; border-radius: 18px; padding: 14px 16px; text-align: left; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 4px 12px rgba(40,10,80,.06); min-height: 56px; }
.row b { font-size: 16px; }
.row span { color: var(--mut); font-weight: 600; font-size: 14px; line-height: 1.45; }
.row:disabled { opacity: .5; }
.skins { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.skin { border: 3px solid transparent; background: #fff; border-radius: 20px; padding: 10px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 4px 14px rgba(40,10,80,.08); }
.skin.sel { border-color: var(--c); }
.skin .pt { width: 96px; height: 96px; }
.skin small { color: var(--mut); font-weight: 700; }
.skin:disabled { opacity: .55; }
.ov { min-height: 100%; display: grid; place-items: center; padding: 16px; background: rgba(20,5,40,.5); }
.ov .panel { text-align: center; margin: 0 auto; }
.btn.ghost { background: rgba(255,255,255,.7); box-shadow: none; }
