/* Bip, meu robozinho — visual próprio (prefixo bip-). Nada pisca; com "menos movimento" nada anda. */
.palco.bip-oficina, .palco.bip-sala {
  gap: 14px; align-items: stretch; border-radius: var(--raio);
  background: linear-gradient(#f3efe6 0 72%, #c9b79c 72% 100%);
  box-shadow: inset 0 0 0 4px #d7ccc8; padding: 6px; transition: background .6s;
}
.palco.bip-escuro { background: linear-gradient(#1f2a44 0 72%, #2b2b3d 72% 100%); }

/* ---------- o Bip ---------- */
.bip-cena { position: relative; flex: 0 0 auto; height: 100%; aspect-ratio: 516 / 720; max-width: 44%; align-self: center; }
.bip-robo {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.bip-robo:focus-visible { outline: 4px solid var(--tema-escuro); border-radius: 20px; }
.bip-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.bip-luz {
  position: absolute; left: 42.5%; top: 1%; width: 9.6%; aspect-ratio: 1; border-radius: 50%;
  background: transparent; opacity: .85; pointer-events: none; transition: background .3s;
}
.bip-tela {
  position: absolute; left: 35%; top: 24%; width: 44%; height: 25%; border-radius: 14%;
  background: #1d2b2b; display: none; pointer-events: none;
}
.bip-tela.ligada { display: block; }
.bip-tela svg { width: 100%; height: 100%; }
.bip-adesivos { position: absolute; left: 22%; top: 69%; width: 56%; display: flex; justify-content: center; gap: 2%; pointer-events: none; }
.bip-adesivo { width: 22%; aspect-ratio: 1; }
.bip-adesivo svg { width: 100%; height: 100%; }
.bip-robo.bip-coberto::after {
  content: ""; position: absolute; left: 4%; right: 4%; top: 14%; bottom: 2%; border-radius: 48% 48% 10% 10%;
  background: #9575cd; opacity: .92; box-shadow: inset 0 -12px 0 #7e57c2;
}
.bip-robo.bip-coberto .bip-tela { z-index: 1; }
.bip-robo.bip-com-cabo::before {
  content: ""; position: absolute; left: 70%; top: 60%; width: 40%; height: 8px; background: #37474f; border-radius: 4px;
}
.bip-sobre { position: absolute; inset: 0; pointer-events: none; }
.bip-sobre > * { pointer-events: auto; }
.bip-pedido {
  position: absolute; right: -14%; top: 2%; width: 34%; aspect-ratio: 1; padding: 6%;
  background: #fff; border-radius: 50%; box-shadow: var(--sombra); pointer-events: none;
}
.bip-pedido svg, .bip-contador svg { width: 100%; height: 100%; }
.bip-contador {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 4px; height: 44px;
  padding: 2px 10px 2px 4px; background: #fff; border-radius: 22px; box-shadow: var(--sombra); font-size: 22px; pointer-events: none;
}
.bip-contador svg { width: 38px; height: 38px; }

.bip-pula { animation: bip-pula .5s ease; }
.bip-balanca { animation: bip-balanca .5s ease; }
.bip-anda { animation: bip-anda 1s ease; }
@keyframes bip-pula { 50% { transform: translateY(-6%); } }
@keyframes bip-balanca { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes bip-anda { 40% { transform: translateX(18%); } 70% { transform: translateX(18%) rotate(5deg); } }

/* ---------- o lado das coisas ---------- */
.bip-lado {
  flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-content: center; align-items: center;
  justify-content: center; gap: 12px; overflow: auto; padding: 4px;
}
.bip-grade { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 560px; }
.bip-cantinho, .bip-ferramenta, .bip-escolha, .bip-voltar, .bip-de-novo, .bip-estrela-teto, .bip-peca-flor {
  width: calc(var(--alvo) + 24px); height: calc(var(--alvo) + 24px); padding: 10px; border: 0; border-radius: 26px;
  background: #fff; box-shadow: var(--sombra); cursor: pointer; touch-action: manipulation;
}
.bip-cantinho svg, .bip-ferramenta svg, .bip-escolha svg, .bip-estrela-teto svg, .bip-peca-flor svg, .bip-peca svg { width: 100%; height: 100%; pointer-events: none; }
.bip-cantinho:focus-visible, .bip-ferramenta:focus-visible, .bip-escolha:focus-visible, .bip-peca:focus-visible { outline: 4px solid var(--tema-escuro); }
.bip-pedido-cantinho { box-shadow: 0 0 0 6px #ffd54f, var(--sombra); }
.bip-linha { display: flex; gap: 14px; justify-content: center; }

.bip-peca { width: calc(var(--alvo) + 20px); height: calc(var(--alvo) + 20px); cursor: grab; touch-action: none; border-radius: 22px; }
.bip-peca[hidden] { display: none; }
.bip-peca.arrastando { cursor: grabbing; z-index: 5; }
.bip-peca.volta { transition: transform .3s; }
.bip-robo.alvo { filter: drop-shadow(0 0 12px #ffd54f); }
.bip-cabo { background: #fff; box-shadow: var(--sombra); padding: 8px; }
.bip-manivela { width: calc(var(--alvo) + 40px); height: calc(var(--alvo) + 40px); }
.bip-manivela svg { transform: rotate(var(--giro, 0deg)); }
.bip-bateria { width: 200px; height: 96px; }
.bip-bateria svg { width: 100%; height: 100%; }

.bip-poeira { position: absolute; width: var(--alvo); height: var(--alvo); transform: translate(-50%, -50%); background: none; }
.bip-sumindo { opacity: 0; transition: opacity .35s; }

.bip-tampa {
  display: flex; gap: 18px; padding: 18px; border-radius: 26px; background: #b2dfdb; box-shadow: inset 0 0 0 5px #80cbc4;
}
.bip-parafuso { background: none; }
.bip-parafuso svg { transform: rotate(var(--giro, 0deg)); }
.bip-balancando svg { animation: bip-balanca-parafuso .6s ease-in-out 2; }
@keyframes bip-balanca-parafuso { 25% { transform: rotate(calc(var(--giro, 0deg) - 12deg)); } 75% { transform: rotate(calc(var(--giro, 0deg) + 12deg)); } }
.bip-firme { box-shadow: inset 0 0 0 4px #90a4ae; border-radius: 50%; }
body.sem-movimento .bip-balancando svg { animation: none; }
.bip-achado { box-shadow: 0 0 0 5px #ffd54f; }

.bip-teto { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }
.bip-teto[hidden] { display: none; }
.bip-estrela-teto { background: rgba(255, 255, 255, .12); box-shadow: none; }
.bip-brilha svg { animation: bip-brilha .6s ease; }
@keyframes bip-brilha { 50% { transform: scale(1.15); } }

.bip-torre { display: flex; flex-direction: column-reverse; align-items: center; min-width: 90px; min-height: 60px; }
.bip-bloco { width: 70px; height: 34px; margin-top: -4px; }
.bip-bloco svg { width: 100%; height: 100%; }
.bip-bloco-bip svg rect, .bip-bloco-bip svg circle { fill: #aed581; stroke: #558b2f; }
.bip-esperando { opacity: .75; outline: 4px dashed #90a4ae; outline-offset: -8px; }

.bip-monte { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; width: 100%; min-height: 44px; }
.bip-morango { width: 44px; height: 44px; }
.bip-morango-monte { width: var(--alvo); height: var(--alvo); padding: 6px; border: 0; border-radius: 20px; background: rgba(255,255,255,.7); cursor: pointer; }
.bip-morango-monte svg { width: 100%; height: 100%; pointer-events: none; }
.bip-mexe { animation: bip-balanca .5s ease; }
.bip-pano { background: #fff; box-shadow: var(--sombra); padding: 8px; }
.bip-morango svg { width: 100%; height: 100%; }
.bip-morango-pequeno { width: 30px; height: 30px; }
.bip-pratos { display: flex; gap: 16px; }
.bip-prato {
  width: 170px; min-height: calc(var(--alvo) + 30px); display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px; border: 0; border-radius: 26px; background: #fff; box-shadow: var(--sombra); cursor: pointer;
}
.bip-prato-quem img { height: 58px; width: auto; }
.bip-prato-morangos { display: flex; flex-wrap: wrap; justify-content: center; min-height: 30px; }

.bip-figura-grande { width: 150px; height: 150px; padding: 10px; background: #fff; border-radius: 26px; box-shadow: var(--sombra); }
.bip-figura-grande svg { width: 100%; height: 100%; }
.bip-escolhas { display: flex; gap: 14px; justify-content: center; }
.bip-escolhas[hidden] { display: none; }
.bip-escolhido { box-shadow: 0 0 0 5px #a5d6a7, var(--sombra); }

.bip-canto-bia { display: flex; align-items: flex-end; gap: 6px; }
.bip-bia img { height: 100px; width: auto; }
.bip-vaso { position: relative; width: 90px; height: 110px; transition: transform .5s; transform-origin: bottom center; }
.bip-vaso svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bip-vaso.bip-caido { transform: rotate(80deg) translateY(10%); }
.bip-chao { display: flex; gap: 10px; }
.bip-peca-flor { background: #fff8e1; }

.bip-feito { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; padding: 10px; border-radius: 26px; background: rgba(255, 255, 255, .85); }
.bip-feito-estrela, .bip-feito-adesivo { width: 100px; height: 100px; }
.bip-feito-estrela svg, .bip-feito-adesivo svg { width: 100%; height: 100%; }
.bip-voltar img { height: 100%; width: auto; }
.bip-de-novo { font-size: 46px; }

body.sem-movimento .bip-pula, body.sem-movimento .bip-balanca, body.sem-movimento .bip-anda, body.sem-movimento .bip-brilha svg { animation: none; }
body.sem-movimento .bip-vaso, body.sem-movimento .bip-sumindo, body.sem-movimento .palco { transition: none; }

@media (max-height: 500px) {
  .bip-cantinho, .bip-ferramenta, .bip-escolha, .bip-voltar, .bip-de-novo, .bip-estrela-teto, .bip-peca-flor { width: var(--alvo); height: var(--alvo); padding: 6px; border-radius: 20px; }
  .bip-peca { width: var(--alvo); height: var(--alvo); }
  .bip-manivela { width: calc(var(--alvo) + 10px); height: calc(var(--alvo) + 10px); }
  .bip-grade, .bip-lado, .bip-teto, .bip-linha, .bip-escolhas, .bip-pratos { gap: 8px; }
  .bip-bateria { width: 150px; height: 70px; }
  .bip-tampa { padding: 8px; gap: 10px; }
  .bip-figura-grande { width: 110px; height: 110px; }
  .bip-prato { width: 130px; min-height: var(--alvo); }
  .bip-prato-quem img { height: 40px; }
  .bip-bia img { height: 70px; }
  .bip-vaso { width: 60px; height: 80px; }
  .bip-feito-estrela, .bip-feito-adesivo { width: 70px; height: 70px; }
  .bip-monte { min-height: 32px; }
  .bip-morango { width: 32px; height: 32px; }
  .bip-morango-monte { width: var(--alvo); height: var(--alvo); }
}

/* nome escrito embaixo de cada cantinho (qualidade: toda escolha mostra o nome) */
.bip-cantinho { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: auto; min-height: calc(var(--alvo) + 24px); }
.bip-cantinho svg { flex: 1 1 auto; min-height: 0; height: calc(var(--alvo) - 10px); }
.bip-rotulo { font-weight: 700; font-size: clamp(12px, 1.5vw, 15px); line-height: 1.1; color: #1f3b57; text-align: center; pointer-events: none; }
