/* =====================================================================================
   Arte: painel em forma de bolha (9 pedaços montados num canvas
   pelo src/nine.js, sem fio na emenda), garrafas cheias na vitória e prateleiras no desktop.
   ===================================================================================== */
.panel {
  border: 44px solid transparent;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  border-image: url(assets/ui/painel-bolha.webp) 150 fill / 44px;
  background: none;
  padding: 0 4px 2px;
  filter: drop-shadow(0 12px 26px rgba(50, 25, 95, 0.45));
}
.panel::before,
.panel::after {
  display: none;
}
.nine {
  border-image: none !important;
  background-size: 100% 100% !important;
  background-origin: border-box !important;
  background-clip: border-box !important;
  background-repeat: no-repeat !important;
}

/* posições que dependiam do padding antigo: agora a moldura tem 44 px */
.panel.win {
  padding-top: 0;
}
.panel.win .stars {
  top: -168px;
}
.panel.win .ribbon,
#s-pause .ribbon {
  margin-top: -96px;
}
#s-pause .panel {
  padding-top: 0;
}
.panel.lose {
  padding-top: 10px;
}
.lose-ico {
  top: -110px;
}
#s-levels .ribbon {
  margin-top: -84px;
}
@media (max-height: 450px) {
  .panel {
    border-width: 30px;
    border-image-width: 30px;
  }
  .panel.win .stars {
    top: -104px;
  }
  .panel.win .ribbon {
    margin-top: -56px;
  }
  #s-pause .ribbon {
    margin-top: -60px;
  }
  .lose-ico {
    top: -84px;
  }
}

/* garrafas da vitória: cheias */

/* desktop e deitado: cada garrafa numa prateleira de madeira */
body.land .flask::after {
  content: '';
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: -9%;
  height: 15%;
  z-index: -1;
  background: url(assets/ui/prateleira.webp) center / 100% 100% no-repeat;
}
body.land .flask {
  margin-bottom: 6px;
}
.panel.win .stars {
  top: -212px;
  z-index: 3;
}
.panel h2.title-ink {
  font-size: 32px;
  white-space: nowrap;
}
@media (max-height: 450px) {
  .panel.win .stars {
    top: -128px;
  }
  .panel h2.title-ink {
    font-size: 26px;
  }
}

/* seleção de fases: um mundo por vez, 5 em cima e 5 embaixo */
.panel.levels {
  width: min(94vw, 520px);
}
.world-name {
  margin: -6px 0 0;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #3d1f6e;
}
.world-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.world-row #level-grid {
  flex: 1;
  grid-template-columns: repeat(5, 1fr);
}
.arrow {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  font-size: 30px;
  line-height: 1;
}
.arrow b {
  transform: translateY(-2px);
  color: #fff;
}
.arrow[disabled] {
  opacity: 0.35;
}
.world-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.world-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c9b6ea;
  box-shadow: inset 0 0 0 2px #fff;
}
.world-dots i.on {
  background: #7a44d6;
  transform: scale(1.3);
}
.world-dots i.locked {
  opacity: 0.5;
}

