@font-face { font-family: Bowlby; src: url("../assets/fonts/BowlbyOneSC-Regular.ttf") format("truetype"); font-display: block; }
/* every rule stays inside the game container: the portal's ad overlay must keep its own default look */
:where(#game), :where(#game) * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #05060f; }
body { overscroll-behavior: none; }
#game { color: #fff; user-select: none; -webkit-user-select: none; touch-action: none; font-family: Bowlby, Impact, "Arial Black", sans-serif; }
#game { position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; overflow: hidden; transform-origin: center; background: #10162a; }
#screen { position: absolute; inset: 0; width: 1280px; height: 720px; display: block; outline: none; }
#ui { position: absolute; inset: 0; z-index: 10; }
:where(#game) button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
:where(#game) img { -webkit-user-drag: none; }

/* loading */
#loading { position: absolute; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: radial-gradient(circle at 50% 40%, #3a1a7a, #0b0820 70%); }
#loading img { width: 560px; }
#loading .track { width: 520px; height: 26px; border-radius: 13px; background: #140b3d; border: 4px solid #fff; overflow: hidden; }
#load-progress { width: 0; height: 100%; background: linear-gradient(#ffe164, #ff9a2d); transition: width .1s; }
#loading .cap { font-size: 24px; letter-spacing: 2px; color: #dff6ff; }
#rotate { position: absolute; inset: 0; z-index: 99; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 30px; background: #0b0820; font-size: 46px; }
#rotate img { width: 160px; transform: rotate(90deg); }

/* generic screen */
.scr { position: absolute; inset: 0; overflow: hidden; }
.bgart { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bgart.dark { filter: brightness(.45) saturate(1.1); }
.shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,6,40,.25), rgba(10,6,40,.75)); }
.shade.solid { background: rgba(10,6,36,.78); }
.ibtn { position: relative; display: block; transition: transform .08s, filter .1s; }
.ibtn img { display: block; width: 100%; height: auto; pointer-events: none; }
.ibtn:hover { filter: brightness(1.12); }
.ibtn:active { transform: translateY(3px) scale(.98); }
.ibtn:focus { outline: none; }
.ibtn:focus-visible, .ibtn:focus { filter: drop-shadow(0 0 0 #ffe164) drop-shadow(0 0 4px #ffe164) drop-shadow(0 0 10px #ffd23d) brightness(1.12); transform: scale(1.04); }
.ibtn[disabled] { filter: grayscale(.9) brightness(.55); cursor: default; }
.ibtn.tb span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 38px; padding-bottom: 6px; -webkit-text-stroke: 2px #2a1240; paint-order: stroke fill; text-shadow: 0 4px #2a1240; }
.ibtn.tb small { font-size: 16px; color: #ffe9a0; -webkit-text-stroke: 1px #2a1240; margin-left: 6px; }
.ibtn.tb .cc { width: 34px; height: 34px; display: inline-block; }
.ibtn.icon { width: 74px; }
.ibtn.icon.sm { width: 66px; }
.col { position: absolute; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 24px; align-items: center; justify-content: center; }
.header { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); width: 760px; pointer-events: none; }
.header.small { width: 600px; }
.mapi { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 150px; pointer-events: none; }
.coinbadge { position: absolute; right: 26px; top: 22px; display: flex; align-items: center; gap: 10px; padding: 8px 22px 8px 12px; border-radius: 30px; background: rgba(20,11,61,.85); border: 3px solid #ffe164; font-size: 30px; color: #ffe164; }
.coinbadge img { width: 40px; }

/* splash */
.splash .logo-big { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 640px; z-index: 2; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
.splash .hero-l, .splash .hero-r { position: absolute; bottom: 70px; height: 430px; filter: drop-shadow(0 12px 14px rgba(0,0,0,.55)); }
.splash .hero-l { left: 120px; } .splash .hero-r { right: 120px; transform: scaleX(-1); }
.tapplay { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); padding: 16px 46px; border-radius: 40px; background: rgba(20,11,61,.72); border: 3px solid rgba(255,255,255,.6); font-size: 34px; letter-spacing: 2px; color: #ffe164; -webkit-text-stroke: 2px #2a1240; paint-order: stroke fill; animation: blink 1.4s ease-in-out infinite; z-index: 3; }
.fullhit { position: absolute; inset: 0; z-index: 5; }
.fullhit:focus { outline: none; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* menu */
.logo-menu { position: absolute; left: 40px; top: 20px; width: 520px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.hero-menu { position: absolute; left: 170px; bottom: 20px; height: 380px; filter: drop-shadow(0 12px 14px rgba(0,0,0,.55)); }
.menu-col { right: 70px; top: 96px; width: 420px; gap: 10px; }
.menu-col .ibtn { width: 420px; }
.menu-col .ibtn.tb span { font-size: 40px; }
.menu-icons { position: absolute; right: 36px; bottom: 18px; display: flex; gap: 16px; }
.lockhint { position: absolute; right: 70px; top: 600px; width: 420px; text-align: center; font-size: 15px; color: #ffe164; opacity: .85; }

/* hero select */
.cards { position: absolute; left: 0; right: 0; top: 150px; gap: 70px; }
.herocard { width: 300px; }
.herocard.sel img:first-child { filter: drop-shadow(0 0 16px #ffe164); }
.herocard .check { position: absolute; right: 8px; top: 8px; width: 64px; }
.lvbadge, .pbadge { position: absolute; left: 14px; top: 14px; padding: 4px 14px; border-radius: 18px; background: #140b3d; border: 3px solid #7feaff; font-size: 22px; }
.pbadge { left: auto; right: 14px; top: auto; bottom: 90px; border-color: #ffe164; color: #ffe164; }
.herodesc { position: absolute; left: 0; right: 0; top: 530px; text-align: center; font-size: 22px; color: #dff6ff; -webkit-text-stroke: 1px #140b2c; paint-order: stroke fill; }

/* map */
.grid3 { position: absolute; left: 80px; right: 80px; top: 150px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 36px; }
.stagecard { width: 100%; }
.stagecard .lock { position: absolute; left: 50%; top: 42%; width: 80px; transform: translate(-50%, -50%); }
.stagecard .stcount { position: absolute; right: 10px; top: 10px; display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 18px; background: rgba(20,11,61,.85); font-size: 22px; color: #ffe164; }
.stagecard .stcount img { width: 26px; }
.totstars { position: absolute; left: 50%; top: 106px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; font-size: 26px; color: #ffe164; }
.totstars img { width: 32px; }
.nodes { position: absolute; left: 0; right: 0; top: 190px; gap: 0; }
.lvnode { width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #5a3ab8, #241066); border: 8px solid #7feaff; box-shadow: 0 10px 0 #120840, 0 0 30px rgba(127,234,255,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lvnode.boss { border-color: #ff4a6a; background: radial-gradient(circle at 50% 35%, #b83a6a, #4a0f2e); box-shadow: 0 10px 0 #2a0618, 0 0 30px rgba(255,74,106,.5); }
.lvnode.locked { filter: grayscale(1) brightness(.5); }
.lvnum { font-size: 54px; -webkit-text-stroke: 3px #140b2c; paint-order: stroke fill; }
.lvnode.boss .lvnum { font-size: 34px; position: absolute; top: 18px; }
.bossface { height: 120px; margin-top: 30px; }
.lvstars { display: flex; gap: 4px; margin-top: 4px; }
.lvstars .st, .goals .st { width: 34px; filter: grayscale(1) brightness(.4); }
.lvstars .st.on, .goals .st.on { filter: none; }
.lvstars .lk { width: 44px; }
.path { width: 90px; height: 14px; border-radius: 7px; background: repeating-linear-gradient(90deg, #ffe164 0 18px, transparent 18px 30px); }
.story { position: absolute; left: 140px; right: 140px; bottom: 50px; margin: 0; text-align: center; font-family: "Segoe UI", Arial, sans-serif; font-weight: 700; font-size: 26px; line-height: 1.45; color: #fff; text-shadow: 0 3px 6px #000; }

/* level intro */
.panel { position: absolute; border-radius: 26px; background: rgba(20,11,61,.88); border: 4px solid #7feaff; box-shadow: 0 14px 0 rgba(0,0,0,.35); }
.panel.intro { left: 250px; right: 250px; top: 120px; padding: 30px 40px; }
.panel.intro h2 { margin: 0 0 16px; font-size: 52px; text-align: center; color: #ffe164; -webkit-text-stroke: 3px #140b2c; paint-order: stroke fill; font-weight: 400; }
.panel.intro h2 span { display: block; font-size: 28px; color: #fff; }
.goals { list-style: none; margin: 0 0 14px; padding: 0; font-size: 28px; }
.goals li { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.tiny { margin: 0; font-family: "Segoe UI", Arial, sans-serif; font-weight: 700; font-size: 17px; color: #bfd6ff; text-align: center; }

/* pause */
.pause-col { left: 50%; transform: translateX(-50%); top: 250px; width: 400px; }

/* results */
.bigstars { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); display: flex; gap: 20px; }
.bs { width: 100px; filter: grayscale(1) brightness(.35); }
.bs.on { animation: starin .5s cubic-bezier(.2, 1.6, .4, 1) both; filter: none; }
.bs.on:nth-child(2) { transform: translateY(-18px); width: 120px; }
@keyframes starin { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { opacity: 1; } }
.stats { position: absolute; left: 50%; top: 290px; transform: translateX(-50%); width: 560px; padding: 18px 34px; border-radius: 24px; background: rgba(20,11,61,.9); border: 4px solid #7feaff; font-size: 26px; }
.stats div { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.stats span { color: #bfd6ff; }
.stats b { font-weight: 400; color: #ffe164; display: flex; align-items: center; gap: 8px; }
.stats b img { width: 32px; }
.module { position: absolute; left: 50%; top: 248px; transform: translateX(-50%); width: 480px; animation: blink 1.2s infinite; }
.resbtns { position: absolute; left: 0; right: 0; bottom: 30px; gap: 18px; }
.resbtns .ibtn { width: 260px; }
.endtext { position: absolute; left: 0; right: 0; bottom: 120px; text-align: center; font-size: 40px; color: #fff; -webkit-text-stroke: 3px #140b2c; paint-order: stroke fill; }

/* gym */
.gymtitle { position: absolute; left: 0; right: 0; top: 20px; margin: 0; text-align: center; font-size: 66px; font-weight: 400; color: #ffe164; -webkit-text-stroke: 4px #140b2c; paint-order: stroke fill; text-shadow: 0 6px #8f3a42; }
.gymtabs { position: absolute; left: 0; right: 0; top: 116px; display: flex; justify-content: center; gap: 30px; }
.tab { display: flex; align-items: center; gap: 12px; padding: 8px 26px 8px 8px; border-radius: 40px; background: rgba(20,11,61,.85); border: 4px solid #6a5aa8; font-size: 30px; }
.tab img { width: 60px !important; height: 60px; border-radius: 50%; object-fit: cover; object-position: top; background: #3a2a7a; }
.tab small { font-size: 18px; color: #7feaff; }
.tab.sel { border-color: #ffe164; }
.uplist { position: absolute; left: 160px; right: 160px; top: 210px; display: flex; flex-direction: column; gap: 12px; }
.uprow { display: flex; align-items: center; gap: 20px; padding: 8px 18px; border-radius: 20px; background: rgba(20,11,61,.88); border: 3px solid #4a3a8a; height: 112px; }
.upicon { width: 84px; }
.upinfo { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.upinfo b { font-weight: 400; font-size: 30px; }
.upinfo span { font-family: "Segoe UI", Arial, sans-serif; font-weight: 700; font-size: 18px; color: #bfd6ff; }
.pips { display: flex; gap: 6px; margin-top: 6px; }
.pips i { width: 28px; height: 12px; border-radius: 6px; background: #2a1a5a; border: 2px solid #6a5aa8; }
.pips i.on { background: #ffe164; border-color: #fff3b0; }
.maxed { width: 200px; text-align: center; font-size: 36px; color: #7bffbd; }
.uprow .ibtn.tb span { font-size: 30px; }

/* options */
.panel.opts { left: 300px; right: 300px; top: 150px; padding: 26px 40px; }
.optrow { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 100px; }
.optrow > img { width: 220px; }
.optrow .lbl { font-size: 28px; white-space: nowrap; color: #fff; }
.optrow input[type=range] { flex: 1; height: 30px; accent-color: #ffe164; }
.optrow input[type=range]:focus { outline: 3px solid #ffe164; outline-offset: 4px; border-radius: 6px; }
.optrow > span:not(.lbl) { width: 60px; text-align: right; font-size: 26px; color: #ffe164; }

/* controls */
.panel.ctrl { left: 60px; right: 60px; top: 110px; padding: 22px 30px; display: grid; grid-template-columns: 1fr 1.2fr 1.3fr; gap: 26px; }
.ccol h3 { margin: 4px 0 10px; font-weight: 400; font-size: 28px; color: #ffe164; }
.ccol p { margin: 6px 0; font-family: "Segoe UI", Arial, sans-serif; font-weight: 600; font-size: 18px; color: #e3edff; line-height: 1.35; }
.ccol b { font-family: Bowlby, Impact, sans-serif; font-weight: 400; color: #7feaff; }

/* trophies */
.trophies { position: absolute; left: 110px; right: 110px; top: 120px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; }
.troph { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-radius: 20px; background: rgba(20,11,61,.9); border: 3px solid #4a3a8a; height: 118px; }
.troph img { width: 82px; filter: grayscale(1) brightness(.5); }
.troph.on { border-color: #ffe164; } .troph.on img { filter: none; }
.troph b { display: block; font-weight: 400; font-size: 26px; }
.troph span { display: block; font-family: "Segoe UI", Arial, sans-serif; font-weight: 700; font-size: 17px; color: #bfd6ff; }
.troph em { font-style: normal; color: #ffe164; font-size: 18px; }

/* touch controls */
#touch { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
#stick { position: absolute; left: 40px; bottom: 34px; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(127,234,255,.18), rgba(20,11,61,.45)); border: 4px solid rgba(255,255,255,.35); pointer-events: auto; touch-action: none; }
#knob { position: absolute; left: 50%; top: 50%; width: 100px; height: 100px; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 40% 35%, #fff, #7feaff 45%, #2a6ad8); border: 4px solid #fff; box-shadow: 0 6px 0 rgba(0,0,0,.35); }
.tbtn { position: absolute; width: 140px; height: 140px; pointer-events: auto; touch-action: none; opacity: .88; }
.tbtn img { width: 100%; height: 100%; }
.tbtn span { position: absolute; left: 0; right: 0; bottom: -6px; text-align: center; font-size: 20px; -webkit-text-stroke: 2px #140b2c; paint-order: stroke fill; }
.tbtn.down { transform: scale(.9); filter: brightness(1.3); }
.t-attack { right: 170px; bottom: 40px; width: 170px; height: 170px; }
.t-jump { right: 26px; bottom: 150px; }
.t-dash { right: 200px; bottom: 230px; width: 112px; height: 112px; }
.t-special { right: 30px; bottom: 300px; width: 122px; height: 122px; }
.t-pick { right: 360px; bottom: 30px; width: 104px; height: 104px; }
#pausebtn { position: absolute; right: 10px; top: 10px; width: 110px; height: 100px; pointer-events: auto; }

/* comics */
.scr .comic { position: absolute; inset: 0; background: #07051a; overflow: hidden; }
.cpanel { position: absolute; overflow: hidden; opacity: 0; transition: transform .55s cubic-bezier(.2,1.3,.4,1), opacity .25s; box-shadow: 0 0 0 4px #07051a; }
.cpanel img { width: 100%; height: 100%; display: block; }
.cpanel.from-l { transform: translateX(-120px) rotate(-2deg) scale(.92); }
.cpanel.from-r { transform: translateX(120px) rotate(2deg) scale(.92); }
.cpanel.from-u { transform: translateY(-90px) scale(.92); }
.cpanel.in { opacity: 1; transform: none; }
.cb { position: absolute; left: 18px; right: 18px; padding: 10px 16px 12px; font-family: 'Arial Black', Arial, sans-serif; font-size: 21px; line-height: 1.22; opacity: 0; transform: scale(.6); transition: transform .25s cubic-bezier(.2,1.6,.4,1), opacity .15s; }
.cb.in { opacity: 1; transform: none; }
.cb.cap { background: #ffe164; color: #140b2c; border: 3px solid #140b2c; border-radius: 6px; box-shadow: 4px 4px 0 #140b2c; }
.cb.talk { background: #fff; color: #140b2c; border: 3px solid #140b2c; border-radius: 22px; box-shadow: 4px 4px 0 rgba(20,11,44,.6); }
.cb b { display: block; font-size: 15px; color: #ff3a6a; letter-spacing: 1px; }
.cb.cap b { display: none; }
.cnext { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; padding: 8px 26px; border-radius: 30px; background: rgba(20,11,61,.75); color: #ffe164; font-size: 20px; letter-spacing: 2px; animation: blink 1.4s ease-in-out infinite; pointer-events: none; }
.panel.pads { top: 110px; }
.tiny.warn { color: #ffb34a; text-align: center; margin: 0 0 10px; }
.panel.opts { top: 118px; padding: 16px 40px; }
.panel.opts .optrow { height: 64px; }
.panel.opts .optrow > img { width: 180px; }
.panel.pads { top: 96px; padding: 12px 40px; }
.panel.pads .optrow { height: 56px; }
/* bonus round (SMASH THE CAR!) replay button on the district screen */
.bonusbtn { position: absolute; right: 28px; top: 20px; width: 150px; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 26px; background: radial-gradient(circle at 50% 35%, #2fb6ff, #123a8a); border: 6px solid #ffe164; box-shadow: 0 8px 0 #0a1a4a, 0 0 26px rgba(255,225,100,.45); }
.bonusbtn img { width: 96px; height: 96px; }
.bonusbtn span { font-family: Bowlby, Impact, "Arial Black", sans-serif; font-size: 24px; color: #fff; -webkit-text-stroke: 1.5px #140b2c; text-shadow: 0 3px 0 #140b2c; }
.bonusbtn:focus-visible, .bonusbtn:hover { transform: scale(1.06); outline: none; box-shadow: 0 8px 0 #0a1a4a, 0 0 0 5px #fff, 0 0 30px rgba(255,225,100,.7); }

/* pack 3: illustrated buttons (normal / pressed art), three fighters, P1 / P2 slots, BUY with price */
.ibtn.artbtn { aspect-ratio: 518 / 110; }
.ibtn.artbtn img { width: 100%; height: 100%; object-fit: contain; }
.ibtn.artbtn .art-p { position: absolute; inset: 0; opacity: 0; }
.ibtn.artbtn:active .art-n { opacity: 0; }
.ibtn.artbtn:active .art-p { opacity: 1; }
.ibtn.artbtn.sure { filter: drop-shadow(0 0 6px #ff7a3d) drop-shadow(0 0 14px #ff3d3d) brightness(1.15); }
.surelbl { font-size: 22px; color: #ff9a6a; margin-left: 10px; -webkit-text-stroke: 1px #140b2c; paint-order: stroke fill; }
.cards.three { gap: 34px; top: 184px; }
.cards.three .herocard { width: 252px; }
.pbadge.p2 { border-color: #7feaff; color: #7feaff; }
.pslots { position: absolute; left: 0; right: 0; top: 112px; z-index: 3; display: flex; justify-content: center; gap: 26px; }
.pslot { display: flex; align-items: center; gap: 10px; padding: 4px 20px 4px 6px; border-radius: 30px; background: rgba(20,11,61,.9); border: 4px solid #6a5aa8; font-size: 22px; }
.pslot img { width: 44px !important; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; background: #3a2a7a; }
.pslot.sel { border-color: #ffe164; box-shadow: 0 0 14px rgba(255,225,100,.7); }
.cards.three ~ .herodesc { top: 524px; }
.buywrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.buycost { display: flex; align-items: center; gap: 6px; font-size: 22px; color: #ffe164; -webkit-text-stroke: 1px #140b2c; paint-order: stroke fill; }
.buycost img { width: 24px; height: 24px; }
.buywrap.poor .buycost { color: #ff8a8a; }
.buywrap.poor .ibtn { filter: grayscale(.6) brightness(.8); }
.bonuswrap { position: absolute; right: 28px; top: 100px; display: flex; align-items: center; gap: 8px; }
.bonuswrap > img { width: 70px; }
.bonuswrap .ibtn { width: 270px; }
