/* Upa! — estilos. Mesma identidade do Ladrilho: céu noturno-violeta, peças creme com borda 3D, acentos rosa/laranja/verde. */
:root {
  --sky1: #0d1838; --sky2: #1d2f63; --sky3: #3b4f8c;
  --accent: #ff5f8f; --accent2: #ffb84d; --ok: #3ddc97;
  --tile: #fff4e6; --tile-edge: #e8cfb2; --ink: #2b2140;
  --glass: rgba(255,255,255,.10); --glass-2: rgba(255,255,255,.18); --line: rgba(255,255,255,.16);
  --text: #f6f3ff; --muted: rgba(246,243,255,.66);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
/* Etapa 59.1: bordas seguras (câmera e barra de gestos). No navegador vêm do env(); no app Android, o próprio app manda a
   altura da câmera em --cut-* (o WebView antigo, antes da versão 140, não informa), e vale o maior dos dois. */
:root { --sa-t: max(env(safe-area-inset-top, 0px), var(--cut-t, 0px)); --sa-b: max(env(safe-area-inset-bottom, 0px), var(--cut-b, 0px)); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sky2); }
body {
  font-family: var(--font); color: var(--text);
  user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

#app { position: relative; height: 100%; max-width: 520px; margin: 0 auto; overflow: hidden; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* HUD */
#hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start;
  padding: max(12px, var(--sa-t)) 14px 0; pointer-events: none; transition: opacity .3s ease; }
#hud.hidden { opacity: 0; }
.pill { display: flex; align-items: baseline; gap: 3px; padding: 6px 14px; border-radius: 999px;
  background: rgba(13,24,56,.38); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-weight: 900; font-size: 22px; }