/* barra de poderes: coluna fina na borda direita */
#powers {
  position: absolute;
  z-index: 2;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  zoom: var(--k, 1);
}
.power {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 28%, #c9a2ff 0 8%, #7a44d6 45%, #4b2390 90%);
  box-shadow:
    inset 0 -4px 0 rgba(20, 5, 50, 0.35),
    inset 0 0 0 3px rgba(255, 255, 255, 0.85),
    0 4px 0 rgba(40, 15, 90, 0.45);
  transition: transform 0.12s;
}
.power svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 0 rgba(30, 10, 60, 0.6));
}
.power[data-power='letra'] {
  background: radial-gradient(circle at 35% 28%, #ffe48a 0 8%, #f2a42a 50%, #c46d0a 92%);
}
.power[data-power='ima'] {
  background: radial-gradient(circle at 35% 28%, #ffb3c8 0 8%, #e8456f 50%, #a51d45 92%);
}
.power[data-power='sopro'] {
  background: radial-gradient(circle at 35% 28%, #b8f2ff 0 8%, #33b6e8 50%, #126fa3 92%);
}
.power i {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: #fff;
  color: #3d1f6e;
  font:
    700 14px/22px Fredoka,
    sans-serif;
  font-style: normal;
  box-shadow: 0 0 0 2px #3d1f6e;
}
.power:active {
  transform: scale(0.9);
}
.power.locked {
  filter: grayscale(1) brightness(0.85);
}
.power.locked i {
  background: #5b4b80;
  color: #fff;
  box-shadow: 0 0 0 2px #fff;
}
.power.empty {
  opacity: 0.55;
}
.power.use {
  animation: powerUse 0.45s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes powerUse {
  0% {
    transform: scale(1.35);
  }
  100% {
    transform: none;
  }
}

/* "quase lá": falta uma palavra, a garrafa pisca devagar */
.flask.almost .bottle {
  animation: almostGlow 1.1s ease-in-out infinite;
}
@keyframes almostGlow {
  50% {
    filter: drop-shadow(0 0 12px var(--c)) drop-shadow(0 0 4px #fff) brightness(1.12);
    transform: scale(1.05);
  }
}
body.reduced .flask.almost .bottle {
  animation: none;
  filter: drop-shadow(0 0 8px var(--c));
}

/* 30. transição de bolha */
#wipe {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at 38% 34%,
    rgba(255, 255, 255, 0.95) 0 6%,
    rgba(255, 235, 252, 0.9) 22%,
    rgba(214, 190, 255, 0.92) 60%,
    rgba(160, 200, 255, 0.95) 100%
  );
  clip-path: circle(0% at 50% 50%);
}
#wipe.grow {
  opacity: 1;
  clip-path: circle(75% at 50% 50%);
  transition: clip-path 0.33s cubic-bezier(0.4, 0, 0.2, 1);
}
#wipe.pop {
  opacity: 0;
  clip-path: circle(90% at 50% 50%);
  transform: scale(1.08);
  transition:
    opacity 0.36s ease-out,
    transform 0.36s ease-out;
}

/* 29. abertura animada: a cena "sobe" e o logo entra soprado */
#s-title.intro .logo-img {
  animation: logoIn 1.1s cubic-bezier(0.25, 1.4, 0.45, 1) both;
}
#s-title.intro .sub {
  animation: fadeUp 0.5s ease-out 0.8s both;
}
#s-title.intro #btn-start {
  animation:
    fadeUp 0.5s ease-out 1s both,
    breathe 1.6s ease-in-out 1.6s infinite;
}
body.intro {
  animation: sceneRise 1.4s cubic-bezier(0.3, 0, 0.2, 1) both;
}
@keyframes logoIn {
  0% {
    transform: translateY(45vh) scale(0.25);
    opacity: 0;
  }
  55% {
    opacity: 1;
  }
  75% {
    transform: translateY(-2vh) scale(1.06, 0.95);
  }
  100% {
    transform: none;
  }
}
@keyframes fadeUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
@keyframes sceneRise {
  0% {
    background-position: center 100%;
  }
  100% {
    background-position: center center;
  }
}

/* 31. resumo da vitória */
.summary {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: -4px;
}
.summary span {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 74px;
  padding: 4px 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #d9c4ff;
}
.summary b {
  font-size: 22px;
  color: #3d1f6e;
  line-height: 1.1;
}
.summary small {
  font-size: 12px;
  font-weight: 700;
  color: #7a5bb0;
}
.summary span.hit {
  animation: sumHit 0.35s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes sumHit {
  0% {
    transform: scale(1.25);
  }
  100% {
    transform: none;
  }
}
@media (max-height: 450px) {
  .summary {
    display: none;
  }
}

/* 32. novo tema descoberto */
#newtheme {
  position: fixed;
  z-index: 15;
  left: 50%;
  top: 32%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 22px 12px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fffaf0, #ffe9a8);
  box-shadow:
    inset 0 0 0 3px #fff,
    0 0 0 3px #f2b43a,
    0 12px 30px rgba(70, 40, 120, 0.4);
  opacity: 0;
}
#newtheme.on {
  animation: ntIn 1.7s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
@keyframes ntIn {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  18% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
  }
  28% {
    transform: translate(-50%, -50%) scale(1);
  }
  82% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -62%) scale(0.9);
  }
}
.nt-bottle {
  width: 64px;
  height: 88px;
  background: var(--img) center / contain no-repeat;
  animation: ntSpin 1.2s ease-in-out infinite;
}
@keyframes ntSpin {
  50% {
    transform: rotate(10deg) scale(1.06);
  }
}
.nt-title {
  font-size: 26px;
  color: #fff;
  -webkit-text-stroke: 3px #8a4b00;
  paint-order: stroke fill;
}
.nt-name {
  font-size: 18px;
  font-weight: 700;
  color: #3d1f6e;
}
body.reduced #newtheme.on {
  animation-duration: 1.7s !important;
}

