/* Witch Flight: estilos da página (painéis, botões, janelas, BIG WIN). */
/* Layout medido no layout de referência para celular e widescreen. A arte da interface fica em arte/ui/final. */
:root {
  --serif:
    'Cinzel', 'Merriweather', Georgia, 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif CJK JP', 'Noto Serif KR',
    'Noto Serif SC', serif;
  --num: 'Merriweather', Georgia, 'Yu Mincho', 'Noto Serif CJK JP', serif;
  --creme: #f6e7c8;
  --bt: min(11.2vw, 10.4vh, 64px);
  --topo: calc(var(--bt) + 1.6vmin);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
body {
  background: transparent !important;
} /* o fundo do body cobria o canvas do céu (z-index -1) */
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1d0636;
  color: #fff;
  user-select: none;
  touch-action: manipulation;
  font-family: var(--serif);
}
button,
a {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  outline: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(255, 230, 160, 0.7);
  outline-offset: 3px;
  border-radius: 999px;
}
img {
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ---------- grade: celular em pé (cena em cima, painel embaixo) / widescreen (cena à esquerda, painel à direita) ---------- */
/* em monitor ultralargo a interface fica num palco de até 21:9 no meio; o céu (canvas) cobre a tela toda */
#app {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100vw, calc(100vh * 21 / 9));
  translate: -50% 0;
  display: grid;
  grid-template-rows: 1fr auto;
}
body > canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  display: block;
}
#lado {
  background: none;
}
#lado-fundo {
  position: absolute;
  left: 0;
  right: 0;
  top: -5.5cqw;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}
#rodape {
  visibility: hidden;
  height: 1cqw !important;
}
#cena {
  position: relative;
  overflow: hidden;
  min-height: 0;
  container-type: size;
}
#cena canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#lado {
  padding-left: max(2vw, calc((100vw - 60vh) / 2)) !important;
  padding-right: max(2vw, calc((100vw - 60vh) / 2)) !important;
  container-type: inline-size;
  display: grid;
  align-content: start;
  gap: 1.6cqw;
  padding: 1.6cqw 2cqw calc(env(safe-area-inset-bottom) + 1cqw);
  position: relative;
}
@media (min-aspect-ratio: 5/4) {
  #app {
    grid-template-rows: 1fr;
    grid-template-columns: 1fr clamp(300px, 31vw, 60vh);
  }
  :root {
    --bt: 7.6vh;
  } /* proporcional à altura: nem gigante nem miúdo em monitor grande */
  #lado {
    padding: calc(var(--topo) + 1.5cqw) 4cqw 2cqw;
    gap: 3cqw;
    background: linear-gradient(#3a0f63, #22073f);
  }
}

/* ---------- barra de cima ---------- */
#topo {
  background: none !important;
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: 0;
  height: var(--topo);
  padding: 0.8vmin 2vw 0;
  display: flex;
  align-items: center;
  gap: 1.6vw;
}
.redondo {
  width: var(--bt);
  height: var(--bt);
  flex: none;
  transition: transform 0.08s;
  display: block;
}
.redondo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.redondo:active,
.check:active {
  transform: scale(0.92);
}
#saldo {
  flex: 1;
  max-width: calc(var(--bt) * 4.3);
  height: calc(var(--bt) * 0.82);
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 1vw;
}
#saldo .moedas {
  height: 104%;
  margin-left: -4%;
  flex: none;
}
#saldo b {
  flex: 1;
  text-align: center;
  font-family: var(--num);
  font-weight: 900;
  -webkit-text-stroke: 0.12em #2a0640;
  paint-order: stroke fill;
  font-size: calc(var(--bt) * 0.38);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #2a0640;
  white-space: nowrap;
}
#saldo .mais {
  height: 108%;
  aspect-ratio: 1;
  margin-right: -5%;
  flex: none;
}
#saldo .mais img {
  width: 100%;
  height: 100%;
}
.vazio {
  flex: 1;
}
@media (min-aspect-ratio: 5/4) {
  #saldo {
    margin-left: 18vw;
    max-width: calc(var(--bt) * 4.4);
  }
  #topo {
    background-image: var(--x) !important;
    background-size: 100% 100% !important;
  }
} /* faixa com arabescos só no widescreen */

