
/* ---------- ajustes do crítico (01/11/2026) ---------- */
:root { --u-muted: #85663f; }
#ui .u-stars.cap small, #ui .u-mini small, #ui .u-hat small { color: #6b4a2c; }
#ui .u-stars.cap { align-items: start; }
#ui .u-stars.cap span { min-height: 0; }
#ui .u-stars.cap img, #ui .u-stars.cap img:nth-child(2) { width: 46px; height: 46px; }
#ui .u-stars:not(.cap) img:nth-child(2) { width: 66px; height: 66px; }
#ui .u-stars.cap small { font: 700 13.5px/1.2 'Nunito', sans-serif; min-height: 2.4em; }
#ui .u-x { width: 44px; height: 44px; padding: 5px; background-clip: content-box; margin: -5px -5px 0 0; }
#ui .u-ribbon { top: 19%; padding: 10px 24px; border-radius: 40px; background: radial-gradient(closest-side, rgba(15, 36, 20, .42), transparent); max-width: 88vw; }
#ui .u-ribbon b { color: #ffe066; font-size: clamp(26px, 8vw, 32px); white-space: normal; text-shadow: 0 2px 0 #8a4f0a, 0 0 2px #5a3306, 0 4px 12px rgba(0, 0, 0, .55); }
#ui .u-res { padding-top: 58px; }
#ui .u-prize { top: -64px; }
#ui .u-big small { margin-top: 10px; }
#ui .u-big b { font-size: 52px; }
#ui .u-mini { min-height: 48px; margin-top: 6px; cursor: pointer; }
#ui .u-sw { width: 52px; height: 32px; border-radius: 17px; }
#ui .u-sw::after { width: 26px; height: 26px; }
#ui .u-reset { color: #8a6a44; }
#ui .u-hat.locked { color: #8a7656; }
#ui .u-hat .u-hico { width: 30px; height: 30px; object-fit: contain; }
#ui .u-hat.locked .u-hico { filter: grayscale(1) opacity(.55); }
#ui .u-hat .u-hlock { position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; }
#ui .u-cap { background: none; box-shadow: none; padding: 0; color: #fff; font: 800 15px 'Nunito', sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, .7), 0 0 8px rgba(0, 0, 0, .4); }
#ui .u-lock { right: -2px; top: -2px; width: 26px; height: 26px; }
#ui .title { padding-top: max(5vh, calc(env(safe-area-inset-top) + 22px)); }
#ui .u-chips .gold-dot { filter: grayscale(1) opacity(.6); }
#ui .u-chips .gold-dot.on { filter: drop-shadow(0 0 4px #ffd23f); }
#ui [hidden] { display: none !important; }
#ui .u-ribbon b { text-wrap: balance; } /* uma linha; nome longo (ou traduzido) quebra em duas em vez de sair da tela */
#ui .u-hat .u-hico { width: 44px; height: 34px; }
/* só o ícone, sem base de botão (pedido do William) */
#ui .u-rb, #ui .u-rb.green, #ui .u-rb.is-down, #ui .u-rb.green.is-down { background: none; box-shadow: none; }
#ui .u-rb .u-ico { width: 92%; height: 92%; filter: drop-shadow(0 3px 3px rgba(40, 20, 5, .3)); }
#ui .u-rb.is-down { transform: translateY(2px) scale(.88); filter: none; }
#ui .u-hud .u-rb .u-ico, #ui .u-tsnd .u-ico, #ui .title .u-rb .u-ico { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)) drop-shadow(0 0 6px rgba(255, 255, 255, .35)); }
#ui .map-top .u-rb.map-back { background: rgba(255, 255, 255, .94); border-radius: 50%; box-shadow: 0 0 0 1px var(--u-line), 0 6px 14px rgba(10, 30, 18, .22); }
/* título maior e mais legível; play com triângulo branco limpo; "toque para começar" em branco */
#ui .u-tri { width: 46%; height: 46%; transform: none; filter: drop-shadow(0 2px 2px rgba(150, 90, 0, .45)); }
#ui .u-tmenu .u-rb { --sz: 88px; }
#ui .u-tmenu .u-row { gap: 26px; }
#ui .u-cap { font-size: 19px; font-weight: 800; }
#ui .title .tap { color: #fff; font: 900 30px 'Nunito', sans-serif; letter-spacing: .06em; -webkit-text-stroke: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .35); }
#ui .title .hint { font-size: 18px; }
#ui .title .sub { font-size: 18px; padding: 7px 16px; }
@media (max-height: 700px) { #ui .u-tmenu .u-rb { --sz: 72px; } #ui .u-cap { font-size: 17px; } #ui .title .tap { font-size: 26px; } }
/* X de fechar em HTML: dois traços arredondados, discreto */
#ui .u-xi { position: relative; width: 16px; height: 16px; display: block; }
#ui .u-xi::before, #ui .u-xi::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 3px; margin: -1.5px 0 0 -9px; border-radius: 2px; background: #8a6a44; transform: rotate(45deg); }
#ui .u-xi::after { transform: rotate(-45deg); }
#ui .u-tri { filter: none; }
/* ---------- maior em tudo (William: "muito pequena") ---------- */
#ui .u-hud { height: 62px; }
#ui .u-pill { height: 56px; padding: 0 17px 0 12px; gap: 9px; border-radius: 16px; }
#ui .u-pill b { font-size: 26px; }
#ui .u-pill .of { font-size: 17px; }
#ui .u-pill .u-bico { width: 32px; height: 32px; }
#ui .u-pi { width: 27px; height: 27px; }
#ui .u-rb.sm { --sz: 60px; }
#ui .progress { top: 128px; }
#ui .u-toast { font-size: 17px; top: calc(max(12px, env(safe-area-inset-top)) + 70px); }
#ui .u-card { width: min(380px, 94vw); padding: 24px 22px; border-radius: 20px; }
#ui .u-head h2 { font-size: 32px; }
#ui .u-head small, #ui .u-kicker { font-size: 14px; }
#ui .u-xi { width: 20px; height: 20px; }
#ui .u-xi::before, #ui .u-xi::after { width: 22px; height: 3.5px; margin: -1.75px 0 0 -11px; }
#ui .u-x { width: 50px; height: 50px; }
#ui .u-row .u-rb { --sz: 76px; }
#ui .u-row .u-lbl { font-size: 16px; }
#ui .u-play { --sz: 120px; }
#ui .u-tiles { gap: 10px; }
#ui .u-tile { font-size: 16px; padding: 12px 4px 11px; }
#ui .u-tile .u-ico { width: 54px; height: 54px; }
#ui .u-slash { top: 30px; width: 50px; margin-left: -25px; }
#ui .u-mini { font-size: 18px; min-height: 54px; }
#ui .u-mini small { font-size: 14px; }
#ui .u-sw { width: 58px; height: 34px; }
#ui .u-sw::after { width: 28px; height: 28px; }
#ui .u-sw.on::after { transform: translateX(24px); }
#ui .u-reset { font-size: 17px; min-height: 54px; }
#ui .u-cta { font-size: 25px; min-height: 64px; }
#ui .u-chips span { font-size: 17px; padding: 7px 12px; }
#ui .u-stars.cap img, #ui .u-stars.cap img:nth-child(2) { width: 56px; height: 56px; }
#ui .u-stars.cap small { font-size: 14.5px; }
#ui .u-stars:not(.cap) img { width: 62px; height: 62px; }
#ui .u-stars:not(.cap) img:nth-child(2) { width: 76px; height: 76px; }
#ui .u-big b { font-size: 58px; }
/* chapéus: vitrine com o macaco, grande e colorida */
#ui .u-hats { gap: 10px; }
#ui .u-hat { min-height: 128px; padding: 8px 4px 10px; gap: 2px; font-size: 16px; }
#ui .u-hat .u-hico { width: 78px; height: 78px; }
#ui .u-hat.locked .u-hico { filter: saturate(.55) opacity(.7); }
#ui .u-hat small { font-size: 13.5px; }
#ui .u-hat .u-hlock { width: 24px; height: 24px; top: 6px; right: 6px; }
@media (max-height: 700px) { #ui .u-hat { min-height: 108px; } #ui .u-hat .u-hico { width: 62px; height: 62px; } #ui .u-row .u-rb { --sz: 66px; } #ui .u-play { --sz: 100px; } }
#ui .u-res { padding-top: 72px; }
#ui .map-top .u-rb.map-back { --sz: 58px; }
#ui .u-mstars { height: 56px; }
#ui .u-mstars b { font-size: 26px; }
#ui .u-mstars .u-pimg { width: 32px; height: 32px; }

/* =====================================================================================================
   Mapa v2 (01/11/2026): classes m-* (src/ui/map.ts). Medalhões brancos com brilho amarelo, sem contorno preto;
   cada mundo com o próprio fundo e casca; cipó curvo que fica dourado onde já passou; mundo fechado escurecido
   com cartão branco. O nó não usa transform para se posicionar (usa margem), então o afundar/mola do toque funciona.
   ===================================================================================================== */
#map { background: #0d2418; }
#map::before { content: ''; position: absolute; left: 0; right: 0; top: 0; z-index: 5; height: 120px; pointer-events: none;
  background: linear-gradient(rgba(5, 14, 10, .6), transparent); }
#map .map-scroll { overflow-x: hidden; }
#map .m-world { position: relative; }
/* o fundo sobe 170 px por trás do mundo de cima e aparece aos poucos: emenda sem corte */
#map .m-bg { position: absolute; left: 0; right: 0; top: -170px; bottom: 0; background: var(--bg) center / cover;
  -webkit-mask: linear-gradient(transparent, #000 170px); mask: linear-gradient(transparent, #000 170px); }
#map .m-bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5, 16, 10, .4), transparent 28%, transparent 72%, rgba(5, 16, 10, .4)); }
#map .m-trunk { position: absolute; z-index: 1; left: 50%; top: 0; bottom: 0; width: 104px; margin-left: -52px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .55), transparent 24%, rgba(255, 255, 255, .07) 46%, transparent 66%, rgba(0, 0, 0, .5)),
    var(--bark) center top / 104px auto repeat-y;
  box-shadow: 0 0 34px rgba(0, 0, 0, .4); }
#map .m-leaf { position: absolute; z-index: 1; width: 104px; height: 78px; margin: -39px 0 0 -52px; pointer-events: none;
  background: var(--lf0) center / contain no-repeat; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
#map .m-leaf.v1 { background-image: var(--lf1); }
#map .m-leaf.v2 { background-image: var(--lf2); }
#map .map-top { z-index: 5; }
#map .m-path { position: absolute; z-index: 1; left: 0; top: 0; overflow: visible; pointer-events: none; }
#map .m-path path { fill: none; stroke-linecap: round; }
#map .m-path .vine { stroke: rgba(255, 255, 255, .92); stroke-width: 8; stroke-dasharray: .1 17; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
#map .m-path .gold { stroke: #ffcf3a; stroke-width: 9; filter: drop-shadow(0 0 6px rgba(255, 200, 40, .7)); }
#map .m-path .flow { stroke: #fff9d8; stroke-width: 4; stroke-dasharray: .1 24; animation: m-flow 1.1s linear infinite; }
@keyframes m-flow { to { stroke-dashoffset: -24.1; } }

/* medalhão da fase */
#map .m-node { --s: 86px; position: absolute; z-index: 2; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  padding: 0; border: 0; background: none; color: var(--u-ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .08s cubic-bezier(.3, .7, .4, 1); }
#map .m-node.boss, #map .m-node.current { --s: 104px; }
#map .m-node.boss.current { --s: 114px; }
#map .m-disc { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #fff 0, #fffaf0 55%, #f4e4c4 100%);
  box-shadow: inset 0 -5px 0 rgba(214, 180, 120, .55), 0 0 0 5px rgba(255, 255, 255, .35), 0 0 26px rgba(255, 214, 90, .55), 0 12px 22px rgba(5, 20, 10, .5); }
#map .m-disc b { font: 900 36px/1 'Nunito', sans-serif; color: var(--u-ink); }
#map .boss .m-disc b { font-size: 42px; }
#map .done .m-disc { box-shadow: inset 0 -5px 0 rgba(214, 180, 120, .55), 0 0 0 5px #ffcf3f, 0 0 26px rgba(255, 214, 90, .7), 0 12px 22px rgba(5, 20, 10, .5); }
#map .boss .m-disc { box-shadow: inset 0 -6px 0 rgba(214, 180, 120, .55), 0 0 0 6px #ff8a4c, 0 0 30px rgba(255, 138, 76, .6), 0 14px 24px rgba(5, 20, 10, .5); }
#map .current .m-disc { background: radial-gradient(circle at 50% 30%, #fffbe0 0, #ffdf6a 50%, #f5b52a 100%);
  box-shadow: inset 0 -6px 0 #d8901a, 0 0 0 6px #fff, 0 0 44px #ffd23f, 0 14px 24px rgba(5, 20, 10, .5); animation: m-breathe 1.6s ease-in-out infinite; }
#map .current .m-disc::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 4px solid #fff3b0; animation: m-ring 1.6s ease-out infinite; }
@keyframes m-breathe { 50% { transform: scale(1.08); } }
@keyframes m-ring { from { transform: scale(1); opacity: .95; } to { transform: scale(1.55); opacity: 0; } }
#map .locked { cursor: default; }
#map .locked .m-disc { background: radial-gradient(circle at 50% 30%, #f6f1e8, #e6ddcd); box-shadow: inset 0 -5px 0 #cfc3af, 0 10px 18px rgba(5, 20, 10, .35); }
#map .m-lock { width: 56%; height: 56%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }
#map .m-stars { position: absolute; z-index: 1; left: 50%; top: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 110px; margin: -14px 0 0 -55px; pointer-events: none; }
#map .m-stars img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(5, 20, 10, .45)); }
#map .m-stars img.off { filter: grayscale(1) brightness(.62) drop-shadow(0 2px 2px rgba(5, 20, 10, .35)); opacity: .85; }
#map .m-stars img:nth-child(1) { transform: rotate(-14deg); }
#map .m-stars img:nth-child(2) { transform: translateY(6px) scale(1.12); }
#map .m-stars img:nth-child(3) { transform: rotate(14deg); }
#map .m-gold { position: absolute; right: -10px; top: -12px; width: 30px; height: 36px; background: url('../../banana-dourada-D8TcyciP.webp') center / contain no-repeat;
  filter: drop-shadow(0 0 6px #ffd23f); }
#map .m-tag { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 10px; white-space: nowrap; padding: 5px 14px;
  border-radius: 10px; background: linear-gradient(#ff9a5a, #f0612f); color: #fff; font: 900 15px/1 'Nunito', sans-serif; letter-spacing: .06em;
  text-transform: uppercase; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 6px 14px rgba(5, 20, 10, .4); }

/* nome do mundo: placa branca no pé do mundo */
#map .m-wname { position: absolute; z-index: 3; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px;
  padding: 10px 26px 12px; border-radius: 16px; background: #fffdf8; white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 210, 80, .55), 0 0 28px rgba(255, 200, 60, .4), var(--u-shadow); }
#map .m-wname small { font: 800 14px/1 'Nunito', sans-serif; color: var(--u-muted); letter-spacing: .14em; text-transform: uppercase; }
#map .m-wname b { font: 900 25px/1.1 'Nunito', sans-serif; color: var(--u-ink); }
#map .m-wname span { display: flex; align-items: center; gap: 5px; font: 900 18px/1 'Nunito', sans-serif; color: var(--u-ink); }
#map .m-wname span img { width: 22px; height: 22px; }

/* mundo fechado: fundo escurecido e desfocado, cartão branco com cadeado e barra de estrelas */
#map .closed .m-bg { filter: saturate(.35) brightness(.6); }
#map .closed .m-trunk, #map .closed .m-leaf { filter: saturate(.5) brightness(.65); }
#map .closed .m-node { filter: saturate(.6) brightness(.85); }
#map .closed .m-path { opacity: .5; }
#map .closed .m-wname { display: none; }
/* cartão do mundo fechado: gruda na tela enquanto se rola pelo mundo */
#map .m-fog { position: absolute; inset: 0; z-index: 4; padding: 160px 0 230px; }
#map .m-fogcard { position: sticky; top: calc(50% - 130px); display: grid; justify-items: center; gap: 7px; width: min(320px, 86vw); margin: 0 auto;
  padding: 58px 26px 20px; border-radius: 18px; background: #fffdf8;
  box-shadow: 0 0 0 1px rgba(255, 210, 80, .55), 0 0 40px rgba(255, 200, 60, .45), var(--u-shadow); }
#map .m-flock { position: absolute; left: 50%; top: -46px; width: 84px; height: 84px; margin-left: -42px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(5, 20, 10, .4)); }
#map .m-fogcard small { font: 800 14px/1 'Nunito', sans-serif; color: var(--u-muted); letter-spacing: .14em; text-transform: uppercase; }
#map .m-fogcard b { font: 900 25px/1.1 'Nunito', sans-serif; color: var(--u-ink); text-align: center; white-space: nowrap; }
#map .m-bar { width: 100%; height: 16px; margin-top: 6px; border-radius: 8px; background: #f3ead8; overflow: hidden; box-shadow: inset 0 2px 3px rgba(120, 90, 40, .2); }
#map .m-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(#ffd95a, #ffb21e); box-shadow: inset 0 -3px 0 #e2960f; }
#map .m-fogcard span { display: flex; align-items: center; gap: 6px; font: 900 22px/1 'Nunito', sans-serif; color: var(--u-ink); }
#map .m-fogcard span img { width: 26px; height: 26px; }
#map .m-fogcard em { font: 800 16px/1.2 'Nunito', sans-serif; font-style: normal; color: var(--u-muted); }

/* topo: o Cacho Dourado com raios girando e estrelinhas */
#map .m-goal { position: relative; height: 320px; overflow: hidden;
  background: radial-gradient(circle at 50% 56%, rgba(255, 225, 120, .55), rgba(255, 190, 40, .12) 32%, transparent 58%), linear-gradient(#071022, #0f2040 55%, #08141a); }
#map .m-goal::before { content: ''; position: absolute; inset: 0; animation: m-twinkle 2.4s ease-in-out infinite alternate;
  background: radial-gradient(2px 2px at 18% 22%, #fff, transparent), radial-gradient(2px 2px at 78% 16%, #fff, transparent), radial-gradient(3px 3px at 86% 48%, #fff6c0, transparent),
    radial-gradient(2px 2px at 10% 58%, #fff, transparent), radial-gradient(3px 3px at 30% 40%, #fff6c0, transparent), radial-gradient(2px 2px at 64% 30%, #fff, transparent),
    radial-gradient(2px 2px at 92% 72%, #fff, transparent), radial-gradient(2px 2px at 44% 12%, #fff, transparent); }
@keyframes m-twinkle { from { opacity: .35; } to { opacity: 1; } }
#map .m-rays { position: absolute; left: 50%; top: 56%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 232, 150, .22) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%); animation: m-spin 30s linear infinite; }
@keyframes m-spin { to { transform: rotate(1turn); } }
#map .m-bunch { position: absolute; z-index: 1; left: 50%; top: 56%; width: 170px; margin: -100px 0 0 -85px; filter: drop-shadow(0 0 22px rgba(255, 210, 63, .9)); animation: m-float 2.6s ease-in-out infinite alternate; }
@keyframes m-float { to { transform: translateY(-12px) rotate(3deg); } }
#map .m-goal b { position: absolute; z-index: 1; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 9px 24px; border-radius: 14px; white-space: nowrap;
  background: #fffdf8; font: 900 24px/1.1 'Nunito', sans-serif; color: var(--u-ink); box-shadow: 0 0 0 1px var(--u-line), 0 0 34px rgba(255, 214, 90, .6), var(--u-shadow); }
/* chão: a grama com raízes do Mundo 1 (chao-v2) logo abaixo do tronco */
#map .m-ground { position: relative; z-index: 2; height: 190px; margin-top: -40px; display: grid; place-items: center; padding-top: 40px; pointer-events: none;
  background: url('../../chao-v2-BmPtE8NL.webp') center top / auto 100% repeat-x; }
#map .m-ground span { position: relative; padding: 8px 22px; border-radius: 12px; background: #fffdf8; font: 900 20px/1 'Nunito', sans-serif; color: var(--u-ink);
  box-shadow: 0 0 0 1px var(--u-line), var(--u-shadow); }
.reduce-motion #map .m-disc, .reduce-motion #map .m-disc::after, .reduce-motion #map .m-rays, .reduce-motion #map .m-bunch,
.reduce-motion #map .m-path .flow, .reduce-motion #map .m-goal::before { animation: none; }

/* macaco no mapa (main.ts placeMonkey): senta na fase da vez e dá pulinhos; faíscas no pouso */
#map .m-me { position: absolute; z-index: 3; width: 210px; height: 140px; margin: -121px 0 0 -127px; pointer-events: none; transform-origin: 50% 100%; }
#map .m-me img { display: block; width: 100%; height: 100%; transform-origin: 50% 100%; filter: drop-shadow(0 7px 6px rgba(5, 20, 10, .45)); animation: m-idle 2s ease-in-out infinite; }
#map .m-me.jumping img { animation: none; }
@keyframes m-idle { 0%, 58%, 100% { transform: none; } 64% { transform: scale(1.1, .9); } 74% { transform: translateY(-18px) scale(.94, 1.07); } 84% { transform: none; } 89% { transform: scale(1.08, .93); } 94% { transform: none; } }
#map .m-spark { position: absolute; z-index: 3; width: 12px; height: 12px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0 30%, #ffd23f 60%, rgba(255, 210, 63, 0) 72%); box-shadow: 0 0 10px #ffd23f; }
.reduce-motion #map .m-me img { animation: none; }

/* entrada do mapa (#map.enter por 1,5 s): tudo brota da fase da vez para fora; usa a propriedade scale para não
   brigar com os transforms das estrelas, folhas e placas */
#map.enter .map-tree { animation: m-fade .3s ease-out; }
#map.enter .map-top > * { animation: u-in .4s cubic-bezier(.2, 1.4, .4, 1) backwards; }
#map.enter .map-top > :nth-child(2) { animation-delay: .08s; }
#map.enter .m-node { animation: m-grow .5s cubic-bezier(.3, 1.7, .5, 1) backwards; animation-delay: var(--d); }
#map.enter .m-leaf { animation: m-grow .5s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: calc(var(--d) + .06s); }
#map.enter .m-stars img { animation: m-grow .4s cubic-bezier(.3, 1.9, .5, 1) backwards; }
#map.enter .m-node .m-stars img:nth-child(1) { animation-delay: calc(var(--d) + .26s); }
#map.enter .m-node .m-stars img:nth-child(2) { animation-delay: calc(var(--d) + .33s); }
#map.enter .m-node .m-stars img:nth-child(3) { animation-delay: calc(var(--d) + .40s); }
#map.enter .m-wname, #map.enter .m-fogcard { animation: m-grow .45s cubic-bezier(.3, 1.5, .5, 1) .25s backwards; }
#map.enter .m-path .gold { stroke-dasharray: 1; animation: m-draw .9s cubic-bezier(.4, 0, .2, 1) .15s backwards; }
#map.enter .m-path .flow { animation: m-fade .3s 1s backwards; }
@keyframes m-grow { from { scale: 0; opacity: 0; } }
@keyframes m-fade { from { opacity: 0; } }
@keyframes m-draw { from { stroke-dashoffset: 1; } }
.reduce-motion #map.enter * { animation-duration: .01s !important; animation-delay: 0s !important; }

/* balão sobre a fase fechada tocada (main.ts) */
#map .m-tip { position: absolute; z-index: 4; transform: translate(-50%, -100%); margin-top: -14px; padding: 9px 16px; border-radius: 12px; white-space: nowrap;
  background: #fffdf8; color: var(--u-ink); font: 900 17px/1.15 'Nunito', sans-serif; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 210, 80, .55), 0 0 24px rgba(255, 200, 60, .4), var(--u-shadow); animation: m-tip 1.7s ease-out forwards; }
#map .m-tip::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -8px; border: 8px solid transparent; border-top-color: #fffdf8; }
@keyframes m-tip { 0% { opacity: 0; scale: .6; } 10% { opacity: 1; scale: 1.06; } 16%, 80% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1; } }

/* ponto de volta (main.ts cpRace): placa branca reta e centrada, com uma faixa quadriculada de chegada no topo;
   cai de leve com mola, fica e sobe sumindo. Nada torto. */
#ui .cp-race { position: absolute; z-index: 4; left: 50%; top: 20%; width: max-content; max-width: 92vw; pointer-events: none; border-radius: 16px; overflow: hidden;
  background: #fffdf8; box-shadow: 0 0 0 1px rgba(255, 210, 80, .6), 0 0 30px rgba(255, 200, 60, .45), 0 14px 30px rgba(10, 30, 18, .35);
  animation: cp-in2 1.8s cubic-bezier(.2, .9, .3, 1) forwards; }
#ui .cp-chk { display: block; height: 10px; background: repeating-conic-gradient(#2a1d14 0 25%, #fff 0 50%) 0 0 / 20px 20px; }
#ui .cp-mid { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 24px 14px; }
#ui .cp-mid b { font: 900 30px/1 'Nunito', sans-serif; color: var(--u-ink); white-space: nowrap; }
#ui .cp-mid img { width: 40px; height: 40px; object-fit: contain; transform-origin: 20% 90%; animation: cp-flag .35s ease-in-out infinite alternate; }
@keyframes cp-in2 {
  0% { transform: translate(-50%, -24px) scale(.85); opacity: 0; }
  14% { transform: translate(-50%, 4px) scale(1.04); opacity: 1; }
  24%, 78% { transform: translate(-50%, 0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -18px) scale(.98); opacity: 0; }
}
@keyframes cp-flag { from { rotate: -8deg; } to { rotate: 10deg; } }
.reduce-motion #ui .cp-race { animation: cp-fade 1.8s forwards; transform: translateX(-50%); }
@keyframes cp-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* dica "puxe de novo no ar": mesma linguagem branca, menor, um pouco abaixo */
#ui .u-tip-air { position: absolute; z-index: 4; left: 50%; top: 33%; padding: 10px 20px; border-radius: 14px; white-space: nowrap; pointer-events: none;
  background: #fffdf8; color: var(--u-ink); font: 900 22px/1.1 'Nunito', sans-serif;
  box-shadow: 0 0 0 1px rgba(255, 210, 80, .6), 0 0 24px rgba(255, 200, 60, .4), 0 10px 24px rgba(10, 30, 18, .3); animation: cp-in2 1.8s cubic-bezier(.2, .9, .3, 1) forwards; }