/* abertura: desafio do dia e álbum */
#s-title {
  grid-template-rows: auto minmax(12vh, 1fr) auto auto auto;
}
.title-row {
  display: flex;
  gap: 10px;
}
.btn.small {
  font-size: 18px;
  padding: 10px 16px;
  -webkit-text-stroke-width: 2px;
}

/* álbum de temas */
.panel.album {
  width: min(94vw, 560px);
  max-height: 92vh;
}
#album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
  padding: 4px;
}
.alb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #e2d4fb;
}
.alb i {
  width: 42px;
  height: 56px;
  background: url(assets/ui/garrafa-0.webp) center / contain no-repeat;
  filter: grayscale(1) brightness(1.1) opacity(0.35);
}
.alb.on i {
  background-image: var(--img);
  filter: none;
}
.alb b {
  font-size: 11px;
  color: #3d1f6e;
  text-align: center;
  line-height: 1.1;
}
.alb:not(.on) b {
  font-size: 18px;
  color: #b9a8d8;
}
.panel.album {
  max-height: calc(90vh / var(--pk, 1));
}
#album-grid {
  max-height: calc(52vh / var(--pk, 1));
}
@media (max-height: 450px) {
  #album-grid {
    max-height: calc(38vh / var(--pk, 1));
  }
}

/* sem moldura quadrada em volta das garrafas: no Chrome com GPU, "filter: drop-shadow" + o "backdrop-filter" das
   modais desenha o retângulo da camada de cada garrafa. O brilho agora é um fundo radial (sem filter) e as
   modais só escurecem, sem desfocar. */
.modal {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(50, 25, 95, 0.5) !important;
}
.flask.done .bottle,
.flask.almost .bottle,
body.reduced .flask.almost .bottle {
  filter: none !important;
}
.flask.done .bottle,
.flask.almost .bottle {
  background:
    var(--img) center bottom / contain no-repeat,
    radial-gradient(
        closest-side,
        color-mix(in srgb, var(--c) 70%, #fff) 0%,
        color-mix(in srgb, var(--c) 35%, transparent) 55%,
        transparent 100%
      )
      center 72% / 100% 72% no-repeat;
}
.flask.almost .bottle {
  animation: almostPulse 1.1s ease-in-out infinite;
}
@keyframes almostPulse {
  50% {
    transform: scale(1.05);
  }
}
body.reduced .flask.almost .bottle {
  animation: none;
}

/* idioma: PT / EN / ES (só nas configurações da abertura) */
#s-pause:not(.settings-mode) .title-only {
  display: none;
}
.lang-row {
  cursor: default;
}
.langs {
  display: flex;
  gap: 4px;
  flex: 0 0 auto !important;
}
.langs button {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #efe6ff;
  color: #5b3b8c;
  box-shadow: inset 0 0 0 2px #d9c4ff;
  -webkit-text-stroke: 0;
  text-shadow: none;
}
.langs button.on {
  background: linear-gradient(180deg, #a97cff, #7a44d6);
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(20, 5, 50, 0.3);
}
.setting .ico {
  flex: 0 0 auto;
}
.setting > span:not(.langs) {
  min-width: 0;
}
.setting > span:not(.langs) {
  white-space: normal;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
/* configurações da abertura têm uma linha a mais (idioma): o painel encolhe um pouco para caber na altura */
#s-pause.settings-mode .panel {
  zoom: calc(var(--pk, 1) * 0.86);
}

/* ===== ajustes de legibilidade, toque e animação ===== */
/* escolha de fases: 5 colunas que encolhem; a bolinha não cresce com o número (95, 100) e as setas ficam na janela */
.world-row > .round {
  flex: 0 0 auto;
}
.world-row #level-grid {
  min-width: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.lv {
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: visible;
  font-size: 26px;
}
.lv.d3 {
  font-size: 20px;
  letter-spacing: -1px;
}
@media (max-width: 420px) {
  #level-grid {
    gap: 8px;
  }
  .lv {
    font-size: 22px;
  }
  .lv.d3 {
    font-size: 16px;
  }
  .world-row {
    gap: 3px;
  }
}
#s-pause.settings-mode .panel {
  zoom: var(--pk, 1);
} /* a medida em fitPanel() cuida da altura */