/* ---------- cena: título, multiplicador, ganho ---------- */
#titulo {
  --tw: min(58cqw, 62cqh);
  position: absolute;
  left: 50%;
  top: calc(var(--topo) + 1cqh);
  translate: -50% 0;
  width: var(--tw);
  aspect-ratio: 878 / 254;
  z-index: 2;
  background: url(arte/ui/final/titulo.webp) center / contain no-repeat;
}
/* texto no miolo da placa (57% a 84% da altura medidos na arte), não no meio da placa inteira, que inclui a coroa */
#titulo span {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 70.5%;
  translate: 0 -50%;
  text-align: center;
  line-height: 1;
}
#titulo span {
  font-weight: 900;
  font-size: calc(var(--tw) * 0.058);
  -webkit-text-stroke: 0.1em #2a0640;
  paint-order: stroke fill;
  color: var(--creme);
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-shadow: 0 2px 0 #3a0a52;
}
#mult {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  pointer-events: none;
  top: calc(var(--topo) + 1.6cqh + min(58cqw, 62cqh) * 254 / 878);
}
#mult::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70cqw;
  height: 30cqh;
  translate: -50% -55%;
  z-index: -1;
  background:
    radial-gradient(closest-side, rgba(255, 200, 90, 0.35), rgba(255, 170, 60, 0)),
    repeating-conic-gradient(from 0deg, rgba(255, 215, 120, 0.16) 0 4deg, transparent 4deg 13deg);
  mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
  animation: gira 40s linear infinite;
}
body.calmo #mult::before {
  animation: none;
}
#mult .num {
  display: inline-block;
  font-size: min(20cqw, 17cqh);
  line-height: 1;
  filter: brightness(1.18) saturate(1.25) drop-shadow(0 0 1.6cqh rgba(255, 190, 70, 0.55));
}
#mult .sub {
  display: block;
  font-weight: 900;
  -webkit-text-stroke: 0.12em #2a0640;
  paint-order: stroke fill;
  font-size: min(4.2cqw, 3.4cqh);
  color: #ffe6c0;
  text-shadow:
    0 2px 0 #2a0640,
    0 0 8px #2a0640;
  min-height: 1.2em;
  white-space: nowrap;
}
@media (min-aspect-ratio: 5/4) {
  #titulo {
    --tw: min(42cqw, 46cqh);
    top: calc(var(--topo) - 1.5cqh);
  }
  #mult {
    top: calc(var(--topo) - 1cqh + min(42cqw, 46cqh) * 254 / 878);
  }
  #mult .num {
    font-size: min(14.5cqw, 14.5cqh);
  }
}
#mult.quente .num {
  filter: saturate(1.35) brightness(1.1) drop-shadow(0 0 2cqh rgba(255, 120, 60, 0.55));
}
#mult.caiu .num {
  filter: hue-rotate(-55deg) saturate(1.4) brightness(0.95);
}
#ganho {
  position: absolute;
  left: 70%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
  font-size: min(9cqw, 8cqh);
  opacity: 0;
  white-space: nowrap;
}
#ganho.on {
  animation: ganho 1.3s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}
@keyframes ganho {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.4);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  30% {
    transform: translate(-50%, -50%) scale(1);
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -95%) scale(0.95);
  }
}

/* fonte dourada pintada (atlas de caracteres) para multiplicador e prêmios */
.glyph {
  display: inline-block;
  height: 0.86em;
  vertical-align: -0.1em;
  margin-right: -0.035em;
  background: url(arte/final/font-gold.webp) no-repeat;
  background-size: calc(var(--glyph-atlas, 10) * 1em) 0.86em;
  filter: drop-shadow(0 0.05em 0.04em rgba(20, 8, 0, 0.95)) drop-shadow(0 0 0.12em rgba(0, 0, 0, 0.6));
}