.reduce-motion #ui .u-tip-air { animation: cp-fade 1.8s forwards; transform: translateX(-50%); }

/* sequência de bananas: plaquinha branca com o ×N em marrom; a partir de ×5 fica dourada */
#ui .combo { padding: 4px 12px 5px; border-radius: 12px; background: #fffdf8; color: var(--u-ink); font: 900 24px/1 'Nunito', sans-serif;
  -webkit-text-stroke: 0; text-shadow: none; box-shadow: 0 0 0 1px rgba(255, 210, 80, .6), 0 0 18px rgba(255, 200, 60, .5), 0 6px 14px rgba(10, 30, 18, .3);
  animation: combo-pop2 .8s cubic-bezier(.2, .9, .3, 1) forwards; }
#ui .combo.hot { background: linear-gradient(#ffe27a, #ffc22e); box-shadow: 0 0 0 2px #fff, 0 0 26px rgba(255, 200, 40, .8), 0 6px 14px rgba(10, 30, 18, .3); }
@keyframes combo-pop2 {
  0% { transform: translate(-50%, -50%) scale(calc(var(--s, 1) * .3)); opacity: 0; }
  22% { transform: translate(-50%, -75%) scale(calc(var(--s, 1) * 1.12)); opacity: 1; }
  40% { transform: translate(-50%, -85%) scale(var(--s, 1)); opacity: 1; }
  100% { transform: translate(-50%, -150%) scale(var(--s, 1)); opacity: 0; }
}