/* avisos pequenos: pílula escura (antes o texto se misturava com as palavras das bolhas) e ficam mais tempo */
.float.small {
  font-size: 18px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(61, 31, 110, 0.92);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 4px 10px rgba(40, 20, 80, 0.35);
  -webkit-text-stroke: 0;
  text-shadow: none;
  animation: floatPill 1.85s ease-out forwards;
}
@keyframes floatPill {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
  }
  10% {
    transform: translate(-50%, -58%) scale(1.08);
    opacity: 1;
  }
  16% {
    transform: translate(-50%, -60%) scale(1);
  }
  85% {
    transform: translate(-50%, -70%);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -95%);
    opacity: 0;
  }
}
/* menos movimento: o aviso aparece parado e some (antes sumia na hora) */
body.reduced .float {
  animation: floatFade 1.3s linear forwards !important;
  animation-duration: 1.3s !important;
}
body.reduced .float.small {
  animation-duration: 1.85s !important;
}
@keyframes floatFade {
  0%,
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* garrafa: o líquido sobe de verdade a cada palavra e a cheia fica bem diferente da vazia */
.flask .liquid::before {
  height: calc(var(--fill, 0%) * 0.66);
  opacity: 0.9;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--c) 45%, #fff) 0 6px,
    color-mix(in srgb, var(--c) 88%, #3d1f6e) 6px 100%
  );
}
.flask.done .liquid::before {
  height: 66%;
}
.flask.done .bottle {
  animation: flaskJump 0.6s cubic-bezier(0.3, 1.7, 0.5, 1);
}
@keyframes flaskJump {
  0% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-14px) scale(1.08, 0.94);
  }
  100% {
    transform: none;
  }
}
.flask .name b {
  font-weight: 700;
}

/* sopros: perder um sacode a barra; o último pulsa */
#breaths.hit {
  animation: breathsHit 0.28s ease-out;
}
@keyframes breathsHit {
  0%,
  100% {
    transform: none;
  }
  25% {
    transform: translateX(-5px);
  }
  55% {
    transform: translateX(5px);
  }
  80% {
    transform: translateX(-2px);
  }
}
.breath.off {
  opacity: 0.9;
  box-shadow: inset 0 0 0 2.5px rgba(255, 255, 255, 0.8);
  background: rgba(30, 10, 60, 0.55);
}
#breaths:has(.breath.off:nth-child(2)) .breath:first-child {
  animation: lastBreath 1s ease-in-out infinite;
}
@keyframes lastBreath {
  50% {
    filter: brightness(1.5) drop-shadow(0 0 5px #fff);
  }
}

/* poderes: trancado mostra cadeado (o número parecia estoque); novo pisca; vazio balança */
.power.locked i {
  min-width: 22px;
  padding: 0;
  background: #5b4b80
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='10' rx='2' fill='white'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3' stroke='white' stroke-width='2.6' fill='none'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
.power.new {
  animation: powerNew 0.9s ease-in-out 6;
}
@keyframes powerNew {
  50% {
    transform: scale(1.18);
    box-shadow:
      0 0 0 4px #ffd23f,
      0 0 18px #ffd23f;
  }
}
.power.nope {
  animation: powerNope 0.3s ease-out;
}
@keyframes powerNope {
  25% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(4px);
  }
}

/* vitória: prêmio à vista e regra das estrelas */
.gift {
  margin: 0;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  color: #6b4400;
  background: linear-gradient(180deg, #fff3b8, #ffd23f);
  box-shadow:
    inset 0 0 0 2px #fff,
    0 0 0 2px #f2b43a;
  transform: scale(0);
  align-self: center;
  white-space: pre;
}
.gift.on {
  animation: giftIn 0.5s cubic-bezier(0.3, 1.8, 0.5, 1) forwards;
}
@keyframes giftIn {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
body.reduced .gift {
  transform: none;
}
#win-tip {
  margin: 0;
  font-size: 15px;
}

/* "Novo tema!": cartão menor, logo abaixo do HUD, mais rápido (não cobre mais as bolhas do meio) */
#newtheme {
  top: calc(64px * var(--k, 1) + 62px);
  zoom: 0.68;
}
#newtheme.on {
  animation-duration: 1.25s;
}
body.reduced #newtheme.on {
  animation-duration: 1.25s !important;
}

/* configurações no celular: idioma com alvo de dedo, palavra não quebra no meio */
.langs button {
  min-width: 46px;
  min-height: 38px;
  font-size: 16px;
}
.setting > span:not(.langs) {
  overflow-wrap: normal;
  word-break: normal;
}
.row .btn {
  min-width: 0;
}
.panel.lose .row .btn,
.panel.win .row .btn {
  white-space: nowrap;
}

