:root { --c: #4361EE; --c2: #F72585; --bg: #10122B; --ink: #14203d; --mut: #5d6a8a; --paper: #fffaf0; --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; }
button:disabled { cursor: default; opacity: .55; }

.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;
  background: linear-gradient(180deg, rgba(16,18,43,0) 0%, rgba(16,18,43,0) 34%, rgba(16,18,43,.55) 50%, rgba(16,18,43,.85) 100%); }
.logo { text-align: center; color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.35); margin-bottom: 26vh; }
.logo h1 { margin: 0; font-size: clamp(50px, 15vw, 76px); font-weight: 900; letter-spacing: -1px; line-height: 1; -webkit-text-stroke: 2px rgba(20,30,90,.5); }
.logo p { margin: 6px 0 0; font-weight: 800; font-size: 18px; }
.story { color: #fff; text-align: center; font-weight: 600; margin: 0; opacity: .95; line-height: 1.45; }
.btn { display: block; width: 100%; min-height: 54px; border: 0; border-radius: 18px; background: var(--paper); font-weight: 800; font-size: 17px; margin: 6px 0; box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 8px 14px; }
.btn small { display: block; font-size: 13px; font-weight: 700; opacity: .85; margin-top: 2px; }
.btn.main { background: linear-gradient(180deg, var(--c2), var(--c)); color: #fff; box-shadow: 0 8px 22px rgba(67,97,238,.45); }
.btn.big { min-height: 76px; font-size: 25px; font-weight: 900; }
.btn.big small { font-size: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.tile { border: 0; border-radius: 18px; background: rgba(255,250,240,.96); padding: 12px; text-align: left; min-height: 92px; box-shadow: 0 6px 18px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 3px; border-top: 5px solid var(--c); }
.tile b { font-size: 16px; }
.tile small { color: var(--mut); font-weight: 700; font-size: 13px; }
.link { border: 0; background: rgba(255,250,240,.88); border-radius: 14px; min-height: 48px; padding: 10px 16px; font-weight: 800; width: 100%; }
.foot { color: #fff; font-size: 13px; text-align: center; opacity: .85; }
.foot a { color: #fff; }
.nem, .wait { width: 100%; border: 0; border-radius: 18px; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 14px; box-shadow: 0 6px 18px rgba(0,0,0,.25); min-height: 64px; }
.nem { background: linear-gradient(90deg, #c1121f, #ef476f); color: #fff; }
.nem small { display: block; font-size: 12px; font-weight: 900; letter-spacing: 1px; opacity: .9; }
.nem b { display: block; font-size: 20px; }
.nem i, .wait i { display: block; font-style: normal; font-size: 13px; font-weight: 700; opacity: .9; }
.wait { background: #fff3d6; color: #6b3b00; }
.wait b { display: block; font-size: 15px; }

.page { max-width: 640px; margin: 0 auto; padding: calc(var(--sat) + 70px) 16px 40px; min-height: 100%; background: rgba(255,248,236,.98); }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.top h2 { margin: 0; font-size: 25px; 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(0,0,0,.1); white-space: nowrap; }
.mut { color: var(--mut); font-size: 14px; font-weight: 600; margin: 4px 0 12px; line-height: 1.5; }
h3 { margin: 18px 0 8px; font-size: 18px; }
h4 { margin: 0 0 6px; font-size: 16px; }
.por { width: 96px; height: 96px; border-radius: 50%; flex: none; }
.por.sm { width: 64px; height: 64px; }
.por.xs { width: 48px; height: 48px; }
.por.big { width: 120px; height: 120px; }
.rvs { display: flex; flex-direction: column; gap: 10px; }
.rv { border: 0; background: #fff; border-radius: 20px; padding: 10px 12px; display: flex; gap: 12px; align-items: center; text-align: left; box-shadow: 0 4px 14px rgba(40,30,80,.08); min-height: 84px; width: 100%; }
.rv > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rv b { font-size: 18px; }
.rv small { color: var(--mut); font-weight: 700; font-size: 13px; }
.rv em { font-style: normal; font-weight: 900; font-size: 14px; }
.rv.lock { opacity: .6; }
.rv.perk.on { outline: 3px solid #06d6a0; }
.rel { display: block; position: relative; height: 8px; border-radius: 4px; margin-top: 4px; background: linear-gradient(90deg, #ef476f, #d9dbe3 50%, #06d6a0); }
.rel i { position: absolute; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: #14203d; border: 3px solid #fff; transform: translateX(-50%); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.rel.big { height: 12px; margin-top: 8px; }
.rel.big i { top: -4px; width: 20px; height: 20px; }
.ends { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--mut); }
.hero { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 22px; padding: 14px; box-shadow: 0 6px 18px rgba(40,30,80,.08); }
.hero > div { flex: 1; display: flex; flex-direction: column; }
.hero b { font-size: 24px; }
.hero small { color: var(--mut); font-weight: 700; }
.hero em { font-style: normal; font-weight: 900; margin-top: 4px; }
.quote { font-size: 17px; font-weight: 700; font-style: italic; background: #fff; border-radius: 16px; padding: 12px 14px; margin: 12px 0; border-left: 6px solid var(--c); }
.box { background: #fff; border-radius: 18px; padding: 12px 14px; margin: 10px 0; box-shadow: 0 3px 10px rgba(40,30,80,.06); }
.box p { margin: 4px 0; font-weight: 600; line-height: 1.45; font-size: 15px; }
.box.red { background: #fff0f2; border: 2px solid #ffccd5; }
.box.green { background: #effcf6; border: 2px solid #b7efd9; }
.evrec { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.evrec span { background: #fff; border-radius: 12px; padding: 6px 10px; font-weight: 700; font-size: 13px; }
.evs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.ev { border: 0; background: #fff; border-radius: 16px; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 4px 12px rgba(40,30,80,.08); font-weight: 800; }
.ev b { font-size: 30px; }
.ev span { font-size: 14px; }
.match { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.match > div { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 18px; padding: 10px; box-shadow: 0 3px 10px rgba(40,30,80,.07); }
.match span { display: flex; flex-direction: column; }
.match small { color: var(--mut); font-weight: 800; font-size: 12px; }
.match b { font-size: 18px; }
.match i { font-style: normal; font-weight: 700; font-size: 14px; color: #3a4a7a; }
.ov { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: calc(var(--sat) + 20px) 16px 20px; background: rgba(16,18,43,.55); }
.panel { background: var(--paper); border-radius: 24px; padding: 20px; max-width: 460px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.panel.center { text-align: center; }
.panel.center .por { margin: 0 auto; display: block; }
.panel h2 { margin: 8px 0; }
