@font-face { font-family: 'Fredoka'; src: url(fonts/fredoka.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Lilita'; src: url(fonts/lilita.woff2) format('woff2'); font-display: swap; }
:root { --gold: #ffd25b; --ink: #f6f1ff; --mut: #b9b1d8; --bg: #140f26; --pan: #241c40; --pan2: #1a1430; --line: #ffffff1f; --pur: #b47bff;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px); --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: Fredoka, system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
canvas#c { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.ic { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; font-weight: 600; font-size: 17px; letter-spacing: .2px;
  background: linear-gradient(#3a2f63, #2c2350); box-shadow: 0 4px 0 #0c0819, inset 0 1px 0 #ffffff22; transition: transform .12s, filter .12s, box-shadow .12s; }
.btn:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0c0819, inset 0 1px 0 #ffffff22; }
.btn:disabled { opacity: .42; cursor: default; }
.btn.main { background: linear-gradient(#ffe07a, #ffab3d); color: #3a1d00; box-shadow: 0 4px 0 #a2560c, 0 8px 24px #ffb84a40, inset 0 1px 0 #fff8; font-size: 19px; }
.btn.main:active:not(:disabled) { box-shadow: 0 1px 0 #a2560c, inset 0 1px 0 #fff8; }
.btn.ghost { background: #ffffff10; box-shadow: inset 0 0 0 1.5px #ffffff26; }
.btn.small { min-height: 40px; font-size: 15px; padding: 0 14px; }
.btn.icon { width: 44px; min-height: 44px; padding: 0; font-size: 30px; line-height: 1; border-radius: 12px; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- camadas de tela ---------- */
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.scr { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--st)) calc(16px + var(--sr)) calc(16px + var(--sb)) calc(16px + var(--sl)); pointer-events: auto; opacity: 0; transition: opacity .25s ease; overflow-y: auto; }
.scr.in { opacity: 1; }
.scr.out { opacity: 0; pointer-events: none; }
.scr.menuscr { background: radial-gradient(ellipse at 50% 40%, #0b081800 0%, #0b0818a8 70%, #0b0818e0 100%); }
.scr.modal { background: radial-gradient(ellipse at center, #120c26b0, #0b0818e8); }
.scr > * { transform: translateY(18px) scale(.97); transition: transform .32s cubic-bezier(.2, 1.4, .4, 1); }
.scr.in > * { transform: none; }
.scr.out > * { transform: translateY(10px) scale(.96); transition-duration: .2s; }
.scr.out.picked > * { transform: none; }

.panel { width: min(520px, 100%); max-height: 100%; overflow-y: auto; background: linear-gradient(#2a2149f2, #1b1534f2); border-radius: 22px; padding: 20px; box-shadow: 0 20px 60px #0009, inset 0 1px 0 #ffffff1c, inset 0 0 0 1px #ffffff12; display: flex; flex-direction: column; gap: 12px; }
.panel.wide { width: min(860px, 100%); }
.panel.narrow { width: min(380px, 100%); text-align: center; }
.panel h2 { margin: 0; font-family: Lilita, Fredoka, sans-serif; font-weight: 400; font-size: 30px; letter-spacing: .5px; }
.panel h3 { margin: 6px 0 0; font-size: 15px; color: var(--mut); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.phead { display: flex; align-items: center; gap: 12px; }
.phead .ess { margin-left: auto; }
.sub { margin: 0; color: var(--mut); font-size: 15px; }
.ess { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #0005; font-weight: 600; color: var(--gold); }

/* ---------- título ---------- */
.title { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }
.title > .ess { position: fixed; top: calc(14px + var(--st)); right: calc(14px + var(--sr)); }
.logo { display: flex; flex-direction: column; align-items: center; animation: float 4s ease-in-out infinite; }
.logo span { font-family: Lilita, Fredoka, sans-serif; font-size: clamp(64px, 17vw, 128px); line-height: .95; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff6c9 0%, #ffd25b 38%, #ff8a3d 62%, #c757ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #3b1966) drop-shadow(0 10px 22px #a24bff70); }
.logo small { margin-top: 6px; color: #e9e1ff; font-size: 16px; letter-spacing: 3px; text-transform: uppercase; opacity: .85; text-shadow: 0 2px 8px #000a; }
.menu { display: flex; flex-direction: column; gap: 12px; width: min(300px, 100%); }
.menu .btn { width: 100%; }
.menu .row { flex-wrap: nowrap; } .menu .row .btn { flex: 1; }
.best { color: #e9e1ffcc; font-size: 14px; text-shadow: 0 2px 6px #000; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- personagens ---------- */
.chars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.char { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 10px 12px; border-radius: 16px; background: #ffffff0b; box-shadow: inset 0 0 0 1.5px #ffffff14;
  transition: transform .15s, box-shadow .15s, background .15s; animation: pop .35s backwards cubic-bezier(.2, 1.5, .4, 1); animation-delay: var(--d); }
.char:not(.locked):hover { background: #ffffff14; }
.char.sel { background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--c) 30%, transparent), #ffffff0d 70%); box-shadow: inset 0 0 0 2.5px var(--c), 0 0 24px color-mix(in srgb, var(--c) 35%, transparent); transform: translateY(-3px); }
.char .chat { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, var(--robe) 0%, #0000 72%); margin-bottom: 4px; }
.char b { font-size: 19px; } .char small { color: var(--mut); font-size: 13px; margin-top: -2px; }
.cspell { margin-top: 6px; font-size: 13px; display: flex; gap: 5px; align-items: center; color: #eee8ff; }
.cperk { font-size: 12.5px; color: var(--mut); margin-top: 2px; line-height: 1.25; }
.char.locked { opacity: .6; }
.panel > .start { position: sticky; bottom: -20px; margin: 0 -20px -20px; border-radius: 0 0 22px 22px; flex: none; }
.panel > .start::before { content: ''; position: absolute; inset: -18px 0 100%; background: linear-gradient(transparent, #1b1534f2); pointer-events: none; }
.howto { display: grid; gap: 4px; font-size: 13.5px; color: var(--mut); background: #0003; border-radius: 12px; padding: 10px 12px; line-height: 1.35; }
@keyframes pop { from { transform: translateY(14px) scale(.9); opacity: 0; } }

/* ---------- Santuário ---------- */
.shop { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.up { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: #ffffff0a; animation: pop .3s backwards; animation-delay: var(--d); }
.up.bought { animation: bought .45s; }
.uic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #ffffff10; flex: none; }
.utx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .utx b { font-size: 15px; } .utx small { color: var(--mut); font-size: 12.5px; }
.pips { display: flex; gap: 3px; margin-top: 4px; } .pips i { width: 12px; height: 5px; border-radius: 3px; background: #ffffff22; } .pips i.on { background: var(--gold); box-shadow: 0 0 6px #ffd25b90; }
.buy { min-height: 38px; padding: 0 10px; font-size: 14px; min-width: 70px; }
@keyframes bought { 40% { transform: scale(1.05); background: #ffd25b30; } }

/* ---------- conquistas e ajustes ---------- */
.achs { display: grid; gap: 8px; }
.arow { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #ffffff08; animation: pop .3s backwards; animation-delay: var(--d); }
.arow div { display: flex; flex-direction: column; } .arow small { color: var(--mut); font-size: 13px; } .arow em { font-style: normal; font-size: 12.5px; color: var(--gold); opacity: .9; }
.arow:not(.ok) { opacity: .75; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; font-size: 16px; }
.set input[type=range] { flex: 1; max-width: 220px; accent-color: var(--gold); height: 28px; }
.seg { display: flex; background: #0004; border-radius: 12px; padding: 3px; } .seg button { padding: 7px 11px; border-radius: 9px; font-size: 14px; color: var(--mut); } .seg button.on { background: #ffffff1c; color: var(--ink); }
.tog { width: 52px; height: 30px; border-radius: 99px; background: #ffffff1c; position: relative; transition: background .2s; } .tog i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tog.on { background: #ffb84a; } .tog.on i { transform: translateX(22px); }
.note { margin: 0; font-size: 13px; color: var(--mut); }

/* ---------- cartas de nível ---------- */
.lvl { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(900px, 100%); }
.lvl h2 { margin: 0; font-family: Lilita, sans-serif; font-weight: 400; font-size: 44px; color: var(--gold); text-shadow: 0 4px 0 #6b3300, 0 0 30px #ffb84a80; animation: lvlIn .5s cubic-bezier(.2, 1.6, .4, 1); }
.lvl .sub { margin-top: -6px; }
@keyframes lvlIn { from { transform: scale(.3); opacity: 0; } }
.cards { display: flex; gap: 14px; justify-content: center; width: 100%; }
.card { position: relative; flex: 1; max-width: 240px; min-height: 250px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px 14px 16px; border-radius: 18px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 18%, #2b2250) 0%, #1c1636 60%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc) 70%, transparent), 0 10px 30px #0008;
  animation: cardIn .45s backwards cubic-bezier(.2, 1.4, .4, 1); animation-delay: var(--d); transition: transform .15s, box-shadow .15s, opacity .25s, filter .25s; }
.card:hover { transform: translateY(-6px) scale(1.02); box-shadow: inset 0 0 0 2.5px var(--rc), 0 16px 40px #000a, 0 0 30px color-mix(in srgb, var(--c) 35%, transparent); }
.card.r2 { box-shadow: inset 0 0 0 2.5px var(--rc), 0 0 26px #b66bff55, 0 10px 30px #0008; }
.card.r3 { box-shadow: inset 0 0 0 3px var(--rc), 0 0 34px #ffc83d70, 0 10px 30px #0008; }
.card.r3::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(110deg, transparent 30%, #fff3 45%, transparent 60%); background-size: 250% 100%; animation: shine 2.2s infinite; pointer-events: none; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.cico { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); }
.cico .ic { filter: drop-shadow(0 0 8px var(--c)); }
.cname { font-weight: 700; font-size: 19px; line-height: 1.1; }
.clvl { display: flex; gap: 6px; justify-content: center; align-items: center; font-size: 13px; margin-top: 4px; }
.clvl span { padding: 2px 8px; border-radius: 99px; background: #ffffff18; color: #fff; }
.clvl em { font-style: normal; font-weight: 700; color: var(--rc); }
.cdesc { font-size: 14.5px; color: #ddd6f6; line-height: 1.3; margin-top: 6px; }
.card kbd { position: absolute; top: 8px; right: 10px; font: 600 12px Fredoka, sans-serif; color: #ffffff60; }
body.touch .card kbd { display: none; }
.card.chosen { transform: scale(1.08) !important; filter: brightness(1.3); box-shadow: inset 0 0 0 3px #fff, 0 0 50px var(--c) !important; z-index: 2; }
.picked .card:not(.chosen) { opacity: 0; transform: translateY(30px) scale(.9); }
.reroll span { min-width: 22px; padding: 0 6px; border-radius: 99px; background: #0005; font-size: 14px; }
.skip small { color: var(--gold); font-size: 13px; }
@keyframes cardIn { from { transform: translateY(60px) scale(.8) rotate(-3deg); opacity: 0; } }

/* ---------- baú ---------- */
.chestbox { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(420px, 100%); }
.chestbox h2 { margin: 0; font-family: Lilita, sans-serif; font-weight: 400; font-size: 40px; color: var(--gold); text-shadow: 0 4px 0 #6b3300; }
.chesticon { animation: chestShake .7s ease-in-out, chestGlow 2s .7s infinite; filter: drop-shadow(0 0 20px #ffd25b90); }
@keyframes chestShake { 0%, 100% { transform: none; } 15% { transform: rotate(-8deg) scale(1.05); } 30% { transform: rotate(8deg); } 45% { transform: rotate(-6deg); } 60% { transform: rotate(6deg) scale(1.1); } 80% { transform: scale(1.25); } }
@keyframes chestGlow { 50% { filter: drop-shadow(0 0 34px #ffd25bcc); } }
.loot { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: #241c40; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc) 70%, transparent); animation: lootIn .45s backwards cubic-bezier(.2, 1.6, .4, 1); animation-delay: var(--d); }
.li div { display: flex; flex-direction: column; } .li small { color: var(--mut); }
.li.r3 { box-shadow: inset 0 0 0 2.5px var(--rc), 0 0 24px #ffc83d60; }
.lgold, .chestbox .go { animation: lootIn .45s backwards; animation-delay: var(--d); }
.lgold { color: var(--gold); font-weight: 600; display: flex; gap: 6px; align-items: center; }
@keyframes lootIn { from { transform: scale(.4); opacity: 0; } }

/* ---------- resultado ---------- */
.results { text-align: center; }
.results h2 { font-size: 40px; color: #ff8aa0; text-shadow: 0 4px 0 #4a0f22; }
.results.won h2 { color: var(--gold); text-shadow: 0 4px 0 #6b3300, 0 0 30px #ffb84a80; }
.rec { color: var(--gold); font-weight: 700; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.big div { display: flex; flex-direction: column; padding: 10px 4px; border-radius: 14px; background: #ffffff0a; animation: pop .35s backwards; }
.big div:nth-child(2) { animation-delay: 60ms } .big div:nth-child(3) { animation-delay: 120ms } .big div:nth-child(4) { animation-delay: 180ms }
.big b { font-size: 26px; font-weight: 700; } .big small { color: var(--mut); font-size: 13px; } .big .gold b { color: var(--gold); }
.dmg { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.drow { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 52px 38px; gap: 8px; align-items: center; font-size: 14px; animation: pop .3s backwards; animation-delay: var(--d); }
.drow span { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow b { text-align: right; font-weight: 600; } .drow em { font-style: normal; color: var(--mut); text-align: right; font-size: 13px; }
.dbar { height: 8px; border-radius: 4px; background: #ffffff12; overflow: hidden; }
.dbar i { display: block; height: 100%; background: var(--c); transform-origin: left; transform: scaleX(var(--w)); border-radius: 4px; animation: grow .8s backwards cubic-bezier(.2, .8, .3, 1); animation-delay: inherit; box-shadow: 0 0 8px var(--c); }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- pausa ---------- */
.pstats { display: flex; justify-content: center; gap: 16px; color: var(--mut); } .pstats span { display: flex; align-items: center; gap: 5px; }
.pbuild { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 4px; }
.panel.narrow .btn { width: 100%; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; opacity: 0; transition: opacity .4s; }
#hud.on { opacity: 1; }
#hud .xp { position: absolute; top: calc(6px + var(--st)); left: calc(8px + var(--sl)); right: calc(8px + var(--sr)); height: 14px; border-radius: 8px; background: #0b0818b0; box-shadow: inset 0 0 0 1.5px #ffffff20; overflow: hidden; }
#hud .xp i { position: absolute; inset: 2px; border-radius: 6px; background: linear-gradient(90deg, #4fb6ff, #7cf0ff 60%, #e3fbff); transform-origin: left; transform: scaleX(0); transition: transform .18s; box-shadow: 0 0 12px #7cf0ff90; }
#hud .xp b { position: absolute; right: 8px; top: -1px; font-size: 12px; line-height: 16px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
#hud .xp b.pop { animation: lvpop .5s; }
@keyframes lvpop { 30% { transform: scale(1.6); color: var(--gold); } }
#hud .top { position: absolute; top: calc(26px + var(--st)); left: calc(10px + var(--sl)); right: calc(10px + var(--sr)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px; }
.hp { display: flex; align-items: center; gap: 8px; }
.hp .bar { position: relative; width: min(220px, 34vw); height: 16px; border-radius: 9px; background: #0b0818b8; box-shadow: inset 0 0 0 1.5px #ffffff22; overflow: hidden; }
.hp .bar i, .hp .bar em { position: absolute; inset: 2px; border-radius: 7px; transform-origin: left; }
.hp .bar em { background: #fff8; } .hp .bar i { background: linear-gradient(#ff7a8a, #e8334f); z-index: 1; transition: transform .1s; }
.hp span { font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.hp.low .bar { animation: lowhp .7s infinite; }
@keyframes lowhp { 50% { box-shadow: inset 0 0 0 2px #ff4a6a, 0 0 14px #ff4a6a; } }
#hud .time { font-family: Lilita, sans-serif; font-size: 30px; line-height: 1; text-shadow: 0 3px 0 #0008, 0 0 14px #0006; letter-spacing: 1px; }
#hud .time.hot { color: #ff9ab0; }
.stats { justify-self: end; display: flex; gap: 12px; margin-right: 50px; } .stats span { display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 16px; text-shadow: 0 1px 3px #000; }
.stats .g b { color: var(--gold); } .stats .g.pop { animation: gpop .3s; }
@keyframes gpop { 40% { transform: scale(1.25); } }
.pausebtn { position: absolute; top: calc(24px + var(--st)); right: calc(8px + var(--sr)); width: 40px; height: 40px; border-radius: 12px; background: #0b0818a0; box-shadow: inset 0 0 0 1.5px #ffffff22; pointer-events: auto; display: grid; place-items: center; }
.slots { position: absolute; top: calc(50px + var(--st)); left: calc(10px + var(--sl)); display: flex; flex-direction: column; gap: 4px; }
.slots > div { display: flex; gap: 4px; }
.slot { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #0b0818b0; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent); overflow: hidden; animation: pop .35s backwards; }
.slot.t { width: 26px; height: 26px; border-radius: 8px; }
.slot i { position: absolute; right: 2px; bottom: 0; font-style: normal; font-size: 10px; font-weight: 700; text-shadow: 0 1px 2px #000; z-index: 2; }
.slot u { position: absolute; inset: 0; background: #0009; transform-origin: bottom; transform: scaleY(0); }
.slot.evo { box-shadow: inset 0 0 0 2px var(--gold), 0 0 10px #ffd25b80; } .slot.evo i { color: var(--gold); }
.boss { position: absolute; top: calc(62px + var(--st)); left: 50%; width: min(440px, 62vw); transform: translate(-50%, -20px); opacity: 0; transition: .4s; text-align: center; }
.boss.on { opacity: 1; transform: translate(-50%, 0); }
.boss b { font-family: Lilita, sans-serif; font-weight: 400; font-size: 18px; letter-spacing: 1px; color: #ffc0e0; text-shadow: 0 2px 0 #000a; }
.boss .bar { height: 12px; margin-top: 3px; border-radius: 7px; background: #0b0818c0; box-shadow: inset 0 0 0 1.5px #ff7ab060; overflow: hidden; }
.boss .bar i { display: block; height: 100%; background: linear-gradient(90deg, #a03cff, #ff4a8a); transform-origin: left; transition: transform .15s; }
.hint { position: absolute; bottom: calc(10px + var(--sb)); left: 50%; transform: translateX(-50%); font-size: 13px; color: #fff; opacity: .5; white-space: nowrap; text-shadow: 0 1px 3px #000; }
body.touch .hint { display: none; }
#banner { position: fixed; top: 30%; left: 0; right: 0; text-align: center; pointer-events: none; z-index: 15; opacity: 0; }
#banner span { display: inline-block; font-family: Lilita, sans-serif; font-size: clamp(32px, 7vw, 60px); padding: 0 20px; color: #fff; text-shadow: 0 4px 0 #0009, 0 0 30px #fff6; }
#banner.show { animation: banIn .5s cubic-bezier(.2, 1.6, .4, 1) forwards; } #banner.hide { animation: banOut .4s forwards; }
#banner.boss span { color: #ff8ad0; text-shadow: 0 4px 0 #3b0030, 0 0 40px #ff3aa0; } #banner.warn span { color: #ffb36b; text-shadow: 0 4px 0 #4a1c00, 0 0 30px #ff7a2a; }
#banner.elite span, #banner.win span { color: var(--gold); text-shadow: 0 4px 0 #6b3300, 0 0 30px #ffb84a; }
#banner.evo span { background: linear-gradient(90deg, #ffd25b, #ff6ad5, #7cf0ff, #ffd25b); background-size: 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hue 1.5s linear infinite; filter: drop-shadow(0 4px 0 #0009); }
@keyframes hue { to { background-position: 200% 0; } }
@keyframes banIn { from { opacity: 0; transform: scale(2.2); } to { opacity: 1; transform: none; } }
@keyframes banOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-20px) scale(.9); } }
#toasts { position: fixed; top: calc(100px + var(--st)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 16; width: min(92vw, 520px); }
.toast, .ach { padding: 10px 16px; border-radius: 14px; background: #16112bd8; box-shadow: 0 8px 24px #0007, inset 0 0 0 1px #ffffff1c; font-size: 15px; text-align: center; opacity: 0; transform: translateY(-12px) scale(.95); transition: .3s cubic-bezier(.2, 1.4, .4, 1); }
.toast.in, .ach.in { opacity: 1; transform: none; } .toast.out, .ach.out { opacity: 0; transform: translateY(-8px); }
.ach { display: flex; align-items: center; gap: 12px; text-align: left; box-shadow: 0 8px 24px #0007, inset 0 0 0 1.5px #ffd25b80, 0 0 24px #ffd25b40; }
.ach div { display: flex; flex-direction: column; } .ach small { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; } .ach em { font-style: normal; color: var(--mut); font-size: 13px; }
#lockhint { position: fixed; left: 50%; top: 58%; transform: translateX(-50%); padding: 10px 18px; border-radius: 14px; background: #16112bd8; z-index: 12; opacity: 0; pointer-events: none; transition: opacity .3s; cursor: pointer; }
body.needlock #lockhint { opacity: 1; pointer-events: auto; }

/* ---------- toque ---------- */
#touch { position: fixed; inset: 0; z-index: 5; display: none; }
body.touch.playing #touch { display: block; }
#jbase { position: fixed; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #ffffff10, #ffffff20); box-shadow: inset 0 0 0 2px #ffffff40; z-index: 6; pointer-events: none; opacity: 0; transition: opacity .15s; }
#jbase.on { opacity: 1; }
#knob { position: absolute; left: 34px; top: 34px; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #d9ceff); box-shadow: 0 4px 12px #0007; }
#tbtns { position: fixed; right: calc(18px + var(--sr)); bottom: calc(22px + var(--sb)); z-index: 11; display: none; }
body.touch.playing #tbtns { display: block; }
#tbtns button { position: absolute; display: grid; place-items: center; border-radius: 50%; background: #ffffff22; box-shadow: inset 0 0 0 2px #ffffff55, 0 6px 16px #0006; transition: transform .08s, background .08s; touch-action: none; }
#tbtns button.on { transform: scale(.9); background: #ffffff44; }
#bJump { right: 0; bottom: 0; width: 88px; height: 88px; background: radial-gradient(circle at 50% 35%, #7cc8ff66, #3a6bff40) !important; }
#bDash { right: 98px; bottom: 6px; width: 66px; height: 66px; --cd: 0; }
#bDash::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#0009 calc(var(--cd) * 360deg), transparent 0); }
#tbtns button.on, #bJump { }

/* ---------- carregando / falha ---------- */
#boot { position: fixed; inset: 0; background: var(--bg); z-index: 50; display: grid; place-items: center; transition: opacity .6s; }
#boot.done { opacity: 0; pointer-events: none; }
.spin { width: 40px; height: 40px; border-radius: 50%; border: 4px solid #ffffff22; border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#fail { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 24px; background: var(--bg); text-align: center; }
#fail.on { display: grid; } #fail p { color: var(--mut); max-width: 440px; } #fail small { color: #ff8aa0; }

/* ---------- celular ---------- */
@media (max-width: 720px) {
  .chars { grid-template-columns: 1fr 1fr; gap: 8px; }
  .char { padding: 10px 6px 9px; } .char .chat { width: 46px; height: 46px; } .char .chat .ic { width: 30px; height: 30px; } .char b { font-size: 17px; }
  .panel > .start { bottom: -16px; margin: 0 -16px -16px; }
  .shop { grid-template-columns: 1fr; }
  .cards { flex-direction: column; gap: 8px; align-items: stretch; }
  .card { max-width: none; min-height: 0; flex-direction: row; text-align: left; padding: 12px 14px; gap: 12px; }
  .card .cico { width: 54px; height: 54px; flex: none; }
  .card .clvl { justify-content: flex-start; } .card .cdesc { margin-top: 3px; font-size: 14px; }
  .lvl h2 { font-size: 36px; }
  .big b { font-size: 21px; }
  .panel { padding: 16px; }
  .stats { margin-right: 46px; gap: 8px; } .stats span { font-size: 14px; }
  #hud .time { font-size: 24px; }
  .hp .bar { width: 30vw; } .hp span { display: none; }
}
@media (max-height: 520px) { .logo span { font-size: 64px; } .title { gap: 14px; } .card { min-height: 0; } }
