@font-face { font-family: "Fredoka"; src: url("../../fonts/Fredoka.ttf") format("truetype"); font-display: swap; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #bfe6ff;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  font-family: "Fredoka", "Trebuchet MS", system-ui, sans-serif; color: #2b3a67; }
#jogo { position: fixed; inset: 0; overflow: hidden; }
#tela { position: absolute; left: 0; top: 0; display: block; touch-action: none; outline: none; }
[hidden] { display: none !important; }
button, a.redondo { font: inherit; border: 0; cursor: pointer; touch-action: none; }

.redondo { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6fb0ff, #2f7bea 70%); box-shadow: 0 5px 0 #1d58b3, 0 8px 18px rgba(0,0,0,.18);
  width: 88px; height: 88px; padding: 0; color: #fff; text-decoration: none; }
.redondo svg { width: 64%; height: 64%; pointer-events: none; }
.redondo:active, .redondo.ativo { transform: translateY(3px) scale(.96); box-shadow: 0 2px 0 #1d58b3, 0 4px 10px rgba(0,0,0,.18); }
.redondo.pequeno { width: 54px; height: 54px; box-shadow: 0 4px 0 #1d58b3; }
.redondo.grande { width: 96px; height: 96px; }

/* HUD */
#hud { z-index: 6; position: absolute; left: 0; right: 0; top: 0; pointer-events: none;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(env(safe-area-inset-right, 0px) + 12px) 0 calc(env(safe-area-inset-left, 0px) + 12px);
  display: flex; align-items: flex-start; gap: 12px; }
#btn-pausa { pointer-events: auto; flex: none; }
#placar { display: flex; gap: 8px; flex-wrap: wrap; }
#placar .item { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.88); border-radius: 30px;
  padding: 4px 12px 4px 6px; font-size: 24px; box-shadow: 0 3px 0 rgba(43,58,103,.15); }
#placar .item svg { width: 36px; height: 36px; }
#placar .item.pulso { animation: pulso .5s ease; }
#pl-lila { padding: 4px !important; }
#pl-lila img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; filter: grayscale(1) opacity(.45); transition: filter .6s; }
#pl-lila.salva img { filter: none; }
@keyframes pulso { 50% { transform: scale(1.18); } }

/* Controles */
#controles { position: absolute; inset: 0; pointer-events: none; }
#zona-cam { position: absolute; inset: 0; pointer-events: auto; touch-action: none; }
#zona-joy { position: absolute; left: 0; bottom: 0; width: 55%; height: 75%; pointer-events: auto; touch-action: none; }
@media (orientation: portrait) { #zona-joy { width: 46%; height: 48%; } }
.dica-cam { display: inline-block; font-size: 13px; opacity: .8; margin-top: 4px; }
#joy-base { position: absolute; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
  background: rgba(255,255,255,.28); border: 4px solid rgba(255,255,255,.75); box-shadow: 0 4px 14px rgba(0,0,0,.12);
  left: calc(env(safe-area-inset-left, 0px) + 110px); bottom: auto; top: calc(100% - 120px - env(safe-area-inset-bottom, 0px)); transition: opacity .2s; opacity: .8; }
#joy-pino { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #dbe9ff); box-shadow: 0 4px 0 #9db8e6; }
#btn-pulo { position: absolute; pointer-events: auto; width: 110px; height: 110px;
  right: calc(env(safe-area-inset-right, 0px) + 22px); bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
  background: radial-gradient(circle at 35% 30%, #7fe08a, #34b24a 70%); box-shadow: 0 6px 0 #23843a, 0 8px 18px rgba(0,0,0,.18); }
#btn-acao { position: absolute; pointer-events: auto; width: 92px; height: 92px;
  right: calc(env(safe-area-inset-right, 0px) + 140px); bottom: calc(env(safe-area-inset-bottom, 0px) + 40px);
  background: radial-gradient(circle at 35% 30%, #c89bff, #8a52e0 70%); box-shadow: 0 6px 0 #6635b3, 0 8px 18px rgba(0,0,0,.18); }
#btn-acao.chama { animation: chama 1s ease-in-out infinite; }
@keyframes chama { 50% { transform: scale(1.12); box-shadow: 0 6px 0 #6635b3, 0 0 0 10px rgba(255,211,77,.55); } }
@media (orientation: portrait) {
  #btn-acao { right: calc(env(safe-area-inset-right, 0px) + 22px); bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); }
  #joy-base { left: calc(env(safe-area-inset-left, 0px) + 95px); top: calc(100% - 110px - env(safe-area-inset-bottom, 0px)); }
}

/* Telas */
.tela { z-index: 10; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(120,190,255,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); touch-action: none; }
.cartao { background: rgba(255,255,255,.94); border-radius: 30px; padding: 22px 28px; text-align: center; max-width: 520px; width: 100%;
  box-shadow: 0 8px 0 rgba(43,58,103,.12), 0 18px 40px rgba(0,0,0,.15); }
.cartao h1 { margin: 0; font-size: 38px; color: #2f7bea; }
.cartao h2 { margin: 0 0 14px; font-size: 30px; color: #2f7bea; }
.cartao .sub { margin: 6px 0 16px; font-size: 22px; }
.dica-ctrl { font-size: 16px; opacity: .7; margin: 14px 0 0; }
.linha-botoes { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
#btn-mudo #xmudo { display: none; }
#btn-mudo.mudo #xmudo { display: inline; }
#btn-mudo.mudo #ondas { display: none; }
#btn-app { background: radial-gradient(circle at 35% 30%, #ffb3d9, #ec5fa6 70%); box-shadow: 0 5px 0 #b83a7c; }
.pais { margin-top: 20px; }
.cam-opcao { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cam-label { font-size: 14px; color: #67708a; }
.cam-btn { background: #f1f3f8; color: #44506c; border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; }
.cam-btn.ativo { background: #2f7bea; color: #fff; }
#btn-apagar { position: relative; overflow: hidden; background: #f1f3f8; color: #67708a; border-radius: 14px; padding: 10px 14px; font-size: 14px; width: 100%; }
#btn-apagar .enche { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #ffcfd6; }
#btn-apagar .txt { position: relative; }

#aviso { z-index: 8; position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 80px); transform: translateX(-50%) scale(.8);
  background: rgba(255,255,255,.95); border-radius: 24px; padding: 10px 22px; font-size: 24px; color: #2f7bea; pointer-events: none;
  opacity: 0; transition: opacity .25s, transform .25s; white-space: nowrap; box-shadow: 0 4px 0 rgba(43,58,103,.15); max-width: 92vw; text-overflow: ellipsis; overflow: hidden; }
#aviso.mostra { opacity: 1; transform: translateX(-50%) scale(1); }
#girar { z-index: 8; position: absolute; right: calc(env(safe-area-inset-right, 0px) + 12px); top: calc(env(safe-area-inset-top, 0px) + 74px);
  display: flex; align-items: center; gap: 6px; background: rgba(43,58,103,.45); color: #fff; border-radius: 20px; padding: 4px 12px 4px 4px; font-size: 15px; pointer-events: none; }
#girar svg { width: 34px; height: 34px; animation: gira 2.4s ease-in-out infinite; }
@keyframes gira { 0%,40% { transform: rotate(0); } 60%,100% { transform: rotate(-90deg); } }
#fade { z-index: 20; position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .35s; }
#fade.on { opacity: 1; }
#debug { position: absolute; left: calc(env(safe-area-inset-left, 0px) + 8px); bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  background: rgba(0,0,0,.55); color: #0f0; font: 12px/1.3 monospace; padding: 4px 6px; border-radius: 6px; pointer-events: none; white-space: pre; }
.ns { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
@media (max-height: 420px) {
  .cartao { padding: 14px 20px; } .cartao h1 { font-size: 30px; } .cartao .sub { margin: 4px 0 10px; font-size: 19px; }
  .redondo.grande { width: 80px; height: 80px; } .pais { margin-top: 12px; }
}
.creditos { margin: 10px 0 0; font-size: 11px; color: #8a93ab; }

/* ===== Rodada visual 2: botões "de brinquedo" 3D, placar em pílulas, cartões pastel ===== */
.redondo { position: relative; border: 4px solid #fff;
  background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #8cc2ff, #3d86f2 62%, #2f6fd6);
  box-shadow: 0 6px 0 #1f56b0, 0 10px 18px rgba(31,60,120,.28), inset 0 -6px 0 rgba(0,0,0,.08); }
.redondo::after { content: ""; position: absolute; left: 18%; top: 9%; width: 42%; height: 26%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0)); pointer-events: none; transform: rotate(-18deg); }
.redondo svg { filter: drop-shadow(0 2px 0 rgba(0,0,0,.18)); position: relative; z-index: 1; }
.redondo:active, .redondo.ativo { transform: translateY(4px) scale(.96); box-shadow: 0 2px 0 #1f56b0, 0 4px 10px rgba(31,60,120,.25), inset 0 -3px 0 rgba(0,0,0,.08); }
.redondo.pequeno { width: 58px; height: 58px; border-width: 3px; box-shadow: 0 4px 0 #1f56b0, 0 6px 12px rgba(31,60,120,.25); }
#btn-pulo { border-width: 5px; background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #a6f09a, #43c35a 60%, #2fa548);
  box-shadow: 0 7px 0 #22803a, 0 12px 20px rgba(20,90,40,.28), inset 0 -6px 0 rgba(0,0,0,.08); }
#btn-pulo:active, #btn-pulo.ativo { box-shadow: 0 2px 0 #22803a, 0 4px 10px rgba(20,90,40,.25); }
#btn-acao { background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #dcbcff, #9a63ec 60%, #7f4ad6);
  box-shadow: 0 7px 0 #5f31ad, 0 12px 20px rgba(80,40,140,.28), inset 0 -6px 0 rgba(0,0,0,.08); }
#btn-acao:active, #btn-acao.ativo { box-shadow: 0 2px 0 #5f31ad, 0 4px 10px rgba(80,40,140,.25); }
#btn-acao.chama { animation: chama2 1s ease-in-out infinite; }
@keyframes chama2 { 50% { transform: scale(1.12); box-shadow: 0 7px 0 #5f31ad, 0 0 0 10px rgba(255,211,77,.6), 0 0 26px 14px rgba(255,236,150,.6); } }
#btn-app { background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #ffc6e2, #f06aaf 62%, #e0508f); box-shadow: 0 6px 0 #b3366f, 0 10px 18px rgba(150,40,90,.25); }
#joy-base { background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,.38)); border: 5px solid rgba(255,255,255,.9);
  box-shadow: 0 5px 0 rgba(61,134,242,.35), 0 8px 18px rgba(31,60,120,.18); }
#joy-pino { background: radial-gradient(circle at 35% 28%, #fff, #e3eeff 60%, #c9dcff); border: 3px solid #fff; box-shadow: 0 5px 0 #8fb0e6, 0 8px 14px rgba(31,60,120,.25); }

#placar .item { background: linear-gradient(180deg, #fff, #f3f7ff); border: 3px solid #fff; color: #2b4aa0; font-weight: 600;
  box-shadow: 0 4px 0 rgba(61,134,242,.28), 0 6px 14px rgba(31,60,120,.15); padding: 3px 14px 3px 6px; }
#placar .item b { font-weight: 600; text-shadow: 0 2px 0 rgba(61,134,242,.15); }
#pl-baloes { box-shadow: 0 4px 0 #c9b1f2, 0 6px 14px rgba(31,60,120,.15) !important; }
#pl-pistas { box-shadow: 0 4px 0 #f3d27a, 0 6px 14px rgba(31,60,120,.15) !important; }
#pl-lila { box-shadow: 0 4px 0 #f6a9c9, 0 6px 14px rgba(31,60,120,.15) !important; }
#pl-lila img { border: 2px solid #fff; }

.cartao { position: relative; background: linear-gradient(180deg, #ffffff 0%, #fff6fb 100%); border: 4px solid #fff;
  box-shadow: 0 8px 0 #f6c3dc, 0 18px 40px rgba(31,60,120,.22); }
.cartao::before { content: ""; position: absolute; left: 18px; right: 18px; top: -4px; height: 8px; border-radius: 0 0 8px 8px;
  background: repeating-linear-gradient(90deg, #ff8fbf 0 18px, #ffd34d 18px 36px, #8fd0ff 36px 54px, #b79cff 54px 72px); opacity: .9; }
.cartao h1, .cartao h2 { color: #3d86f2; font-weight: 600; letter-spacing: .5px;
  text-shadow: 0 3px 0 #fff, 0 5px 0 #c9dcff; }
.cartao .sub { color: #7a4fd0; font-weight: 500; }
#aviso { background: linear-gradient(180deg, #fffbe6, #fff1b8); color: #8a5a00; border: 3px solid #fff; font-weight: 600;
  box-shadow: 0 4px 0 #f3d27a, 0 8px 18px rgba(120,80,0,.18); }
.tela { background: rgba(140,200,255,.38); }
.cam-opcao { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cam-label { font-size: 14px; color: #67708a; }
.cam-btn { background: #f1f3f8; color: #44506c; border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; }
.cam-btn.ativo { background: #2f7bea; color: #fff; }
#btn-apagar { border: 2px dashed #e3e7f1; }
@media (orientation: portrait) {
  #aviso { top: calc(env(safe-area-inset-top, 0px) + 128px); white-space: normal; text-align: center; font-size: 21px; max-width: 86vw; }
  #girar { top: calc(env(safe-area-inset-top, 0px) + 76px); }
}

/* ===== Abertura (Rodada 16) ===== */
#abertura { flex-direction: column; justify-content: space-between; align-items: center; overflow: hidden; background:
  linear-gradient(180deg, rgba(110,185,255,.34) 0%, rgba(110,185,255,0) 30%, rgba(255,214,236,0) 58%, rgba(255,205,232,.62) 100%);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) calc(env(safe-area-inset-right, 0px) + 16px) calc(env(safe-area-inset-bottom, 0px) + 18px) calc(env(safe-area-inset-left, 0px) + 16px); }
.ab-topo { position: relative; z-index: 2; text-align: center; width: 100%; max-width: 560px; margin-top: 4px; }
.ab-topo::before { content: ""; position: absolute; left: -8%; right: -8%; top: -14%; bottom: -22%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.62), rgba(255,255,255,0)); animation: brilho 4.6s ease-in-out infinite; }
@keyframes brilho { 50% { opacity: .55; transform: scale(1.06); } }
.logo { margin: 0; line-height: .98; font-weight: 600; font-size: clamp(50px, 17.5vw, 88px); letter-spacing: .5px; filter: drop-shadow(0 8px 8px rgba(31,60,140,.28));
  animation: balanco 5.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes balanco { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg) translateY(-3px); } }
.logo .ln { display: block; white-space: nowrap; }
.logo .ln2 { font-size: .8em; margin-top: -.04em; }
.logo i { --c: #3d9bff; --d: #1d5fc4; display: inline-block; font-style: normal; color: var(--c); position: relative;
  text-shadow: 3px 0 #fff, -3px 0 #fff, 0 3px #fff, 0 -3px #fff, 2px 2px #fff, -2px 2px #fff, 2px -2px #fff, -2px -2px #fff, 4px 2px #fff, -4px 2px #fff, 0 5px #fff, 0 6px 0 var(--d), 0 8px 0 var(--d), 2px 8px 0 var(--d), -2px 8px 0 var(--d);
  animation: letra 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.21s); }
.logo b { display: inline-block; width: .34em; }
.logo i:nth-child(5n+1) { --c: #ff5fa6; --d: #c22a72; } .logo i:nth-child(5n+2) { --c: #ffc228; --d: #cc8a00; } .logo i:nth-child(5n+3) { --c: #3d9bff; --d: #1d5fc4; }
.logo i:nth-child(5n+4) { --c: #9d6bff; --d: #6335c9; } .logo i:nth-child(5n) { --c: #3ccb5e; --d: #1f8e3d; }
@keyframes letra { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }
.ab-topo .sub { display: inline-block; margin: 14px 0 0; padding: 7px 18px 8px; border-radius: 999px; font-size: clamp(16px, 4.6vw, 21px); font-weight: 500; color: #fff; letter-spacing: .3px;
  background: linear-gradient(180deg, #b58cff, #8654e6); border: 3px solid #fff; box-shadow: 0 5px 0 #5f31ad, 0 10px 18px rgba(60,30,130,.25); text-shadow: 0 2px 0 rgba(70,30,140,.5); }
.ab-base { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 520px; }
#btn-jogar { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 10px 30px 10px 12px; border-radius: 999px; color: #fff; font-size: clamp(30px, 9vw, 40px); font-weight: 600; letter-spacing: 1px;
  background: radial-gradient(ellipse at 50% 120%, rgba(0,0,0,.14), transparent 60%), linear-gradient(180deg, #b4f5a0 0%, #52d264 45%, #2fa548 100%); border: 4px solid #fff;
  box-shadow: 0 8px 0 #1f7d37, 0 14px 24px rgba(20,90,40,.35), inset 0 -6px 0 rgba(0,0,0,.08); text-shadow: 0 3px 0 #1f7d37; animation: jogarpulso 1.7s ease-in-out infinite; }
#btn-jogar::before { content: ""; position: absolute; inset: -9px; border-radius: 999px; border: 4px solid rgba(255,255,255,.9); animation: onda 1.7s ease-out infinite; pointer-events: none; }
#btn-jogar::after { content: ""; position: absolute; left: 22%; right: 22%; top: 6px; height: 12px; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0)); pointer-events: none; }
#btn-jogar .pl-ico { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 28%, #7fe38c, #2ea446); box-shadow: inset 0 0 0 3px rgba(255,255,255,.9), 0 3px 0 #1f7d37; }
#btn-jogar .pl-ico svg { width: 70%; height: 70%; margin-left: 4px; }
#btn-jogar:active { transform: translateY(4px) scale(.97); box-shadow: 0 3px 0 #1f7d37, 0 6px 12px rgba(20,90,40,.3); animation: none; }
@keyframes jogarpulso { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes onda { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.22, 1.5); opacity: 0; } }
.ab-dicas { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 8px; justify-content: center; flex-wrap: nowrap; }
.ab-dicas li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px 5px 6px; border-radius: 999px; background: rgba(255,255,255,.82); border: 2px solid #fff; box-shadow: 0 3px 0 rgba(61,134,242,.25);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 16px; font-weight: 500; color: #2b4aa0; }
.ab-dicas li svg { width: 28px; height: 28px; flex: none; }
#abertura .dica-cam { margin: 0; padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,.6); color: #4a5a8c; font-size: 13px; opacity: 1; }
/* ícone de som */
.ab-som { position: absolute; z-index: 4; top: calc(env(safe-area-inset-top, 0px) + 12px); right: calc(env(safe-area-inset-right, 0px) + 12px); width: 54px; height: 54px; border-radius: 50%; padding: 0;
  background: radial-gradient(circle at 35% 30%, #ffc6e2, #f06aaf 65%); border: 3px solid #fff; box-shadow: 0 4px 0 #b3366f, 0 8px 14px rgba(150,40,90,.25); }
.ab-som svg { width: 70%; height: 70%; pointer-events: none; }
.ab-som:active { transform: translateY(2px) scale(.95); box-shadow: 0 2px 0 #b3366f; }
.ab-som .corte { display: none; } .ab-som.mudo .corte { display: inline; } .ab-som.mudo .ondas { display: none; }
.ab-som { animation: somdica 2.4s ease-in-out infinite; } .ab-som.tocou { animation: none; }
@keyframes somdica { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
/* decorações flutuantes (sem arco de flores) */
.ab-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.ab-deco .d { position: absolute; }
.bal { width: 34px; height: 56px; filter: drop-shadow(0 4px 4px rgba(30,50,120,.2)); animation: flutua 6s ease-in-out infinite; }
.b1 { left: 5%; top: 24%; color: #ff6fae; } .b2 { right: 5%; top: 30%; color: #ffc933; width: 40px; height: 66px; animation-delay: -2s; }
.b3 { left: 9%; top: 44%; color: #6fbcff; width: 28px; height: 46px; animation-delay: -3.5s; } .b4 { right: 10%; top: 17%; color: #b58cff; width: 30px; height: 50px; animation-delay: -1s; }
@keyframes flutua { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(4deg); } }
.est { width: 26px; height: 26px; color: #ffd34d; animation: brilha 2.2s ease-in-out infinite; }
.e1 { left: 20%; top: 4%; } .e2 { right: 18%; top: 2%; width: 20px; height: 20px; animation-delay: -.8s; } .e3 { left: 3%; top: 12%; width: 18px; height: 18px; animation-delay: -1.4s; } .e4 { right: 4%; top: 46%; width: 22px; height: 22px; animation-delay: -.4s; }
@keyframes brilha { 0%, 100% { transform: scale(.8) rotate(-8deg); opacity: .75; } 50% { transform: scale(1.15) rotate(8deg); opacity: 1; } }
.cf { width: 9px; height: 14px; border-radius: 3px; top: -20px; opacity: .9; animation: cai 9s linear infinite; }
.c1 { left: 8%; background: #ff6fae; animation-delay: -1s; } .c2 { left: 22%; background: #ffc933; animation-delay: -4s; width: 8px; height: 8px; border-radius: 50%; } .c3 { left: 36%; background: #6fbcff; animation-delay: -6s; }
.c4 { left: 52%; background: #b58cff; animation-delay: -2.5s; } .c5 { left: 66%; background: #52d264; animation-delay: -7.5s; width: 8px; height: 8px; border-radius: 50%; } .c6 { left: 78%; background: #ff9a3c; animation-delay: -3.2s; }
.c7 { left: 88%; background: #ff6fae; animation-delay: -5.4s; } .c8 { left: 45%; background: #ffc933; animation-delay: -8.2s; width: 7px; height: 7px; border-radius: 50%; }
@keyframes cai { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(110vh) rotate(540deg); } }
@media (orientation: landscape) and (max-height: 560px) {
  #abertura { flex-direction: row; align-items: stretch; padding-top: calc(env(safe-area-inset-top, 0px) + 10px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
  .ab-topo { width: auto; max-width: 44%; align-self: center; margin: 0; text-align: left; }
  .logo { font-size: clamp(34px, 11vh, 52px); } .logo .ln { text-align: left; } .ab-topo .sub { margin-top: 10px; font-size: 15px; padding: 5px 14px 6px; }
  .ab-base { width: auto; max-width: 44%; align-self: flex-end; gap: 8px; }
  #btn-jogar { font-size: 26px; padding: 6px 22px 6px 8px; } #btn-jogar .pl-ico { width: 48px; height: 48px; }
  .ab-dicas li { font-size: 13px; padding: 3px 9px 3px 4px; } .ab-dicas li svg { width: 22px; height: 22px; }
  .ab-som { width: 46px; height: 46px; } .bal, .est { display: none; }
}
@media (prefers-reduced-motion: reduce) { .logo, .logo i, .bal, .est, .cf, #btn-jogar, #btn-jogar::before, .ab-topo::before, .ab-som { animation: none !important; } .cf { display: none; } }

/* painel ?fps (medição em aparelho real): maior e legível */
#debug.medir { top: calc(env(safe-area-inset-top, 0px) + 70px); font-family: system-ui, -apple-system, sans-serif; bottom: auto; left: 50%; transform: translateX(-50%); font-size: 15px; line-height: 1.35; padding: 6px 10px; background: rgba(0,0,0,.6); color: #fff; border-radius: 10px; white-space: pre; pointer-events: none; z-index: 50; }

/* Parte 2: troca de amigo e poderes */
#btn-turma { position: absolute; pointer-events: auto; z-index: 3; width: 74px; height: 74px; padding: 0; border-radius: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 12px);
  border: 5px solid #3d86f2; background: #fff; box-shadow: 0 5px 0 rgba(31,60,120,.25), 0 8px 16px rgba(31,60,120,.2); overflow: visible; }
#btn-turma img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; pointer-events: none; }
#btn-turma .seta { position: absolute; right: -8px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: #ff8a3d; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; }
#btn-turma .seta svg { width: 18px; height: 18px; }
#btn-turma:active, #btn-turma.ativo { transform: translateY(3px) scale(.96); }
#btn-turma.aberto .seta { background: #34b24a; }
#roda-turma { position: absolute; pointer-events: auto; z-index: 3; display: flex; gap: 10px; padding: 10px; border-radius: 48px;
  top: calc(env(safe-area-inset-top, 0px) + 96px); right: calc(env(safe-area-inset-right, 0px) + 8px);
  background: rgba(255,255,255,.92); box-shadow: 0 6px 18px rgba(31,60,120,.25); animation: rodaAbre .18s ease-out; }
#roda-turma[hidden] { display: none; }
#roda-turma button { width: 66px; height: 66px; padding: 0; border-radius: 50%; border: 4px solid #fff; background: #fff; box-shadow: 0 4px 0 rgba(31,60,120,.2); position: relative; }
#roda-turma button img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; pointer-events: none; }
#roda-turma button.ativo { border-color: #ffc83d; transform: scale(1.08); }
#roda-turma button.bloqueado img { filter: grayscale(1) brightness(.75) opacity(.6); }
#roda-turma button.bloqueado::after { content: "?"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.4); }
@keyframes rodaAbre { from { opacity: 0; transform: translateY(-8px) scale(.96); } }
@media (orientation: portrait) { #roda-turma { gap: 6px; padding: 8px; } #roda-turma button { width: 56px; height: 56px; } }
#btn-acao[data-poder="flutuar"] { background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #ecdcff, #b48cff 60%, #9a6ff0); }
#btn-acao[data-poder="superpulo"] { background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #ffd1e4, #ff7fb0 60%, #ea5a94); }
#btn-acao[data-poder="galope"] { background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #b9f5e2, #3cc9a0 60%, #24a883); }
#btn-acao[data-poder="asas"] { background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #ffe7b0, #e8a93a 60%, #cf8c1c); }
#pl-turma { box-shadow: 0 4px 0 #f6a9c9, 0 6px 14px rgba(31,60,120,.15) !important; }
.ab-dicas img.dica-turma { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #ff8a3d; object-fit: cover; flex: none; }
#hud { padding-right: calc(env(safe-area-inset-right, 0px) + 96px) !important; }

/* botão "correr" do Castelinho (segurar) */
#btn-correr { position: absolute; pointer-events: auto; width: 76px; height: 76px; border-width: 4px;
  right: calc(env(safe-area-inset-right, 0px) + 39px); bottom: calc(env(safe-area-inset-bottom, 0px) + 158px);
  background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.12), transparent 55%), radial-gradient(circle at 35% 28%, #ffd6a8, #ff9a3c 60%, #ec7a1c);
  box-shadow: 0 5px 0 #c25f10, 0 8px 16px rgba(0,0,0,.18); }
#btn-correr:active, #btn-correr.ativo { box-shadow: 0 2px 0 #c25f10, 0 4px 10px rgba(120,60,10,.25); }
#btn-correr[hidden] { display: none; }
@media (orientation: portrait) { #btn-correr { right: calc(env(safe-area-inset-right, 0px) + 146px); bottom: calc(env(safe-area-inset-bottom, 0px) + 42px); } }

/* anel de energia da corrida em volta do botão laranja */
#btn-correr::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(#ffe066 calc(var(--e, 1) * 360deg), rgba(255,255,255,.4) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); }
#btn-correr.cansado { filter: grayscale(.85) brightness(.92); }
#btn-correr.cansado::before { background: conic-gradient(#ff8a8a calc(var(--e, 1) * 360deg), rgba(255,255,255,.4) 0); }

/* vídeo de abertura */
#video-abertura { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; align-items: center; justify-content: center; }
#video-abertura[hidden] { display: none; }
#vid-abertura { width: 100%; height: 100%; object-fit: contain; background: #000; }
#btn-pular { position: absolute; right: calc(env(safe-area-inset-right, 0px) + 16px); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  display: flex; align-items: center; gap: 8px; padding: 10px 18px; border: 3px solid #fff; border-radius: 999px; background: rgba(61,134,242,.85);
  color: #fff; font: 700 20px 'Fredoka', sans-serif; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
#btn-pular svg { width: 22px; height: 22px; }

/* celular deitado (tela baixa): HUD, botões e avisos menores para sobrar mais jogo */
@media (orientation: landscape) and (max-height: 500px) {
  #hud { padding-top: calc(env(safe-area-inset-top, 0px) + 6px); gap: 8px; padding-right: calc(env(safe-area-inset-right, 0px) + 72px) !important; }
  #btn-pausa.redondo.pequeno { width: 44px; height: 44px; border-width: 3px; }
  #placar { gap: 6px; flex-wrap: nowrap; }
  #placar .item { font-size: 17px; padding: 1px 10px 1px 4px; border-width: 2px; }
  #placar .item svg { width: 24px; height: 24px; }
  #pl-lila img { width: 26px; height: 26px; }
  #btn-turma { width: 54px; height: 54px; border-width: 4px; top: calc(env(safe-area-inset-top, 0px) + 6px); }
  #btn-turma .seta { width: 22px; height: 22px; right: -6px; bottom: -4px; border-width: 2px; } #btn-turma .seta svg { width: 13px; height: 13px; }
  #roda-turma { top: calc(env(safe-area-inset-top, 0px) + 66px); gap: 6px; padding: 6px; } #roda-turma button { width: 50px; height: 50px; }
  #aviso { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); font-size: 16px; padding: 6px 14px; border-radius: 16px;
    white-space: normal; text-align: center; max-width: 44vw; }
  #btn-pulo { width: 82px; height: 82px; right: calc(env(safe-area-inset-right, 0px) + 16px); bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); }
  #btn-acao { width: 70px; height: 70px; right: calc(env(safe-area-inset-right, 0px) + 110px); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); }
  #btn-correr { width: 58px; height: 58px; right: calc(env(safe-area-inset-right, 0px) + 28px); bottom: calc(env(safe-area-inset-bottom, 0px) + 112px); }
  #btn-correr::before { inset: -8px; }
  #joy-base { width: 116px; height: 116px; margin: -58px 0 0 -58px; left: calc(env(safe-area-inset-left, 0px) + 84px); top: calc(100% - 84px - env(safe-area-inset-bottom, 0px)); }
  #joy-pino { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
  #girar { display: none !important; }
}
.dica-tela { margin: 0; padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,.75); color: #7a4fd0; font-size: 13px; text-align: center; }
.dica-tela[hidden] { display: none; }

#btn-som-video { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); transform: translateX(-50%);
  padding: 10px 18px; border: 3px solid #fff; border-radius: 999px; background: rgba(255,143,192,.9); color: #fff; font: 700 18px 'Fredoka', sans-serif; }
#btn-som-video[hidden] { display: none; }
/* roda de trocar amigo por cima do placar (antes ficava escondida atrás dele com o celular em pé) */
#roda-turma { z-index: 9; }

/* dez/2026: vinheta bem suave na ilha do castelo (escurece um tiquinho os cantos: a cena ganha foco no meio) */
body[data-area]:not([data-area="mundo6"])::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:1;background:radial-gradient(ellipse at 50% 45%,rgba(255,255,255,0) 58%,rgba(24,44,96,.17) 100%)}
