[hidden] {
  display: none !important;
}
@font-face {
  font-family: Fredoka;
  font-weight: 600;
  src: url(assets/fonts/fredoka-latin-600-normal.woff2) format('woff2');
  font-display: swap;
}
@font-face {
  font-family: Fredoka;
  font-weight: 700;
  src: url(assets/fonts/fredoka-latin-700-normal.woff2) format('woff2');
  font-display: swap;
}

:root {
  --ink: #5b3b8c;
  --ink-soft: #7a5bb0;
  --panel: rgba(255, 248, 255, 0.96);
  --u: min(1vw, 1vh * 0.6);
  --flask: 76px;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}
body {
  font-family: Fredoka, system-ui, sans-serif;
  color: var(--ink);
  background: #c9b4f2 var(--bg-p, url(assets/art/mundo-1-retrato.webp)) center / cover no-repeat;
  transition: background-image 0.4s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
body.land {
  background-image: var(--bg-l, url(assets/art/mundo-1-paisagem.webp));
}
#shake {
  position: fixed;
  inset: 0;
}
#hud > *,
#flasks,
.panel,
#s-title > * {
  zoom: var(--k, 1);
}
#stage {
  position: absolute;
  inset: 0;
  touch-action: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  color: inherit;
}

/* ---- HUD ---- */
#hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(64px * var(--k, 1));
  padding: calc(10px * var(--k, 1)) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}
#hud > * {
  pointer-events: auto;
}
.round {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #e3d2ff 40%, #b58cff 100%);
  box-shadow:
    inset 0 -4px 0 rgba(91, 59, 140, 0.25),
    0 4px 10px rgba(91, 59, 140, 0.25);
  display: grid;
  place-items: center;
  transition: transform 0.12s;
}
.round:active {
  transform: translateY(2px) scale(0.96);
}
.ico-pause {
  width: 16px;
  height: 18px;
  border-left: 6px solid #fff;
  border-right: 6px solid #fff;
  filter: drop-shadow(0 1px 0 var(--ink));
}
#level-title {
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  background: rgba(181, 140, 255, 0.55);
  text-shadow: 0 2px 0 var(--ink);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}
#breaths {
  display: flex;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 20px;
  background: rgba(70, 40, 120, 0.45);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.breath {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #fff 0 14%,
    rgba(255, 255, 255, 0.25) 40%,
    rgba(120, 210, 255, 0.6) 100%
  ); /* sopro = bolha de ar */
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 8px rgba(190, 240, 255, 0.9);
  transition:
    transform 0.25s cubic-bezier(0.3, 1.8, 0.5, 1),
    opacity 0.25s;
}
.breath.off {
  background: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
  transform: scale(0.7);
  opacity: 0.6;
}
.breath.pop {
  animation: breathPop 0.45s ease-out;
}
.breath.back {
  animation: breathBack 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes breathPop {
  0% {
    transform: scale(1.5);
  }
  40% {
    transform: scale(0.4);
  }
  100% {
    transform: scale(0.7);
  }
}
@keyframes breathBack {
  0% {
    transform: scale(0.2);
  }
  100% {
    transform: scale(1);
  }
}

/* ---- Frascos ---- */
#flasks {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 8px;
  pointer-events: none;
  left: 8px;
  right: 8px;
  bottom: max(10px, env(safe-area-inset-bottom));
  justify-content: center;
}
body.land #flasks {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), 1fr);
  align-content: center;
  left: 10px;
  right: auto;
  top: var(--top, 74px);
  bottom: 10px;
  width: var(--fw, 140px);
  gap: 6px;
}
body.land .flask {
  flex-direction: row;
  padding: 5px 6px;
  gap: 6px;
}
body.land .flask .name {
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
}
.flask {
  --c: #b58cff;
  --fill: 0%;
  flex: 1 1 0;
  max-width: 150px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  /* cartão próprio: o frasco nunca some em cima das flores ou do céu */
  padding: 7px 5px 6px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 252, 255, 0.95), rgba(246, 236, 255, 0.92));
  box-shadow:
    inset 0 0 0 2.5px color-mix(in srgb, var(--c) 55%, #fff),
    0 6px 14px rgba(70, 40, 120, 0.28);
}
body.land .flask {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
}
.bottle {
  position: relative;
  width: min(66%, 64px);
  aspect-ratio: 1 / 1.05;
  border-radius: 38% 38% 30% 30%;
  background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--c) 22%, #fff));
  box-shadow:
    inset 0 0 0 2.5px color-mix(in srgb, var(--c) 75%, var(--ink)),
    inset 0 -6px 0 rgba(91, 59, 140, 0.08),
    0 3px 6px rgba(91, 59, 140, 0.2);
  overflow: hidden;
}
body.land .bottle {
  width: 40px;
  flex: 0 0 auto;
}
.bottle::before {
  /* bomba de sabão */
  content: '';
  position: absolute;
  left: 50%;
  top: -1px;
  width: 30%;
  height: 14%;
  transform: translateX(-50%);
  background: var(--c);
  border-radius: 0 0 6px 6px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
.liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c));
  transition: height 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.liquid::after {
  content: '';
  position: absolute;
  left: 12%;
  top: 3px;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}