/* ---------- painel (lado) ---------- */
.lbl {
  font-weight: 900;
  color: var(--creme);
  -webkit-text-stroke: 0.14em #2a0640;
  paint-order: stroke fill;
  text-shadow: 0 0.08em 0 #1a0330;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.valor {
  font-family: var(--num);
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 0.12em #2a0640;
  paint-order: stroke fill;
  text-shadow: 0 0.06em 0 #1a0330;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}
#rodadas {
  height: 10cqw;
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  padding: 0 3.4cqw 0 5.6cqw;
}
#rodadas .lbl {
  font-size: 2.5cqw;
  line-height: 1.05;
}
#rodadas .seta {
  height: 2.8cqw;
  flex: none;
}
#hist {
  flex: 1;
  display: flex;
  gap: 1.4cqw;
  justify-content: flex-end;
  overflow: hidden;
}
.pill {
  flex: none;
  width: 13.6cqw;
  height: 6.8cqw;
  display: grid;
  place-items: center;
  font-family: var(--num);
  font-weight: 900;
  font-size: 3.4cqw;
  color: #fff;
  -webkit-text-stroke: 0.12em #2a0640;
  paint-order: stroke fill;
}
.pill.laranja {
  color: #ffe7c8;
}
.pill.novo {
  animation: pill-in 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes pill-in {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

#painel {
  height: 21cqw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 3.6cqw 5cqw 2.6cqw;
  gap: 2cqw;
}
.bloco {
  display: grid;
  gap: 1.2cqw;
  justify-items: center;
  align-self: center;
  grid-template-rows: auto auto;
}
.bloco .lbl {
  font-size: 3.3cqw;
}
.linha {
  display: flex;
  align-items: center;
  width: 100%;
  height: 10.2cqw;
}
.linha .redondo {
  width: 10.2cqw;
  height: 10.2cqw;
  position: relative;
  z-index: 1;
}
.campo {
  height: 7.4cqw;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2cqw;
  margin: 0 -2.4cqw;
  padding: 0 3.6cqw;
}
.campo img {
  height: 75%;
}
.campo .valor {
  font-size: 3.8cqw;
}
.divisor {
  height: 11cqw;
}
.check {
  width: 7.6cqw;
  height: 7.6cqw;
  flex: none;
  margin-right: 1.6cqw;
  transition: transform 0.08s;
}
.check img {
  width: 100%;
  height: 100%;
}
#auto-v-btn {
  flex: 1;
  height: 7.4cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  padding: 0 4cqw 0 6cqw;
}
#auto-v-btn .valor {
  font-size: 3.8cqw;
}
#auto-v-btn .valor {
  flex: 1;
  text-align: center;
} /* valor no meio, seta no fim (mockup) */
#auto-v-btn img {
  height: 30%;
}

/* botão na proporção exata da arte (900x291): nunca esticado */
#grande {
  background: center / 100% 100% no-repeat;
  aspect-ratio: 616 / 254;
  height: auto;
  position: relative;
  width: 76cqw;
  justify-self: center;
  margin-top: 0.6cqw;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.6cqw;
  filter: drop-shadow(0 0.8cqw 1.4cqw rgba(0, 0, 0, 0.45));
  transition: transform 0.08s;
}
#grande:active {
  transform: scale(0.94);
}
#grande .palavra {
  height: 11.6cqw;
  max-width: 70%;
  object-fit: contain;
  margin-top: 1cqw;
}
#grande .interno {
  height: 7cqw;
  min-width: 42cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6cqw;
  padding: 0 4cqw;
}
#grande .interno img {
  height: 72%;
}
#grande .interno .valor {
  font-size: 4.8cqw;
}
#grande.pulsa {
  animation: pulsa 0.7s ease-in-out infinite;
}
body.calmo #grande.pulsa {
  animation: none;
}
#grande.apagado {
  filter: brightness(0.82) drop-shadow(0 0.8cqw 1.4cqw rgba(0, 0, 0, 0.45));
} /* cancelar/esperar: mesmo dourado, mais apagado */
/* brilho do botão feito por código (não fica mais pintado num PNG parado): halo que respira, faixa de luz que
     atravessa o botão recortada pela forma dele, e faíscas que piscam em volta (criadas no jogo.js) */