.pill small { font-size: 13px; font-weight: 800; opacity: .7; }
.helmets { gap: 6px; align-items: center; padding: 10px 12px; }
.helmets i { width: 22px; height: 13px; border-radius: 12px 12px 3px 3px; background: rgba(255,255,255,.16);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); transition: background .2s ease, transform .2s ease; }
.helmets i.on:nth-child(5n+1) { background: linear-gradient(#a6f7d0, #3ddc97); }
.helmets i.on:nth-child(5n+2) { background: linear-gradient(#ffd08a, #ffb84d); }
.helmets i.on:nth-child(5n+3) { background: linear-gradient(#fff2b8, #ffd34d); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), 0 0 10px rgba(255,211,77,.7); }
.helmets.bump i.on:last-of-type, .helmets.bump { animation: bump .35s ease; }
.helmets.lost { animation: lost .4s ease; background: rgba(255,95,143,.45); }
@keyframes bump { 50% { transform: scale(1.14); } }
@keyframes lost { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* Telas sobrepostas */
.overlay { position: absolute; inset: 0; display: none; flex-direction: column; align-items: stretch;
  padding: max(16px, var(--sa-t)) 20px max(16px, var(--sa-b)); }
.overlay.active { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

/* Início */
.logo { display: flex; justify-content: center; gap: 6px; margin-top: 7vh; }
.logo span { width: 48px; height: 56px; display: grid; place-items: center; font-weight: 900; font-size: 32px; color: var(--ink);
  background: var(--tile); border-radius: 12px; box-shadow: 0 5px 0 var(--tile-edge), 0 10px 20px rgba(0,0,0,.25);
  animation: drop .5s cubic-bezier(.3,1.6,.5,1) backwards; }
.logo span:nth-child(odd) { transform: rotate(-4deg); } .logo span:nth-child(even) { transform: rotate(3deg); }
.logo span:nth-child(3) { background: var(--accent); color: #fff; box-shadow: 0 5px 0 #c93a68, 0 10px 20px rgba(0,0,0,.25); }
.logo span:nth-child(1){animation-delay:.02s}.logo span:nth-child(2){animation-delay:.08s}.logo span:nth-child(3){animation-delay:.14s}.logo span:nth-child(4){animation-delay:.2s}
@keyframes drop { from { opacity: 0; transform: translateY(-30px); } }
.tagline { text-align: center; color: var(--text); opacity: .85; margin: 14px 0 0; font-size: 15px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.menu-actions { display: grid; gap: 10px; margin-top: 3.5vh; }
.kid-pick { display: flex; justify-content: center; gap: 8px; }
.chip { padding: 8px 16px; border-radius: 999px; background: rgba(13,24,56,.3); border: 1px solid var(--line); font-weight: 800; font-size: 14px; }
.chip.on { background: var(--tile); color: var(--ink); border-color: var(--tile); box-shadow: 0 3px 0 var(--tile-edge); }

.btn { border-radius: 18px; padding: 14px 18px; font-weight: 800; font-size: 17px; background: var(--glass-2);
  display: flex; flex-direction: column; align-items: center; gap: 2px; }
.btn small { font-size: 13px; font-weight: 700; opacity: .65; }
.btn.primary { background: linear-gradient(180deg, #fff 0%, var(--tile) 100%); color: var(--ink); box-shadow: 0 5px 0 var(--tile-edge), 0 12px 24px rgba(0,0,0,.28); }
.btn.big { font-size: 24px; padding: 16px; }
.btn.video { background: linear-gradient(180deg, #4ff0aa, var(--ok)); color: #0b3a26; box-shadow: 0 5px 0 #23a26c, 0 12px 24px rgba(0,0,0,.28); }
.btn:active { transform: translateY(3px); }
.btn.primary:active { box-shadow: 0 2px 0 var(--tile-edge); }
.home-row { display: flex; gap: 10px; }
.pill-btn { flex: 1; padding: 10px; border-radius: 14px; background: rgba(13,24,56,.3); border: 1px solid var(--line);
  font-weight: 800; font-size: 15px; display: flex; flex-direction: column; align-items: center; }
.pill-btn small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pill-btn:disabled { opacity: .7; cursor: default; }
.best { text-align: center; margin: 2px 0 0; color: var(--text); opacity: .85; font-size: 14px; font-weight: 700; }

/* Game over */
#over { justify-content: center; background: rgba(13,24,56,.5); }
.card-over { display: grid; gap: 10px; padding: 22px 20px 20px; border-radius: 24px; text-align: center;
  background: rgba(29,47,99,.85); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.35);
  animation: pop .35s cubic-bezier(.3,1.5,.5,1) backwards; }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
.card-over h2 { margin: 0; font-size: 30px; font-weight: 900; color: var(--accent); }
.score { font-weight: 900; font-size: 56px; line-height: 1; }
.score small { font-size: 20px; opacity: .7; margin-left: 2px; }
.badge { margin: 0 auto; padding: 4px 12px; border-radius: 999px; background: var(--accent2); color: var(--ink); font-weight: 900; font-size: 13px; display: none; }
.badge.show { display: inline-block; animation: bump .5s ease 2; }

/* Anúncio simulado / pausa */
#ad, #pause { justify-content: center; align-items: center; background: rgba(7,6,15,.82); }
.ad-box { display: grid; gap: 8px; text-align: center; max-width: 280px; }
.ad-box p { margin: 0; font-weight: 900; font-size: 20px; }
.ad-box b { font-size: 64px; color: var(--ok); }
.ad-box small { color: var(--muted); font-size: 13px; }

/* ---------- Etapa 2: modos, fases, vidas ---------- */
svg { width: 22px; height: 22px; flex: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.topbar h3 { margin: 0; font-size: 19px; font-weight: 900; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(13,24,56,.35); border: 1px solid var(--line); }
.icon-btn:active { transform: scale(.94); }
.lives { display: flex; align-items: center; gap: 5px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(13,24,56,.38); border: 1px solid var(--line); font-weight: 900; min-width: 44px; }
.lives svg { width: 22px; height: 22px; }
.lives .n { font-size: 17px; }
.lives .t { font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lives.empty { animation: lost .4s ease; }

.mode-list { display: grid; gap: 14px; margin-top: 6vh; }
.mode-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px; border-radius: 22px;
  background: linear-gradient(180deg, #fff 0%, var(--tile) 100%); color: var(--ink);
  box-shadow: 0 5px 0 var(--tile-edge), 0 12px 24px rgba(0,0,0,.28); }
.mode-card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--tile-edge); }
.mode-card b { display: block; font-size: 22px; font-weight: 900; }
.mode-card small { display: block; font-size: 14px; font-weight: 700; opacity: .65; margin-top: 2px; }
.mode-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: rgba(43,33,64,.08); }

.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 4vh; }
.lv { aspect-ratio: 1 / 1.12; border-radius: 14px; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 6px 0 5px; position: relative;
  background: var(--tile); color: var(--ink); box-shadow: 0 4px 0 var(--tile-edge), 0 8px 16px rgba(0,0,0,.25); }
.lv:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tile-edge); }
.lv .num { font-weight: 900; font-size: 22px; line-height: 1; }
.lv .st { font-size: 11px; letter-spacing: -1px; color: var(--accent2); line-height: 1; }
.lv .st i { font-style: normal; color: rgba(43,33,64,.18); }
.lv .gi { position: absolute; top: 3px; right: 5px; font-size: 10px; font-weight: 900; opacity: .45; }
.lv.next { background: var(--accent); color: #fff; box-shadow: 0 4px 0 #c93a68, 0 8px 18px rgba(255,95,143,.4); animation: nextPulse 1.4s ease-in-out infinite; }
.lv.next .st i { color: rgba(255,255,255,.35); }
.lv.boss:not(.locked) { background: linear-gradient(180deg, #fff4c2, #ffd34d); box-shadow: 0 4px 0 #c98a12, 0 8px 18px rgba(255,211,77,.35); }
.lv.boss.next { background: linear-gradient(180deg, #ffd34d, #ffb84d); color: var(--ink); }
.lv.locked { background: rgba(13,24,56,.35); color: rgba(255,255,255,.5); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.lv.locked:active { transform: none; }
.lv svg { width: 20px; height: 20px; }
@keyframes nextPulse { 50% { transform: translateY(-3px); } }
.note { text-align: center; color: var(--text); opacity: .8; font-size: 13px; font-weight: 700; margin-top: 18px; line-height: 1.5; text-shadow: 0 1px 6px rgba(0,0,0,.3); }

.hud-left { display: grid; gap: 6px; justify-items: start; }
.goal { display: none; padding: 5px 10px 7px; border-radius: 12px; background: rgba(13,24,56,.38); border: 1px solid var(--line);
  font-weight: 900; font-size: 13px; min-width: 120px; }
.goal.show { display: grid; gap: 4px; }
.goal .bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.goal .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 3px; transition: width .25s ease; }

#banner { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); text-align: center; pointer-events: none; opacity: 0; width: 90%; }
#banner b { display: block; font-size: 26px; font-weight: 900; text-shadow: 0 2px 0 rgba(43,33,64,.35), 0 4px 16px rgba(0,0,0,.3); }
#banner small { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(13,24,56,.5); font-size: 14px; font-weight: 800; }
#banner.show { animation: banner 2s ease forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.9); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.04); }
  20% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -8px); } }

#toast { position: absolute; left: 50%; bottom: max(24px, var(--sa-b)); transform: translateX(-50%); padding: 10px 16px; border-radius: 999px;
  background: var(--tile); color: var(--ink); font-weight: 900; font-size: 14px; box-shadow: 0 4px 0 var(--tile-edge); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 5; white-space: nowrap; }
#toast.show { opacity: 1; }

#win, #nolives { justify-content: center; background: rgba(13,24,56,.5); }
.card-over h2.ok { color: var(--ok); }
.win-stars { display: flex; justify-content: center; gap: 6px; font-size: 52px; line-height: 1; }
.win-stars i { font-style: normal; color: rgba(255,255,255,.15); transform: scale(.6); transition: none; }
.win-stars i.on { color: #ffd34d; text-shadow: 0 3px 0 #c98a12, 0 0 18px rgba(255,211,77,.6); animation: starIn .45s cubic-bezier(.3,1.8,.5,1) forwards; }
.win-stars i:nth-child(2) { transform: translateY(-10px) scale(.6); font-size: 62px; }
.win-stars i:nth-child(2).on { animation-name: starIn2; }
@keyframes starIn { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1); } }
@keyframes starIn2 { from { transform: translateY(-10px) scale(0) rotate(-40deg); } to { transform: translateY(-10px) scale(1); } }
.big-heart { position: relative; width: 74px; height: 74px; margin: 0 auto; }
.big-heart svg { width: 74px; height: 74px; filter: grayscale(.6) opacity(.7); }
.big-heart b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 900; padding-bottom: 6px; }
.score.small { font-size: 40px; }

/* ---------- Etapa 3: moedas, guarda-roupa, loja ---------- */
.coin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #ffe9a6, #ffb84d 55%, #d9822b); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), inset 0 0 0 3px rgba(255,233,166,.35); }
.coins { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: rgba(13,24,56,.38); border: 1px solid var(--line); font-weight: 900; font-size: 16px; }
.coins .plus { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #0b3a26; font-size: 15px; line-height: 1; margin-left: 2px; }
.coins.small { padding: 4px 10px 4px 5px; font-size: 14px; }
.coins.small .coin { width: 18px; height: 18px; }
.topbar.end { justify-content: flex-end; min-height: 40px; }
.hud-right { display: grid; gap: 6px; justify-items: end; }

.pill-btn { position: relative; }
.pill-btn .dot { position: absolute; top: 6px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(255,255,255,.8); display: none; }
.pill-btn .dot.show { display: block; animation: bump 1s ease infinite; }

.earn { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; font-size: 22px; }
.earn .mini { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; color: #0b3a26;
  background: linear-gradient(180deg, #4ff0aa, var(--ok)); box-shadow: 0 3px 0 #23a26c; }
.earn .mini:active { transform: translateY(2px); box-shadow: 0 1px 0 #23a26c; }
.unlock { margin: 0; color: var(--accent2); font-weight: 900; font-size: 14px; min-height: 0; }
.unlock:empty { display: none; }

/* Guarda-roupa */
.tabs { display: flex; gap: 8px; margin: 10px 0 8px; }
.tab { flex: 1; padding: 10px; border-radius: 14px; background: rgba(13,24,56,.35); border: 1px solid var(--line); font-weight: 900; font-size: 15px; }
.tab.on { background: var(--tile); color: var(--ink); border-color: var(--tile); box-shadow: 0 3px 0 var(--tile-edge); }
.items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 36vh; overflow-y: auto; padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: none; }
.items::-webkit-scrollbar { display: none; }
.item { position: relative; aspect-ratio: 1; border-radius: 16px; background: rgba(255,255,255,.12); border: 2px solid transparent;
  display: grid; place-items: center; overflow: hidden; }
.item canvas { width: 86%; height: 86%; }
.item .rb { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; }
.item.r-comum .rb { background: #9aa6c8; } .item.r-rara .rb { background: #4fa3ff; }
.item.r-epica .rb { background: #b56bff; } .item.r-lendaria .rb { background: linear-gradient(90deg, #ffd34d, #ff8a3d, #ffd34d); }
.item.r-lendaria { box-shadow: inset 0 0 18px rgba(255,184,77,.35); }
.item.r-epica { box-shadow: inset 0 0 14px rgba(181,107,255,.3); }
.item.locked canvas { opacity: .45; filter: saturate(.5); }
.item .lk { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; background: rgba(13,24,56,.7); display: grid; place-items: center; }
.item .lk svg { width: 13px; height: 13px; color: #fff; }
.item .ck { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #0b3a26; font-weight: 900; font-size: 13px; display: grid; place-items: center; }
.item .new { position: absolute; top: 5px; left: 5px; padding: 1px 6px; border-radius: 999px; background: var(--accent); font-size: 10px; font-weight: 900; }
.item.sel { border-color: #fff; background: rgba(255,255,255,.22); transform: translateY(-2px); }
.spacer { flex: 1; }
.item-bar { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 20px;
  background: rgba(29,47,99,.88); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.ib-info { flex: 1; min-width: 0; display: grid; gap: 2px; justify-items: start; }
.ib-info b { font-size: 18px; font-weight: 900; }
.ib-info small { color: var(--muted); font-size: 12px; font-weight: 700; }
.rar { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.item-bar .btn { min-width: 112px; padding: 12px 16px; }
.item-bar .btn:disabled { opacity: .7; }
.buy { display: inline-flex; align-items: center; gap: 6px; }
.buy .coin { width: 20px; height: 20px; }

/* Loja */
.shop-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 3vh; }
.shop-card { position: relative; display: grid; gap: 8px; justify-items: center; padding: 18px 10px 12px; border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, var(--tile) 100%); color: var(--ink); box-shadow: 0 5px 0 var(--tile-edge), 0 12px 24px rgba(0,0,0,.25); }
.shop-card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--tile-edge); }
.shop-card .sc-coins { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 900; }
.shop-card .sc-coins .coin { width: 28px; height: 28px; }
.shop-card .sc-coins svg { width: 26px; height: 26px; }
.shop-card .sc-coins b { font-weight: 900; }
.shop-card .sc-price { padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 900; font-size: 14px; }
.shop-card.ad .sc-price { background: var(--ok); color: #0b3a26; }
.shop-card .tag { position: absolute; top: -9px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 900; }
.shop-card:last-child { grid-column: 1 / -1; grid-template-columns: 1fr auto; padding: 14px 18px; }

/* ---------- Etapa 4: som ---------- */
.snd { display: flex; gap: 8px; }
.snd .icon-btn { width: 40px; height: 40px; position: relative; }
.snd .icon-btn svg { width: 20px; height: 20px; }
.snd .icon-btn.off { opacity: .55; }
.snd .icon-btn.off::after { content: ''; position: absolute; width: 26px; height: 2.6px; border-radius: 2px; background: var(--accent); transform: rotate(-45deg); box-shadow: 0 0 0 1.5px rgba(13,24,56,.6); }

/* ---------- Etapa 5: menu direto, mundos, guarda-roupa ---------- */
.top-right { display: flex; align-items: center; gap: 8px; }
.menu-actions .mode-card { padding: 13px 16px; gap: 12px; border-radius: 20px; }
.menu-actions .mode-card b { font-size: 20px; }
.menu-actions .mode-card small { font-size: 13px; }
.menu-actions .mode-ico { width: 46px; height: 46px; font-size: 24px; border-radius: 14px; }
.mode-card.inf { background: linear-gradient(180deg, #4ff0aa, var(--ok)); color: #0b3a26; box-shadow: 0 5px 0 #23a26c, 0 12px 24px rgba(0,0,0,.28); }
.mode-card.inf:active { box-shadow: 0 2px 0 #23a26c; }
.mode-card.inf .mode-ico { background: rgba(11,58,38,.12); }
.logo { margin-top: 4vh; }
.menu-actions { margin-top: 2.5vh; }

#levels .grid { flex: 1; min-height: 0; overflow-y: auto; align-content: start; margin-top: 2vh; padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#levels .grid::-webkit-scrollbar { display: none; }
.world { grid-column: 1 / -1; margin: 10px 0 0; font-size: 17px; font-weight: 900; text-shadow: 0 1px 6px rgba(0,0,0,.25); display: flex; align-items: baseline; gap: 8px; }
.world:first-child { margin-top: 0; }
.world span { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--accent); }
#levels .note { margin-top: 8px; }

/* itens: quadrado garantido em qualquer navegador (sem depender de aspect-ratio) */
#wardrobe .items { flex: 0 1 auto; min-height: 0; max-height: none; grid-auto-rows: max-content; align-content: start; } /* linhas nunca encolhem: rola em vez de sobrepor */
#wardrobe .spacer { flex: 1 0 10px; }
#wardrobe .item { aspect-ratio: auto; height: auto; display: block; padding: 0; }
#wardrobe .item::before { content: ''; display: block; padding-top: 100%; }
#wardrobe .item canvas { position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; }
.item .pk { position: absolute; left: 4px; bottom: 7px; font-size: 11px; line-height: 1; letter-spacing: -1px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.ib-btns { display: grid; gap: 6px; flex: none; }
.ib-btns .btn { min-width: 116px; padding: 10px 14px; font-size: 16px; }
.ib-btns .btn small { font-size: 11px; }
.ib-btns .btn.short { opacity: .75; }
.ib-info small { line-height: 1.35; }
.helmets i.on:nth-child(5n+4) { background: linear-gradient(#e0fbff, #7fd8ff); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), 0 0 10px rgba(127,216,255,.7); }
.helmets i.on:nth-child(5n+5) { background: linear-gradient(#f0e2ff, #b56bff); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), 0 0 10px rgba(181,107,255,.7); }

/* ---------- Etapa 6: moeda e loja do Ladrilho, vida infinita, capacetes ---------- */
:root { --coin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3a6'/%3E%3Cstop offset='.55' stop-color='%23ffc93a'/%3E%3Cstop offset='1' stop-color='%23f59b1c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='24' cy='26.5' r='20.5' fill='%23b8641a'/%3E%3Ccircle cx='24' cy='22.5' r='20.5' fill='url(%23a)' stroke='%23d98a1d' stroke-width='1.5'/%3E%3Ccircle cx='24' cy='22.5' r='14.5' fill='%23ffb92e' stroke='%23e3901c' stroke-width='1.5'/%3E%3Cpath d='M24 12.2l3.1 6.4 7 1-5.1 4.9 1.2 7-6.2-3.3-6.2 3.3 1.2-7-5.1-4.9 7-1z' fill='%23fff6c9' stroke='%23e3901c' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M8.5 17.5a17 17 0 0 1 12-11.5' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E"); }
.coin { background: var(--coin) center / contain no-repeat !important; box-shadow: none !important; border-radius: 0 !important; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.coins .coin { width: 28px; height: 28px; margin: -2px 0; }
.coins.small .coin { width: 22px; height: 22px; }
.coin.big { display: block; width: 34px; height: 34px; }
.coin.pile2 { display: block; width: 44px; height: 34px; background: var(--coin) 0 60% / 30px no-repeat, var(--coin) 100% 60% / 30px no-repeat, var(--coin) 50% 20% / 30px no-repeat !important; }
.coins { padding: 5px 6px; gap: 7px; background: rgba(0,0,0,.28); border: 1px solid var(--line); font-size: 16px; }
div.coins { padding-right: 14px; }
.coins .plus { width: 24px; height: 24px; margin-left: 2px; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%236ff0a8'/%3E%3Cstop offset='1' stop-color='%231fb96b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='12' r='11' fill='%23fff'/%3E%3Ccircle cx='12' cy='12' r='9.5' fill='url(%23g)'/%3E%3Cpath d='M12 7v10M7 12h10' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; font-size: 0; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
button.coins:active .plus { transform: scale(.9); }

/* Loja (formato do Ladrilho) */
#shop .shop-list { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1fr; grid-auto-rows: max-content; gap: 12px; align-content: start; padding: 4px 2px 20px; margin-top: 8px; overscroll-behavior: contain; scrollbar-width: none; }
#shop .shop-list::-webkit-scrollbar { display: none; }
.pack { position: relative; border-radius: 20px; overflow: hidden; text-align: left; color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.pack.violet { background: linear-gradient(180deg, #a35cff, #7b3fe0); }
.pack.blue { background: linear-gradient(180deg, #4ea3ff, #2f6fe0); }
.pack:active, .coin-card:active, .noads:active { transform: translateY(3px); }
.pack .tag { position: absolute; top: 8px; right: 10px; padding: 3px 8px; border-radius: 999px; background: #ffd23f; color: #3a2a00; font-size: 11px; font-weight: 900; }
.pack-items { display: flex; align-items: center; gap: 8px; padding: 14px 14px 8px; }
.pk-it { display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 12px; background: rgba(255,255,255,.18); font-size: 18px; }
.pk-it b { font-size: 15px; }
.pack .art { margin-left: auto; font-size: 40px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
.pack-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: rgba(0,0,0,.15); font-weight: 900; font-size: 17px; }
.pack-foot small { display: block; font-size: 12px; font-weight: 800; opacity: .85; }
.price { padding: 7px 14px; border-radius: 12px; background: #2fd16f; color: #fff; font-weight: 900; font-size: 15px; box-shadow: 0 3px 0 #1d9a4f; white-space: nowrap; }
.price.free { background: #ff9f1c; box-shadow: 0 3px 0 #c97200; }
.noads { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; text-align: left; color: #fff; background: linear-gradient(180deg, #ff5f8f, #e23d6f); box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.noads .art { font-size: 32px; }
.noads b { display: block; font-size: 18px; }
.noads small { opacity: .85; font-size: 12px; }
.noads .price { margin-left: auto; }
.noads:disabled .price { background: rgba(255,255,255,.25); box-shadow: none; }
.coin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.coin-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 18px; background: #fff4e6; color: var(--ink); box-shadow: 0 4px 0 var(--tile-edge); }
.coin-card .pile { font-size: 30px; line-height: 34px; }
.coin-card b { font-size: 15px; }
.coin-card .price { font-size: 12px; padding: 6px 10px; }
.shop-note { margin-top: 4px; }

/* vida infinita */
.lives.inf { background: linear-gradient(180deg, rgba(163,92,255,.75), rgba(123,63,224,.75)); border-color: rgba(255,255,255,.35); }
.lives.inf .n { font-size: 20px; line-height: 1; }
.btn.inf { background: linear-gradient(180deg, #a35cff, #7b3fe0); color: #fff; box-shadow: 0 5px 0 #5a2bb0, 0 12px 24px rgba(0,0,0,.28); }

/* guarda-roupa com 3 abas */
.tab { font-size: 14px; padding: 10px 6px; }

/* capacetes do placar: com aba */
.helmets i { position: relative; width: 22px; height: 13px; border-radius: 12px 12px 3px 3px; }
.helmets i::after { content: ''; position: absolute; left: -3px; right: -3px; bottom: -2px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.18); }
.helmets i.on::after { background: rgba(0,0,0,.28); }
.helmets i.on::before { content: ''; position: absolute; left: 4px; top: 2px; width: 3px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.7); transform: rotate(-30deg); }
#items.scenes .item.locked canvas { opacity: .9; filter: none; }

/* ---------- Etapa 8: botões do menu em peças lado a lado (sobra mais cenário) ---------- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-tile { position: relative; display: flex; flex-direction: column; text-align: left; padding: 7px 7px 11px; border-radius: 22px; color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, var(--tile) 100%); box-shadow: 0 5px 0 var(--tile-edge), 0 12px 24px rgba(0,0,0,.28);
  transition: transform .08s ease, box-shadow .08s ease; animation: tileIn .5s cubic-bezier(.3,1.5,.5,1) .05s backwards; }
.mode-tile.inf { background: linear-gradient(180deg, #5af5b4 0%, var(--ok) 100%); color: #0b3a26;
  box-shadow: 0 5px 0 #23a26c, 0 12px 24px rgba(0,0,0,.28); animation-delay: .13s; }
.mode-tile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--tile-edge), 0 6px 12px rgba(0,0,0,.22); }
.mode-tile.inf:active { box-shadow: 0 2px 0 #23a26c, 0 6px 12px rgba(0,0,0,.22); }
.mt-win { position: relative; display: block; height: 62px; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1.5px rgba(43,33,64,.1); }
.mt-win svg { display: block; width: 100%; height: 100%; }
.mt-win::after { content: ''; position: absolute; inset: 0; pointer-events: none; transform: translateX(-110%);
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.38) 50%, transparent 62%); animation: shine 5s ease-in-out 1.2s infinite; }
.mode-tile.inf .mt-win::after { animation-delay: 3.7s; }
.mt-chip { position: absolute; top: 5px; left: 5px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 900; line-height: 1.4;
  color: #fff; background: rgba(13,24,56,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.mt-play { position: absolute; right: 12px; top: 51px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 3px 0 #c93a68, 0 5px 10px rgba(0,0,0,.22); }
.mode-tile.inf .mt-play { color: #fff; background: #1fa86c; box-shadow: 0 3px 0 #13774b, 0 5px 10px rgba(0,0,0,.22); }
.mt-play svg { width: 15px; height: 15px; fill: currentColor; margin-left: 2px; }
.mt-text { display: block; padding: 8px 5px 0; }
.mt-kick { display: block; font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .55; }
.mode-tile b { display: block; font-size: 21px; font-weight: 900; line-height: 1.1; }
.mt-foot { display: flex; align-items: center; gap: 7px; margin-top: 6px; min-height: 15px; font-size: 12px; font-weight: 900; }
.mt-foot em { font-style: normal; opacity: .72; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-bar { flex: 1; height: 7px; border-radius: 99px; background: rgba(43,33,64,.12); overflow: hidden; }
.mt-bar i { display: block; height: 100%; width: 4%; border-radius: inherit; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.a-flag { transform-origin: 119px 10px; animation: flag 1.4s ease-in-out infinite; }
.a-pulse { transform-box: fill-box; transform-origin: center; animation: pulseRing 1.7s ease-out infinite; }
.a-cloud { animation: drift 7s ease-in-out infinite alternate; }
.a-rise { animation: riseBg 3.4s linear infinite; }
.a-bob { animation: bobA 2.2s ease-in-out infinite; }
.a-lines { animation: linesA .6s linear infinite; }
@keyframes tileIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes shine { 0%, 72% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }
@keyframes flag { 50% { transform: scaleX(.8) skewY(5deg); } }
@keyframes pulseRing { from { transform: scale(1); opacity: .95; } to { transform: scale(2.2); opacity: 0; } }
@keyframes drift { to { transform: translateX(12px); } }
@keyframes riseBg { from { transform: translateY(-60px); } to { transform: translateY(0); } }
@keyframes bobA { 50% { transform: translateY(-3px); } }
@keyframes linesA { from { transform: translateY(-4px); opacity: .2; } 50% { opacity: .6; } to { transform: translateY(5px); opacity: 0; } }

/* Guarda-roupa e Loja nos cantos de baixo, por cima das flores */
.corner-btns { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.round-btn { pointer-events: auto; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.rb-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px;
  background: linear-gradient(180deg, #fff, var(--tile)); box-shadow: 0 4px 0 var(--tile-edge), 0 8px 16px rgba(0,0,0,.28); transition: transform .08s ease; }
.round-btn small { font-size: 12px; font-weight: 900; color: #fff; white-space: nowrap; text-shadow: 0 1px 0 rgba(43,33,64,.7), 0 1px 6px rgba(0,0,0,.5); }
.round-btn:active .rb-ico { transform: translateY(3px); box-shadow: 0 1px 0 var(--tile-edge), 0 4px 8px rgba(0,0,0,.25); }
.round-btn .dot { position: absolute; top: -4px; right: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2.5px #fff; display: none; }
.round-btn .dot.show { display: block; animation: bump 1s ease infinite; }

@media (prefers-reduced-motion: reduce) {
  .mode-tile, .mt-win::after, .mt-win svg * { animation: none !important; }
}
/* telas baixas: menu mais compacto para não cobrir o balão */
@media (max-height: 740px) {
  .logo { margin-top: 1.5vh; }
  .logo span { width: 42px; height: 49px; font-size: 28px; }
  .tagline { margin-top: 8px; font-size: 14px; }
  .menu-actions { margin-top: 1.5vh; gap: 8px; }
  .mt-win { height: 52px; }
  .mt-play { top: 41px; }
  .mt-text { padding-top: 6px; }
}

/* ---------- Etapa 9: pausa no meio da partida e configurações ---------- */
.hud-row { display: flex; align-items: center; gap: 8px; }
.hud-pause { pointer-events: auto; width: 42px; height: 42px; background: rgba(13,24,56,.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hud-pause svg { width: 18px; height: 18px; }
#hud.hidden .hud-pause { pointer-events: none; }
.gear-btn svg { width: 22px; height: 22px; transition: transform .3s ease; }
.gear-btn:active svg { transform: rotate(60deg); }

#pause { justify-content: center; align-items: stretch; background: rgba(13,24,56,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pause-card { width: 100%; max-width: 340px; margin: 0 auto; }
.pause-card h2 { color: var(--text); }
.pause-card .best { margin: -4px 0 6px; }
.btn-row { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.btn-row svg { width: 20px; height: 20px; flex: none; }
.btn.big .btn-row svg { width: 22px; height: 22px; }
.pause-card .btn small:empty { display: none; }
.btn.quit { background: rgba(255,95,143,.16); color: #ffd6e1; }

#settings { background: linear-gradient(180deg, rgba(13,24,56,.94), rgba(29,47,99,.94)); }
.topbar-gap { width: 44px; flex: none; }
.set-list { display: grid; gap: 8px; margin-top: 2vh; overflow-y: auto; align-content: start; }
.set-head { margin: 12px 6px 0; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.set-group { border-radius: 20px; background: rgba(255,255,255,.08); border: 1px solid var(--line); overflow: hidden; }
.set-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; font-weight: 800; font-size: 16px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.12); font-size: 18px; }
.set-ico svg { width: 19px; height: 19px; }
.set-lbl { flex: 1; }
.sw { position: relative; width: 50px; height: 30px; flex: none; border-radius: 99px; background: rgba(255,255,255,.22); transition: background .2s ease; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.3); transition: transform .22s cubic-bezier(.3,1.4,.5,1); }
.set-row.on .sw { background: var(--ok); }
.set-row.on .sw::after { transform: translateX(20px); }
.lang-row { padding-bottom: 4px; }
.lang-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 14px 14px; }
.lang { padding: 11px 4px; border-radius: 14px; font-weight: 900; font-size: 14px; background: rgba(13,24,56,.35); border: 1px solid var(--line); }
.lang.on { background: var(--tile); color: var(--ink); border-color: var(--tile); box-shadow: 0 3px 0 var(--tile-edge); }
.lang:active { transform: translateY(2px); }
.set-ver { margin-top: 16px; opacity: .55; }
.hud-pause { transition: opacity .2s ease; }
.hud-pause.off { opacity: 0; pointer-events: none; }

/* ---------- Etapa 10: menus separados, mapa de fases, 2x ---------- */
/* menu: Balões, Skins, Cenários e Loja lado a lado embaixo */
.dock { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dock-btn { min-width: 0; }
.dock-btn small { font-size: 11.5px; }
@media (max-height: 740px) { .dock .rb-ico { width: 48px; height: 48px; font-size: 24px; border-radius: 15px; } .dock-btn small { font-size: 11px; } }
#wardrobe .tabs { display: none; }
#ibHow { white-space: pre-line; }
.item .rq { position: absolute; top: 4px; left: 5px; font-size: 13px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }

/* 2x de moedas ativo */
.x2-hud { display: none; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; font-weight: 900; font-size: 15px; color: #7a3d0c;
  background: linear-gradient(180deg, #fff3a6, #ffc93a); box-shadow: 0 3px 0 #d98a1d, 0 0 16px rgba(255,211,77,.6); }
.x2-hud.show { display: flex; animation: bump .5s ease; }
.x2-bar { width: 44px; height: 6px; border-radius: 9px; background: rgba(122,61,12,.25); overflow: hidden; }
.x2-bar i { display: block; height: 100%; background: #7a3d0c; border-radius: inherit; }

/* mapa de fases: trilha subindo pelos mundos */
#levels { padding-bottom: 0; }
.map-scroll { flex: 1; min-height: 0; margin: 8px -20px 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  border-radius: 22px 22px 0 0; box-shadow: inset 0 0 0 1px var(--line); }
.map-scroll::-webkit-scrollbar { display: none; }
.map { position: relative; width: 100%; }
.map-world { position: absolute; left: 0; right: 0; overflow: hidden; }
.map-world.w0 { background: linear-gradient(180deg, #9fd8ff 0%, #8fd4a0 45%, #5fb874 100%); }
.map-world.w1 { background: linear-gradient(180deg, #e8f4ff 0%, #b9dcff 55%, #8fc4ff 100%); }
.map-world.w2 { background: linear-gradient(180deg, #1a1446 0%, #2a2160 50%, #3b3a8c 100%); }
.map-world.w3 { background: linear-gradient(180deg, #1c1a2e 0%, #2b2a40 50%, #4a4466 100%); }
.map-world i { position: absolute; font-style: normal; font-size: 26px; opacity: .6; transform: translate(-50%, -50%); }
.map-sign { position: absolute; bottom: 14px; display: flex; flex-direction: column; padding: 6px 12px; border-radius: 14px; line-height: 1.15;
  font-weight: 900; font-size: 14px; color: #fff; background: rgba(13,24,56,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.map-sign b { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.map-sign.left { left: 14px; }
.map-sign.right { right: 14px; text-align: right; }
.map-path { position: absolute; left: 0; top: 0; pointer-events: none; }
.mp-bed { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 18; stroke-linecap: round; }
.mp-dots { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0.1 13; }
.mp-done { fill: none; stroke: #ffd34d; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 0.1 13; }
.map-node { position: absolute; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink); font-weight: 900; font-size: 22px; background: radial-gradient(circle at 35% 30%, #fff, var(--tile) 60%, #f1dcc0);
  box-shadow: 0 5px 0 var(--tile-edge), 0 10px 18px rgba(0,0,0,.3); transition: transform .08s ease; }
.map-node:active { transform: translateY(3px); }
.map-node.done { background: radial-gradient(circle at 35% 30%, #fff6c9, #ffd34d 60%, #f0a92a); box-shadow: 0 5px 0 #c98a12, 0 10px 18px rgba(0,0,0,.3); }
.map-node.boss { width: 70px; height: 70px; margin: -35px 0 0 -35px; font-size: 24px; outline: 4px solid #ff5f8f; outline-offset: -1px; }
.map-node.locked { color: #4a5070; background: radial-gradient(circle at 35% 30%, #d6d9e8, #9aa0bd); box-shadow: 0 5px 0 #646b8c, 0 8px 14px rgba(0,0,0,.25); }
.map-node.locked .mn-num svg { width: 20px; height: 20px; }
.map-node.here { animation: nodeGlow 1.4s ease-in-out infinite; }
@keyframes nodeGlow { 50% { box-shadow: 0 5px 0 var(--tile-edge), 0 0 0 9px rgba(255,255,255,.35), 0 10px 18px rgba(0,0,0,.3); } }
.mn-crown { position: absolute; top: -20px; font-size: 20px; }
.mn-goal { position: absolute; top: -3px; left: -3px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; color: #fff; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.mn-stars { position: absolute; bottom: -15px; font-size: 14px; letter-spacing: -1px; color: #ffd34d; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.mn-stars i { font-style: normal; color: rgba(255,255,255,.5); }
.map-node.locked .mn-stars, .map-node.locked .mn-goal { display: none; }
.mn-foes { position: absolute; top: 50%; transform: translateY(-50%); display: flex; gap: 3px; }
.mn-foes.l { right: calc(100% + 8px); flex-direction: row-reverse; }
.mn-foes.r { left: calc(100% + 8px); }
.mn-foes img { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.88); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.map-node.locked .mn-foes img { opacity: .75; filter: saturate(.6); }
.mn-me { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); pointer-events: none; animation: meBob 1.3s ease-in-out infinite; }
.map-node.boss .mn-me { bottom: calc(100% + 16px); }
.mn-me img { width: 50px; height: 50px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
@keyframes meBob { 50% { transform: translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) { .map-node.here, .mn-me { animation: none; } }
.map-node.here { z-index: 2; }
.mp-bed { stroke: rgba(255,255,255,.5); }

/* ---------- Etapa 11: tela inicial = mapa de fases ---------- */
#menu { padding: 0; }
.map-scroll.home-map { position: absolute; inset: 0; margin: 0; border-radius: 0; box-shadow: none; }
.home-top { position: relative; z-index: 3; padding: max(12px, var(--sa-t)) 12px 10px;
  background: linear-gradient(180deg, rgba(13,24,56,.55), rgba(13,24,56,0)); }
.logo.mini { margin: 0; gap: 3px; }
.logo.mini span { width: 27px; height: 31px; font-size: 18px; border-radius: 8px; animation: none; box-shadow: 0 3px 0 var(--tile-edge), 0 6px 10px rgba(0,0,0,.25); }
.logo.mini span:nth-child(3) { box-shadow: 0 3px 0 #c93a68, 0 6px 10px rgba(0,0,0,.25); }
@media (max-width: 370px) { .logo.mini { display: none; } }

.home-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; gap: 8px;
  padding: 26px 12px max(12px, var(--sa-b)); background: linear-gradient(0deg, rgba(13,24,56,.5), rgba(13,24,56,0)); }
.home-row { display: flex; gap: 8px; align-items: stretch; }
.glass { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(13,24,56,.25), inset 0 1px 0 rgba(255,255,255,.35); }

/* progresso das fases (esquerda) */
.home-prog { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 8px 12px; border-radius: 18px; color: #fff; }
.home-prog small { font-size: 10.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-prog b { font-size: 19px; font-weight: 900; line-height: 1.15; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.hp-foot { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; font-weight: 900; }
.hp-foot em { font-style: normal; color: #ffe9a6; white-space: nowrap; }
.home-prog .mt-bar { background: rgba(255,255,255,.25); }

/* corrida infinita (botão separado, à direita) */
.inf-card { flex: 1.25; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 18px; text-align: left; color: #0b3a26;
  background: linear-gradient(180deg, #5af5b4 0%, var(--ok) 100%); box-shadow: 0 4px 0 #23a26c, 0 10px 20px rgba(0,0,0,.25); transition: transform .08s ease; }
.inf-card:active { transform: translateY(3px); box-shadow: 0 1px 0 #23a26c, 0 6px 12px rgba(0,0,0,.2); }
.ic-win { width: 58px; height: 54px; flex: none; border-radius: 13px; overflow: hidden; box-shadow: inset 0 0 0 1.5px rgba(11,58,38,.15); }
.ic-win svg { display: block; width: 100%; height: 100%; }
.ic-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.ic-text b { font-size: 18px; font-weight: 900; }
.ic-text em { font-style: normal; font-size: 11.5px; font-weight: 900; opacity: .75; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-play { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #1fa86c; border: 2px solid #fff; }
.ic-play svg { width: 13px; height: 13px; margin-left: 2px; }

/* Balões, Skins, Cenários e Loja: cartões de vidro com a prévia do que está equipado */
.home-bottom .dock { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dock-card { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 6px 7px; border-radius: 18px; color: #fff;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(13,24,56,.25), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .08s ease; }
.dock-card:active { transform: translateY(2px) scale(.97); }
.dock-card small { font-size: 12px; font-weight: 900; text-shadow: 0 1px 4px rgba(0,0,0,.45); white-space: nowrap; }
.dc-win { position: relative; width: 100%; aspect-ratio: 1.2; border-radius: 13px; overflow: hidden; display: grid; place-items: center;
  background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.dc-win.sky { background: linear-gradient(180deg, rgba(120,180,255,.55), rgba(214,236,255,.3)); }
.dc-win img { width: 100%; height: 100%; object-fit: contain; }
.dc-win img.cover { object-fit: cover; }
.dc-win.shop-art { background: linear-gradient(180deg, rgba(255,211,77,.45), rgba(255,143,176,.3)); }
.shop-art .coin { position: absolute; width: 24px; height: 24px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.shop-art .c1 { left: 14%; bottom: 14%; } .shop-art .c2 { left: 34%; bottom: 26%; } .shop-art .c3 { left: 22%; bottom: 40%; }
.shop-art .bag { position: absolute; right: 8%; bottom: 8%; font-size: 26px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.dock-card .dot { position: absolute; top: -4px; right: -2px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2.5px #fff; display: none; }
.dock-card .dot.show { display: block; animation: bump 1s ease infinite; }
@media (max-height: 700px) { .dc-win { aspect-ratio: 1.45; } .ic-win { width: 50px; height: 46px; } }

/* menina/menino na tela de Skins */
.ward-kid { margin: 4px 0 2px; }
/* barra de cima da tela inicial cabendo em celulares de 375px */
.home-top { gap: 6px; padding-left: 10px; padding-right: 10px; }
.home-top .top-right { gap: 6px; }
.home-top .gear-btn { width: 40px; height: 40px; flex: none; }
.logo.mini { gap: 2px; flex: none; }
.logo.mini span { width: 21px; height: 25px; font-size: 14px; border-radius: 6px; }
.home-top.no-logo .logo.mini { display: none; } /* sem espaço (ex.: muitas moedas): esconde o logo */

/* ---------- Etapa 12: mapa no céu, menina e lenhador na tela inicial, ida até a fase ---------- */
/* o mapa termina no meio do balão (--map-bottom vem do jogo) e some suave nas pontas */
.map-scroll.home-map { bottom: var(--map-bottom, 0px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 64px, #000 calc(100% - 80px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 64px, #000 calc(100% - 80px), transparent 100%); }
.home-map .map-world { background: none; } /* a cor de cada mundo vem num degradê translúcido do próprio mapa */
.mp-shade { fill: none; stroke: rgba(13,24,56,.16); stroke-width: 24; stroke-linecap: round; }
.home-bottom { padding-top: 14px; background: linear-gradient(0deg, rgba(13,24,56,.42), rgba(13,24,56,0)); }
/* cartão do progresso também joga a fase atual */
button.home-prog { position: relative; text-align: left; padding-right: 40px; transition: transform .08s ease; }
button.home-prog:active { transform: translateY(2px) scale(.98); }
.hp-play { position: absolute; top: 50%; right: 9px; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--accent); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.hp-play svg { width: 11px; height: 11px; margin-left: 2px; }
/* ao começar: botões saem, a trilha desce e a fase vem até o balão */
#menu .home-top, #menu .home-bottom { transition: transform .32s cubic-bezier(.55,0,.8,.3), opacity .3s ease; }
#menu.launch { pointer-events: none; }
#menu.launch .home-top { transform: translateY(-120%); opacity: 0; }
#menu.launch .home-bottom { transform: translateY(115%); opacity: 0; }
#menu.launch .home-map { transition: bottom .35s ease, opacity .35s ease; }
#menu.launch .mn-me { opacity: 0; transition: opacity .2s ease; }
#menu.fade .home-map { opacity: 0; }
body.travel #hud, body.travel #banner { z-index: 6; } /* placar e nome da fase por cima do mapa */
.map-node.go { z-index: 4; animation: nodeGo .5s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes nodeGo { 0% { transform: scale(1); } 45% { transform: scale(1.32); } 100% { transform: scale(1.14); } }
.map-node.go::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid #fff; pointer-events: none; animation: nodeRing .7s ease-out forwards; }
@keyframes nodeRing { from { opacity: .95; transform: scale(.9); } to { opacity: 0; transform: scale(2.1); } }
@media (prefers-reduced-motion: reduce) { .map-node.go, .map-node.go::after { animation: none; } }
.home-row .inf-card { flex: 1.38; }
button.home-prog { padding-right: 38px; }
/* ícones dos inimigos sempre na ordem em que chegam (da esquerda para a direita) */
.mn-foes.l { flex-direction: row; }

/* ---------- Etapa 14: cartão "novo inimigo" com o vídeo do que ele faz ---------- */
#meet { justify-content: center; align-items: stretch; background: rgba(13,24,56,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.meet-card { width: 100%; max-width: 340px; margin: 0 auto; animation: meetIn .4s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes meetIn { from { transform: scale(.85); opacity: 0; } }
.meet-kick { font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.meet-card h2 { color: var(--text); margin-top: -6px; }
#meetCv { display: block; width: 100%; aspect-ratio: 7 / 5; border-radius: 18px; background: #4f7fd8;
  box-shadow: inset 0 0 0 1px var(--line), 0 8px 18px rgba(0,0,0,.28); }
.meet-card .best { margin: 2px 0 4px; font-size: 15px; line-height: 1.35; }

/* itens que se liberam jogando: selos de fase e distância no canto (verde com ✓ quando já cumpriu) */
.item .rqs { position: absolute; top: 4px; right: 4px; display: grid; justify-items: end; gap: 2px; z-index: 1; pointer-events: none; }
.item .rqb { display: flex; align-items: center; gap: 2px; padding: 2px 5px 2px 4px; border-radius: 999px; font-size: 9.5px; font-weight: 900; line-height: 1.15;
  color: #fff; white-space: nowrap; background: rgba(13,24,56,.8); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.item .rqb svg { width: 9px; height: 9px; flex: none; }
.item .rqb.ok { background: var(--ok); color: #0b3a26; }

/* ===== Etapa 20 — psicologia: ganhos rápidos ===== */
/* barra do objetivo brilha quando falta pouco (gradiente de objetivo) */
.goal.near { border-color: rgba(255,211,77,.85); animation: goalNear .9s ease-in-out infinite; }
.goal.near .bar i { background: linear-gradient(90deg, #ffe9a6, #ffd34d); box-shadow: 0 0 8px rgba(255,211,77,.9); }
@keyframes goalNear { 50% { box-shadow: 0 0 0 3px rgba(255,211,77,.35); } }
/* fim da partida: quanto chegou perto, quanto faltou e o que te estourou */
.ov-prog { display: flex; align-items: center; gap: 10px; margin: 0 4px; }
.ov-bar { position: relative; flex: 1; height: 10px; border-radius: 5px; background: rgba(255,255,255,.15); }
.ov-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 5px; background: linear-gradient(90deg, #ffe9a6, #ffd34d); transition: width .8s cubic-bezier(.2,.8,.3,1); }
.ov-bar .mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(43,33,64,.45); }
.ov-prog b { min-width: 42px; text-align: right; font-size: 15px; font-weight: 900; }
.ov-left { margin: -4px 0 0; font-size: 14px; font-weight: 800; color: #ffd34d; }
.ov-left:empty { display: none; }
.ov-tip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; text-align: left; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.ov-tip img { width: 40px; height: 40px; flex: none; border-radius: 50%; background: rgba(255,255,255,.88); }
.ov-tip span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ov-tip small { font-size: 10.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.ov-tip b { font-size: 14px; font-weight: 900; }
.ov-tip em { font-style: normal; font-size: 12.5px; opacity: .9; }
/* tela inicial: próximo item a conquistar (Zeigarnik + gradiente de objetivo) */
.next-item { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 16px; color: #fff; text-align: left; transition: transform .08s ease; }
.next-item:active { transform: translateY(2px) scale(.98); }
.next-item img { width: 34px; height: 34px; flex: none; border-radius: 11px; object-fit: cover; background: rgba(255,255,255,.2); }
.ni-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.15; }
.ni-txt small { font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-txt b { font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-goal { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 48%; min-width: 0; }
.ni-bar { width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); overflow: hidden; }
.ni-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #ffe9a6, #ffd34d); }
.ni-goal em { display: flex; align-items: center; gap: 3px; max-width: 100%; font-style: normal; font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-goal em .coin { width: 13px; height: 13px; }
.next-item.ready { border-color: rgba(61,220,151,.9); animation: niReady 1.6s ease-in-out infinite; }
.next-item.ready .ni-bar i { background: linear-gradient(90deg, #9ff0c8, #3ddc97); }
.next-item.ready em { color: #9ff0c8; }
@keyframes niReady { 50% { box-shadow: 0 8px 20px rgba(13,24,56,.25), 0 0 0 4px rgba(61,220,151,.35); } }
/* mapa: estrelas de cada mundo e anel nas fases que ainda dão mais estrelas */
.map-sign em { margin-top: 2px; font-style: normal; font-size: 12px; font-weight: 900; color: #ffd34d; }
.map-node.more::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 3px dashed #ffd34d; filter: drop-shadow(0 0 1.5px rgba(43,33,64,.75)); pointer-events: none; animation: moreSpin 14s linear infinite; }
@keyframes moreSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .goal.near, .next-item.ready, .map-node.more::before { animation: none; } }

/* ===== Etapa 22 — voltar todo dia ===== */
.daily-btn { position: absolute; right: 12px; top: -66px; width: 58px; height: 58px; border-radius: 18px; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; transition: transform .08s ease; }
.daily-btn:active { transform: translateY(2px) scale(.96); }
.daily-btn .db-ic { font-size: 25px; line-height: 1.05; }
.daily-btn small { font-size: 10px; font-weight: 900; }
.daily-btn .dot { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2.5px #fff; display: none; }
.daily-btn .dot.show { display: block; }
.daily-btn.ready { animation: dailyWiggle 2.6s ease-in-out infinite; }
@keyframes dailyWiggle { 0%, 78%, 100% { transform: rotate(0); } 84% { transform: rotate(-9deg); } 90% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }
.next-wrap { display: flex; gap: 8px; align-items: stretch; }
.next-wrap .next-item { flex: 1; min-width: 0; }
.ni-drive { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 12px; border-radius: 16px; line-height: 1.1;
  color: #0b3a26; background: linear-gradient(180deg, #4ff0aa, var(--ok)); box-shadow: 0 4px 0 #23a26c; }
.ni-drive b { font-size: 13px; font-weight: 900; white-space: nowrap; }
.ni-drive small { font-size: 9.5px; font-weight: 800; opacity: .75; white-space: nowrap; }
.ni-drive:active { transform: translateY(2px); box-shadow: 0 2px 0 #23a26c; }
#daily { justify-content: center; background: rgba(13,24,56,.62); }
.daily-card { max-height: 100%; overflow-y: auto; gap: 10px; padding: 18px 16px 16px; }
.daily-card h2 { color: var(--accent2); font-size: 26px; }
.daily-card h3 { margin: 6px 2px 0; font-size: 16px; font-weight: 900; text-align: left; }
.cal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 7px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.cal-day small { font-size: 10px; font-weight: 900; opacity: .8; white-space: nowrap; }
.cal-day .cd-ic { display: grid; place-items: center; height: 26px; font-size: 20px; }
.cal-day .cd-ic .coin { width: 20px; height: 20px; }
.cal-day b { font-size: 13px; font-weight: 900; }
.cal-day.chest { grid-column: span 2; background: linear-gradient(180deg, rgba(255,211,77,.22), rgba(255,95,143,.16)); }
.cal-day.chest .cd-ic { height: 34px; font-size: 30px; }
.cal-day.got { opacity: .5; }
.cal-day.got em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 30px; font-weight: 900; color: var(--ok); text-shadow: 0 2px 6px rgba(0,0,0,.45); }
.cal-day.today { background: linear-gradient(180deg, #fff, var(--tile)); color: var(--ink); border-color: #fff; box-shadow: 0 4px 0 var(--tile-edge), 0 0 0 3px rgba(255,211,77,.65); animation: calPulse 1.2s ease-in-out infinite; }
@keyframes calPulse { 50% { transform: scale(1.05); } }
.cal-note { margin: -2px 0 0; font-size: 12px; opacity: .75; }
.btn:disabled { opacity: .55; pointer-events: none; }
.missions { display: grid; gap: 8px; }
.mis { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; text-align: left; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.mis.done { border-color: rgba(61,220,151,.75); }
.mis.got { opacity: .55; }
.mis-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 19px; border-radius: 10px; background: rgba(255,255,255,.12); }
.mis-ic .coin { width: 22px; height: 22px; }
.mis-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mis-txt b { font-size: 13.5px; font-weight: 900; line-height: 1.2; }
.mis-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.mis-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ffe9a6, #ffd34d); }
.mis.done .mis-bar i { background: linear-gradient(90deg, #9ff0c8, #3ddc97); }
.mis-txt small { font-size: 11px; opacity: .75; }
.mis-txt small .coin { width: 12px; height: 12px; vertical-align: -2px; }
.mis-btn { flex: none; padding: 8px 12px; border-radius: 12px; font-weight: 900; font-size: 13px; }
.mis-btn.claim { color: #0b3a26; background: linear-gradient(180deg, #4ff0aa, var(--ok)); box-shadow: 0 3px 0 #23a26c; animation: calPulse 1s ease-in-out infinite; }
.mis-btn.swap { color: var(--text); background: var(--glass-2); }
.mis-ok { flex: none; font-size: 22px; font-weight: 900; color: var(--ok); }
.gift-odds { margin: 0; font-size: 11.5px; line-height: 1.4; opacity: .75; text-align: left; }
.run-note { margin: 0; font-size: 13.5px; font-weight: 800; line-height: 1.35; color: #9ff0c8; }
.run-note:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .daily-btn.ready, .cal-day.today, .mis-btn.claim { animation: none; } }
.next-wrap .ni-goal { flex-basis: 40%; }
.next-wrap .ni-txt small { letter-spacing: .02em; }
#over .card-over, #win .card-over { max-height: 100%; overflow-y: auto; scrollbar-width: none; } /* telas baixas: o cartão rola em vez de cortar */

/* ===== Etapa 23 — álbum, treino, prévia do mundo e segredos ===== */
.album-btn { right: 78px; }
#album { gap: 10px; background: linear-gradient(180deg, rgba(13,24,56,.95), rgba(29,47,99,.97)); }
#album .topbar h3 { margin: 0; font-size: 20px; font-weight: 900; }
.album-count { padding: 6px 12px; border-radius: 999px; background: var(--glass-2); font-weight: 900; font-size: 14px; white-space: nowrap; }
.album-bar { flex: none; height: 8px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.album-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #ffe9a6, #ffd34d); transition: width .6s ease; }
.album-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; padding: 2px 2px 14px; }
.al-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 9px; border-radius: 16px;
  color: var(--text); background: rgba(255,255,255,.1); border: 1px solid var(--line); transition: transform .08s ease; }
.al-card:active { transform: scale(.96); }
.al-pic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.9); box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.al-pic img { width: 58px; height: 58px; }
.al-card b { font-size: 12.5px; font-weight: 900; line-height: 1.15; text-align: center; }
.al-card small { font-size: 10.5px; font-weight: 800; opacity: .7; }
.al-card.unk { background: rgba(255,255,255,.05); border-style: dashed; }
.al-card.unk .al-pic { background: rgba(255,255,255,.3); }
.al-card.unk b { letter-spacing: .2em; opacity: .7; }
.al-crown { position: absolute; top: 4px; right: 6px; font-size: 16px; }
.al-card.shake { animation: lost .4s ease; }
.meet-card.from-album .btn-row svg { display: none; }
.teaser { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; text-align: left;
  background: linear-gradient(90deg, rgba(155,140,255,.22), rgba(255,255,255,.06)); border: 1px dashed rgba(255,255,255,.35); }
.tz-pic { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.3); }
.tz-pic img { width: 44px; height: 44px; }
.tz-txt { display: flex; flex-direction: column; line-height: 1.2; }
.tz-txt small { font-size: 10.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.tz-txt b { font-size: 15px; font-weight: 900; }
.mn-foes img.unk { background: rgba(255,255,255,.5); }
#wardrobe .item.far canvas { filter: brightness(0); opacity: .45; }
#items.scenes .item.far canvas { filter: blur(5px) brightness(.55); opacity: 1; }
.far-q { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 26px; font-weight: 900; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.5); pointer-events: none; }

/* ===== Etapa 24 — Ateliê e vitrine ===== */
#atelier .items { flex: 0 1 auto; min-height: 0; max-height: none; grid-auto-rows: max-content; align-content: start; }
#atelier .spacer { flex: 1 0 10px; }
#atelier .item { aspect-ratio: auto; height: auto; display: block; padding: 0; }
#atelier .item::before { content: ''; display: block; padding-top: 100%; }
#atelier .item canvas { position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; }
#atelier .item.locked canvas { opacity: .4; filter: saturate(.4); }
.atl-tabs, .al-tabs { margin: 8px 0 6px; flex: none; }
.atl-k { flex: 1; padding: 9px 4px; border-radius: 14px; background: rgba(13,24,56,.35); border: 1px solid var(--line); color: var(--text); font-weight: 900; font-size: 13px; white-space: nowrap; }
.atl-k.on { background: var(--tile); color: var(--ink); border-color: var(--tile); box-shadow: 0 3px 0 var(--tile-edge); }
.item .req { position: absolute; left: 4px; right: 4px; bottom: 8px; padding: 2px 4px; border-radius: 999px; background: rgba(13,24,56,.78);
  font-size: 10px; font-weight: 900; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atl-bar .ib-info small { white-space: normal; }
.item.atl-tile { background: linear-gradient(160deg, rgba(255,95,143,.3), rgba(155,140,255,.3) 55%, rgba(61,220,151,.25)); border-color: rgba(255,255,255,.45); }
.item .atl-lb { position: absolute; left: 0; right: 0; bottom: 7px; text-align: center; font-size: 10.5px; font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,.7); pointer-events: none; }
.al-pic.sq { border-radius: 16px; overflow: hidden; }
.al-pic.sq img { width: 100%; height: 100%; object-fit: contain; }
.al-pic.sq.wide img { object-fit: cover; }
.al-card.col.r-rara { box-shadow: inset 0 0 12px rgba(79,163,255,.35); }
.al-card.col.r-epica { box-shadow: inset 0 0 14px rgba(181,107,255,.4); }
.al-card.col.r-lendaria { box-shadow: inset 0 0 18px rgba(255,184,77,.45); }

/* ===== Etapa 25 (parte 1) — compartilhar ===== */
.share-btn { justify-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; font-weight: 900; font-size: 14px;
  color: var(--ink); background: linear-gradient(180deg, #fff, var(--tile)); box-shadow: 0 3px 0 var(--tile-edge); }
.share-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tile-edge); }
#share { justify-content: center; background: rgba(13,24,56,.72); }
.share-card { max-height: 100%; overflow-y: auto; scrollbar-width: none; }
.share-card h2 { color: var(--text); font-size: 24px; }
#shareImg { display: block; width: 100%; max-height: 50vh; object-fit: contain; border-radius: 18px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }

/* ===== Telas de fim e botões do guarda-roupa: a mesma linguagem do resto do jogo =====
   (cartão noturno com borda 3D embaixo, medalha dourada da fase igual à do mapa, placar numa peça creme,
   recompensa numa peça creme e o botão principal com a bolinha rosa do ▶ da tela inicial) */
.end-card { gap: 12px; padding: 24px 18px 18px; border: 0;
  background: radial-gradient(120% 55% at 50% 0%, rgba(61,220,151,.2), rgba(61,220,151,0) 62%), linear-gradient(180deg, #2c4285, #1d2f63 58%, #182752);
  box-shadow: 0 8px 0 #0f1a3d, 0 26px 50px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.22); }
.over-card { background: radial-gradient(120% 50% at 50% 0%, rgba(255,95,143,.22), rgba(255,95,143,0) 62%), linear-gradient(180deg, #2c4285, #1d2f63 58%, #182752); }
.end-card h2 { font-size: 32px; letter-spacing: -.01em; line-height: 1.1; text-shadow: 0 3px 0 rgba(8,14,36,.45); }
.end-card .best { font-size: 14.5px; }
#win .card-over { max-height: calc(100% - 52px); }
.win-card.has-medal { padding-top: 56px; }
/* medalha da fase (pendurada em cima do cartão) */
.medal { position: relative; z-index: 2; align-self: center; flex: none; width: 96px; height: 96px; margin-bottom: -48px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff6c9, #ffd34d 60%, #f0a92a); box-shadow: 0 6px 0 #c98a12, 0 16px 28px rgba(0,0,0,.38);
  animation: medalIn .6s cubic-bezier(.3,1.6,.5,1) backwards; }
.medal b { font-size: 42px; font-weight: 900; color: var(--ink); letter-spacing: -.03em; }
.medal.boss { box-shadow: 0 6px 0 #c98a12, 0 0 0 5px #ff5f8f, 0 16px 28px rgba(0,0,0,.38); } /* contorno rosa, como o chefe no mapa */
.medal-crown { position: absolute; top: -27px; width: 40px; height: 40px; display: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)); }
.medal.boss .medal-crown { display: block; }
@keyframes medalIn { from { opacity: 0; transform: translateY(-46px) scale(.4) rotate(-24deg); } }
/* estrelas desenhadas (não mais o caractere ★) */
.win-stars { align-items: flex-end; gap: 2px; margin: 2px 0 -2px; font-size: 0; }
.win-stars i { width: 60px; height: 60px; display: grid; place-items: center; color: rgba(8,14,36,.55); filter: drop-shadow(0 2px 0 rgba(255,255,255,.1)); }
.win-stars i svg { width: 100%; height: 100%; }
.win-stars i { transform: scale(.86); }
.win-stars i:nth-child(2) { width: 78px; height: 78px; font-size: 0; transform: translateY(-10px) scale(.86); }
.win-stars i.on { color: #ffd34d; text-shadow: none; filter: drop-shadow(0 4px 0 #c98a12) drop-shadow(0 4px 12px rgba(255,211,77,.5)); }
/* placar numa peça creme (dourada no recorde) */
.plaque { justify-self: center; min-width: 64%; padding: 10px 22px 12px; border-radius: 22px; color: var(--ink);
  background: linear-gradient(180deg, #fff, var(--tile)); box-shadow: 0 6px 0 var(--tile-edge), 0 16px 30px rgba(0,0,0,.32);
  transform: rotate(-2deg); animation: plaqueIn .5s cubic-bezier(.3,1.6,.5,1) backwards .06s; }
.plaque .score { color: var(--ink); letter-spacing: -.02em; }
.plaque .score small { color: var(--ink); opacity: .5; }
.plaque.gold { background: radial-gradient(circle at 35% 25%, #fff6c9, #ffd34d 60%, #f0a92a); box-shadow: 0 6px 0 #c98a12, 0 16px 30px rgba(0,0,0,.32); }
@keyframes plaqueIn { from { opacity: 0; transform: rotate(-9deg) scale(1.35); } }
/* recompensa numa peça creme */
.end-card .earn { justify-self: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 999px; color: var(--ink); font-size: 22px;
  background: linear-gradient(180deg, #fff, var(--tile)); box-shadow: 0 4px 0 var(--tile-edge), 0 10px 20px rgba(0,0,0,.25); }
.end-card .earn .coin { width: 26px; height: 26px; }
.end-card .earn .mini { padding: 8px 14px; font-size: 14px; }
.end-card .ov-tip b { font-size: 14.5px; }
/* dica do inimigo e prévia do mundo: linhas soltas, sem caixa dentro do cartão */
.end-card .ov-tip, .end-card .teaser { background: none; border: 0; padding: 2px 6px; }
.end-card .ov-tip img, .end-card .tz-pic { box-shadow: 0 3px 0 rgba(8,14,36,.35); }
.end-card .btn.video small { opacity: 1; color: #10462e; } /* "assistir vídeo" legível no verde */
/* botões: principal com a bolinha rosa (como o ▶ da tela inicial), secundário com ícone */
.btn.go { position: relative; padding-left: 56px; padding-right: 56px; }
.go-chip { position: absolute; top: 50%; right: 10px; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--accent); box-shadow: 0 3px 0 #c93a68; }
.go-chip svg { width: 17px; height: 17px; }
#btnNext .go-chip svg { width: 16px; height: 16px; margin-left: 2px; }
.btn.ghost { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px rgba(255,255,255,.2); }
.btn.ghost .btn-row svg { width: 19px; height: 19px; opacity: .85; }
.end-card .btn { font-size: 18px; }
/* guarda-roupa: Usar / Em uso */
.ib-btns .btn.go { padding-left: 16px; padding-right: 54px; }
.ib-btns .btn.go .go-chip { width: 32px; height: 32px; margin-top: -16px; right: 8px; }
.ib-btns .btn.go .go-chip svg { width: 16px; height: 16px; }
.btn.in-use { color: #9ff0c8; background: rgba(61,220,151,.14); box-shadow: inset 0 0 0 2px rgba(61,220,151,.8); }
.item-bar .btn.in-use:disabled { opacity: 1; }
.btn.in-use .btn-row { gap: 7px; }
.btn.in-use svg { width: 18px; height: 18px; }
.ib-btns .btn .btn-row svg { width: 17px; height: 17px; }
@media (prefers-reduced-motion: reduce) { .medal, .plaque { animation: none; } }

/* ===== Etapa 29 — Melhorar Balão ===== */
.helmets.two { display: grid; grid-template-columns: repeat(5, 18px); gap: 3px 5px; padding: 7px 10px; }
.helmets.two i { width: 18px; height: 10px; }
.ward-seg { display: flex; gap: 6px; margin: 8px 0 4px; padding: 4px; border-radius: 17px; background: rgba(13,24,56,.38); border: 1px solid var(--line); }
.ward-seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border-radius: 13px; font-weight: 900; font-size: 15px; color: #fff; }
.ward-seg button.on { background: var(--tile); color: var(--ink); box-shadow: 0 3px 0 var(--tile-edge); }
.ward-seg svg { width: 15px; height: 15px; color: #22b673; }
.ward-seg button:not(.on) svg { color: #7ff0b8; }
#wardrobe .items.ups { display: grid; grid-template-columns: 1fr; gap: 10px; }
.up-card { display: grid; grid-template-columns: 48px 1fr; gap: 9px 11px; padding: 10px 11px; border-radius: 22px; background: rgba(13,24,56,.5); border: 1px solid var(--line); box-shadow: 0 4px 0 rgba(8,14,40,.35); }
.up-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; background: var(--tile); box-shadow: 0 4px 0 var(--tile-edge); }
.up-info { min-width: 0; display: grid; gap: 5px; align-content: center; }
.up-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.up-head b { font-size: 18px; font-weight: 900; line-height: 1.1; }
.up-head em { font-style: normal; font-weight: 900; font-size: 13px; color: var(--muted); white-space: nowrap; }
.up-pips { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.up-pips i { height: 8px; border-radius: 4px; background: rgba(255,255,255,.16); }
.up-card[data-up="mag"] .up-pips i.on { background: linear-gradient(#ffc9c9, #ff5a5a); }
.up-card[data-up="cap"] .up-pips i.on { background: linear-gradient(#a6f7d0, #3ddc97); }
.up-info small { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.35; }
.up-btns { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.up-btns .btn { padding: 9px 10px; font-size: 16px; min-width: 0; min-height: 44px; }
.up-btns .btn small { font-size: 11px; }
.up-btns .btn.short { opacity: .75; }
.up-full { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border-radius: 15px; font-weight: 900; color: #7ff0b8; background: rgba(61,220,151,.14); }
.up-full svg { width: 18px; height: 18px; }
.dock-card .upb { position: absolute; top: -5px; left: -3px; width: 23px; height: 23px; border-radius: 50%; background: linear-gradient(#5ff0a8, #22b673); box-shadow: 0 0 0 2.5px #fff, 0 3px 0 2.5px #178a55; color: #fff; display: none; place-items: center; }
.dock-card .upb.show { display: grid; animation: upHop 1.3s ease-in-out infinite; }
.dock-card .upb svg { width: 13px; height: 13px; }
@keyframes upHop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(8,12,34,.72); }
.gate[hidden] { display: none; }
.gate-card { width: min(340px, 100%); display: grid; justify-items: center; gap: 10px; padding: 22px 18px 18px; border-radius: 26px; background: var(--tile); color: var(--ink); box-shadow: 0 6px 0 var(--tile-edge); text-align: center; }
.gate-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #2b2140; color: #ffd34d; }
.gate-ic svg { width: 24px; height: 24px; }
.gate-card h3 { margin: 0; font-size: 21px; font-weight: 900; }
.gate-card p { margin: 0; font-size: 14px; font-weight: 700; opacity: .75; line-height: 1.4; }
.gate-q { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 900; }
.gate-q input { width: 84px; padding: 8px 10px; border-radius: 14px; border: 2px solid rgba(43,33,64,.25); background: #fff; color: var(--ink); font: inherit; text-align: center; }
.gate-q input:focus { outline: 3px solid #7fd8ff; outline-offset: 1px; }
.gate-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.gate-btns .btn.ghost { color: var(--ink); border-color: rgba(43,33,64,.25); }
@media (prefers-reduced-motion: reduce) { .dock-card .upb.show { animation: none; } }

/* ===== Etapa 30 — Melhorar Personagem ===== */
.up-ic[data-portrait] { overflow: hidden; background: linear-gradient(#cfe6ff, #9cc7f5); }
.up-ic canvas { width: 118%; height: 118%; margin-top: 12%; }
.up-bar { display: block; height: 9px; border-radius: 5px; background: rgba(255,255,255,.16); overflow: hidden; }
.up-bar i { display: block; height: 100%; min-width: 9px; border-radius: 5px; background: linear-gradient(90deg, #ffd34d, #ffb84d); }
.up-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.up-stat { display: grid; justify-items: center; gap: 1px; padding: 7px 4px; border-radius: 14px; background: rgba(255,255,255,.08); }
.up-stat b { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 900; white-space: nowrap; }
.up-stat b i { font-style: normal; font-size: 14px; }
.up-stat small { font-size: 11px; font-weight: 800; color: var(--muted); }
.up-gain { grid-column: 1 / -1; text-align: center; font-size: 12px; font-weight: 800; color: #ffe9a6; }
.dock-card small { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ===== Etapa 31 — primeira vez ===== */
.intro-card { margin-top: 6px; display: grid; gap: 14px; padding: 14px 16px 18px; border-radius: 28px; background: rgba(13,24,56,.55); border: 1px solid var(--line); box-shadow: 0 6px 0 rgba(8,14,40,.35); }
.intro-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; justify-items: center; }
.intro-top .logo.mini { margin: 0; }
.intro-dots { display: flex; gap: 5px; }
.intro-dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.3); transition: width .2s ease, background .2s ease; }
.intro-dots i.on { width: 20px; background: #ffd34d; }
#introTitle { margin: 0; text-align: center; font-size: 27px; font-weight: 900; letter-spacing: -.01em; }
.intro-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.intro-pick { position: relative; display: grid; justify-items: center; align-content: end; gap: 4px; padding: 10px 8px 12px; border-radius: 24px;
  background: linear-gradient(180deg, #fff 0%, var(--tile) 100%); color: var(--ink); box-shadow: 0 5px 0 var(--tile-edge); transition: transform .12s ease; }
.intro-pick:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--tile-edge); }
.intro-pick canvas { width: min(128px, 100%); height: auto; }
.intro-picks.bals .intro-pick canvas { width: min(118px, 100%); }
.intro-pick b { font-size: 19px; font-weight: 900; }
.intro-pick.on { box-shadow: 0 5px 0 var(--tile-edge), 0 0 0 4px #ff6f9a; }
.intro-pick .ck { position: absolute; top: -9px; right: -9px; width: 30px; height: 30px; border-radius: 50%; background: #ff6f9a; color: #fff; display: none; place-items: center; box-shadow: 0 0 0 3px #fff; }
.intro-pick.on .ck { display: grid; animation: bump .3s ease; }
.intro-pick .ck svg { width: 16px; height: 16px; }
#introGo { width: 100%; font-size: 20px; padding: 14px; }
#introGo:disabled { opacity: .45; box-shadow: none; }
#introGo .btn-row svg { width: 18px; height: 18px; }

/* ===== Etapa 32 — cordões ===== */
.ward-seg.three button { font-size: 14px; padding: 9px 4px; gap: 4px; }

/* ===== Etapa 33 — quests ===== */
.quests-btn { right: 144px; }
.item.r-quest .rb { background: linear-gradient(90deg, #9ff0c8, #3ddc97, #9ff0c8); }
.item.r-quest { box-shadow: inset 0 0 16px rgba(61,220,151,.35); }
.al-card.col.r-quest { box-shadow: inset 0 0 16px rgba(61,220,151,.45); }
#quests { background: linear-gradient(180deg, rgba(22,30,74,.95), rgba(30,36,92,.9)); }
.q-list { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 8px; padding: 4px 0 16px; }
.q-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 10px 4px 2px; font-size: 17px; font-weight: 900; }
.q-h small { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.q-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 20px; background: rgba(13,24,56,.5); border: 1px solid var(--line); }
.q-row.cur { border-color: rgba(159,240,200,.8); box-shadow: 0 0 0 2px rgba(61,220,151,.25); }
.q-row.done { background: rgba(61,220,151,.13); }
.q-pic { width: 56px; height: 56px; border-radius: 16px; overflow: hidden; background: linear-gradient(#5a8ee8, #1d2f63); display: grid; place-items: center; }
.q-pic img { width: 100%; height: 100%; object-fit: cover; }
.q-row:not(.done):not(.cur) .q-pic img { opacity: .55; filter: saturate(.6); }
.q-txt { min-width: 0; display: grid; gap: 3px; }
.q-txt b { font-size: 15px; font-weight: 900; line-height: 1.2; }
.q-txt small { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.16); overflow: hidden; }
.q-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #9ff0c8, #3ddc97); }
.q-prog { font-style: normal; font-size: 12px; font-weight: 900; color: #ffe9a6; white-space: nowrap; }
.q-in { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 900; color: #9ff0c8; white-space: nowrap; }
.q-in svg { width: 15px; height: 15px; }
.q-use { padding: 8px 14px; font-size: 15px; min-height: 40px; }

/* ===== Etapa 34 — menus nas laterais ===== */
.rail { position: absolute; bottom: calc(100% - 6px); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.rail-l { left: 10px; }
.rail-r { right: 10px; }
.rail-btn { position: relative; pointer-events: auto; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #fff; transition: transform .1s ease; }
.rail-btn:active { transform: translateY(2px) scale(.95); }
.rail-btn .rb-ic { position: relative; width: 56px; height: 56px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; font-size: 27px; line-height: 1;
  background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 0 rgba(13,24,56,.28), 0 8px 16px rgba(13,24,56,.22), inset 0 1px 0 rgba(255,255,255,.45); }
.rail-btn .rb-ic img { width: 100%; height: 100%; object-fit: contain; }
.rail-btn .rb-ic img.cover { object-fit: cover; }
.rail-btn .rb-ic.sky { background: linear-gradient(180deg, rgba(120,180,255,.6), rgba(214,236,255,.35)); }
.rail-btn .rb-ic.quest-art { background: linear-gradient(180deg, rgba(159,240,200,.55), rgba(61,220,151,.3)); }
.rail-btn .rb-ic.rank-art { background: linear-gradient(180deg, rgba(255,233,166,.55), rgba(255,184,77,.32)); }
.rail-btn .rb-ic.day-art { background: linear-gradient(180deg, rgba(255,143,176,.55), rgba(255,95,143,.3)); }
.rail-btn .rb-ic.album-art { background: linear-gradient(180deg, rgba(196,182,255,.55), rgba(155,140,255,.3)); }
.rail-btn .rb-ic.shop-art { background: linear-gradient(180deg, rgba(255,211,77,.5), rgba(255,143,176,.3)); }
.rail-btn .rb-ic.shop-art .coin { position: absolute; width: 16px; height: 16px; }
.rail-btn .rb-ic.shop-art .c1 { left: 7px; top: 8px; } .rail-btn .rb-ic.shop-art .c2 { right: 6px; top: 14px; }
.rail-btn small { max-width: 64px; font-size: 10.5px; font-weight: 900; text-shadow: 0 1px 4px rgba(0,0,0,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-btn .dot { position: absolute; top: -4px; right: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2.5px #fff; display: none; }
.rail-btn .dot.show { display: block; animation: bump 1s ease infinite; }
.rail-btn .upb { position: absolute; top: -5px; left: -1px; width: 23px; height: 23px; border-radius: 50%; background: linear-gradient(#5ff0a8, #22b673); box-shadow: 0 0 0 2.5px #fff, 0 3px 0 2.5px #178a55; color: #fff; display: none; place-items: center; }
.rail-btn .upb.show { display: grid; animation: upHop 1.3s ease-in-out infinite; }
.rail-btn .upb svg { width: 13px; height: 13px; }
#btnDaily.ready .rb-ic { animation: dailyWiggle 2.6s ease-in-out infinite; }
.home-map .map-sign { max-width: 112px; z-index: 3; } /* placas dos mundos: estreitas, fora dos menus laterais e por cima dos rostinhos (telas estreitas) */
.home-map .map-sign.left { left: 66px; } .home-map .map-sign.right { right: 66px; }
@media (max-height: 720px) {
  .rail { gap: 4px; }
  .rail-btn { width: 52px; gap: 2px; }
  .rail-btn .rb-ic { width: 48px; height: 48px; border-radius: 15px; font-size: 23px; }
  .rail-btn small { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) { .rail-btn .dot.show, .rail-btn .upb.show, #btnDaily.ready .rb-ic { animation: none; } }

/* ===== Etapa 35 — faixa de poderes na partida ===== */
.pwr { position: absolute; left: 50%; bottom: max(10px, var(--sa-b)); transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 2px;
  padding: 4px 5px; border-radius: 999px; background: rgba(13,24,56,.36); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  pointer-events: none; white-space: nowrap; transition: opacity .3s ease; }
.pwr.hidden { opacity: 0; }
.pw { display: flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); font-variant-numeric: tabular-nums; }
.pw i { font-style: normal; font-size: 13px; line-height: 1; }
.pw i.coin { width: 13px; height: 13px; }
.pw.off { opacity: .45; }
.pw.hit { animation: pwHit .45s ease; }
@keyframes pwHit { 0% { transform: scale(1); background: rgba(255,233,166,0); } 35% { transform: scale(1.2); background: rgba(255,233,166,.4); } 100% { transform: scale(1); background: rgba(255,233,166,0); } }
@media (prefers-reduced-motion: reduce) { .pw.hit { animation: none; background: rgba(255,233,166,.3); } }

/* ===== Etapa 37 — ranking ===== */
#rank { background: linear-gradient(180deg, rgba(22,30,74,.95), rgba(30,36,92,.9)); }
.rk-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 10px; padding: 6px 0 16px; }
.rk-card { display: grid; gap: 10px; padding: 16px; border-radius: 24px; background: rgba(13,24,56,.5); border: 1px solid var(--line); }
.rk-intro { justify-items: center; text-align: center; }
.rk-medal { font-size: 46px; line-height: 1; }
.rk-intro h4 { margin: 0; font-size: 21px; font-weight: 900; }
.rk-intro p { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.4; }
.rk-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; font-size: 13.5px; font-weight: 800; line-height: 1.35; }
.rk-rules li { padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,.07); }
.rk-intro .btn, .rk-card > .btn.primary { width: 100%; }
.rk-k { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rk-nick { padding: 14px; border-radius: 18px; background: var(--tile); color: var(--ink); box-shadow: 0 4px 0 var(--tile-edge); font-size: 22px; font-weight: 900; text-align: center; }
.rk-dice { justify-self: center; padding: 9px 16px; font-size: 15px; }
.rk-sel { display: grid; gap: 4px; font-size: 12px; font-weight: 900; color: var(--muted); }
.rk-sel select { width: 100%; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.95); color: var(--ink); font: inherit; font-size: 15px; font-weight: 800; }
.rk-sel select:disabled { opacity: .6; }
.rk-hint { margin: -4px 2px 0; font-size: 12px; font-weight: 700; color: #ffe9a6; min-height: 0; }
.rk-hint:empty { display: none; }
.rk-link { justify-self: center; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 900; color: #bfe6ff; text-decoration: underline; text-underline-offset: 3px; }
.rk-link.danger { color: #ffb3c9; }
.rk-tabs { margin: 0; }
.rk-tabs .tab { font-size: 13px; padding: 9px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-note { margin: 0; padding: 9px 12px; border-radius: 14px; background: rgba(255,233,166,.12); color: #ffe9a6; font-size: 12.5px; font-weight: 800; line-height: 1.35; }
.rk-list { display: grid; gap: 6px; }
.rk-row { display: grid; grid-template-columns: 34px 30px 1fr auto; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 16px; background: rgba(13,24,56,.45); border: 1px solid rgba(255,255,255,.08); }
.rk-row.top { background: rgba(255,211,77,.1); }
.rk-row.me { background: rgba(61,220,151,.18); border-color: rgba(159,240,200,.7); }
.rk-pos { text-align: center; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rk-row.top .rk-pos { font-size: 20px; }
.rk-bal { width: 30px; height: 30px; object-fit: contain; }
.rk-name { min-width: 0; font-size: 14.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-name i { font-style: normal; font-size: 11px; font-weight: 900; color: #9ff0c8; }
.rk-m { font-style: normal; font-size: 14px; font-weight: 900; color: #ffe9a6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-gap { text-align: center; color: var(--muted); font-weight: 900; letter-spacing: .3em; }
.rk-empty { margin: 8px 0; text-align: center; font-size: 14px; font-weight: 800; color: var(--muted); }
.rk-foot { display: grid; justify-items: center; gap: 2px; margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--muted); }

/* ===== Etapa 38 — "UPA!" no topo durante a partida ===== */
.run-logo { position: absolute; left: 0; top: 0; z-index: 2; display: flex; gap: 3px; pointer-events: none; transform-origin: 0 0; opacity: 0; will-change: transform, opacity; }
.run-logo.anim { transition: transform .5s cubic-bezier(.3,1.15,.4,1), opacity .5s ease; }
.run-logo span { width: 27px; height: 31px; display: grid; place-items: center; border-radius: 8px; font-weight: 900; font-size: 18px; color: var(--ink);
  background: var(--tile); box-shadow: 0 3px 0 var(--tile-edge), 0 6px 10px rgba(0,0,0,.25); }
.run-logo span:nth-child(odd) { transform: rotate(-4deg); } .run-logo span:nth-child(even) { transform: rotate(3deg); }
.run-logo span:nth-child(3) { background: var(--accent); color: #fff; box-shadow: 0 3px 0 #c93a68, 0 6px 10px rgba(0,0,0,.25); }
@media (prefers-reduced-motion: reduce) { .run-logo.anim { transition: opacity .25s ease; } }

/* ===== Etapa 39 — prêmios de quest nas skins ===== */
.ib-btns .btn.quest-go { background: linear-gradient(180deg, #9ff0c8, #3ddc97); color: #0b3a26; box-shadow: 0 5px 0 #23a26c, 0 12px 24px rgba(0,0,0,.25); }
.ib-btns .btn.quest-go small { color: #11553a; opacity: .85; }
.q-row.focus { animation: qFocus .65s ease-in-out 4; border-color: #9ff0c8; }
@keyframes qFocus { 0%, 100% { box-shadow: 0 0 0 2px rgba(61,220,151,.25); } 50% { box-shadow: 0 0 0 5px rgba(159,240,200,.75); transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .q-row.focus { animation: none; box-shadow: 0 0 0 4px rgba(159,240,200,.75); } }

/* ===== Etapa 40 — provador ===== */
#wardrobe .items:not(.ups) { overflow-y: auto; overscroll-behavior: contain; -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); padding-bottom: 14px; }

/* ===== Etapa 41 — botões "chiclete" no lugar dos cremes (escolhido em tools/botoes.html) ===== */
:root { --gum-1: #ff8db2; --gum-2: #e93f78; --gum-3: #cc2560; --gum-edge: #9e1a49; }
.btn.primary { background: linear-gradient(180deg, var(--gum-1) 0%, var(--gum-2) 42%, var(--gum-3) 100%); color: #fff; text-shadow: 0 1px 1px rgba(110,8,44,.5);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.42), 0 5px 0 var(--gum-edge), 0 12px 22px rgba(90,10,40,.32); }
.btn.primary small { color: #fff; opacity: .92; }
.btn.primary:active { box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 2px 0 var(--gum-edge); }
.btn.primary .go-chip { background: #fff; color: #d92d66; box-shadow: 0 3px 0 rgba(110,8,44,.35); }
.btn.primary.short, .ib-btns .btn.short, .up-btns .btn.short { filter: saturate(.35) brightness(.92); opacity: 1; } /* faltam moedas: apagado, mas legível */
.tab.on, .ward-seg button.on, .chip.on, .lang.on, .atl-k.on { background: linear-gradient(180deg, var(--gum-1), #e23a72); color: #fff; border-color: transparent;
  text-shadow: 0 1px 1px rgba(110,8,44,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 0 var(--gum-edge); }
.ward-seg button.on svg { color: #fff; }
.share-btn { background: linear-gradient(180deg, var(--gum-1), #e23a72); color: #fff; text-shadow: 0 1px 1px rgba(110,8,44,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 0 var(--gum-edge); }

/* ===== Etapa 42 — festa no mapa ao passar de fase ===== */
.mw-coin { position: fixed; z-index: 70; width: 26px; height: 26px; pointer-events: none; transform: translate(-50%, -50%); }
.coins.mw-bump { animation: bump .25s ease; }
.map-node.mw-pop { animation: mwPop .38s cubic-bezier(.3,1.6,.5,1); }
@keyframes mwPop { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }
.map-node.mw-open { animation: nodeGo .5s cubic-bezier(.3,1.5,.5,1) both; }
.map-node.mw-open::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid #fff; pointer-events: none; animation: nodeRing .7s ease-out forwards; }
.mn-me img { will-change: transform; }
/* Etapa 47: fase concluída = popup no meio da tela inicial (mesmo visual do cartão de vitória) */
.map-win { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  padding: max(16px, var(--sa-t)) 16px max(16px, var(--sa-b)); background: rgba(13,24,56,.55); }
.map-win[hidden], .map-win [hidden] { display: none !important; }
.mw-card { width: min(100%, 380px); max-height: 100%; overflow-y: auto; scrollbar-width: none; }
.mw-card .mw-title { margin: 0; }
.mw-card .mw-stars { display: flex; justify-content: center; }
.mw-card .mw-share { justify-self: center; }
.mw-card .mw-close { font-size: 17px; }
.map-win.mw-in { animation: mwFade .22s ease both; }
.map-win.mw-in .mw-card { animation: pop .38s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes mwFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .map-node.mw-pop, .map-node.mw-open, .map-node.mw-open::after, .map-win.mw-in, .map-win.mw-in .mw-card { animation: none; } }

/* ===== Etapa 43 — começar com capacetes ===== */
#wardrobe .items.ups { overflow-y: auto; overscroll-behavior: contain; -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); padding-bottom: 14px; }
.up-ic.start-ic { position: relative; }
.up-ic.start-ic::after { content: ''; position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: #3ddc97 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='white'/%3E%3C/svg%3E") center / 12px no-repeat; box-shadow: 0 0 0 2px #fff; }
.up-card.locked { opacity: .85; }
.up-card.locked .up-ic { filter: grayscale(.7); }
.up-card.locked .up-ic.start-ic::after { display: none; }
.up-lock { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #2b2140; color: #ffd34d; box-shadow: 0 0 0 2px #fff; }
.up-card[data-up="start"] .up-pips i.on { background: linear-gradient(#bfe6ff, #4fa3ff); }
.up-card.locked .up-bar i { background: linear-gradient(90deg, #a6f7d0, #3ddc97); }

/* ===== Etapa 44 — loja nova ===== */
.pack.unlock-all { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; padding: 16px; text-align: left;
  background: linear-gradient(135deg, #ffcf4a 0%, #ff8db2 45%, #9b6bff 100%); color: #2b0f3a; box-shadow: 0 5px 0 #7a3fb5, 0 14px 26px rgba(40,10,70,.35); }
.pack.unlock-all .ua-art { grid-column: 1 / -1; font-size: 28px; letter-spacing: 4px; }
.pack.unlock-all .ua-txt b { display: block; font-size: 21px; font-weight: 900; }
.pack.unlock-all .ua-txt small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 800; line-height: 1.35; color: #3d1650; }
.pack.unlock-all .price { align-self: end; padding: 9px 14px; border-radius: 14px; background: #2b0f3a; color: #fff; font-weight: 900; font-size: 16px; white-space: nowrap; }
.pack:disabled { filter: saturate(.55); opacity: .85; }
.ua-party { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 14px; border-radius: 20px; background: rgba(61,220,151,.16); border: 1px solid rgba(159,240,200,.7); }
.ua-party .ua-ic { font-size: 30px; }
.ua-party b { display: block; font-size: 18px; font-weight: 900; }
.ua-party small { display: block; font-size: 13px; font-weight: 800; color: #c9f7e2; }
.ua-party .btn { grid-column: 1 / -1; }
.shop-restore { justify-self: center; margin: 2px auto 0; padding: 8px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 900; color: #bfe6ff; text-decoration: underline; text-underline-offset: 3px; display: block; }
#toast { width: max-content; max-width: calc(100% - 32px); white-space: normal; text-align: center; line-height: 1.3; } /* Etapa 44: avisos longos quebram linha */
#toast:has(br), #toast.long { border-radius: 18px; }

/* ===== Etapa 45 — pedir vida a um amigo ===== */
#ask { justify-content: center; background: rgba(13,24,56,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ask-card { text-align: center; }
.ask-card h2 { margin: 6px 0 4px; }

/* Etapa 45 — pedir vida: azul-céu, para não parecer o rosa pago de "Encher vidas" */
.btn.friend { background: linear-gradient(180deg, #9fdcff 0%, #4fa3ff 55%, #3a86e8 100%); color: #fff; text-shadow: 0 1px 1px rgba(10,40,100,.45);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.42), 0 5px 0 #2563b8, 0 12px 22px rgba(10,30,80,.3); }
.btn.friend small { color: #fff; opacity: .92; }
.btn.friend:active { box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 2px 0 #2563b8; }

/* ===== Etapa 46 — apelido escrito ===== */
.rk-nick-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rk-nick-btns .rk-dice { white-space: nowrap; }
.rk-nick-btns.two .rk-dice { flex: 1 1 0; min-width: 0; padding: 9px 10px; }
.rk-write { position: relative; }
.rk-nick-in { display: block; width: 100%; box-sizing: border-box; padding: 14px 56px; border: 0; border-radius: 18px; background: var(--tile); color: var(--ink);
  box-shadow: 0 4px 0 var(--tile-edge); font: inherit; font-size: 22px; font-weight: 900; text-align: center; outline: none; transition: box-shadow .15s; }
.rk-nick-in::placeholder { color: rgba(43,33,64,.38); font-weight: 800; }
.rk-nick-in:focus { box-shadow: 0 4px 0 var(--tile-edge), 0 0 0 3px #ff8db2; }
.rk-nick-in.bad { box-shadow: 0 4px 0 #c43c6c, 0 0 0 3px #ffb3c9; }
.rk-nick-in.shake { animation: rkShake .32s ease; }
@keyframes rkShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .rk-nick-in.shake { animation: none; } }
.rk-count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 900; color: rgba(43,33,64,.5); pointer-events: none; font-variant-numeric: tabular-nums; }
.rk-warn { margin: -2px 2px 0; font-size: 12.5px; font-weight: 800; line-height: 1.35; color: var(--muted); }
.rk-hint.rk-err { margin-top: -6px; font-size: 13px; font-weight: 900; color: #ffb3c9; }
.rk-hint.rk-err.good { color: #9ff0c8; }
@media (max-width: 390px) { .rk-nick-btns.two { gap: 6px; } .rk-nick-btns.two .rk-dice { font-size: 13.5px; padding: 9px 6px; } }

/* ===== Etapa 54 — quests de "Ufa!" (moedas) ===== */
.q-coinpic { position: relative; background: linear-gradient(#ffe58a, #ffb84d); }
.q-coinpic .coin { width: 30px; height: 30px; }
.q-coinpic b { position: absolute; right: 3px; bottom: 1px; font-size: 18px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.q-row:not(.done):not(.cur) .q-coinpic { opacity: .65; filter: saturate(.6); }
.q-row .btn.q-claim { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.q-claim .coin { width: 18px; height: 18px; }
.q-hint { margin: -2px 4px 2px; font-size: 12.5px; font-weight: 800; line-height: 1.35; color: var(--muted); }

/* ===== Etapa 55 — chances do balão-surpresa nas Configurações ===== */
.set-gift { margin: 6px 6px 0; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.07); font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--muted); }

/* ===== Etapa 56 — missões: moeda com o prêmio, ícone de troca e barra maior com o número ===== */
.mis { padding: 10px; }
.mis-txt { gap: 6px; }
.mis-bar { position: relative; height: 18px; border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.mis-bar i { border-radius: 999px; }
.mis-bar em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 900; color: #fff;
  text-shadow: 0 1px 1px rgba(20,20,60,.65); font-variant-numeric: tabular-nums; }
.mis-act { flex: none; display: flex; align-items: center; gap: 6px; }
.mis-coin { display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 900; color: var(--ink);
  background: linear-gradient(180deg, #fff, var(--tile)); box-shadow: 0 3px 0 var(--tile-edge); white-space: nowrap; cursor: default; }
.mis-coin .coin { width: 16px; height: 16px; }
.mis-coin.ready { cursor: pointer; color: #0b3a26; background: linear-gradient(180deg, #4ff0aa, var(--ok)); box-shadow: 0 3px 0 #23a26c; animation: calPulse 1s ease-in-out infinite; }
.mis-coin.ready:active { transform: translateY(2px); box-shadow: 0 1px 0 #23a26c; }
.mis-coin.got { padding: 7px; color: var(--ok); background: rgba(61,220,151,.14); box-shadow: inset 0 0 0 2px rgba(61,220,151,.7); }
.mis-coin.got svg { width: 16px; height: 16px; }
.mis-swap { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--text); background: var(--glass-2); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.mis-swap svg { width: 18px; height: 18px; }
.mis-swap:active { transform: scale(.92); }
.mis-swapnote { margin: 0 2px; font-size: 12px; font-weight: 800; line-height: 1.35; color: var(--muted); text-align: left; }
.mis-swapnote:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .mis-coin.ready { animation: none; } }
.mis.got .mis-bar i { background: linear-gradient(90deg, #9ff0c8, #3ddc97); } /* recebida: continua verde, como as completas */
/* Etapa 56b: moeda de missão ainda não completa = translúcida, sem sombra de botão (não parece clicável) */
.mis-coin:not(.ready):not(.got) { color: rgba(255,255,255,.62); background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.16); }
.mis-coin:not(.ready):not(.got) .coin { opacity: .55; filter: saturate(.5); }

/* ===== Etapa 57 — selo de prêmio de moedas ===== */
.reward-pop { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; }
.rp-glow { position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,190,.75) 0%, rgba(255,211,77,.35) 32%, rgba(255,211,77,0) 66%),
    repeating-conic-gradient(from 0deg, rgba(255,236,170,.45) 0deg 9deg, rgba(255,236,170,0) 9deg 30deg);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%); mask-image: radial-gradient(circle, #000 35%, transparent 70%);
  animation: rpGlow 1.8s ease-out both; }
.rp-card { position: relative; display: grid; justify-items: center; gap: 2px; min-width: 150px; padding: 40px 28px 14px; border-radius: 28px; text-align: center;
  background: linear-gradient(180deg, #fff, var(--tile)); color: var(--ink); box-shadow: 0 7px 0 var(--tile-edge), 0 20px 40px rgba(8,10,40,.4);
  animation: rpPop 1.8s cubic-bezier(.3,1.4,.5,1) both; }
.rp-coin { position: absolute; top: -30px; left: 50%; width: 62px; height: 62px; margin-left: -31px;
  filter: drop-shadow(0 4px 0 rgba(160,100,10,.35)) drop-shadow(0 0 14px rgba(255,211,77,.8)); animation: rpSpin 1.8s ease-out both; }
.rp-n { font-size: 44px; font-weight: 900; line-height: 1; letter-spacing: -.02em; color: #c47d0a; text-shadow: 0 2px 0 #fff; font-variant-numeric: tabular-nums; }
.rp-card small { font-size: 14px; font-weight: 900; color: var(--ink); opacity: .72; }
.mw-coin { z-index: 90; } /* as moedinhas voam por cima do selo */
@keyframes rpPop { 0% { opacity: 0; transform: scale(.4); } 16% { opacity: 1; transform: scale(1.08); } 26% { transform: scale(1); }
  80% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-46px) scale(.95); } }
@keyframes rpGlow { 0% { opacity: 0; transform: scale(.3) rotate(0deg); } 22% { opacity: 1; } 80% { opacity: .85; } 100% { opacity: 0; transform: scale(1.15) rotate(45deg); } }
@keyframes rpSpin { 0% { transform: rotateY(0deg) scale(.6); } 30% { transform: rotateY(720deg) scale(1.1); } 40% { transform: rotateY(720deg) scale(1); } 100% { transform: rotateY(720deg) scale(1); } }
@keyframes rpFade { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rp-glow, .rp-card, .rp-coin { animation: rpFade 1.8s linear both; } }

/* ===== Etapa 58 — moedas no topo do Diário e selo de aviso novo nos menus ===== */
#daily { padding-top: calc(max(16px, var(--sa-t)) + 56px); }
.daily-top { position: absolute; top: max(16px, var(--sa-t)); left: 20px; right: 20px; justify-content: flex-end; z-index: 2; }
/* selo chiclete com número (mesmo estilo 3D do selo verde de "melhorar") e um anel pulsando de leve, no lugar da bolinha vermelha */
.rail-btn .dot { top: -6px; right: -3px; min-width: 22px; height: 22px; padding: 0 5px; box-sizing: border-box; border-radius: 999px;
  display: none; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; line-height: 1; color: #fff; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ff8db2 0%, #e93f78 55%, #cc2560 100%); text-shadow: 0 1px 1px rgba(110,8,44,.5);
  box-shadow: 0 0 0 2.5px #fff, 0 3px 0 2.5px #9e1a49, 0 6px 10px rgba(90,10,40,.35); }
.rail-btn .dot.show { display: grid; animation: badgePop .45s cubic-bezier(.3,1.6,.5,1) both; }
.rail-btn .dot.show::after { content: ''; position: absolute; inset: -2.5px; border-radius: inherit; animation: badgeRing 1.8s ease-out infinite; pointer-events: none; }
@keyframes badgePop { from { transform: scale(0); } }
@keyframes badgeRing { 0% { box-shadow: 0 0 0 0 rgba(255,141,178,.7); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255,141,178,0); } }
@media (prefers-reduced-motion: reduce) { .rail-btn .dot.show, .rail-btn .dot.show::after { animation: none; } }

/* ---------- Etapa 59.1: abertura DEMORO GAMES (a mesma do Ladrilho) ---------- */
/* O fundo começa liso (igual à tela de abertura do Android) e o degradê aparece suave; as animações só começam com .go. */
.studio { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; cursor: pointer; background: #a5c0dd; transition: opacity .85s ease .1s;
  overflow: hidden; --g: min(1.6vw, 8px); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.studio::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #7f93b9 0%, #a5c0dd 52%, #9dbf88 100%); opacity: 0; transition: opacity .6s ease; }
.studio.go::before { opacity: 1; }
.studio.out { opacity: 0; pointer-events: none; }
/* saída: a marca sobe um pouco, cresce e se dissolve enquanto a tela inicial entra por baixo */
.studio.out .st-logo { animation: st-away .6s cubic-bezier(.5,0,.85,.35) forwards; }
@keyframes st-away { to { translate: 0 -34px; scale: 1.1; opacity: 0; } }
.st-logo { position: relative; display: grid; justify-items: center; gap: 16px; padding: 0 16px; max-width: 100%; box-sizing: border-box; }
.st-tiles { display: flex; justify-content: center; gap: var(--g); }
.st-tiles b { width: min(62px, calc((100vw - 56px - 5 * var(--g)) / 6)); height: min(62px, calc((100vw - 56px - 5 * var(--g)) / 6)); border-radius: 22%; display: grid; place-items: center;
  font: 900 min(41px, calc((100vw - 56px - 5 * var(--g)) / 6 * .66))/1 var(--font); color: #2b2140; background: linear-gradient(180deg, #fffaf2, #f7ecdd);
  box-shadow: 0 5px 0 #d9c6a8, 0 12px 20px rgba(40,50,90,.28); opacity: 0; }
.st-tiles b.rose { color: #fff; background: linear-gradient(180deg, #d96d72, #c4545a); box-shadow: 0 5px 0 #9c3d43, 0 12px 20px rgba(40,50,90,.28); }
.studio.go .st-tiles b { animation: st-tile .7s cubic-bezier(.3,1.7,.5,1) forwards; }
.studio.go .st-tiles b:nth-child(1) { animation-delay: .10s; } .studio.go .st-tiles b:nth-child(2) { animation-delay: .20s; } .studio.go .st-tiles b:nth-child(3) { animation-delay: .30s; }
.studio.go .st-tiles b:nth-child(4) { animation-delay: .40s; } .studio.go .st-tiles b:nth-child(5) { animation-delay: .50s; } .studio.go .st-tiles b:nth-child(6) { animation-delay: .60s; }
@keyframes st-tile { from { transform: translateY(-46px) scale(.6) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.st-games { font: 900 min(7.5vw, 34px)/1 var(--font); letter-spacing: .42em; padding-left: .42em; color: #fff; text-shadow: 0 3px 0 rgba(60,70,110,.35), 0 8px 18px rgba(40,50,90,.3); opacity: 0; }
.st-tag { font: 700 min(4vw, 17px)/1.3 var(--font); color: rgba(255,255,255,.92); text-shadow: 0 2px 8px rgba(40,50,90,.35); opacity: 0; text-align: center; }
.studio.go .st-games { animation: st-fade .6s ease .95s forwards; }
.studio.go .st-tag { animation: st-fade .6s ease 1.3s forwards; }
@keyframes st-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .studio.go .st-tiles b, .studio.go .st-games, .studio.go .st-tag { animation-duration: .01s; animation-delay: 0s; } }

/* a tela inicial entra em sequência depois da abertura (body.enter, só nos primeiros segundos): mapa, barra de cima,
   letras do UPA! caindo, menus das laterais e, por último, os botões de jogar */
body.enter #menu .home-map { animation: henter-fade .8s ease backwards .1s; }
body.enter #menu .gear-btn { animation: henter-down .55s ease backwards .3s; }
body.enter #menu .top-right { animation: henter-down .55s ease backwards .4s; }
body.enter #menu .logo.mini span { animation: henter-drop .65s cubic-bezier(.3,1.7,.5,1) backwards; }
body.enter #menu .logo.mini span:nth-child(1) { animation-delay: .35s; } body.enter #menu .logo.mini span:nth-child(2) { animation-delay: .41s; }
body.enter #menu .logo.mini span:nth-child(3) { animation-delay: .47s; } body.enter #menu .logo.mini span:nth-child(4) { animation-delay: .53s; }
body.enter #menu .rail-l .rail-btn { animation: henter-left .5s cubic-bezier(.3,1.4,.5,1) backwards; }
body.enter #menu .rail-r .rail-btn { animation: henter-right .5s cubic-bezier(.3,1.4,.5,1) backwards; }
body.enter #menu .rail .rail-btn:nth-child(1) { animation-delay: .6s; } body.enter #menu .rail .rail-btn:nth-child(2) { animation-delay: .67s; }
body.enter #menu .rail .rail-btn:nth-child(3) { animation-delay: .74s; } body.enter #menu .rail .rail-btn:nth-child(4) { animation-delay: .81s; }
body.enter #menu .rail .rail-btn:nth-child(5) { animation-delay: .88s; } body.enter #menu .rail .rail-btn:nth-child(6) { animation-delay: .95s; }
body.enter #menu #playCur { animation: henter-rise .75s cubic-bezier(.3,1.5,.5,1) backwards .95s; }
body.enter #menu #playInf { animation: henter-rise .75s cubic-bezier(.3,1.5,.5,1) backwards 1.05s; }
body.enter #intro .intro-card { animation: henter-rise .75s cubic-bezier(.3,1.5,.5,1) backwards .3s; } /* primeira vez: "Quem vai voar?" sobe */
@keyframes henter-fade { from { translate: 0 18px; opacity: 0; } }
@keyframes henter-down { from { translate: 0 -20px; opacity: 0; } }
@keyframes henter-drop { from { translate: 0 -46px; scale: .5; opacity: 0; } }
@keyframes henter-left { from { translate: -84px 0; opacity: 0; } }
@keyframes henter-right { from { translate: 84px 0; opacity: 0; } }
@keyframes henter-rise { from { translate: 0 70px; scale: .9; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { body.enter #menu *, body.enter #intro * { animation-duration: .01s !important; animation-delay: 0s !important; } }

/* ---------- Etapa 60: link da política de privacidade nas Configurações ---------- */
a.set-row { color: inherit; text-decoration: none; }
.set-go { font-size: 24px; line-height: 1; opacity: .6; }