/* placa da fase: maior e com o título centralizado (o X fica no canto) */
#ui #lvcard .u-card { width: min(400px, 94vw); padding-top: 22px; }
#ui #lvcard .u-head { position: relative; justify-content: center; text-align: center; padding: 0 48px; margin-bottom: 10px; }
#ui #lvcard .u-head h2 { text-align: center; font-size: 34px; }
#ui #lvcard .u-head small { font-size: 15px; }
#ui #lvcard .u-head .u-x { position: absolute; right: -4px; top: -6px; }
#ui #lvcard .u-stars.cap img { width: 76px; height: 76px; }
#ui #lvcard .u-stars.cap small { font-size: 16px; }
#ui #lvcard .u-chips { margin: 12px 0 4px; }
#ui #lvcard .u-chips > span { font-size: 18px; padding: 8px 16px; }
#ui #lvcard .u-cta { margin-top: 14px; font-size: 30px; min-height: 72px; }

/* chapéus v2: janela maior, palco com o macaco vivo e grade com o macaco real de cada chapéu */
#ui #hats .u-card { width: min(390px, 94vw); max-height: calc(100dvh - 24px); overflow-y: auto; }
#ui .u-stage { position: relative; display: grid; justify-items: center; margin-top: 10px; padding-bottom: 12px; border-radius: 16px;
  background: radial-gradient(ellipse at 50% 62%, #fff4c4 0, #fffaf0 55%, #fffdf8 100%); box-shadow: inset 0 0 0 1px var(--u-line); }
#ui .u-stage::before { content: ''; position: absolute; left: 50%; top: 168px; width: 120px; height: 18px; margin-left: -60px; border-radius: 50%;
  background: radial-gradient(rgba(90, 60, 20, .25), transparent 70%); }