#grande .halo {
  position: absolute;
  inset: -14% -7%;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(255, 205, 90, 0.55),
    rgba(255, 170, 50, 0.18) 60%,
    rgba(255, 170, 50, 0)
  );
  animation: respira 1.8s ease-in-out infinite;
}
#grande .brilho {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask: url(arte/ui/final/botao_laranja.webp) center / 100% 100% no-repeat;
  mask: url(arte/ui/final/botao_laranja.webp) center / 100% 100% no-repeat;
}
#grande .brilho::before {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 22%;
  left: -30%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 240, 0.6), rgba(255, 255, 255, 0));
  animation: varre 3.2s ease-in-out infinite;
}
#grande .fa {
  position: absolute;
  width: 2.2cqw;
  height: 2.2cqw;
  margin: -1.1cqw;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, #fffbe0, rgba(255, 215, 110, 0.7) 40%, rgba(255, 190, 70, 0));
  animation: pisca 1.6s ease-in-out infinite;
}
#grande .palavra,
#grande .interno {
  position: relative;
  z-index: 1;
} /* a faixa de luz passa por baixo das letras */
@keyframes respira {
  50% {
    opacity: 0.55;
    transform: scale(1.04);
  }
}
@keyframes varre {
  0%,
  55% {
    left: -30%;
  }
  85%,
  100% {
    left: 115%;
  }
}
@keyframes pisca {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}
#grande.apagado .halo,
#grande.apagado .fa,
#grande.apagado .brilho {
  display: none;
}
body.calmo #grande .halo,
body.calmo #grande .brilho::before,
body.calmo #grande .fa {
  animation: none;
}
@keyframes pulsa {
  50% {
    transform: scale(1.025);
  }
}
#rodape {
  height: 5.4cqw;
  margin: 0 -2cqw 0;
  order: 9;
  background: url(arte/ui/final/ornamento.webp) center bottom / 100% 100% no-repeat;
  display: grid;
  align-items: end;
  justify-items: center;
}
#aviso {
  order: 8;
  font: italic 900 2.7cqw var(--num);
  color: #f4eaff;
  -webkit-text-stroke: 0.12em #1a0330;
  paint-order: stroke fill;
  padding-bottom: 0.6cqw;
  white-space: nowrap;
  text-align: center;
  position: relative;
}

/* widescreen: painel em coluna como no mockup (medidas em vh tiradas do widescreen.webp: barra 10,6vh, painel 34vh, botão 23vh) */
@media (min-aspect-ratio: 5/4) {
  #lado {
    padding-left: 2.8vh !important;
    padding-right: 2.8vh !important;
    gap: 1.6vh;
    padding: 5vh 2.8vh 4vh;
    margin: calc(var(--topo) + 0.6vh) 2.4vh 2.6vh 0;
    background: none;
    align-content: space-evenly;
    padding-top: 6.4vh !important;
    padding-bottom: 6vh !important;
  } /* sem bloco de cor: o céu passa por trás */

  #rodadas {
    height: 8.4vh;
    padding: 0 2vh 0 2.2vh;
    gap: 0.8vh;
  }
  #rodadas .lbl {
    font-size: 1.5vh;
  }
  #rodadas .seta {
    height: 1.6vh;
  }
  #hist {
    gap: 0.5vh;
    min-width: 0;
  }
  .pill {
    width: 6vh;
    height: 3.5vh;
    font-size: 1.6vh;
  }
  #lado > * {
    min-width: 0;
  }
  /* nada passa da moldura: a coluna é mais estreita que a soma das pílulas */
  #painel {
    height: 31vh;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto 1fr;
    padding: 4.6vh 4.8vh 3.8vh;
    gap: 1.6vh;
  }
  .bloco {
    gap: 1vh;
  }
  .bloco .lbl {
    font-size: 2vh;
  }
  .linha {
    height: 6.6vh;
  }
  .linha .redondo {
    width: 6.6vh;
    height: 6.6vh;
  }
  .campo {
    height: 5.6vh;
    margin: 0 -1.3vh;
    padding: 0 2vh;
    gap: 0.8vh;
  }
  .campo .valor,
  #auto-v-btn .valor {
    font-size: 2.9vh;
  }
  .divisor {
    display: none;
  } /* o divisor é vertical: deitado ficaria deformado */
  .check {
    width: 5.8vh;
    height: 5.8vh;
    margin-right: 1.2vh;
  }
  #auto-v-btn {
    height: 5.6vh;
  }
  #grande {
    width: min(96%, 22vh * 616 / 254);
    margin-top: 0.6vh;
    gap: 0.6vh;
  }
  #grande .palavra {
    height: 8.4vh;
  }
  #grande .interno {
    height: 5.4vh;
    min-width: 60%;
    gap: 0.8vh;
    padding: 0 2.4vh;
  }
  #grande .interno .valor {
    font-size: 3.7vh;
  }
  #rodape {
    display: none;
  }
  #lado-fundo {
    display: none;
  }
  #aviso {
    font-size: 1.6vh;
    padding-top: 0.6vh;
  }
  #grande .fa {
    width: 1.6vh;
    height: 1.6vh;
    margin: -0.8vh;
  }
}

