@font-face { font-family: 'Baloo 2'; font-weight: 600; font-display: swap; src: url(../assets/fonts/baloo2-600.woff2) format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url(../assets/fonts/baloo2-700.woff2) format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url(../assets/fonts/baloo2-800.woff2) format('woff2'); }

:root {
  --red: #e8432e; --red-d: #a8281a; --yellow: #ffc93c; --yellow-d: #c98a0c; --green: #3fae5a; --green-d: #1f7a39;
  --blue: #3a8fe0; --blue-d: #1f5ea6; --cream: #fff6e6; --ink: #3b1d0f; --brown: #7a3d14;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --g1: #ffa53c; --g2: #ff5a3c; --g3: #e8325a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2a0f08; }
body { font-family: 'Baloo 2', system-ui, sans-serif; color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: manipulation; overscroll-behavior: none; }
button { font-family: inherit; border: 0; cursor: pointer; color: inherit; }

#app { position: relative; height: 100%; max-width: 560px; margin: 0 auto; overflow: hidden; }
@media (min-width: 700px) {
  body { background: radial-gradient(circle at 50% 40%, #5a1d10, #1c0805 75%); }
  #app { box-shadow: 0 0 60px rgba(0,0,0,.6); border-left: 1px solid rgba(255,255,255,.06); border-right: 1px solid rgba(255,255,255,.06); }
}

/* ---------- fundo por mundo ---------- */
#bg { position: absolute; inset: 0; background: linear-gradient(160deg, var(--g1) 0%, var(--g2) 55%, var(--g3) 100%); transition: background .6s; }
#app[data-world="2"] { --g1: #ff8a3c; --g2: #c8401e; --g3: #6e1a0e; }
#app[data-world="3"] { --g1: #47b86a; --g2: #23804a; --g3: #154a33; }
#app[data-world="4"] { --g1: #7b4bd6; --g2: #4a2a8a; --g3: #23124a; }
#app[data-world="5"] { --g1: #ffb347; --g2: #ff5f8f; --g3: #b6307a; }
#bg::before { content: ''; position: absolute; inset: 0; opacity: .35;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,226,120,.9) 0 9%, transparent 9.2%),
    radial-gradient(circle at 92% 92%, rgba(0,0,0,.25) 0 14%, transparent 14.2%),
    radial-gradient(circle at 85% 18%, rgba(255,255,255,.18) 0 3%, transparent 3.2%),
    radial-gradient(circle at 8% 70%, rgba(255,255,255,.14) 0 4%, transparent 4.2%); }
#app[data-world="3"] #bg::after { content: ''; position: absolute; inset: 0; opacity: .08;
  background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0/48px 48px; }
.bg-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .5s; }
.bg-img.on { opacity: 1; }
.bg-img.on + .bg-deco { opacity: .25; }
.bg-deco { position: absolute; inset: 0; pointer-events: none; }
.deco { position: absolute; opacity: .55; animation: drift linear infinite; }
.deco svg { width: 100%; height: 100%; }
@keyframes drift { 0% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(12deg); } 100% { transform: translateY(0) rotate(0deg); } }