#ui .u-stage canvas { position: relative; justify-self: stretch; width: 100%; height: 200px; display: block; }
#ui .u-stage b { font: 900 26px/1.1 'Nunito', sans-serif; color: var(--u-ink); }
#ui .u-stage small { min-height: 20px; font: 800 16px/1.2 'Nunito', sans-serif; color: var(--u-muted); }
#ui .u-stage.locked canvas { filter: saturate(.6); }
#ui .u-stage.yay canvas { animation: u-yay .55s cubic-bezier(.3, 1.6, .5, 1); }
#ui .u-stage.yay::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 16px; animation: u-yay-glow .7s ease-out forwards;
  background: radial-gradient(circle at 50% 45%, rgba(255, 214, 90, .55), transparent 55%); }
@keyframes u-yay { 0% { transform: scale(1); } 30% { transform: translateY(-14px) scale(1.06, .96); } 60% { transform: scale(1.03, .97); } 100% { transform: none; } }
@keyframes u-yay-glow { from { opacity: 1; } to { opacity: 0; } }
#ui #hats .u-hat { min-height: 120px; }
#ui #hats .u-hat .u-hico { width: 100px; height: 80px; object-fit: contain; }
@media (max-height: 700px) { #ui .u-stage canvas { height: 140px; } #ui .u-stage::before { top: 116px; } #ui #hats .u-hat { min-height: 92px; } #ui #hats .u-hat .u-hico { width: 72px; height: 56px; } }

#ui #lvcard .u-stars.cap small { white-space: nowrap; font-size: 15px; }

#ui #hats .u-hats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#ui #hats .u-hat .u-hico { width: 100%; max-width: 100px; }

/* som e pausa no canto de cima à direita, numa pílula branca igual à das bananas (o ícone de madeira não some na casca) */
#ui .u-hud .u-hbtns { margin-left: auto; height: 56px; padding: 0 6px; gap: 2px; align-items: center; border-radius: 16px;
  background: rgba(255, 255, 255, .94); box-shadow: 0 0 0 1px var(--u-line), 0 0 18px var(--u-glow), 0 6px 14px rgba(10, 30, 18, .22); }