/* monitor ultralargo: uma coluna pintada de cada lado fecha o palco (antes a interface flutuava no céu) */
.coluna {
  display: none;
  position: fixed;
  top: 0;
  height: 100vh;
  width: auto;
  z-index: 3;
  pointer-events: none;
}
@media (min-aspect-ratio: 22/9) {
  .coluna {
    display: block;
  }
  .coluna.esq {
    left: calc(50% - 100vh * 21 / 18 - 100vh * 0.2);
  }
  .coluna.dir {
    right: calc(50% - 100vh * 21 / 18 - 100vh * 0.2);
    transform: scaleX(-1);
  }
}

/* lista do saque automático, recordes, jogadores, tela de carregamento, brilho da placa */
#auto-lista {
  position: absolute;
  z-index: 7;
  left: -4cqw;
  right: -2cqw;
  bottom: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1cqw;
  padding: 2cqw;
  background: rgba(30, 8, 56, 0.96);
  border: 2px solid #f2c14a;
  border-radius: 3cqw;
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.5);
}
#auto-lista[hidden],
#casa[hidden] {
  display: none;
}
#auto-lista button {
  height: 8cqw;
  font: 900 3.6cqw var(--num);
  color: #fff;
  -webkit-text-stroke: 0.12em #2a0640;
  paint-order: stroke fill;
}
#auto-lista button:active {
  transform: scale(0.92);
}
@media (min-aspect-ratio: 5/4) {
  #auto-lista {
    left: 0;
    right: 0;
    gap: 0.8vh;
    padding: 1.4vh;
    border-radius: 2vh;
  }
  #auto-lista button {
    height: 5.4vh;
    font-size: 2.4vh;
  }
}
#melhores {
  display: grid;
  gap: calc(var(--u) * 0.5);
}
.linha-rec {
  height: calc(var(--u) * 2.8);
  display: grid;
  grid-template-columns: 1.4em 1fr 1fr auto;
  align-items: center;
  gap: 0.6em;
  padding: 0 calc(var(--u) * 1.4);
  font: 900 var(--u) var(--num);
  color: #fff;
}
.linha-rec b {
  color: #ffd86b;
}
.linha-rec .rx {
  color: #ffe9a8;
}
.linha-rec i {
  opacity: 0.7;
  font-style: normal;
  font-size: 0.85em;
}
#justo-c {
  display: grid;
  gap: calc(var(--u) * 0.6);
}
#justo-c p {
  text-align: left;
  font-size: calc(var(--u) * 0.85);
}
#justo-c code {
  font: 400 calc(var(--u) * 0.7) monospace;
  word-break: break-all;
  color: #ffe9a8;
}
.bot {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  background: rgba(40, 10, 70, 0.82);
  border: 1px solid #b98cf0;
  font: 700 min(2.6cqw, 2cqh) var(--num);
  color: #e9dcff;
  white-space: nowrap;
  animation: bot 1.7s ease-out forwards;
}
.bot b {
  color: #ffd86b;
}
@keyframes bot {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.7);
  }
  12% {
    opacity: 1;
    transform: none;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-26px);
  }
}
#carrega {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4vh;
  background: radial-gradient(#3a1166, #160530);
  transition: opacity 0.4s;
}
#carrega img {
  width: min(70vw, 60vh);
}
#carrega.fim {
  opacity: 0;
  pointer-events: none;
}
#carrega .barra {
  width: min(56vw, 46vh);
  height: 1.6vh;
  border-radius: 999px;
  background: #1a0530;
  border: 2px solid #f2c14a;
  overflow: hidden;
}
#carrega i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(#fff3b0, #ffc93c 55%, #f29a17);
  transition: width 0.2s;
}
#festa .placa {
  position: relative;
  width: 100%;
}
#festa .placa::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: var(--pl) center / 100% 100% no-repeat;
  mask: var(--pl) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 240, 0.7) 50%, transparent 60%) no-repeat;
  background-size: 300% 100%;
  animation: varre2 2.2s ease-in-out infinite;
}
@keyframes varre2 {
  0%,
  30% {
    background-position: 150% 0;
  }
  80%,
  100% {
    background-position: -50% 0;
  }
}
body.calmo #festa .placa::after {
  animation: none;
  opacity: 0;
}