/* álbum: janela maior, tema escolhido marcado (tocar mostra as palavras) */
.panel.album {
  width: min(94vw, 640px);
}
#album-grid {
  max-height: calc(60vh / var(--pk, 1));
}
.alb.on {
  cursor: pointer;
}
.alb.sel {
  box-shadow:
    inset 0 0 0 3px #ffd23f,
    0 0 10px #ffd23f;
}
#album-count {
  min-height: 2.2em;
}

/* celular em pé: a janela de fases usa a largura toda e as setas descem para baixo da grade */
@media (max-width: 520px) {
  .panel.levels {
    width: calc((100vw - 36px) / var(--pk, 1));
    max-width: none;
    box-sizing: border-box;
  }
  .world-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 22px;
  }
  .world-row #level-grid {
    grid-column: 1 / 3;
    grid-row: 1;
  }
  .world-row #world-prev {
    grid-row: 2;
    justify-self: start;
  }
  .world-row #world-next {
    grid-row: 2;
    justify-self: end;
  }
  .lv {
    font-size: 26px;
  }
  .lv.d3 {
    font-size: 19px;
  }
}
/* derrota: o título quebra em duas linhas se precisar (espanhol); barra de dica: letras escuras, sem contorno */
.panel h2.title-ink {
  white-space: normal;
  text-wrap: balance;
  line-height: 1.05;
  max-width: 100%;
  font-size: 30px;
}
.hint-text b.on {
  color: #3d1f6e;
  -webkit-text-stroke: 0;
  text-shadow: none;
}
/* rótulo do frasco legível: tracinhos separados (dá para contar as letras), bolinhas numa linha só,
   e nome comprido vira uma etiqueta um pouco mais larga que a garrafa */
#flasks {
  pointer-events: auto;
}
.flask {
  cursor: pointer;
}
.flask .name {
  font-size: var(--fs, 14px);
  gap: 0;
}
.flask .name b {
  margin: 0 0.07em;
  min-width: 0.6em;
  border-bottom-width: 2.5px;
}
.flask .name b.on {
  min-width: 0;
}
.flask.wide .name {
  padding: 2px 0;
  border-radius: 8px;
  background: #fbf1dc;
  box-shadow:
    0 0 0 1.5px #e6c99a,
    0 2px 3px rgba(80, 50, 20, 0.25);
}
.flask .dots {
  flex-wrap: nowrap;
}
.flask .dots i:nth-last-child(n + 5),
.flask .dots i:nth-last-child(n + 5) ~ i {
  width: 7.5px;
  height: 7.5px;
}
.flask .name {
  overflow: visible;
  white-space: nowrap;
}
.flask .name.measure {
  justify-content: flex-start;
}
.flask .name.measure b {
  min-width: 0.62em;
}
.flask.wide .name {
  max-width: none;
}
body.land .flask.wide .name {
  max-width: none;
}
/* nome em duas linhas (FESTA / JUNINA): a etiqueta cresce para baixo */
.flask .name.two {
  flex-wrap: wrap;
  height: auto;
  top: 56%;
  row-gap: 0;
  align-content: center;
  line-height: 1;
  padding: 1px 0 2px;
}
.flask .name.two b {
  border-bottom-width: 2px;
}
.flask .name.two b.br {
  flex-basis: 100%;
  height: 0;
  min-width: 0;
  margin: 0;
}
/* botões sem a faixa de brilho em cima */
.btn::before {
  display: none;
}
/* abertura no desktop: logo e botões mais perto do meio (o espaço das bolhas não estica até o fim da tela) */
@media (min-height: 600px) {
  body.land #s-title {
    grid-template-rows: auto minmax(10vh, 19vh) auto auto auto;
    align-content: center;
    padding: 3vh 16px;
    gap: 1.2vh;
  }
}
/* líquido enche por trás da etiqueta creme: a máscara do líquido é a garrafa MENOS o retângulo arredondado da
   etiqueta (57-76,5% da altura, 9-91% da largura, igual nas 6 garrafas) */
.flask .liquid {
  --hole: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M0 0H100V100H0Z M17 56.5H83Q91 56.5 91 61V72.5Q91 77 83 77H17Q9 77 9 72.5V61Q9 56.5 17 56.5Z'/%3E%3C/svg%3E");
  -webkit-mask:
    var(--img) center bottom / contain no-repeat,
    var(--hole) center / 100% 100% no-repeat;
  -webkit-mask-composite: source-in;
  mask:
    var(--img) center bottom / contain no-repeat,
    var(--hole) center / 100% 100% no-repeat;
  mask-composite: intersect;
}