#ui .u-hud .u-hbtns .u-rb { --sz: 50px; }
#ui .u-hud .u-rb .u-ico, #ui .u-tsnd .u-ico { filter: none; }
#ui .u-tsnd { border-radius: 16px; background-color: rgba(255, 255, 255, .94);
  box-shadow: 0 0 0 1px var(--u-line), 0 0 18px var(--u-glow), 0 6px 14px rgba(10, 30, 18, .22); }

/* resultado: legenda de cada estrela (valor e meta; a que faltou diz quanto faltou), dourada, mundo, chapéu novo */
#ui .u-rstars { gap: 6px; align-items: flex-start; }
#ui .u-rstar { display: grid; justify-items: center; gap: 2px; min-width: 92px; }
#ui .u-rstar small { font: 800 15px/1.15 'Nunito', sans-serif; color: var(--u-ink); white-space: nowrap; }
#ui .u-rstar.off small { color: #8a7656; }
#ui .u-rstar em { font: 900 14px/1 'Nunito', sans-serif; font-style: normal; color: #d9771e; padding: 3px 8px; border-radius: 8px; background: #fff1d6; }
#ui .u-extra { display: grid; gap: 8px; margin-top: 10px; }
#ui .u-extra:empty { display: none; }
#ui .u-gold { justify-self: center; display: inline-flex; align-items: center; gap: 6px; font: 800 16px/1 'Nunito', sans-serif; color: #8a7656; padding: 6px 12px; border-radius: 10px; background: #f5ecda; }
#ui .u-gold.on { color: #8a5a00; background: linear-gradient(#fff3c4, #ffe08a); box-shadow: 0 0 14px rgba(255, 200, 40, .5); }
#ui .u-gold .gold-dot { width: 18px; height: 22px; }
#ui .u-wbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font: 800 15px/1 'Nunito', sans-serif; color: var(--u-ink); }
#ui .u-wbar b { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#ui .u-wbar b img { width: 18px; height: 18px; }
#ui .u-wbar i { display: block; height: 12px; border-radius: 6px; background: #f3ead8; overflow: hidden; }
#ui .u-wbar u { display: block; height: 100%; border-radius: 6px; background: linear-gradient(#ffd95a, #ffb21e); }
#ui .u-newhat { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(#fff8dc, #ffeaa6); box-shadow: 0 0 0 1px rgba(255, 200, 60, .6), 0 0 22px rgba(255, 200, 60, .45); animation: u-in .4s .9s cubic-bezier(.2, 1.4, .4, 1) backwards; }
#ui .u-newhat img { width: 64px; height: 44px; object-fit: contain; }
#ui .u-newhat b { font: 900 17px/1.1 'Nunito', sans-serif; color: var(--u-ink); text-align: left; }
#ui .u-newhat span { font: 900 16px/1 'Nunito', sans-serif; color: #fff; background: #6cbf45; padding: 8px 14px; border-radius: 10px; box-shadow: inset 0 -3px 0 #3f8c2a; }
#ui .u-newhat.worn span { background: #c9b78f; box-shadow: none; }
@media (max-height: 700px) { #ui .u-rstar { min-width: 84px; } #ui .u-rstar small { font-size: 13.5px; } #ui .u-extra { gap: 6px; margin-top: 6px; } }

/* HUD em tela estreita: botões e pílulas menores para som e pausa não saírem pela direita */
@media (max-width: 380px) {
  #ui .u-hud { gap: 6px; }
  #ui .u-pill { padding: 0 12px 0 9px; gap: 7px; }
  #ui .u-pill b { font-size: 22px; }
  #ui .u-hud .u-hbtns { padding: 0 4px; gap: 0; }
  #ui .u-hud .u-hbtns .u-rb { --sz: 44px; }
}

/* avisos curtos (toast): pílula branca com brilho amarelo, como o resto da interface */
#ui .u-toast { background: #fffdf8; color: var(--u-ink); font: 900 17px/1.2 'Nunito', sans-serif; padding: 10px 18px; border-radius: 14px; border: 0;
  box-shadow: 0 0 0 1px rgba(255, 210, 80, .6), 0 0 22px rgba(255, 200, 60, .45), 0 10px 22px rgba(10, 30, 18, .3); text-shadow: none; }

/* dourada no HUD: apagada até pegar; acende com um pulo */
#ui .u-hgold { width: 18px; height: 24px; margin-left: 2px; filter: grayscale(1) opacity(.35); }
#ui .u-hgold.on { filter: drop-shadow(0 0 5px #ffd23f); }
#ui .u-hgold.pop { animation: u-gpop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes u-gpop { 0% { scale: .4; } 60% { scale: 1.5; } 100% { scale: 1; } }
#ui .u-tip-air.u-goldtip { top: 27%; background: linear-gradient(#fff6cf, #ffe08a); color: #6b4300; }

/* estrelas que voam até o placar do mapa; placa de mundo aberto */
#ui .m-flystar { position: fixed; left: 0; top: 0; z-index: 30; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 210, 63, .9)); }
#ui .m-wopen { z-index: 30; top: 40%; font-size: 26px; padding: 14px 26px; animation-duration: 2.4s; }