/* ---------- telas ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(var(--sat) + 10px) 12px calc(var(--sab) + 10px); }
.screen.hidden { display: none; }
.screen.enter { animation: scrIn .32s cubic-bezier(.2,.9,.3,1.2); }
@keyframes scrIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.topbar { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.spacer { flex: 1; }

.ic { width: 1.3em; height: 1.3em; flex: none; }
.icon-btn { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(#ff7b52, var(--red)); box-shadow: 0 4px 0 var(--red-d), 0 6px 12px rgba(60,10,0,.3); transition: transform .08s; }
.icon-btn .ic { width: 26px; height: 26px; }
.icon-btn.small { width: 44px; height: 44px; border-radius: 14px; }
.icon-btn.light { background: linear-gradient(#fff, #f3e6d2); color: var(--brown); box-shadow: 0 4px 0 #c9b49a, 0 6px 12px rgba(60,10,0,.25); }
.icon-btn:active, .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-d); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 6px; border-radius: 18px;
  background: rgba(60,15,5,.38); color: #fff; font-weight: 800; font-size: 17px; backdrop-filter: blur(4px); }
.chip .ic { width: 24px; height: 24px; }
.ic.coin { color: #ffc93c; }
.ic.gold { color: #ffd23f; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 20px;
  font-size: 21px; font-weight: 800; color: #fff; letter-spacing: .3px;
  background: linear-gradient(#ff7b52, var(--red)); box-shadow: 0 5px 0 var(--red-d), 0 8px 16px rgba(60,10,0,.3);
  text-shadow: 0 2px 0 rgba(0,0,0,.18); transition: transform .08s, filter .15s; }
.btn .ic { width: 26px; height: 26px; }
.btn.big { min-height: 66px; font-size: 26px; border-radius: 24px; padding: 0 34px; }
.btn.yellow { background: linear-gradient(#ffe07a, var(--yellow)); color: #6a3b00; text-shadow: none; box-shadow: 0 5px 0 var(--yellow-d), 0 8px 16px rgba(60,10,0,.25); }
.btn.green { background: linear-gradient(#6fd08a, var(--green)); box-shadow: 0 5px 0 var(--green-d), 0 8px 16px rgba(0,40,10,.25); }
.btn.blue { background: linear-gradient(#6fb6ff, var(--blue)); box-shadow: 0 5px 0 var(--blue-d), 0 8px 16px rgba(0,20,60,.25); }
.btn.light { background: linear-gradient(#fff, #f1e3cd); color: var(--brown); text-shadow: none; box-shadow: 0 5px 0 #c9b49a, 0 8px 16px rgba(60,10,0,.2); }
.btn.small { min-height: 46px; font-size: 18px; padding: 0 18px; border-radius: 16px; }
.btn[disabled] { filter: grayscale(.8) brightness(.9); pointer-events: none; }
.btn.yellow:active { box-shadow: 0 1px 0 var(--yellow-d); }
.btn.green:active { box-shadow: 0 1px 0 var(--green-d); }
.btn.light:active { box-shadow: 0 1px 0 #c9b49a; }

/* ---------- início ---------- */
.home-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.logo { position: relative; text-align: center; color: #fff; }
.logo canvas { width: min(46vw, 190px); height: min(46vw, 190px); display: block; margin: 0 auto -18px; filter: drop-shadow(0 10px 12px rgba(60,10,0,.35)); animation: bob 3s ease-in-out infinite; }
.logo img { width: min(78vw, 360px); display: block; margin: 0 auto; filter: drop-shadow(0 10px 14px rgba(60,10,0,.35)); }
.logo h1 { margin: 0; line-height: .85; font-weight: 800; font-size: clamp(54px, 17vw, 84px); letter-spacing: 1px; }
.logo h1 span { display: block; -webkit-text-stroke: 7px #7a2410; paint-order: stroke fill; text-shadow: 0 7px 0 #7a2410, 0 12px 18px rgba(60,10,0,.35); }
.logo .l1 { color: #fff4d6; }
.logo .l2 { color: var(--yellow); margin-top: 2px; }
.logo .tagline { margin: 12px 0 0; display: inline-block; background: #fff4d6; color: var(--red-d); padding: 2px 16px; border-radius: 99px; font-weight: 800; font-size: 17px; letter-spacing: 1.5px; text-transform: uppercase; box-shadow: 0 3px 0 rgba(120,30,10,.4); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.home-btns { display: flex; flex-direction: column; gap: 14px; width: min(84vw, 330px); }
.home-btns .btn { width: 100%; }
.home-stats { display: flex; gap: 10px; }
.home-foot { display: flex; justify-content: center; gap: 12px; padding-bottom: 4px; }

/* ---------- mapa ---------- */
.title-pill { color: #fff; font-weight: 800; font-size: 26px; text-shadow: 0 3px 0 rgba(80,20,0,.35); padding-left: 4px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 2px 6px; scroll-snap-type: x mandatory; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; scroll-snap-align: center; min-width: 96px; padding: 8px 12px 6px; border-radius: 16px; background: rgba(60,15,5,.3); color: #fff;
  display: flex; flex-direction: column; align-items: center; line-height: 1.05; font-weight: 800; font-size: 15px; }
.tab small { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 3px; margin-top: 2px; }
.tab small .ic { width: 13px; height: 13px; }
.tab .bar { width: 100%; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin-top: 5px; overflow: hidden; }
.tab .bar i { display: block; height: 100%; background: var(--yellow); border-radius: 3px; }
.tab.active { background: #fff6e6; color: var(--red-d); box-shadow: 0 4px 0 rgba(80,20,0,.3); }
.tab.active .bar { background: rgba(160,60,20,.18); }
.tab.locked { opacity: .55; }
.world-head { color: #fff; text-align: center; padding: 6px 0 2px; }
.world-head h2 { margin: 0; font-size: 26px; line-height: 1.1; text-shadow: 0 3px 0 rgba(80,20,0,.35); }
.world-head p { margin: 2px 0 0; font-weight: 700; opacity: .9; font-size: 15px; }
.level-path { flex: 1; position: relative; overflow-y: auto; scrollbar-width: none; padding: 10px 0 20px; }
.level-path::-webkit-scrollbar { display: none; }
.path-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 22px; padding: 10px 6px; }
.path-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.node { position: relative; justify-self: center; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, #f4e3c8); color: var(--red-d); font-weight: 800; font-size: 30px;
  box-shadow: 0 6px 0 #b98d5c, 0 10px 18px rgba(60,10,0,.3); border: 4px solid #fff; transition: transform .1s; }
.node:active { transform: translateY(3px); }
.node.done { background: radial-gradient(circle at 35% 30%, #ffe58a, #ffc93c); color: #7a3d00; box-shadow: 0 6px 0 #c98a0c, 0 10px 18px rgba(60,10,0,.3); }
.node.current { background: radial-gradient(circle at 35% 30%, #ff9b7a, var(--red)); color: #fff; box-shadow: 0 6px 0 var(--red-d), 0 0 0 6px rgba(255,255,255,.35), 0 10px 18px rgba(60,10,0,.3); animation: pulse 1.4s ease-in-out infinite; }
.node.locked { background: radial-gradient(circle at 35% 30%, #c9b9a8, #9b8b7a); color: #f6efe6; box-shadow: 0 6px 0 #6e6052; border-color: #d8ccc0; }
.node.locked .ic { width: 30px; height: 30px; }
.node .stars { position: absolute; bottom: -16px; display: flex; gap: 1px; }
.node .stars .ic { width: 20px; height: 20px; color: rgba(80,40,20,.35); filter: drop-shadow(0 1px 0 rgba(0,0,0,.2)); }
.node .stars .ic.on { color: #ffd23f; }
.node.boss { width: 92px; height: 92px; }
.node.boss::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.7); }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* ---------- HUD do jogo ---------- */
.hud { display: flex; flex-direction: column; gap: 8px; }
.hud-row { display: flex; align-items: center; gap: 10px; }
.hud-title { flex: 1; color: #fff; text-align: center; line-height: 1; text-shadow: 0 2px 0 rgba(80,20,0,.35); }
.hud-title b { display: block; font-size: 24px; }
.hud-title small { font-size: 14px; font-weight: 700; opacity: .9; }
.hud-panel { display: flex; align-items: stretch; gap: 8px; background: rgba(255,246,230,.95); border-radius: 20px; padding: 7px; box-shadow: 0 5px 0 rgba(90,30,10,.35); }
.moves, .score { flex: none; min-width: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; padding: 2px 8px; line-height: 1; }
.moves { background: linear-gradient(#ff7b52, var(--red)); color: #fff; }
.moves b { font-size: 30px; }
.moves small, .score small { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; opacity: .9; }
.moves.low { animation: lowPulse .8s ease-in-out infinite; }
@keyframes lowPulse { 50% { transform: scale(1.06); background: linear-gradient(#ff4a2e, #c41f0e); } }
.score { background: #fbe6c6; color: var(--brown); }
.score b { font-size: 24px; }
.goals { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.goal { display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 12px; padding: 3px 8px 3px 4px; font-weight: 800; font-size: 18px; color: var(--ink); box-shadow: inset 0 -2px 0 rgba(0,0,0,.06); position: relative; }
.goal .gi { width: 30px; height: 30px; display: grid; place-items: center; }
.goal .gi .ic, .goal .gi img { width: 28px; height: 28px; }
.goal.done { background: #d8f5df; color: var(--green-d); }
.goal.done::after { content: ''; position: absolute; right: -5px; top: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.goal.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.endless-best { font-weight: 800; color: var(--brown); font-size: 16px; display: flex; align-items: center; gap: 6px; }
.endless-best .ic { color: #e2a200; }

#boardWrap { flex: 1; position: relative; min-height: 0; margin: 4px -6px; }
#board { position: absolute; inset: 0; touch-action: none; }

.boosters { display: flex; justify-content: center; gap: 10px; padding-top: 4px; }
.booster { position: relative; flex: 1; max-width: 120px; height: 72px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: linear-gradient(#fff, #f2e2c8); color: var(--brown); font-weight: 800; font-size: 15px; box-shadow: 0 5px 0 #c4a77f, 0 8px 14px rgba(60,10,0,.25); }
.booster .ic { width: 30px; height: 30px; }
.booster[data-b="rotate"] .ic { color: var(--blue); }
.booster[data-b="swap"] .ic { color: var(--green); }
.booster[data-b="trash"] .ic { color: var(--red); }
.booster .count { position: absolute; top: -7px; right: -5px; min-width: 26px; height: 26px; border-radius: 13px; background: var(--red); color: #fff; font-size: 15px; display: grid; place-items: center; padding: 0 6px; border: 2px solid #fff; }
.booster .count.buy { background: var(--green); }
.booster .count.buy .ic { width: 14px; height: 14px; color: #fff; }
.booster:active { transform: translateY(3px); box-shadow: 0 2px 0 #c4a77f; }
.booster.glow { animation: glow 1s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 5px 0 #c4a77f, 0 0 0 5px rgba(255,220,80,.8), 0 0 24px rgba(255,220,80,.9); } }

/* ---------- modal ---------- */
.modal { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(40,10,4,.62); backdrop-filter: blur(3px); }
.modal.hidden { display: none; }
.modal-card { position: relative; width: min(100%, 380px); max-height: 92%; overflow-y: auto; scrollbar-width: none; background: var(--cream); border-radius: 28px; padding: 24px 20px 20px; text-align: center;
  box-shadow: 0 8px 0 #c9a878, 0 20px 40px rgba(0,0,0,.4); animation: pop .34s cubic-bezier(.2,1.4,.4,1); }
.modal-card::-webkit-scrollbar { display: none; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-card h2 { margin: 0 0 6px; font-size: 32px; line-height: 1.05; color: var(--red-d); }
.modal-card p { margin: 6px 0; font-size: 18px; font-weight: 600; color: #6a3a22; }
.modal-card .ribbon { position: relative; margin: -6px auto 12px; width: fit-content; padding: 6px 30px; background: linear-gradient(#ff7b52, var(--red)); color: #fff; font-weight: 800; font-size: 24px; border-radius: 14px; box-shadow: 0 5px 0 var(--red-d); }
.modal-card .ribbon.green { background: linear-gradient(#6fd08a, var(--green)); box-shadow: 0 5px 0 var(--green-d); }
.modal-card .ribbon.gray { background: linear-gradient(#a78b7a, #7c6152); box-shadow: 0 5px 0 #4e3a2e; }
.modal-btns { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.modal-btns .row { display: flex; gap: 10px; }
.modal-btns .row .btn { flex: 1; padding: 0 10px; }
.modal-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 12px; background: #f0dcc0; color: var(--brown); display: grid; place-items: center; }
.modal-close .ic { width: 20px; height: 20px; }
.goal-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 6px; }
.goal-item { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 8px 14px; text-align: left; font-weight: 700; font-size: 18px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.05); }
.goal-item .gi { width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.goal-item .gi .ic, .goal-item .gi img { width: 40px; height: 40px; }
.goal-item b { font-size: 24px; color: var(--red-d); margin-left: auto; }
.info-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.info-pill { display: inline-flex; align-items: center; gap: 6px; background: #fbe6c6; color: var(--brown); border-radius: 99px; padding: 4px 14px 4px 8px; font-weight: 800; font-size: 17px; }
.info-pill .ic { width: 22px; height: 22px; }
.big-stars { display: flex; justify-content: center; gap: 4px; margin: 4px 0 6px; }
.big-stars .ic { width: 64px; height: 64px; color: #e6d3b8; transform: scale(.5); opacity: .7; }
.big-stars .ic:nth-child(2) { width: 80px; height: 80px; margin-top: -14px; }
.big-stars .ic.on { color: #ffcb1f; animation: starIn .45s cubic-bezier(.2,1.6,.4,1) forwards; filter: drop-shadow(0 4px 0 #c98a0c); }
@keyframes starIn { from { transform: scale(.2) rotate(-60deg); } to { transform: scale(1) rotate(0); opacity: 1; } }
.result-score { font-size: 46px; font-weight: 800; color: var(--red-d); line-height: 1; }
.result-score small { display: block; font-size: 15px; color: #8a5a3a; letter-spacing: 1px; text-transform: uppercase; }
.chef { width: 120px; height: auto; display: block; margin: -8px auto 4px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.3)); }
.setting { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 14px; margin: 8px 0; font-weight: 700; font-size: 18px; text-align: left; }
.setting .ic { width: 28px; height: 28px; color: var(--red); }
.setting span { flex: 1; }
.switch { width: 58px; height: 32px; border-radius: 16px; background: #d8c6ae; position: relative; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: left .2s; }
.switch.on { background: var(--green); }
.switch.on::after { left: 29px; }
.shop-item { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 10px 12px; margin: 10px 0; text-align: left; }
.shop-item .si { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #fbe6c6; flex: none; }
.shop-item .si .ic { width: 32px; height: 32px; }
.shop-item div { flex: 1; line-height: 1.1; }
.shop-item b { font-size: 19px; display: block; }
.shop-item small { font-size: 14px; color: #8a5a3a; font-weight: 600; }
.shop-item .btn { min-height: 44px; font-size: 18px; padding: 0 12px; gap: 4px; }
.shop-item .btn .ic { width: 22px; height: 22px; }
.how { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; text-align: left; }
.how .step { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 10px 12px; font-weight: 700; font-size: 17px; line-height: 1.2; }
.how .num { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; }

/* ---------- tutorial ---------- */
.coach { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
.coach.hidden { display: none; }
.coach .bubble { position: absolute; left: 50%; transform: translateX(-50%); width: min(88%, 360px); background: #fff; border-radius: 20px; padding: 12px 16px; font-weight: 800; font-size: 19px; text-align: center; color: var(--ink); box-shadow: 0 6px 0 rgba(90,30,10,.35); animation: pop .3s; }
.coach .hand { position: absolute; width: 64px; height: 64px; animation: tapHand 1.1s ease-in-out infinite; filter: drop-shadow(0 6px 6px rgba(0,0,0,.35)); }
.coach .hand .ic { width: 100%; height: 100%; }
@keyframes tapHand { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-6px,-10px) scale(.92); } }

.toast { position: absolute; left: 50%; bottom: calc(var(--sab) + 110px); transform: translate(-50%, 20px); background: rgba(40,12,4,.9); color: #fff; padding: 10px 18px; border-radius: 16px; font-weight: 800; font-size: 17px; opacity: 0; transition: .25s; pointer-events: none; z-index: 30; text-align: center; max-width: 86%; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: linear-gradient(160deg, #ffa53c, #e8325a); transition: opacity .4s; }
.loading.done { opacity: 0; pointer-events: none; }
.spin { width: 54px; height: 54px; border-radius: 50%; border: 6px solid rgba(255,255,255,.3); border-top-color: #fff; animation: rot 0.8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

@media (max-height: 640px) {
  .booster { height: 60px; font-size: 13px; }
  .booster .ic { width: 24px; height: 24px; }
  .moves b { font-size: 24px; }
  .hud-title b { font-size: 20px; }
  .icon-btn { width: 42px; height: 42px; }
  .logo canvas { width: 130px; height: 130px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; } }

/* ---------- modo pizzaria ---------- */
.store-box { width: min(86vw, 340px); display: flex; flex-direction: column; gap: 12px; }
.store-box.hidden { display: none; }
.store-box .btn { width: 100%; }
.store-box .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.store-box .row2 .btn { padding: 0 8px; font-size: 18px; gap: 6px; }
.store-name { align-self: center; display: inline-flex; align-items: center; gap: 8px; background: #fff6e6; color: var(--red-d); padding: 6px 16px 6px 10px; border-radius: 99px; font-weight: 800; font-size: 19px; box-shadow: 0 4px 0 rgba(90,30,10,.35); max-width: 100%; }
.store-name .ic { width: 24px; height: 24px; color: var(--red); }
.store-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-mode .home-center { gap: 14px; }
.store-mode .logo img { width: min(56vw, 230px); }
.store-mode #btnPlay, .store-mode .home-stats { display: none; }
.store-mode .home-btns { flex-direction: row; width: min(86vw, 340px); }
.store-mode .home-btns .btn { min-height: 46px; font-size: 16px; padding: 0 8px; gap: 6px; border-radius: 16px; }
.store-mode .home-btns .btn .ic { width: 20px; height: 20px; }
.info-pill.big { font-size: 24px; padding: 6px 18px 6px 12px; }
.info-pill.big .ic { width: 28px; height: 28px; }
.lbl { display: block; text-align: left; font-weight: 800; font-size: 15px; color: #8a5a3a; margin: 12px 4px 4px; }
.field { width: 100%; height: 52px; border: 3px solid #ecd9bd; border-radius: 16px; padding: 0 14px; font: 700 20px 'Baloo 2', sans-serif; color: var(--ink); background: #fff; outline: none; }
.field:focus { border-color: var(--yellow); }
.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-weight: 700; font-size: 16px; margin: 14px 2px 0; line-height: 1.25; }
.check input { width: 24px; height: 24px; accent-color: var(--green); flex: none; margin: 0; }
.seg { display: flex; background: #f0dcc0; border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 10px; }
.seg button { flex: 1; height: 40px; border-radius: 11px; background: none; font-weight: 800; font-size: 17px; color: #8a5a3a; }
.seg button.on { background: #fff; color: var(--red-d); box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.rank li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 6px 12px 6px 6px; font-weight: 800; font-size: 18px; }
.rank li.me { box-shadow: 0 0 0 3px var(--yellow); background: #fff8dc; }
.rank .pos { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #f0dcc0; color: #8a5a3a; flex: none; font-size: 17px; }
.rank .p1 { background: #ffcb1f; color: #6a3b00; } .rank .p2 { background: #d9dee6; color: #4a5260; } .rank .p3 { background: #e8a46a; color: #5a2a00; }
.rank .nm { flex: 1; display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank .sc { color: var(--red-d); }
.ver-inline { display: inline-flex; color: #2f8be0; vertical-align: middle; }
.ver-inline .ic { width: 20px; height: 20px; }
.passou { margin-top: 14px; text-align: left; }
.passou b { font-size: 15px; color: #8a5a3a; }
.passou div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.passou span { background: #fbe6c6; color: var(--brown); border-radius: 99px; padding: 2px 12px; font-weight: 700; font-size: 15px; }
.rank-loading { display: grid; place-items: center; padding: 30px 0; }
.spin.dark { border-color: rgba(168,40,26,.2); border-top-color: var(--red); }
.spin.small { width: 20px; height: 20px; border-width: 3px; display: inline-block; vertical-align: middle; }
.empty { padding: 16px 0; }
.gbtn { color: #3c4043 !important; width: 100%; white-space: nowrap; font-size: 21px !important; padding: 0 12px !important; }
.gbtn .ic { width: 30px; height: 30px; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0 4px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 3px dashed #e3c9a3; display: grid; place-items: center; font-weight: 800; color: #c9ad86; font-size: 17px; background: #fff; }
.stamp.on { border: 3px solid #e8913a; background: #fff3d6; animation: pop .35s; }
.stamp .ic { width: 70%; height: 70%; }
.stamp-count { margin: 4px 0 10px !important; }
.stamp-count b { color: var(--red-d); font-size: 22px; }
.full-banner { display: flex; align-items: center; gap: 10px; background: linear-gradient(#6fd08a, var(--green)); color: #fff; border-radius: 16px; padding: 10px 14px; text-align: left; font-weight: 700; font-size: 17px; margin-bottom: 8px; box-shadow: 0 4px 0 var(--green-d); animation: pulse 1.4s infinite; }
.full-banner .ic { width: 34px; height: 34px; flex: none; }
.qrbox { background: #fff; border-radius: 20px; padding: 12px; display: flex; flex-direction: column; align-items: center; box-shadow: inset 0 -3px 0 rgba(0,0,0,.05); }
.qrbox canvas { width: 200px; height: 200px; image-rendering: pixelated; }
.qrbox .code { font-size: 32px; font-weight: 800; letter-spacing: 6px; color: var(--ink); line-height: 1.1; margin-top: 4px; }
.qrbox small { font-weight: 700; color: #8a5a3a; font-size: 14px; }
.rank .sc small { color: #8a5a3a; font-size: 14px; }

.dev-fab { position: absolute; left: 10px; bottom: calc(var(--sab) + 96px); z-index: 14; width: 52px; height: 52px; border-radius: 50%; background: #1d1d2b; color: #ffd23f; font: 800 15px 'Baloo 2', sans-serif; box-shadow: 0 4px 0 #000, 0 6px 12px rgba(0,0,0,.35); opacity: .85; }
.dev-group { text-align: left; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dev-group b { width: 100%; color: #8a5a3a; font-size: 15px; }
.dev-group .btn { min-height: 40px; font-size: 15px; padding: 0 12px; }

/* =====================================================================
   VISUAL DE JOGO: botões com contorno, brilho e volume
   (quando as imagens de assets/img/ui/ existem, elas substituem estes estilos)
   ===================================================================== */
.btn, .icon-btn {
  --t: #ff9a6a; --m: #f4552f; --b: #d63a1b; --o: #7a1d0e;
  position: relative; isolation: isolate; overflow: visible;
  border: 3px solid var(--o);
  background: linear-gradient(180deg, var(--t) 0%, var(--m) 48%, var(--b) 100%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.5), inset 0 -6px 0 rgba(0,0,0,.16), 0 6px 0 var(--o), 0 10px 16px rgba(40,8,0,.35);
  color: #fff;
  text-shadow: 0 2px 0 var(--o), 2px 0 0 var(--o), -2px 0 0 var(--o), 0 -2px 0 var(--o), 2px 2px 0 var(--o), -2px 2px 0 var(--o), 2px -2px 0 var(--o), -2px -2px 0 var(--o), 0 4px 0 var(--o);
  letter-spacing: .5px;
}
.btn::before, .icon-btn::before {
  content: ''; position: absolute; z-index: -1; left: 8%; right: 8%; top: 4px; height: 40%;
  border-radius: 999px; background: linear-gradient(rgba(255,255,255,.6), rgba(255,255,255,.05)); pointer-events: none;
}
.btn .ic, .icon-btn .ic { filter: drop-shadow(0 2px 0 var(--o)) drop-shadow(1px 0 0 var(--o)) drop-shadow(-1px 0 0 var(--o)); }
.btn.green { --t: #a5ef7a; --m: #4cc04e; --b: #2f9a3c; --o: #18571f; }
.btn.yellow { --t: #fff08a; --m: #ffc61f; --b: #f0a000; --o: #8a4a00; color: #fff; }
.btn.blue { --t: #9ad8ff; --m: #3f9cf2; --b: #2575d4; --o: #133a7a; }
.btn.light, .icon-btn.light { --t: #fffdf6; --m: #f6e7cc; --b: #e6cc9e; --o: #9a6a3a; color: #6a3512; text-shadow: 0 2px 0 rgba(255,255,255,.8); }
.btn.light .ic, .icon-btn.light .ic { filter: none; }
.btn, .btn.yellow, .btn.green, .btn.blue, .btn.light { background: linear-gradient(180deg, var(--t) 0%, var(--m) 48%, var(--b) 100%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.5), inset 0 -6px 0 rgba(0,0,0,.16), 0 6px 0 var(--o), 0 10px 16px rgba(40,8,0,.3); }
.btn { border-radius: 22px; }
.btn.big { border-radius: 26px; }
.btn.small { border-radius: 18px; }
.icon-btn { border-radius: 18px; }
.btn:active, .btn.yellow:active, .btn.green:active, .btn.blue:active, .btn.light:active, .icon-btn:active {
  transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255,255,255,.4), inset 0 -4px 0 rgba(0,0,0,.16), 0 1px 0 var(--o), 0 3px 6px rgba(40,8,0,.3); }
.btn small { text-shadow: inherit; }
.btn[disabled] { filter: grayscale(.85) brightness(.95); }

.booster { border: 3px solid #9a6a3a; background: linear-gradient(180deg, #fffdf6, #f3e0bf); border-radius: 22px;
  box-shadow: inset 0 3px 0 #fff, inset 0 -6px 0 rgba(154,106,58,.18), 0 6px 0 #9a6a3a, 0 10px 14px rgba(40,8,0,.3); color: #6a3512; }
.booster .ic { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.booster:active { transform: translateY(5px); box-shadow: inset 0 3px 0 #fff, 0 1px 0 #9a6a3a; }
.booster .count { border: 3px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.3); font-weight: 800; }

.modal-card .ribbon { border: 3px solid var(--red-d); border-radius: 16px; box-shadow: inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 #7a1d0e;
  text-shadow: 0 2px 0 #7a1d0e, 2px 0 0 #7a1d0e, -2px 0 0 #7a1d0e, 0 -2px 0 #7a1d0e, 0 3px 0 #7a1d0e; }
.modal-card .ribbon.green { border-color: #18571f; box-shadow: inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 #18571f;
  text-shadow: 0 2px 0 #18571f, 2px 0 0 #18571f, -2px 0 0 #18571f, 0 -2px 0 #18571f, 0 3px 0 #18571f; }
.modal-card .ribbon.gray { border-color: #4e3a2e; text-shadow: 0 2px 0 #4e3a2e, 2px 0 0 #4e3a2e, -2px 0 0 #4e3a2e, 0 -2px 0 #4e3a2e, 0 3px 0 #4e3a2e; }
.modal-card { border: 4px solid #e2c393; box-shadow: inset 0 0 0 3px #fffaf0, 0 8px 0 #b98d5c, 0 20px 40px rgba(0,0,0,.45); }
.modal-close { border: 3px solid #9a6a3a; background: linear-gradient(#fffdf6, #f0dcc0); box-shadow: 0 3px 0 #9a6a3a; }
.chip { border: 2px solid rgba(255,255,255,.18); box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 3px 0 rgba(0,0,0,.25); }
.tab { border: 3px solid rgba(60,15,5,.25); }
.tab.active { border-color: #9a6a3a; box-shadow: inset 0 3px 0 #fff, 0 4px 0 #9a6a3a; }

/* ---------- imagens de botão (assets/img/ui) ---------- */
.ui-img { border-color: transparent !important; box-shadow: none !important; background: none !important; border-style: solid !important;
  border-image-repeat: stretch; border-width: 0 !important; }
.ui-img::before { display: none; }
.ui-img:active { transform: translateY(4px) scale(.98); filter: brightness(.94); box-shadow: none !important; }

.btn.ui-img, .booster.ui-img, .ribbon.ui-img { border-image-slice: 0 28% fill; border-image-width: 0 calc(var(--bh, 56px) * .82); }
.btn.big.ui-img { --bh: 68px; } .btn.small.ui-img { --bh: 46px; }
.icon-btn.ui-img { border-image-slice: 0 0 fill; border-image-width: 0; background-size: 100% 100% !important; }
.modal-card.ui-frame { border: 0 solid transparent; border-image-slice: 22% fill; border-image-width: 44px; border-image-repeat: stretch; background: none; box-shadow: none; }
.ic-img { object-fit: contain; filter: none !important; }

/* avisos do painel */
.notice { width: min(86vw, 340px); display: flex; align-items: center; gap: 10px; border-radius: 18px; padding: 10px 12px; border: 3px solid #8a4a00; background: linear-gradient(#fff3b0, #ffd34e); color: #5a2a00; box-shadow: 0 4px 0 #8a4a00; text-align: left; animation: pop .4s; }
.notice.hidden { display: none; }
.notice.red { background: linear-gradient(#ffb59c, #ff7b52); border-color: #7a1d0e; box-shadow: 0 4px 0 #7a1d0e; color: #4a0e04; }
.notice.green { background: linear-gradient(#c8f5b0, #7fd36a); border-color: #18571f; box-shadow: 0 4px 0 #18571f; color: #0e3a14; }
.notice > .ic { width: 30px; height: 30px; flex: none; }
.notice div { flex: 1; line-height: 1.15; }
.notice b { display: block; font-size: 17px; }
.notice span { font-size: 14px; font-weight: 700; }
.notice button { width: 32px; height: 32px; border-radius: 10px; background: rgba(0,0,0,.12); display: grid; place-items: center; flex: none; }
.notice button .ic { width: 16px; height: 16px; }
.fb-stars { display: flex; justify-content: center; gap: 6px; margin: 6px 0 12px; }
.fb-stars button { background: none; padding: 0; }
.fb-stars .ic { width: 46px; height: 46px; color: #e3cfae; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); transition: transform .1s; }
.fb-stars button.on .ic { color: #ffc61f; }
.fb-stars button:active .ic { transform: scale(.9); }

/* logo e horário da pizzaria */
.store-logo { align-self: center; max-width: 150px; max-height: 92px; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(90,30,10,.25)); }
.store-logo.sm { display: block; margin: 0 auto 6px; max-height: 70px; }
.store-hours { align-self: center; display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer; background: rgba(255,246,230,.95); color: #3b1d0f; padding: 6px 10px 6px 12px; border-radius: 99px; font: 800 15px inherit; font-family: inherit; box-shadow: 0 3px 0 rgba(90,30,10,.3); max-width: 100%; }
.store-hours.static { cursor: default; margin: 0 auto 10px; display: flex; width: fit-content; }
.store-hours span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-hours .ic { width: 18px; height: 18px; flex: none; }
.store-hours > i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.store-hours.green > i { background: #3fae5a; box-shadow: 0 0 0 3px rgba(63,174,90,.25); }
.store-hours.yellow > i { background: #f2a900; box-shadow: 0 0 0 3px rgba(242,169,0,.25); }
.store-hours.red > i { background: #e8432e; box-shadow: 0 0 0 3px rgba(232,67,46,.22); }
.hrs-list { display: grid; gap: 3px; text-align: left; margin: 4px 0 6px; }
.hrs-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; border-radius: 11px; font-size: 16px; font-weight: 700; color: #5a3520; }
.hrs-row:nth-child(odd) { background: rgba(236,217,189,.35); }
.hrs-row.today { background: #ffe39a; color: #3b1d0f; box-shadow: inset 0 0 0 2px #f2b400; }
.hrs-row.off span { color: #c0392b; }
.hrs-row small { font-size: 12px; color: #a8281a; text-transform: uppercase; margin-left: 4px; }
.hrs-note { font-size: 14px; color: #8a5a3a; margin: 6px 0 0; font-weight: 700; }