.side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}
body.land .side {
  align-items: flex-start;
  flex: 1;
}
.dots {
  display: flex;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
}
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 75%, var(--ink));
  transition:
    background 0.2s,
    transform 0.2s;
}
.dots i.on {
  background: color-mix(in srgb, var(--c) 75%, var(--ink));
  box-shadow: inset 0 0 0 2px #fff;
}
.name {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 18%, #fff);
  font-weight: 700;
  font-size: var(--fs, 15px);
  line-height: 1.25;
  letter-spacing: 0.02em;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
}
.name b {
  display: inline-block;
  min-width: 0.62em;
  text-align: center;
  color: transparent;
  border-bottom: 2.5px solid rgba(91, 59, 140, 0.55);
}
.name b.on {
  color: var(--ink);
  border-color: transparent;
  min-width: 0;
  animation: letterPop 0.4s cubic-bezier(0.3, 1.8, 0.5, 1);
}
.name b.gap {
  border: 0;
  min-width: 0.35em;
}
@keyframes letterPop {
  0% {
    transform: scale(0.2) translateY(6px);
  }
  100% {
    transform: none;
  }
}
.flask.done .bottle {
  animation: flaskWiggle 0.6s ease-out;
  box-shadow:
    inset 0 0 0 2.5px #fff,
    0 0 18px var(--c);
}
.flask.done .name {
  background: var(--c);
}
.flask.done .name b.on {
  color: #fff;
  text-shadow: 0 1px 0 var(--ink);
}
@keyframes flaskWiggle {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.18, 0.88);
  }
  50% {
    transform: scale(0.92, 1.08);
  }
  75% {
    transform: scale(1.04, 0.97);
  }
  100% {
    transform: none;
  }
}

/* ---- Textos que sobem ---- */
#floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.float {
  position: absolute;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 88vw;
  text-align: center;
  font-weight: 700;
  color: #fff;
  font-size: 30px;
  text-shadow:
    0 3px 0 var(--ink),
    0 0 2px var(--ink),
    0 0 14px rgba(91, 59, 140, 0.6);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  animation: floatUp 1.1s ease-out forwards;
}
.float.small {
  font-size: 20px;
}
.float.big {
  font-size: 46px;
}
@keyframes floatUp {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
  }
  18% {
    transform: translate(-50%, -60%) scale(1.15);
    opacity: 1;
  }
  30% {
    transform: translate(-50%, -62%) scale(1);
  }
  75% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -110%) scale(1);
    opacity: 0;
  }
}