/* resultado em tela baixa (360 x 640): cabe inteiro, com o cacho visível */
@media (max-height: 700px) {
  #ui .u-res { padding-top: 44px; }
  #ui .u-res .u-prize { top: -36px; width: 92px; }
  #ui #result .u-card { margin-top: 30px; }
  #ui .u-rstars img { width: 50px; height: 50px; }
  #ui #result .u-big b { font-size: 40px; }
  #ui #result .u-cta { min-height: 54px; margin-top: 8px; }
}

/* HUD v4 (vidro escuro): some no cenário, números brancos; som e pausa em círculos do mesmo vidro */
#ui .u-hud { height: 52px; }
#ui .u-hud .u-pill { height: 48px; padding: 0 14px 0 10px; border-radius: 24px; color: #fff;
  background: rgba(30, 19, 10, .46); -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 16px rgba(0, 0, 0, .22); }
#ui .u-hud .u-pill b { color: #fff; font-size: 23px; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
#ui .u-hud .u-pill .of { color: rgba(255, 255, 255, .7); }
#ui .u-hud .u-sep { background: rgba(255, 255, 255, .28); }
#ui .u-hud .u-pi svg circle { fill: none; stroke: #fff; }
#ui .u-hud .u-pi svg path { stroke: #fff; }
#ui .u-hud .u-pi svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
#ui .u-hud #clock.over { color: #ffb08a; }
#ui .u-hud .u-hgold { filter: grayscale(1) brightness(1.6) opacity(.4); }
#ui .u-hud .u-hgold.on { filter: drop-shadow(0 0 6px #ffd23f); }
#ui .u-hud .u-hbtns { height: auto; padding: 0; gap: 8px; background: none; box-shadow: none; border-radius: 0; }
#ui .u-hud .u-hbtns .u-rb { --sz: 48px; border-radius: 50%; background: rgba(30, 19, 10, .46) none;
  -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 16px rgba(0, 0, 0, .22); filter: none; }
#ui .u-hud .u-hbtns .u-rb .u-ico { width: 64%; height: 64%; }
#ui .u-tsnd { border-radius: 50%; background: rgba(30, 19, 10, .46) none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 16px rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (max-width: 380px) { #ui .u-hud .u-pill b { font-size: 20px; } #ui .u-hud .u-hbtns .u-rb { --sz: 44px; } #ui .u-hud .u-hbtns { gap: 6px; } }

/* resultado estável: a linha de "faltou" sempre ocupa lugar e os números não mudam a largura ao contar */
#ui .u-rstar em.ph { visibility: hidden; }
#ui #result .u-chips span, #ui #result .u-big b { font-variant-numeric: tabular-nums; }
#ui #result #r-bananas { display: inline-block; min-width: 3.4em; text-align: left; }
#ui #result #r-best { min-width: 7.5em; justify-content: center; }
/* brilho da chegada no cacho */
#ui .u-burst { position: absolute; z-index: 3; width: min(120vw, 560px); aspect-ratio: 1; pointer-events: none; filter: saturate(1.3) brightness(1.15); }

/* ajustes e som v2 (como no jogo da bruxa): sem blocos de ícones; no jogo os ajustes trazem Continuar, Recomeçar e Mapa */
#ui .u-set { width: min(380px, 92vw); }
#ui .u-game { display: none; margin-top: 12px; }
#ui #settings.ingame .u-game { display: grid; gap: 8px; }
#ui #settings:not(.ingame) #p-sub { display: none; }
#ui .u-game .u-cta { margin-top: 0; }
#ui .u-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#ui .u-sec { min-height: 50px; border: 0; border-radius: 14px; cursor: pointer; background: #f3ead8; color: var(--u-ink); font: 900 18px/1 'Nunito', sans-serif;
  box-shadow: inset 0 -3px 0 #e2d4b8; }