/* ícones em imagem (assets/ui/ico-*.webp): poderes, pausa e configurações */
.power,
.power[data-power],
#btn-pause,
#btn-gear {
  background: var(--ico) center / contain no-repeat !important;
  box-shadow: none !important;
  border: 0;
}
.power svg,
#btn-pause .ico-pause,
#btn-gear svg {
  display: none;
}
.power[data-power='lupa'] {
  --ico: url(assets/ui/ico-lupa.webp);
}
.power[data-power='letra'] {
  --ico: url(assets/ui/ico-letra.webp);
}
.power[data-power='ima'] {
  --ico: url(assets/ui/ico-ima.webp);
}
.power[data-power='sopro'] {
  --ico: url(assets/ui/ico-sopro.webp);
}
#btn-pause {
  --ico: url(assets/ui/ico-pausa.webp);
  filter: drop-shadow(0 3px 3px rgba(40, 15, 90, 0.35));
}
#btn-gear {
  --ico: url(assets/ui/ico-config.webp);
  filter: drop-shadow(0 3px 3px rgba(40, 15, 90, 0.35));
}
.power {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 3px 3px rgba(40, 15, 90, 0.35));
}
.power.locked {
  filter: grayscale(1) brightness(0.9) drop-shadow(0 3px 3px rgba(40, 15, 90, 0.35));
}
.flask .liquid::before {
  opacity: 0.78;
}

/* ===== tela de fases ===== */
#world-lock {
  min-height: 1.3em;
  text-align: center;
}
#world-lock.off {
  visibility: hidden;
}
.panel.levels .row {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: center;
}
.panel.levels .row .btn.small {
  flex: 0 0 auto;
}
.panel.levels .row .btn.wide {
  flex: 1;
}
/* botão de fase: bolha brilhante (reflexo redondo pequeno, sem faixa) */
.lv {
  background: radial-gradient(circle at 50% 55%, #b98cff 0%, #8a52e6 55%, #5e2bb8 100%);
  box-shadow:
    inset 0 -5px 0 rgba(40, 15, 90, 0.32),
    inset 0 0 0 3px rgba(255, 255, 255, 0.9),
    0 4px 0 rgba(60, 30, 110, 0.4);
}
.lv::before {
  content: '';
  position: absolute;
  left: 20%;
  top: 13%;
  width: 26%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: rotate(-25deg);
  pointer-events: none;
}
.lv[disabled]::before {
  opacity: 0.55;
}
.lv.current {
  box-shadow:
    inset 0 -5px 0 rgba(40, 15, 90, 0.32),
    inset 0 0 0 3px #fff,
    0 0 0 4px #ffd23f,
    0 0 14px 4px rgba(255, 210, 63, 0.55),
    0 4px 0 rgba(60, 30, 110, 0.4);
}
/* estrelas: as mesmas da vitória, em arco embaixo da bolha */
.lv-stars {
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 0;
  pointer-events: none;
}
.lv-stars i {
  width: 17px;
  height: 17px;
  background: url(assets/ui/estrela-vazia.webp) center / contain no-repeat;
}
.lv-stars i.on {
  background-image: url(assets/ui/estrela-ouro.webp);
}
.lv-stars i:nth-child(2) {
  width: 21px;
  height: 21px;
  margin-bottom: -3px;
}
@media (max-width: 420px) {
  .lv-stars {
    bottom: -13px;
  }
  .lv-stars i {
    width: 14px;
    height: 14px;
  }
  .lv-stars i:nth-child(2) {
    width: 17px;
    height: 17px;
  }
}

/* álbum: barra de rolagem no estilo do jogo (trilho lilás afundado, puxador de bolha roxo-rosa com aro branco) */
#album-grid {
  padding-right: 8px;
  scrollbar-gutter: stable;
}
#album-grid::-webkit-scrollbar {
  width: 14px;
}
#album-grid::-webkit-scrollbar-track {
  margin: 6px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #d9c6f5, #ece2fb);
  box-shadow:
    inset 0 2px 4px rgba(61, 31, 110, 0.28),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.7);
}
#album-grid::-webkit-scrollbar-thumb {
  min-height: 44px;
  border-radius: 999px;
  border: 2.5px solid #fff;
  background: linear-gradient(180deg, #c58bff, #8a4fe0 55%, #ff7fc4);
  box-shadow: 0 2px 4px rgba(61, 31, 110, 0.35);
}
#album-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d39dff, #9a5ff0 55%, #ff92ce);
}
#album-grid::-webkit-scrollbar-button {
  display: none;
}
/* Firefox (não tem os pseudo-elementos acima): só as cores */
@supports not selector(::-webkit-scrollbar) {
  #album-grid {
    scrollbar-width: thin;
    scrollbar-color: #8a4fe0 #e3d4f8;
  }
}