/* ---- Telas ---- */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 5;
  padding: 16px;
}
.screen.on {
  display: grid;
}
.modal {
  background: rgba(70, 40, 120, 0.28);
}
.modal.on .panel {
  animation: panelIn 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
}
@keyframes panelIn {
  0% {
    transform: scale(0.6) translateY(30px);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
.panel {
  width: min(92vw, 400px);
  padding: 22px 20px 20px;
  border-radius: 34px;
  text-align: center;
  background: var(--panel);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.9),
    0 10px 40px rgba(91, 59, 140, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.panel h2 {
  margin: 0;
  font-size: 32px;
  color: #fff;
  text-shadow: 0 3px 0 var(--ink);
  -webkit-text-stroke: 1.5px var(--ink);
}
.row {
  display: flex;
  gap: 10px;
}
.row > * {
  flex: 1;
}
.big,
.mid {
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 0 rgba(60, 30, 110, 0.6);
  background: linear-gradient(180deg, #d4b8ff, #a77cf5);
  box-shadow:
    inset 0 -5px 0 rgba(60, 30, 110, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    0 4px 10px rgba(91, 59, 140, 0.3);
  transition: transform 0.1s;
}
.big {
  font-size: 24px;
  padding: 14px 22px;
}
.row .big,
.row .mid {
  font-size: 19px;
  padding: 12px 10px;
  white-space: nowrap;
}
.gear {
  position: fixed;
  right: 16px;
  top: 16px;
}
.ico-gear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 6px dotted #fff;
  box-shadow: 0 0 0 2px rgba(91, 59, 140, 0.4);
}
.settings-mode .game-only {
  display: none;
}
.mid {
  font-size: 18px;
  padding: 11px 16px;
}
.big:active,
.mid:active {
  transform: translateY(3px);
  box-shadow: inset 0 -2px 0 rgba(60, 30, 110, 0.25);
}
.green {
  background: linear-gradient(180deg, #9cf06a, #4fc43a);
}
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  padding: 4px 8px;
}
.toggle input {
  width: 22px;
  height: 22px;
  accent-color: #a77cf5;
}
.note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

#s-title {
  align-content: center;
  gap: 18px;
}
.logo {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.9;
  font-size: clamp(56px, 16vmin, 120px);
  color: #fff;
  -webkit-text-stroke: 3px var(--ink);
  text-shadow:
    0 6px 0 var(--ink),
    0 0 30px rgba(255, 214, 245, 0.9);
}
.logo span:nth-child(1) {
  animation: bob 3s ease-in-out infinite;
}
.logo span:nth-child(2) {
  animation: bob 3s ease-in-out 0.4s infinite;
}
@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}
.sub {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
}
#btn-start {
  animation: none;
} /* sem o pulsar que esticava e espremia */
@keyframes breathe {
  50% {
    transform: scale(1.05);
  }
}

#level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.lv {
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, #e6d6ff 40%, #b58cff 100%);
  position: relative;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.8),
    0 3px 8px rgba(91, 59, 140, 0.25);
}
.lv[disabled] {
  filter: grayscale(0.8);
  opacity: 0.55;
  cursor: default;
}
.lv small {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  font-size: 11px;
  color: #f5b400;
  text-shadow: none;
  letter-spacing: -1px;
}

.stars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  height: 74px;
}
.stars i {
  width: 58px;
  height: 58px;
  display: block;
  opacity: 0.55;
  filter: grayscale(1) brightness(0.75);
  background: #ffd23f;
  clip-path: polygon(50% 2%, 63% 36%, 99% 38%, 71% 60%, 81% 96%, 50% 75%, 19% 96%, 29% 60%, 1% 38%, 37% 36%);
}
.stars i:nth-child(2) {
  width: 72px;
  height: 72px;
}
.stars i.on {
  opacity: 1;
  filter: none;
  animation: starIn 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes starIn {
  0% {
    transform: scale(2.2) rotate(-30deg);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
.label {
  margin: 0;
  font-weight: 700;
}
#win-themes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.chip {
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--c);
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 0 var(--ink);
}

/* Menos movimento: sem animações de CSS que se mexem */
body.reduced *,
body.reduced *::before,
body.reduced *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}

/* ---- Barra de dica: o nome do tema em letras grandes ---- */
#hint {
  --c: #b58cff;
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: calc(48px * var(--k, 1));
  padding: 6px 16px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 252, 255, 0.96), rgba(246, 236, 255, 0.94));
  box-shadow:
    inset 0 0 0 3px color-mix(in srgb, var(--c) 60%, #fff),
    0 6px 16px rgba(70, 40, 120, 0.28);
}
#hint.pop {
  animation: hintPop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes hintPop {
  0% {
    transform: scale(0.9);
  }
  100% {
    transform: none;
  }
}
.hint-dot {
  flex: 0 0 auto;
  width: calc(18px * var(--k, 1));
  height: calc(18px * var(--k, 1));
  border-radius: 50%;
  background: var(--c);
  box-shadow:
    inset 0 0 0 3px #fff,
    0 0 0 2px color-mix(in srgb, var(--c) 70%, var(--ink));
}
.hint-text {
  display: flex;
  gap: calc(6px * var(--k, 1));
  font-weight: 700;
  font-size: var(--hs, 28px);
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}
.hint-text b {
  display: inline-block;
  min-width: 0.8em;
  text-align: center;
  color: transparent;
  border-bottom: 4px solid rgba(91, 59, 140, 0.6);
  border-radius: 2px;
  line-height: 1.1;
}
.hint-text b.on {
  color: var(--ink);
  border-color: transparent;
  min-width: 0;
  animation: letterPop 0.4s cubic-bezier(0.3, 1.8, 0.5, 1);
}
.hint-text b.gap {
  border: 0;
  min-width: 0.3em;
}
.hint-text.msg {
  font-size: calc(17px * var(--k, 1));
  font-weight: 600;
  letter-spacing: 0;
  white-space: normal;
  text-align: center;
}

/* End of style.css */