/* animações  */
.slam {
  animation: slam 0.42s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.mile {
  animation: mile 0.26s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.spring {
  animation: spring 0.42s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.tremor {
  animation: tremor 0.35s;
}
.bump {
  animation: bump 0.3s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes slam {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  60% {
    transform: scale(1.07);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@keyframes mile {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes spring {
  25% {
    transform: scale(1.04, 1.2);
  }
  50% {
    transform: scale(1.01, 0.92);
  }
  75% {
    transform: scale(1, 1.05);
  }
}
@keyframes tremor {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}
@keyframes bump {
  50% {
    transform: scale(1.18);
  }
}

/* comemoração BIG / MEGA / EPIC */
#festa {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: start center;
  padding-top: calc(var(--topo) + 3cqh);
  background: radial-gradient(closest-side, rgba(20, 4, 36, 0.82), rgba(20, 4, 36, 0.6) 60%, rgba(20, 4, 36, 0));
}
#festa[hidden] {
  display: none;
}
#cena:has(#festa:not([hidden])) #mult,
#cena:has(#festa:not([hidden])) #titulo {
  visibility: hidden;
}
#festa .raios {
  position: absolute;
  width: 160vmax;
  height: 160vmax;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 214, 90, 0.22) 0 7deg, transparent 7deg 18deg);
  mask-image: radial-gradient(circle, #000 0, transparent 45%);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 45%);
  animation: gira 14s linear infinite;
}
body.calmo #festa .raios {
  animation: none;
}
@keyframes gira {
  to {
    rotate: 1turn;
  }
}
#festa .caixa {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1cqh;
  width: min(80cqw, 58cqh);
}
#festa img {
  width: 100%;
  height: auto;
}
#festa-v {
  height: min(14cqw, 11cqh);
  min-width: 40cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 6cqw;
  font-size: min(9cqw, 7cqh);
}
#festa .dica {
  font: 700 min(2.6cqw, 13px) var(--serif);
  opacity: 0.7;
}

/* janelas do menu e da coroa (mesma moldura do painel) */
.janela {
  position: fixed;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 2, 24, 0.6);
}
.janela[hidden] {
  display: none;
}
.janela {
  animation: some-in 0.15s ease-out;
}
.janela .moldura {
  animation: slam 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
body.calmo .janela .moldura {
  animation: none;
}
@keyframes some-in {
  from {
    opacity: 0;
  }
}
.janela {
  --u: clamp(13px, 2.1vh, 30px);
}
.janela .moldura {
  position: relative;
  width: min(88vw, calc(var(--u) * 27));
  padding: calc(var(--u) * 2.4) calc(var(--u) * 2.7) calc(var(--u) * 3.9);
  display: grid;
  gap: calc(var(--u) * 0.8);
}
.janela .fechar {
  position: absolute;
  top: calc(var(--u) * -0.9);
  right: calc(var(--u) * -0.9);
  width: calc(var(--u) * 3.2);
  height: calc(var(--u) * 3.2);
}
.janela .fechar img {
  width: 100%;
  height: 100%;
}
.janela .lbl {
  font-size: calc(var(--u) * 1.5);
  text-align: center;
  margin-bottom: 4px;
}
.janela .item {
  height: calc(var(--u) * 3.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--u) * 0.8) 0 calc(var(--u) * 1.7);
  font-weight: 900;
  font-size: var(--u);
  color: var(--creme);
  -webkit-text-stroke: 0.12em #2a0640;
  paint-order: stroke fill;
}
.janela .item img {
  height: 70%;
}
/* idioma: lista suspensa nativa (o celular abre a lista do sistema); o select fica invisível por cima da linha inteira */
#m-lingua {
  position: relative;
  cursor: pointer;
}
.janela .item > span[data-t] {
  white-space: nowrap;
}
.janela .moldura {
  grid-template-columns: minmax(0, 1fr);
}
.janela .moldura > * {
  min-width: 0;
} /* texto comprido não alarga a janela (também no Safari) */
.janela .item {
  min-width: 0;
  overflow: hidden;
}
#m-lingua .escolha b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
#m-lingua .escolha {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.4em;
  height: 100%;
  margin-left: auto;
  padding-left: 0.8em;
  color: #ffe9a8;
  font-size: 0.78em;
  white-space: nowrap;
}
#m-lingua .escolha img {
  height: 45%;
}
#lingua-sel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}
.janela p {
  margin: 4px 0 0;
  font: 400 var(--u) / 1.5 var(--num);
  color: #f3e8ff;
  text-align: center;
}

/* End of estilo.css */