/* ===== tela de fases: setas grandes nas laterais da janela, aviso de trancado embaixo ===== */
.panel.levels {
  position: relative;
}
.world-row {
  display: block;
}
.world-row #level-grid {
  width: 100%;
}
@media (max-width: 520px) {
  /* desfaz a grade com as setas embaixo */
  .panel.levels {
    width: calc((100vw - 64px) / var(--pk, 1));
  }
  .world-row {
    display: block;
  }
}
#s-levels .world-row > .round.arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 60px;
  height: 60px;
  margin-top: -30px;
  background: radial-gradient(circle at 35% 28%, #fffbe0 0 10%, #ffd84a 42%, #f5a316 85%, #e08a00);
  box-shadow:
    inset 0 -5px 0 rgba(150, 70, 0, 0.35),
    inset 0 0 0 3px rgba(255, 255, 255, 0.9),
    0 5px 0 rgba(140, 60, 0, 0.45),
    0 6px 14px rgba(60, 30, 110, 0.35);
}
#s-levels #world-prev {
  left: -60px;
}
#s-levels #world-next {
  right: -60px;
}
#s-levels .round.arrow b {
  font-size: 50px;
  line-height: 1;
  margin-top: -8px;
  color: #fff;
  -webkit-text-stroke: 3px #9a4a00;
  paint-order: stroke fill;
  font-weight: 700;
}
#s-levels #world-prev b {
  margin-left: -4px;
}
#s-levels #world-next b {
  margin-right: -4px;
}
#s-levels .round.arrow:disabled {
  filter: grayscale(1) brightness(1.15);
  opacity: 0.45;
}
/* sem as setas espremendo, as bolhas das fases crescem */
#level-grid {
  gap: 12px 14px;
}
.lv {
  font-size: 30px;
}
.lv.d3 {
  font-size: 23px;
}
@media (max-width: 520px) {
  #level-grid {
    gap: 10px;
  }
  .lv {
    font-size: 26px;
  }
  .lv.d3 {
    font-size: 19px;
  }
}
/* aviso de mundo trancado: pílula escura logo abaixo da janela (não ocupa espaço dentro dela) */
#world-lock {
  margin: 14px auto 0;
  padding: 7px 18px;
  border-radius: 999px;
  width: max-content;
  max-width: 90vw;
  text-align: center;
  font:
    700 16px Fredoka,
    system-ui;
  color: #fff;
  background: rgba(61, 31, 110, 0.9);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 4px 10px rgba(40, 20, 80, 0.35);
}
#world-lock::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  margin: 0 7px -2px 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='10' rx='2' fill='white'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3' stroke='white' stroke-width='2.6' fill='none'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
#s-levels.on {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@media (max-width: 520px) {
  .panel.levels {
    width: calc((100vw - 48px) / var(--pk, 1));
  }
  #s-levels .world-row > .round.arrow {
    width: 50px;
    height: 50px;
    margin-top: -25px;
  }
  #s-levels #world-prev {
    left: -55px;
  } /* centro da seta em cima da moldura (30 px), sem cobrir as bolhas */
  #s-levels #world-next {
    right: -55px;
  }
  #s-levels .round.arrow b {
    font-size: 42px;
    margin-top: -7px;
  }
}
@media (max-width: 520px) {
  /* moldura mais fina só aqui: sobra largura para as bolhas das fases */
  .panel.levels {
    border-width: 32px;
    border-image-width: 32px;
    width: calc((100vw - 40px) / var(--pk, 1));
  }
  #s-levels #world-prev {
    left: -60px;
  }
  #s-levels #world-next {
    right: -60px;
  }
  #level-grid {
    gap: 9px 8px;
  }
  .lv {
    font-size: 28px;
  }
  .lv.d3 {
    font-size: 21px;
  }
}
/* setas um pouco para fora da caixa: desktop fica toda fora; no celular quase toda */
#s-levels #world-prev {
  left: -122px;
}
#s-levels #world-next {
  right: -122px;
}
@media (max-width: 520px) {
  .panel.levels {
    width: calc((100vw - 76px) / var(--pk, 1));
  }
  #s-levels .world-row > .round.arrow {
    width: 46px;
    height: 46px;
    margin-top: -23px;
  }
  #s-levels .round.arrow b {
    font-size: 38px;
    margin-top: -6px;
  }
  #s-levels #world-prev {
    left: -76px;
  } /* 34 px fora da caixa, 12 em cima da moldura */
  #s-levels #world-next {
    right: -76px;
  }
}
@media (max-width: 520px) {
  /* celular: setas inteiras na tela, só encostando na moldura; cadeado menor para não tampar o número */
  .panel.levels {
    border-width: 26px;
    border-image-width: 26px;
    width: calc((100vw - 88px) / var(--pk, 1));
  }
  #s-levels .world-row > .round.arrow {
    width: 44px;
    height: 44px;
    margin-top: -22px;
  }
  #s-levels #world-prev {
    left: -66px;
  }
  #s-levels #world-next {
    right: -66px;
  }
  .lv[disabled]::after {
    width: 16px;
    height: 16px;
    right: -4px;
    bottom: -4px;
    background-size: 11px;
  }
}