#ui .u-flabel { margin: 16px 0 6px; font: 800 17px/1 'Nunito', sans-serif; color: var(--u-ink); text-align: left; }
#ui .u-set .u-langsel { margin-top: 0; }
#ui .u-set .u-langsel .u-lname { min-height: 50px; }
#ui .u-set .u-langsel .u-lname b { font-size: 21px; }
#ui .u-set .u-mini { margin-top: 16px; font-size: 17px; font-weight: 800; }
#ui .u-set .u-mini small { font-size: 13.5px; font-weight: 700; color: var(--u-muted); display: block; }
#ui .u-set .u-sw { width: 56px; height: 32px; border-radius: 16px; }
#ui .u-set .u-sw::after { width: 26px; height: 26px; }
#ui .u-set .u-sw.on::after { transform: translateX(24px); }
#ui .u-slider { display: grid; gap: 10px; margin-top: 18px; cursor: pointer; }
#ui .u-slider > span { display: flex; justify-content: space-between; align-items: baseline; }
#ui .u-slider b { font: 800 18px/1 'Nunito', sans-serif; color: var(--u-ink); }
#ui .u-slider i { font: 800 15px/1 'Nunito', sans-serif; font-style: normal; color: var(--u-muted); font-variant-numeric: tabular-nums; }
#ui .u-slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; margin: 6px 0; border-radius: 6px; cursor: pointer;
  background: linear-gradient(90deg, #ffbf2e 0, #ffbf2e var(--v, 100%), #efe4cc var(--v, 100%)); }
#ui .u-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 7px #fff inset, 0 0 0 1px rgba(160, 120, 40, .25), 0 3px 8px rgba(80, 50, 10, .3); border: 8px solid #ffbf2e; }
#ui .u-slider input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 7px solid #ffbf2e; box-shadow: 0 3px 8px rgba(80, 50, 10, .3); }

/* sem contorno escuro nos volumes; apagar progresso sem a borda tracejada */
#ui .u-slider input { border: 0; outline: none; box-shadow: inset 0 1px 2px rgba(120, 80, 20, .18); }
#ui .u-slider input:focus-visible { box-shadow: 0 0 0 3px rgba(255, 191, 46, .45); }
#ui .u-set .u-reset { border: 0; background: #f6efe2; color: #9a7a52; box-shadow: none; }

/* janelas v3.1 (como o jogo da bruxa, em amarelo): branco que puxa para o amarelo nos cantos, aro claro grosso com a
   borda de baixo mais funda, subtítulo, volume com trilho fino e bolinha branca com miolo */
#ui .u-card { border-radius: 26px;
  background: radial-gradient(260px 200px at 0% 0%, #fff4c8, transparent 70%), radial-gradient(260px 200px at 100% 100%, #ffe7a3, transparent 72%), linear-gradient(160deg, #ffffff 30%, #fffaf0 70%, #fff3d2);
  box-shadow: inset 0 0 0 3px #f6dc98, inset 0 -7px 0 #f0cf78, 0 18px 40px rgba(10, 30, 18, .35); }
#ui .u-head .u-sub { display: block; margin-top: 6px; font: 800 16px/1.2 'Nunito', sans-serif; letter-spacing: 0; text-transform: none; color: #b08442; }
#ui .u-slider { margin-top: 24px; gap: 12px; padding: 0 6px; }
#ui .u-slider b { font-size: 19px; }
#ui .u-slider i { font-size: 16px; color: #b08442; }
#ui .u-slider input { height: 8px; margin: 8px 0; border-radius: 4px; box-shadow: none;
  background: linear-gradient(90deg, #ffb81f 0, #ffb81f var(--v, 100%), #f4e6c4 var(--v, 100%)); }
#ui .u-slider input::-webkit-slider-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: radial-gradient(circle, #ffb81f 0 5px, #fff 6px); box-shadow: 0 2px 8px rgba(120, 80, 10, .35); }
#ui .u-slider input::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: radial-gradient(circle, #ffb81f 0 5px, #fff 6px); box-shadow: 0 2px 8px rgba(120, 80, 10, .35); }

/* título v4: cenário nítido (só um degradê para ler), logo flutuando, o macaco pendurado no meio, Jogar grande com a
   fase dentro e três botões de verdade embaixo */
#ui .title { backdrop-filter: none; -webkit-backdrop-filter: none;
  background: linear-gradient(180deg, rgba(8, 22, 14, .55) 0%, rgba(8, 22, 14, .05) 32%, rgba(8, 22, 14, 0) 55%, rgba(8, 22, 14, .45) 100%); }
#ui .title h1 .logo { animation: t-logo 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes t-logo { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
#ui .t-monkey { position: absolute; left: 50%; top: 34%; width: 240px; height: 260px; margin-left: -120px; cursor: pointer; touch-action: none; }
#ui .u-tmenu { position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(360px, 90vw); margin: 0; gap: 14px; }
#ui .u-tplay { display: grid; justify-items: center; gap: 2px; min-height: 84px; width: 100%; margin: 0; padding: 10px 16px 12px; }
#ui .u-tplay b { font: 900 34px/1 'Nunito', sans-serif; }
#ui .u-tplay small { font: 800 15px/1.1 'Nunito', sans-serif; color: rgba(70, 40, 10, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#ui .u-tbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
#ui .u-tbtn { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 86px; border: 0; border-radius: 18px; cursor: pointer; padding: 8px 4px;
  background: radial-gradient(120px 80px at 0% 0%, #fff4c8, transparent 70%), linear-gradient(160deg, #ffffff, #fff6dc);
  box-shadow: inset 0 0 0 2px #f6dc98, inset 0 -5px 0 #f0cf78, 0 8px 18px rgba(10, 30, 18, .3); color: var(--u-ink); font: 900 16px/1 'Nunito', sans-serif; }
#ui .u-tbtn .u-ico { width: 44px; height: 44px; filter: none; }
#ui .title .t-bottom { position: absolute; left: 0; right: 0; bottom: max(70px, 12vh); margin: 0; }
@media (max-height: 700px) { #ui .t-monkey { top: 30%; width: 200px; height: 210px; margin-left: -100px; } #ui .u-tplay { min-height: 72px; } #ui .u-tplay b { font-size: 29px; } #ui .u-tbtn { min-height: 74px; } #ui .u-tbtn .u-ico { width: 36px; height: 36px; } }
.reduce-motion #ui .title h1 .logo { animation: none; }

#ui .u-tmenu { bottom: max(64px, calc(env(safe-area-inset-bottom) + 40px)); }
#ui .t-monkey { top: 30%; height: 300px; }
@media (max-height: 700px) { #ui .u-tmenu { bottom: 52px; } #ui .t-monkey { top: 25%; height: 230px; } }
#ui .t-monkey { width: 320px; margin-left: -160px; }
@media (max-height: 700px) { #ui .t-monkey { width: 280px; margin-left: -140px; } }

/* acabamento da revisão (crítico 2) */
body:has(#ui .u-ov:not(.hidden)) .screen-leaf { display: none; }
#ui .u-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
#ui #result .u-chips > span:not(#r-best) { display: none; }
#ui #result #r-best:empty { display: none; }
#ui .u-gold:not(.on) { background: none; padding: 2px 6px; color: #7a5a22; }
#ui .u-rstars img, #ui .u-stars.cap img, #ui .u-stars.cap img:nth-child(2), #ui #lvcard .u-stars.cap img { width: 66px; height: 66px; }
#ui #lvcard .u-stars.cap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#ui #lvcard .u-stars.cap small { white-space: normal; text-wrap: balance; max-width: 104px; margin: 0 auto; font-size: 14.5px; line-height: 1.15; }
#ui #hats .u-hat small { display: inline-flex; align-items: center; gap: 3px; }
#ui #hats .u-hat small .gold-dot { width: 13px; height: 16px; }
/* HUD: vidro mais escuro e limpo, ícones mais claros */
#ui .u-hud .u-pill, #ui .u-hud .u-hbtns .u-rb, #ui .u-tsnd { background-color: rgba(26, 16, 9, .64);
  -webkit-backdrop-filter: blur(8px) saturate(.7); backdrop-filter: blur(8px) saturate(.7);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18), 0 2px 10px rgba(0, 0, 0, .3); }
#ui .u-hud .u-hbtns .u-rb .u-ico, #ui .u-tsnd .u-ico { filter: brightness(1.35) saturate(.9); }
#ui .u-hud .u-pill .of { color: rgba(255, 255, 255, .8); }
#ui .u-hud .u-hgold { filter: grayscale(1) brightness(1.7) opacity(.6); }
/* nome da fase no começo: legível em céu claro, sem estourar as bordas */
#ui .u-ribbon { max-width: calc(100% - 48px); width: auto; padding: 8px 18px; border-radius: 18px;
  background: radial-gradient(closest-side, rgba(10, 40, 40, .38), transparent); }
#ui .u-ribbon small { font-size: 14px; font-weight: 800; }
#ui .u-ribbon b { font-size: clamp(24px, 7.5vw, 32px); color: #fff4c8; text-wrap: balance; text-shadow: 0 2px 0 rgba(90, 50, 0, .6), 0 4px 14px rgba(10, 40, 40, .55); }
/* ajustes: chaves amarelas, trilha desligada visível, linhas com divisor; apagar em tom de alerta */
#ui .u-set .u-sw { background: #cdbf9f; box-shadow: inset 0 1px 3px rgba(80, 50, 10, .25); }
#ui .u-set .u-sw.on { background: linear-gradient(#ffd34a, #f3a700); }
#ui .u-set .u-mini { margin-top: 0; min-height: 56px; border-top: 1px solid rgba(120, 80, 20, .1); }
#ui .u-set .u-langsel + .u-mini { margin-top: 12px; }
#ui .u-set .u-reset { margin-top: 14px; color: #a3341f; background: rgba(200, 70, 40, .09); font-weight: 800; }
#ui .u-head small, #ui .u-kicker { color: #7a5a22; }
/* som: trilha e números legíveis */
#ui .u-slider input { background: linear-gradient(90deg, #ffb81f 0, #ffb81f var(--v, 100%), #e3d1a6 var(--v, 100%)); height: 10px; }
#ui .u-slider i { color: #7a5a22; }
#ui .u-head .u-sub { color: #8a6420; }
/* título: subtítulo do Jogar legível e botão alinhado com os outros */
#ui .u-tplay small { color: #4a2b0c; opacity: .9; font-size: 16px; }

#ui .u-res { overflow: visible; max-height: none; }
#ui .u-ribbon { width: max-content; }

/* som e engrenagem em traço branco (sem a arte de madeira) */
#ui .u-glyph { width: 52%; height: 52%; display: block; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }

/* título: logo ~15% menor e macaco um pouco menor, sem encostar no logo */
#ui .title h1 .logo { width: min(68vw, 323px); }
#ui .t-monkey { top: 33%; height: 250px; }
@media (max-height: 700px) { #ui .title h1 .logo { width: min(54vw, 255px); } #ui .t-monkey { top: 29%; height: 200px; } }

/* qualquer elemento com a classe hidden some (os botões u-* tinham display próprio e venciam) */
#ui .hidden { display: none !important; }

/* regra de cada estrela no resultado */
#ui .u-rstar .u-rule { font: 700 12.5px/1.15 'Nunito', sans-serif; font-style: normal; color: #8a6a3a; max-width: 104px; text-align: center; }

/* mapa: a estrela vazia de fase já feita pisca de leve (dá para voltar e pegar) */
#map .m-stars img.off { animation: m-miss 1.8s ease-in-out infinite; }
@keyframes m-miss { 0%, 100% { opacity: .85; } 50% { opacity: .45; filter: grayscale(1) brightness(1.3) drop-shadow(0 0 6px #fff3b0); } }
.reduce-motion #map .m-stars img.off { animation: none; }

/* mapa no celular ~15% menor (medalhões, estrelas, macaco, placas); a etiqueta "Desafio" vai para baixo do medalhão
   (em cima ficava atrás do macaco e do chapéu) */
#map .m-node { --s: 74px; }
#map .m-node.boss, #map .m-node.current { --s: 90px; }
#map .m-node.boss.current { --s: 96px; }
#map .m-disc b { font-size: 31px; }
#map .boss .m-disc b { font-size: 36px; }
#map .m-stars { width: 96px; margin: -12px 0 0 -48px; }
#map .m-stars img { width: 26px; height: 26px; }
#map .m-leaf { width: 88px; height: 66px; margin: -33px 0 0 -44px; }
#map .m-me { width: 176px; height: 118px; margin: -102px 0 0 -107px; }
#map .m-wname { padding: 8px 20px 10px; }
#map .m-wname b { font-size: 21px; }
#map .m-wname small { font-size: 12.5px; }
#map .m-wname span { font-size: 16px; }
#map .m-tag { bottom: auto; top: 100%; margin: 8px 0 0; font-size: 13px; padding: 4px 11px; }
#map .m-node.done .m-tag { margin-top: 26px; }
#map .m-fogcard { padding: 48px 22px 16px; }
#map .m-fogcard b { font-size: 22px; }

/* etiqueta "Novo" (chapéu aberto ainda não visto) */
#ui .u-new { position: absolute; top: -6px; right: -8px; z-index: 2; padding: 3px 7px; border-radius: 8px; font: 900 11.5px/1 'Nunito', sans-serif; font-style: normal;
  color: #fff; background: linear-gradient(#ff8a4c, #f0582f); box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(120, 40, 10, .35); letter-spacing: .03em;
  text-transform: uppercase; pointer-events: none; animation: u-newpop 1.6s ease-in-out infinite; }
@keyframes u-newpop { 0%, 100% { scale: 1; } 50% { scale: 1.1; } }
#ui #result .u-row { gap: 18px; }
.reduce-motion #ui .u-new { animation: none; }

/* resultado: o cacho não encosta no topo da tela (empurra o cartão para baixo, onde sobrava espaço) */
#ui #result .u-card { margin-top: max(44px, calc(env(safe-area-inset-top) + 36px)); }
@media (max-height: 700px) { #ui #result .u-card { margin-top: 34px; } }

/* fim do jogo */
#ui .u-ending { z-index: 25; display: grid; justify-items: center; align-content: center; gap: 0; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(255, 220, 120, .55), rgba(20, 30, 20, .75) 70%); }
#ui .u-end-rays { position: absolute; left: 50%; top: 24%; width: 900px; height: 900px; margin: -450px 0 0 -450px; pointer-events: none;
  background: url('../../brilho-vitoria-Df4Yz0Ik.webp') center / contain no-repeat; opacity: .9; animation: victory-rays 22s linear infinite; }
#ui .u-end-rain { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#ui .u-end-rain i { position: absolute; top: -40px; width: 30px; height: 36px; background: url('../../banana-DFyiVA1X.webp') center / contain no-repeat;
  animation: u-endfall 3s linear infinite; }
#ui .u-end-rain i.s { width: 26px; height: 26px; background-image: url('../../estrela-D9V10xvi.webp'); }
@keyframes u-endfall { from { transform: translateY(0) rotate(0); } to { transform: translateY(110vh) rotate(540deg); } }
#ui .u-end-stage { position: relative; width: 260px; height: 230px; margin-bottom: -26px; z-index: 1; }
#ui .u-end-bunch { position: absolute; left: 50%; top: 0; width: 130px; margin-left: -65px; filter: drop-shadow(0 0 20px rgba(255, 210, 63, .9)); animation: m-float 2.2s ease-in-out infinite alternate; }
#ui #end-monkey { position: absolute; left: 0; bottom: 0; width: 260px; height: 170px; }
#ui .u-end-card { position: relative; text-align: center; padding-top: 30px; animation: u-in .5s cubic-bezier(.2, 1.4, .4, 1); }
#ui .u-end-card h2 { margin: 0; font: 900 36px/1.1 'Nunito', sans-serif; color: var(--u-ink); }
#ui .u-end-card p { margin: 8px 0 0; font: 800 17px/1.3 'Nunito', sans-serif; color: #6b4a2c; }
#ui .u-end-card .u-end-thanks { margin-top: 12px; font-size: 18px; color: #c4850c; }
#ui .u-end-stats { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
#ui .u-end-stats span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; background: #fff3d2; font: 900 20px/1 'Nunito', sans-serif; color: var(--u-ink); }
#ui .u-end-stats img { width: 26px; height: 26px; }
#ui .u-end-stats .gold-dot { width: 20px; height: 24px; }
#ui .u-end-card .u-cta { margin-top: 16px; }
#ui .u-end-card .u-sec { width: 100%; margin-top: 8px; }
#map .m-goal { cursor: pointer; }
.reduce-motion #ui .u-end-rays, .reduce-motion #ui .u-end-bunch { animation: none; }

/* topo da árvore no mapa: o tronco não acaba em corte reto, some em direção ao cacho com uma copa de folhas */
#map .m-world:first-of-type .m-trunk { -webkit-mask: linear-gradient(transparent, #000 190px); mask: linear-gradient(transparent, #000 190px); }

/* topo da árvore: o tronco some aos poucos em direção ao cacho; o topo ganha a mesma sombra lateral dos mundos
   (sem ela aparecia um retângulo mais claro na emenda) */
#map .m-world:first-of-type .m-trunk { -webkit-mask: linear-gradient(transparent 0, #000 160px); mask: linear-gradient(transparent 0, #000 160px); }
#map .m-goal::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 16, 10, .4), transparent 28%, transparent 72%, rgba(5, 16, 10, .4)); }

/* emenda do topo: o tronco do último mundo começa mais abaixo e entra devagar; o fundo do mundo sobe 260 px sobre o
   céu do cacho, que fica mais escuro embaixo (sem faixa clara na emenda) */
#map section:first-of-type .m-trunk { top: 90px; -webkit-mask: linear-gradient(transparent 0, #000 260px); mask: linear-gradient(transparent 0, #000 260px); }
#map section:first-of-type .m-bg { top: -260px; -webkit-mask: linear-gradient(transparent, #000 260px); mask: linear-gradient(transparent, #000 260px); }
#map .m-goal { background: radial-gradient(circle at 50% 56%, rgba(255, 225, 120, .55), rgba(255, 190, 40, .12) 32%, transparent 58%), linear-gradient(#071022, #0b1730 70%, #0b1730); }

/* só o ramo de flores brancas na ponta do tronco */
#map .m-crown { position: absolute; z-index: 1; left: 50%; top: 70px; width: 150px; height: 100px; margin-left: -62px; pointer-events: none;
  background: url('../../folhas-c-COyTh9ej.webp') center / contain no-repeat; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); }
/* End of src/styles.css */
/* End of src/styles/polish.css */
/* End of assets/src/styles/polish-Dlz8ikbl.css */