/* ===== tela final: troféu saindo por cima da janela ===== */
.panel.end {
  width: min(92vw, 460px);
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  overflow: visible;
}
.panel.end .trophy {
  width: 200px;
  height: auto;
  margin: -190px auto -18px;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 8px 14px rgba(40, 15, 90, 0.45));
  animation:
    trophyIn 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both,
    trophyBob 2.6s 0.7s ease-in-out infinite;
}
@keyframes trophyIn {
  0% {
    transform: scale(0.2) rotate(-12deg);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
@keyframes trophyBob {
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}
body.reduced .panel.end .trophy {
  animation: none;
}
.panel.end .ribbon {
  margin-top: 0;
  z-index: 4;
}
.panel.end .end-text {
  margin: 0;
  font:
    700 22px Fredoka,
    system-ui;
  color: #3d1f6e;
  text-wrap: balance;
}
.panel.end .summary b {
  font-size: 24px;
}
.panel.end .summary span {
  min-width: 104px;
}
#end-tip {
  margin: 0;
  font-size: 15px;
  text-wrap: balance;
}
.panel.end .row {
  display: flex;
  gap: 10px;
  width: 100%;
}
.panel.end .row .btn.wide {
  flex: 1;
}

/* ===== abertura: "Toque para começar" verde (cor principal); Desafio laranja e Álbum azul, maiores ===== */
.btn.orange {
  background: linear-gradient(180deg, #ffd98a, #ffa23a 70%, #f0800f);
  -webkit-text-stroke-color: #8a3d00;
  text-shadow: 0 2px 0 rgba(120, 50, 0, 0.5);
}
.btn.blue {
  background: linear-gradient(180deg, #9fe3ff, #36abf0 70%, #1c87d2);
  -webkit-text-stroke-color: #0d4a7a;
  text-shadow: 0 2px 0 rgba(10, 60, 110, 0.5);
}
.title-row {
  width: min(84vw, 460px);
  gap: 12px;
}
.title-row .btn {
  flex: 1;
  font-size: clamp(19px, 2.8vh, 26px);
  padding: 14px 10px;
  white-space: nowrap;
}
.title-row #btn-daily {
  flex: 1.45;
}

/* ===== configurações: volume da música e dos efeitos (barra de arrastar no lugar do liga/desliga) ===== */
.setting.vol {
  cursor: default;
}
.setting.vol > span {
  flex: 0 0 auto;
  min-width: 4.6em;
}
.setting.vol input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 90px;
  height: 34px;
  margin: 0 6px 0 0;
  background: transparent;
  cursor: pointer;
}
.setting.vol input[type='range']::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #8a4fe0, #ff7fc4) 0 0 / var(--v, 100%) 100% no-repeat,
    #e3d4f8;
  box-shadow:
    inset 0 2px 3px rgba(61, 31, 110, 0.3),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.7);
}
.setting.vol input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -8px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #c58bff, #8a4fe0);
  box-shadow: 0 3px 5px rgba(61, 31, 110, 0.4);
}
.setting.vol input[type='range']::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background: #e3d4f8;
}
.setting.vol input[type='range']::-moz-range-progress {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a4fe0, #ff7fc4);
}
.setting.vol input[type='range']::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #8a4fe0;
}
.setting.vol input[type='range']:focus-visible {
  outline: 3px solid #ffd23f;
  outline-offset: 2px;
  border-radius: 999px;
}
.setting.vol input[type='range'] {
  position: static;
  opacity: 1;
  pointer-events: auto;
}
.setting.vol > span {
  min-width: 0;
}
.setting.vol input[type='range'] {
  flex: 1 1 55%;
  min-width: 120px;
  margin-right: 4px;
}

/* End of ui-arte2.css */
