@font-face {
  font-family: 'Fredoka';
  src: url('../assets/fonts/fredoka-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --ink: #3a2416;
  --cream: #fff7e8;
  --panel: #fff3dc;
  --gold: #ffd43b;
  --sat: env(safe-area-inset-top);
  --sab: env(safe-area-inset-bottom);
  --sar: env(safe-area-inset-right);
  --sal: env(safe-area-inset-left);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #f6e7c8;
  font-family: 'Fredoka', system-ui, sans-serif;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
}
#game,
#fx {
  position: fixed;
  inset: 0;
  display: block;
}
#game {
  touch-action: none;
}
#fx {
  pointer-events: none;
  z-index: 5;
}
#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
#ui > * {
  pointer-events: auto;
  touch-action: manipulation;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
}

/* placar flutuante (como no protótipo): só os botões e pílulas pegam toque */
#top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: calc(var(--sat) + 10px) calc(var(--sar) + 10px) 6px calc(var(--sal) + 10px);
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
#top > * {
  pointer-events: auto;
}
.pill {
  background: var(--cream);
  border: 3.5px solid var(--ink);
  border-radius: 99px;
  padding: 5px 14px;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 4px 0 rgba(58, 36, 22, 0.35);
}
.lvl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
}
.lvl .stars {
  margin-left: 2px;
}
.lvl .stars {
  display: flex;
  gap: 1px;
}
.lvl .stars i {
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  color: #e2d3bb;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}
.lvl .stars i.on {
  color: var(--gold);
}
.round {
  position: relative;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gold);
  border: 3.5px solid var(--ink);
  box-shadow: 0 4px 0 #c78a1c;
  display: grid;
  place-items: center;
  transition: transform 0.12s;
}
.round:active {
  transform: translateY(3px) scale(0.95);
  box-shadow: 0 1px 0 #c78a1c;
}
.round svg {
  width: 26px;
  height: 26px;
  fill: var(--ink);
}
.round svg.mag {
  fill: #bfe9ff;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
}
.round svg.line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hintb {
  margin-left: auto;
}
.prog {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
}
.prog .bar {
  width: 52px;
  height: 14px;
  border: 2.5px solid var(--ink);
  border-radius: 99px;
  background: #eadbc2;
  overflow: hidden;
}
.prog .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(#8ce99a, #40c057);
  transition: width 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.lvl .stars i.lose {
  animation: lose 0.7s ease-in forwards;
  color: var(--gold);
}
@keyframes lose {
  30% {
    transform: translateY(-8px) scale(1.3);
  }
  100% {
    transform: translateY(26px) rotate(60deg) scale(0.6);
    opacity: 0;
  }
}
.pill {
  white-space: nowrap;
}
@media (max-width: 440px) {
  .prog .bar {
    width: 32px;
  }
  .prog {
    gap: 5px;
    padding: 5px 9px;
  }
  .pill {
    font-size: 16px;
    padding: 5px 9px;
  }
  .lvl {
    gap: 5px;
  }
  .lvl .stars i {
    font-size: 16px;
  }
  #top {
    gap: 6px;
  }
}
@media (max-width: 374px) {
  .prog .bar {
    display: none;
  }
}
@media (max-width: 360px) {
  .lvl .stars {
    display: none;
  }
}
/* balão de fala da raposa */
#say {
  position: absolute;
  left: 6px;
  bottom: calc(100% + 8px);
  max-width: min(240px, calc(100vw - 170px));
  background: #fff;
  border: 3.5px solid var(--ink);
  border-radius: 18px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  box-shadow: 0 4px 0 rgba(58, 36, 22, 0.3);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transform-origin: 0 100%;
  transition:
    opacity 0.18s,
    transform 0.25s cubic-bezier(0.2, 1.6, 0.4, 1);
  pointer-events: none;
}
#say::after {
  content: '';
  position: absolute;
  left: 46px;
  bottom: -12px;
  border: 9px solid transparent;
  border-top-color: var(--ink);
  border-bottom: 0;
}
#say.on {
  opacity: 1;
  transform: none;
}
#say.on.hush {
  opacity: 0;
}
.foxwrap {
  position: absolute;
  left: calc(var(--sal) + 6px);
  bottom: 0;
  pointer-events: none !important;
}
.foxwrap .bigfox {
  position: relative;
  left: 0;
  display: block;
}
.foxwrap #say {
  left: 30%;
  bottom: 96%;
  width: max-content;
  max-width: min(320px, 46vw);
}
#hand {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  pointer-events: none !important;
  filter: drop-shadow(0 3px 0 rgba(58, 36, 22, 0.3));
  z-index: 2;
}
#zbtns {
  position: absolute;
  right: calc(var(--sar) + 10px);
  top: calc(var(--sat) + 96px);
  opacity: 0.95;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.modal #zbtns,
body.modal #tray,
body.modal #panel,
body.modal .foxwrap {
  visibility: hidden;
}
#zbtns .round {
  width: 44px;
  height: 44px;
  background: var(--cream);
  box-shadow: 0 4px 0 #c9a77a;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.zb {
  font-weight: 700;
}
.zrow .zb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--gold);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
}
.round b {
  position: absolute;
  right: -7px;
  top: -7px;
  background: #69db7c;
  border: 2.5px solid var(--ink);
  border-radius: 99px;
  min-width: 24px;
  height: 24px;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.round.off {
  filter: grayscale(1) opacity(0.6);
}
.hintb.cost::before {
  content: '\2212\2605';
  position: absolute;
  left: -16px;
  top: 16px;
  background: #ffe3e3;
  border: 2.5px solid var(--ink);
  border-radius: 99px;
  padding: 0 5px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.round small {
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 99px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

/* bandeja em pé: painel arredondado flutuando, raposa à esquerda, grade de bichinhos */
#tray {
  position: absolute;
  left: calc(var(--sal) + 8px);
  right: calc(var(--sar) + 8px);
  max-width: 720px;
  margin-inline: auto;
  bottom: calc(var(--sab) + 8px);
  height: 132px;
  padding: 10px 10px 10px 112px;
  background: linear-gradient(#fff8ea, #f7e3bd);
  border: 4px solid var(--ink);
  border-radius: 26px;
  box-shadow: 0 6px 0 rgba(58, 36, 22, 0.35);
}
#tray #fox {
  position: absolute;
  left: -2px;
  bottom: 2px;
  width: 116px;
  transform-origin: 50% 100%;
  pointer-events: none;
}
#slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 66px));
  grid-auto-rows: minmax(0, 66px);
  justify-content: center;
  align-content: center;
  gap: 7px;
  height: 100%;
}
#tray .slot {
  min-width: 0;
}
#tray .slot canvas {
  width: min(50px, 88%);
  height: auto;
  aspect-ratio: 1;
}

.slot {
  position: relative;
  background: #fffdf7;
  border: 3px solid var(--ink);
  border-radius: 15px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 -4px 0 rgba(58, 36, 22, 0.12);
  transition: background 0.2s;
}
.slot canvas {
  width: 50px;
  height: 50px;
}

.slot.got {
  background: #d3f9d8 !important;
}
.slot.coming:not(.got) {
  box-shadow:
    0 0 0 4px #ffd43b,
    inset 0 -4px 0 rgba(58, 36, 22, 0.12);
  animation: coming 0.5s ease-in-out infinite alternate;
}
@keyframes coming {
  to {
    transform: scale(1.08);
  }
}
.slot.got::after {
  content: '✓';
  position: absolute;
  right: -7px;
  top: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #40c057;
  color: #fff;
  border: 2.5px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* deitado: painel "Find N Critters" à direita, raposa grande no canto */
body.land #top {
  right: calc(var(--sar) + 232px);
}
#panel {
  position: absolute;
  top: calc(var(--sat) + 10px);
  right: calc(var(--sar) + 10px);
  max-height: calc(100% - var(--sat) - var(--sab) - 20px);
  width: 212px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(#fff8ea, #f7e3bd);
  border: 4px solid var(--ink);
  border-radius: 26px;
  box-shadow: 0 6px 0 rgba(58, 36, 22, 0.35);
}
#panel .head {
  background: var(--gold);
  border: 3px solid var(--ink);
  border-radius: 99px;
  padding: 6px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 3px 0 #c78a1c;
}
#panel .head em {
  font-style: normal;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 99px;
  padding: 0 7px;
  margin-left: 4px;
  font-size: 15px;
}
#panel #slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 78px;
  height: auto;
  align-content: start;
}
#panel .slot canvas {
  width: 50px;
  height: 50px;
}
.zoom {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 6px 10px;
  text-align: center;
  font-weight: 700;
}
.zrow {
  display: flex;
  align-items: center;
  gap: 6px;
}
.zrow b {
  font-size: 22px;
  line-height: 1;
}
.zoom input {
  flex: 1;
  min-width: 0;
  width: 100%;
  accent-color: #40c057;
}
.bigfox {
  position: absolute;
  left: calc(var(--sal) + 6px);
  bottom: 0;
  width: clamp(130px, 19vw, 250px);
  transform-origin: 50% 100%;
  pointer-events: none !important;
  filter: drop-shadow(0 4px 0 rgba(58, 36, 22, 0.25));
}
@media (max-height: 500px) {
  body.land #top {
    right: calc(var(--sar) + 196px);
  }
  #panel {
    width: 176px;
    padding: 8px;
    gap: 6px;
  }
  #panel #slots {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 5px;
  }
  #panel .slot canvas {
    width: 36px;
    height: 36px;
  }
  #panel .head {
    font-size: 15px;
    padding: 3px 6px;
  }
  .zoom {
    padding: 3px 8px;
    font-size: 13px;
  }
  .bigfox {
    width: 110px;
  }
  .round {
    width: 44px;
    height: 44px;
  }
  .pill {
    font-size: 16px;
    padding: 3px 12px;
  }
}

/* telas */
.toast {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translateX(-50%);
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 18px;
  padding: 10px 22px;
  font-size: 24px;
  font-weight: 700;
  pointer-events: none !important;
  animation: toast 2.2s ease-out forwards;
  white-space: nowrap;
  box-shadow: 0 5px 0 rgba(58, 36, 22, 0.3);
}
@keyframes toast {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.8);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.05);
  }
  20% {
    transform: translate(-50%, 0) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}
.title {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  background: radial-gradient(circle at 50% 40%, #fff6dd, #f3c97f);
  cursor: pointer;
}
.title .logo {
  width: min(84vw, 480px, 44vh);
  animation: bob 2.6s ease-in-out infinite;
}
.title p.sub {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  background: var(--cream);
  border: 3.5px solid var(--ink);
  border-radius: 99px;
  padding: 6px 18px;
  box-shadow: 0 4px 0 rgba(58, 36, 22, 0.3);
}
.title .play {
  font-size: 34px;
  padding: 14px 64px;
}
.title .tfox {
  width: min(42vw, 210px, 26vh);
  margin-top: 4px;
  transform-origin: 50% 100%;
  animation: wave 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes wave {
  50% {
    transform: rotate(-4deg) translateY(-4px);
  }
}
.title .tsnd {
  position: absolute;
  top: calc(var(--sat) + 12px);
  right: calc(var(--sar) + 12px);
  font-size: 22px;
}
.title {
  justify-content: flex-start;
  padding-top: calc(var(--sat) + 9vh);
  gap: 14px;
}
@keyframes bob {
  50% {
    transform: translateY(-8px) rotate(-1deg);
  }
}
.big {
  background: #69db7c;
  border: 4px solid var(--ink);
  border-radius: 99px;
  padding: 12px 30px;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 6px 0 #2b8a3e;
}
.big:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #2b8a3e;
}
.big.alt {
  background: var(--cream);
  box-shadow: 0 6px 0 #c9a77a;
}
.win {
  position: fixed;
  inset: 0;
  z-index: 6;
  font-family: 'Fredoka', system-ui, sans-serif;
  background: rgba(58, 36, 22, 0.5);
  display: grid;
  place-items: center;
  animation: fade 0.25s;
}
.win .card {
  position: relative;
  width: min(88vw, 360px);
  background: var(--cream);
  border: 5px solid var(--ink);
  border-radius: 28px;
  padding: 72px 20px 24px;
  text-align: center;
  animation: popin 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.win h2 {
  margin: 0;
  font-size: 30px;
}
.win p {
  margin: 4px 0 10px;
  font-size: 17px;
}
.win .row {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.win .row .big {
  padding: 10px 12px;
  flex: 1;
  font-size: 19px;
}
.win .col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.wfox {
  position: absolute;
  width: 140px;
  left: 50%;
  top: -84px;
  margin-left: -70px;
}
.stars.big {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.stars.big span {
  font-size: 52px;
  color: #e9dcc6;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  animation: starpop 0.4s cubic-bezier(0.2, 1.8, 0.4, 1) both;
}
.stars.big span.on {
  color: var(--gold);
}
.albumgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
  max-height: 46vh;
  overflow-y: auto;
}
.pal {
  background: #fffdf7;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}
.pal canvas {
  width: 54px;
  height: 54px;
}
.pal.unknown canvas {
  filter: brightness(0) opacity(0.25);
}
.parade {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: -4px 0 12px;
  min-height: 40px;
}
.parade canvas {
  width: 40px;
  height: 40px;
  animation:
    hop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1) both,
    bob2 1.6s ease-in-out 1.2s infinite;
}
@keyframes hop {
  from {
    transform: translateY(30px) scale(0.3);
    opacity: 0;
  }
}
@keyframes bob2 {
  50% {
    transform: translateY(-5px);
  }
}
@media (max-height: 500px) {
  .win .card {
    padding-top: 50px;
    transform-origin: center;
  }
  .wfox {
    width: 100px;
    top: -60px;
    margin-left: -50px;
  }
  .stars.big span {
    font-size: 40px;
  }
  .win .col {
    gap: 8px;
  }
  .win .col .big {
    padding: 6px 20px;
    font-size: 18px;
  }
}
@keyframes starpop {
  from {
    transform: scale(0) rotate(-40deg);
  }
}
@keyframes popin {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* mapa de fases */
.map {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 246, 221, 0.6);
}
.maptop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--sat) + 10px) 14px 10px;
}
.maptop h2 {
  margin: 0;
  flex: 1;
  font-size: 28px;
  -webkit-text-stroke: 1px var(--ink);
  color: #fff;
  text-shadow: 0 3px 0 var(--ink);
}
.map .grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  grid-auto-rows: 104px;
  gap: 12px;
  padding: 6px 14px calc(var(--sab) + 20px);
  align-content: start;
}
.lv {
  position: relative;
  border-radius: 22px;
  border: 4px solid var(--ink);
  background-size: cover;
  background-position: center;
  box-shadow: 0 5px 0 rgba(58, 36, 22, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}
.lv .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.lv .bg.v1,
.lv .bg.v3 {
  transform: scaleX(-1);
}
.lv .bg.v2 {
  filter: sepia(0.35) saturate(1.3) hue-rotate(-12deg);
}
.lv .bg.v3 {
  filter: brightness(0.78) saturate(0.85) hue-rotate(25deg);
}
.lv[data-v]::after {
  content: attr(data-v);
  position: absolute;
  right: 6px;
  top: 4px;
  z-index: 2;
  font-size: 18px;
}
.lv::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 248, 234, 0.45);
}
.lv > b,
.lv > span {
  z-index: 2;
}
.lv > * {
  position: relative;
}
.lv b {
  font-size: 30px;
  color: #fff;
  -webkit-text-stroke: 1.5px var(--ink);
  text-shadow: 0 3px 0 var(--ink);
}
.lv span i {
  font-style: normal;
  font-size: 18px;
  color: #e2d3bb;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
}
.lv span i.on {
  color: var(--gold);
}
.lv.lock {
  filter: grayscale(0.55);
}
.lv.lock::before {
  background: rgba(120, 95, 70, 0.22);
}
.lv.lock b {
  font-size: 34px;
}
.albumb {
  cursor: pointer;
}
.lv .go {
  position: absolute;
  bottom: 6px;
  z-index: 2;
  font-style: normal;
  background: #69db7c;
  border: 2.5px solid var(--ink);
  border-radius: 99px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
}
.lv.cur {
  outline: 4px solid var(--gold);
  outline-offset: 2px;
  animation: cur 1.4s ease-in-out infinite;
}
@keyframes cur {
  50% {
    transform: scale(1.05);
  }
}
.title {
  background: radial-gradient(circle at 50% 42%, rgba(255, 246, 221, 0.92), rgba(243, 201, 127, 0.55) 75%);
}

/* ===== Rodada 6: acabamento do mockup (vale por cima das regras acima) ===== */
#fx {
  z-index: 7;
}
body.modal #tray,
body.modal #panel,
body.modal .foxwrap {
  visibility: visible;
  filter: brightness(0.75);
}
.pill {
  border-width: 4px;
  background: linear-gradient(#fffdf6, #f6e6c6);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.8),
    0 4px 0 rgba(58, 36, 22, 0.35);
}
.round {
  border-width: 4px;
  background: radial-gradient(circle at 35% 30%, #fff3a8, #ffd43b 45%, #f2b51c);
  box-shadow:
    inset 0 -3px 0 rgba(160, 90, 0, 0.25),
    0 4px 0 #b37714;
}
.round svg.mag {
  fill: #9ad8ff;
}
.big {
  background: linear-gradient(#a3e96b, #4cbf3a);
  border-width: 4px;
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.55),
    inset 0 -4px 0 rgba(30, 110, 20, 0.35),
    0 6px 0 #2b7a1e;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
}
.big.alt {
  background: linear-gradient(#fffdf6, #f3e0bd);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.8),
    0 6px 0 #b8925e;
}
.ribbon {
  position: relative;
  display: inline-block;
  margin: 0 0 6px;
  padding: 6px 30px;
  font-size: 26px;
  background: linear-gradient(#ffe680, #ffc928);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.6),
    0 4px 0 #b37714;
}
.ribbon::before,
.ribbon::after {
  content: '\1F343';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}
.ribbon::before {
  left: 4px;
}
.ribbon::after {
  right: 4px;
  transform: translateY(-50%) scaleX(-1);
}
.win .card {
  border-width: 5px;
  background: linear-gradient(#fffaf0, #f8e9cc);
  box-shadow: 0 8px 0 rgba(58, 36, 22, 0.35);
  padding-top: 92px;
}
.wfox {
  width: 170px;
  top: -112px;
  margin-left: -85px;
  filter: drop-shadow(0 0 18px rgba(255, 220, 120, 0.85));
}
.wincard .wfox {
  animation:
    foxjump 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both,
    bob2 1.4s ease-in-out 0.9s infinite;
}
@keyframes foxjump {
  from {
    transform: translateY(40px) scale(0.6);
    opacity: 0;
  }
}
.stars.big span.on {
  text-shadow: 0 0 14px rgba(255, 210, 60, 0.9);
}
.title {
  background: radial-gradient(circle at 50% 32%, rgba(255, 250, 230, 0.55), rgba(255, 240, 200, 0) 62%);
}
.title .logo {
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.9)) drop-shadow(0 6px 0 rgba(58, 36, 22, 0.25));
}
.title p.sub::before {
  content: '\1F343  ';
}
.title p.sub::after {
  content: '  \1F343';
}
.title .play {
  padding: 14px 72px;
  font-size: 36px;
}
/* bandeja maior, fox maior, divisória e checks grandes */
#tray {
  height: 148px;
  padding-left: 128px;
  border-width: 5px;
  background: linear-gradient(#fffaf0, #f6e2bb);
}
#tray::before {
  content: '';
  position: absolute;
  left: 120px;
  top: 14px;
  bottom: 14px;
  border-left: 3px dashed rgba(58, 36, 22, 0.3);
}
#tray #fox {
  width: 132px;
  left: -6px;
}
#slots {
  grid-template-columns: repeat(4, minmax(0, 70px));
  grid-auto-rows: minmax(0, 62px);
  gap: 8px;
}
.slot {
  border-radius: 16px;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(58, 36, 22, 0.14);
}
.slot.got::after {
  width: 26px;
  height: 26px;
  font-size: 15px;
  right: -8px;
  top: -8px;
  box-shadow: 0 2px 0 rgba(58, 36, 22, 0.4);
}
.slot.coming:not(.got) {
  box-shadow:
    0 0 0 5px #ffd43b,
    0 0 18px 6px rgba(255, 212, 59, 0.8);
}
#zbtns {
  top: auto;
  bottom: calc(var(--sab) + 172px);
}
.prog .bar {
  height: 16px;
  background: #e8d5b0;
}
.prog .bar i {
  background: linear-gradient(#b2f27a, #40c057);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
/* mapa: cabeçalho e cartões creme com figura da cena */
.maphead {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: calc(var(--sat) + 8px);
  gap: 4px;
}
.maphead img {
  height: 76px;
  filter: drop-shadow(0 4px 0 rgba(58, 36, 22, 0.25));
}
.maphead .mfox {
  height: 84px;
}
.maptop {
  padding-top: 6px;
}
.maptop h2 {
  font-size: 26px;
}
.map .grid {
  grid-auto-rows: 132px;
  gap: 14px;
}
.lv {
  background: linear-gradient(#fffaf0, #f3e0bd);
  border-width: 4px;
  justify-content: flex-end;
  padding-bottom: 8px;
}
.lv::before {
  display: none;
}
.lv .bg {
  inset: 7px 7px 34px 7px;
  border-radius: 14px;
  border: 3px solid var(--ink);
}
.lv > b {
  position: absolute;
  top: 30px;
  font-size: 34px;
}
.lv > span {
  margin-bottom: 2px;
}
.lv span i {
  font-size: 20px;
}
.lv.lock {
  filter: none;
}
.lv.lock .bg {
  filter: grayscale(0.7) brightness(0.85);
}
.lv .go {
  bottom: 40px;
  background: linear-gradient(#a3e96b, #4cbf3a);
  font-size: 15px;
  padding: 1px 12px;
}
.lv[data-v]::after {
  top: 10px;
  right: 10px;
}
/* álbum 5x2 com células cor de areia */
.albumgrid {
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.pal {
  background: #f6e3c0;
  padding: 5px 1px;
  font-size: 11px;
  border-radius: 14px;
}
.pal canvas {
  width: 46px;
  height: 46px;
}
/* deitado: HUD e fichas maiores, vitória larga */
body.land .pill {
  font-size: 20px;
  padding: 6px 16px;
}
body.land .round {
  width: 56px;
  height: 56px;
}
#panel {
  width: 236px;
  border-width: 5px;
  background: linear-gradient(#fffaf0, #f6e2bb);
}
body.land #top {
  right: calc(var(--sar) + 256px);
}
#panel #slots {
  grid-auto-rows: 84px;
  gap: 10px;
}
#panel .slot canvas {
  width: 58px;
  height: 58px;
}
.zoom input {
  accent-color: #4cbf3a;
  height: 8px;
}
.bigfox {
  width: clamp(150px, 22vw, 290px);
}
body.land .wincard .card {
  width: min(92vw, 640px);
}
body.land .wincard .row .big,
body.land .wincard .col > .big {
  font-size: 22px;
}
@media (max-height: 500px) {
  #panel {
    width: 190px;
  }
  body.land #top {
    right: calc(var(--sar) + 206px);
  }
  #panel #slots {
    grid-auto-rows: 1fr;
  }
  #panel .slot canvas {
    width: 38px;
    height: 38px;
  }
  body.land .round {
    width: 46px;
    height: 46px;
  }
  body.land .pill {
    font-size: 16px;
    padding: 4px 11px;
  }
  .win .card {
    padding-top: 64px;
  }
  .wfox {
    width: 110px;
    top: -70px;
    margin-left: -55px;
  }
}
@media (max-width: 380px) {
  #tray {
    padding-left: 112px;
  }
  #tray::before {
    left: 106px;
  }
  #tray #fox {
    width: 116px;
  }
}

.title .tfox {
  width: min(56vw, 290px, 31vh);
}
.parade canvas {
  width: 54px;
  height: 54px;
}
.wincard .stars.big span {
  font-size: 62px;
}

/* ===== Rodada 7: tipografia dos botões, vitória, mapa, HUD e bandeja ===== */
.big {
  color: #fff;
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
  letter-spacing: 0.5px;
}
.big.alt {
  color: var(--ink);
  -webkit-text-stroke: 0;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}
.big::after {
  content: '';
}
.win .col > .big:first-child {
  font-size: 32px;
  padding: 12px 20px;
}
.title .play {
  font-size: 40px;
  -webkit-text-stroke: 7px var(--ink);
}
.ribbon {
  font-size: 28px;
  padding: 8px 34px;
  margin-top: -8px;
}
.wfox {
  width: 210px;
  top: -150px;
  margin-left: -105px;
}
.win .card {
  padding-top: 70px;
  margin-top: 90px;
}
.win .card::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -120px;
  width: 300px;
  height: 240px;
  margin-left: -150px;
  background: radial-gradient(closest-side, rgba(255, 226, 120, 0.95), rgba(255, 226, 120, 0));
  pointer-events: none;
}
.stars.big {
  position: relative;
}
.wincard .stars.big span {
  position: relative;
  font-size: 66px;
  filter: drop-shadow(0 0 10px rgba(255, 210, 60, 0.9));
}
.wincard .stars.big span.on::before {
  content: '';
  position: absolute;
  inset: -14px;
  background: repeating-conic-gradient(rgba(255, 214, 60, 0.55) 0 8deg, transparent 8deg 30deg);
  border-radius: 50%;
  mask: radial-gradient(circle, transparent 42%, #000 44%, #000 70%, transparent 72%);
  -webkit-mask: radial-gradient(circle, transparent 42%, #000 44%, #000 70%, transparent 72%);
  z-index: -1;
}
.parade {
  background: linear-gradient(transparent 62%, #8fd16a 62%, #6fbf4a);
  border-radius: 0 0 22px 22px;
  padding: 4px 8px 6px;
  margin: 2px -6px 14px;
}
.parade canvas {
  width: 58px;
  height: 58px;
}
.wincard p {
  font-size: 19px;
  font-weight: 700;
}
.wlogo {
  position: absolute;
  top: 4%;
  left: 50%;
  width: min(30vw, 300px);
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 0 rgba(58, 36, 22, 0.3));
}
body.land .wincard .card {
  margin-top: 140px;
}
/* HUD mais encorpado */
.pill {
  font-size: 18px;
  font-weight: 700;
  border-width: 4px;
}
.lvl .stars i {
  font-size: 21px;
  -webkit-text-stroke: 2.5px var(--ink);
}
.round {
  width: 54px;
  height: 54px;
}
.round svg {
  width: 30px;
  height: 30px;
}
.round b {
  min-width: 26px;
  height: 26px;
  font-size: 15px;
}
@media (max-width: 440px) {
  .round {
    width: 50px;
    height: 50px;
  }
  .lvl .stars i {
    font-size: 18px;
  }
  .pill {
    font-size: 16px;
  }
}
/* bandeja: fichas creme, ícones grandes, raposa grande saindo da borda, contagem no topo */
.slot {
  background: linear-gradient(#fffdf7, #f8ecd4) !important;
}
.slot.got {
  background: linear-gradient(#e6fbe8, #c3f0c8) !important;
}
#slots {
  grid-template-columns: repeat(4, minmax(0, 72px));
}
#tray .slot canvas {
  width: min(56px, 90%);
}
#tray #fox {
  width: 150px;
  left: -10px;
  bottom: 6px;
}
.tcount {
  position: absolute;
  left: 50%;
  top: -20px;
  transform: translateX(-50%);
  background: linear-gradient(#a3e96b, #4cbf3a);
  color: #fff;
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  border: 3.5px solid var(--ink);
  border-radius: 99px;
  padding: 0 16px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 3px 0 #2b7a1e;
}
body.land .tcount {
  display: none;
}
/* balão de fala mais forte */
#say {
  border-width: 4px;
  font-size: 17px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 20px;
  box-shadow: 0 5px 0 rgba(58, 36, 22, 0.35);
}
#say::after {
  border-width: 11px;
  bottom: -14px;
}
/* mapa: cartões maiores, cadeado grande, fase atual em destaque */
.maphead img {
  height: 96px;
}
.maphead .mfox {
  height: 104px;
}
.map .grid {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 158px;
  gap: 14px;
  padding: 8px 16px calc(var(--sab) + 24px);
}
@media (min-width: 600px) {
  .map .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
.lv {
  border-radius: 24px;
}
.lv .bg {
  inset: 8px 8px 36px 8px;
  border-radius: 16px;
}
.lv > b {
  top: auto;
  bottom: 34px;
  font-size: 38px;
  -webkit-text-stroke: 2px var(--ink);
}
.lv.lock > b {
  font-size: 46px;
  -webkit-text-stroke: 0;
  text-shadow: 0 3px 0 rgba(58, 36, 22, 0.4);
  bottom: 46px;
}
.lv span i {
  font-size: 22px;
}
.lv.cur {
  transform-origin: center;
  outline: 5px solid #ffd43b;
  box-shadow:
    0 0 20px 4px rgba(255, 212, 59, 0.8),
    0 5px 0 rgba(58, 36, 22, 0.4);
}
.lv .go {
  bottom: 36px;
  font-size: 17px;
  color: #fff;
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
}
.lv.cur > b {
  bottom: 66px;
}
.lv[data-v]::after {
  font-size: 20px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  line-height: 1;
}
/* pausa e álbum: raposa sobre a faixa, com brilho */
.win .card .wfox + .ribbon {
  margin-top: -18px;
}

.ribbon {
  white-space: nowrap;
  font-size: clamp(20px, 6.4vw, 28px);
  padding: 8px 32px;
}

/* ===== Rodada 8: HUD maior, bandeja com raposa saindo, vitória e mapa ===== */
#top {
  padding-left: calc(var(--sal) + 8px);
  padding-right: calc(var(--sar) + 8px);
  gap: 6px;
}
.round {
  width: 58px;
  height: 58px;
  border-width: 4.5px;
}
.round svg {
  width: 32px;
  height: 32px;
}
.pill {
  font-size: 20px;
  padding: 6px 14px;
  border-width: 4.5px;
}
.lvl .stars i {
  font-size: 23px;
}
.prog .bar {
  width: 58px;
  height: 18px;
  border-width: 3px;
}
.round small {
  font-size: 13px;
  bottom: -17px;
  padding: 0 8px;
  border-width: 2.5px;
}
@media (max-width: 440px) {
  .round {
    width: 13.4vw;
    height: 13.4vw;
    max-width: 56px;
    max-height: 56px;
  }
  .pill {
    font-size: 4.3vw;
    padding: 1.2vw 2.8vw;
  }
  .lvl .stars i {
    font-size: 4.6vw;
  }
  .prog .bar {
    width: 10vw;
    height: 4vw;
  }
  #top {
    gap: 1.4vw;
  }
}
#tray {
  height: 156px;
  padding-left: 132px;
  padding-top: 30px;
}
#tray::before {
  display: none;
}
#tray #fox {
  width: 172px;
  left: -18px;
  bottom: 0;
}
.tcount {
  left: auto;
  right: 14px;
  top: 6px;
  transform: none;
  font-size: 15px;
  padding: 0 12px;
}
#slots {
  grid-auto-rows: minmax(0, 58px);
}
@media (max-width: 380px) {
  #tray {
    padding-left: 118px;
  }
  #tray #fox {
    width: 150px;
  }
}
#zbtns {
  bottom: calc(var(--sab) + 180px);
}
/* vitória: sem faixa verde; bichinhos com sombrinha; botões grandes com ícone */
.parade {
  background: none;
  margin: 4px 0 14px;
  padding: 0;
}
.parade canvas {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 5px 0 rgba(58, 36, 22, 0.18));
}
.win .col > .big:first-child {
  font-size: 36px;
  padding: 14px 20px;
}
.win .row .big {
  font-size: 22px;
  padding: 12px 10px;
}
.win .card {
  border-width: 6px;
}
.ribbon::before {
  content: '\2728\1F343';
  left: -6px;
}
.ribbon::after {
  content: '\1F343\2728';
  right: -6px;
}
.ribbon {
  padding: 8px 42px;
}
body.land .wincard .card {
  width: min(94vw, 720px);
  margin-top: 170px;
}
body.land .wincard .wfox {
  top: -165px;
}
body.land .wlogo {
  top: 2%;
  width: min(24vw, 240px);
}
/* abertura: engrenagem e alto-falante dourados nos cantos, folhagem no balcão */
.title .tsnd,
.title .tgear {
  position: absolute;
  top: calc(var(--sat) + 12px);
  font-size: 0;
}
.title .tgear {
  left: calc(var(--sal) + 12px);
  right: auto;
}
.title .tsnd {
  right: calc(var(--sar) + 12px);
}
/* mapa: painel creme por trás dos cartões */
.mappanel {
  flex: 1;
  min-height: 0;
  display: flex;
  margin: 0 10px calc(var(--sab) + 10px);
  background: linear-gradient(#fffaf0, #f6e2bb);
  border: 5px solid var(--ink);
  border-radius: 30px;
  box-shadow: 0 6px 0 rgba(58, 36, 22, 0.3);
  overflow: hidden;
}
.mappanel .grid {
  padding: 14px 12px 18px;
}
.lv {
  background: linear-gradient(#fffdf7, #f8ecd4);
}
.lv span i {
  font-size: 24px;
}
.win {
  background: rgba(58, 36, 22, 0.62);
}

/* rodada 9: mapa com cartões mais quadrados; vitória deitada com 3 botões lado a lado; pílulas em negrito */
.map .grid {
  grid-auto-rows: 136px;
}
.lv .bg {
  inset: 7px 7px 32px 7px;
}
.lv > b {
  bottom: 30px;
  font-size: 36px;
}
.lv.cur > b {
  bottom: 58px;
}
.lv .go {
  bottom: 32px;
}
.pill,
.round small,
.tcount {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.pill span,
#count {
  font-weight: 700;
}
body.land .wincard .col {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
body.land .wincard .row {
  display: contents;
}
body.land .wincard #again {
  order: 1;
  flex: 1;
}
body.land .wincard #next {
  order: 2;
  flex: 1.3;
  font-size: 30px;
}
body.land .wincard #map {
  order: 3;
  flex: 1;
}
body.land .wincard .parade canvas {
  width: 64px;
  height: 64px;
}

/* rodada 10: bandeja baixa, mapa claro, janelas redondas, painel deitado maior, raios atrás do logo */
#tray {
  height: 128px;
  padding-top: 12px;
}
#tray #fox {
  width: 150px;
  left: -14px;
}
#slots {
  grid-auto-rows: minmax(0, 56px);
}
.tcount {
  display: none;
}
#zbtns {
  bottom: calc(var(--sab) + 150px);
}
.lv {
  border-width: 3px;
}
.lv .bg {
  inset: 5px 5px 30px 5px;
  border-width: 2.5px;
}
.lv.lock .bg {
  filter: grayscale(0.45) brightness(0.97);
}
.lv.lock::before {
  display: block;
  background: rgba(255, 255, 255, 0.18);
}
.win .card {
  border-radius: 38px;
}
.ribbon {
  border-radius: 22px;
  padding: 8px 46px;
}
body.land #panel {
  width: 250px;
}
body.land #top {
  right: calc(var(--sar) + 270px);
}
#panel .head {
  font-size: 21px;
  padding: 8px 10px;
}
.title .logo {
  position: relative;
}
.title::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--sat) + 9vh + 20vh);
  width: 130vmin;
  height: 130vmin;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.28) 0 7deg, transparent 7deg 20deg);
  mask: radial-gradient(circle, #000 0, #000 22%, transparent 55%);
  -webkit-mask: radial-gradient(circle, #000 0, #000 22%, transparent 55%);
  animation: spin 40s linear infinite;
  pointer-events: none;
}
@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@media (max-height: 500px) {
  body.land #panel {
    width: 196px;
  }
  body.land #top {
    right: calc(var(--sar) + 212px);
  }
}

/* rodada 11: confete atrás das janelas, estrelas da vitória douradas, deitado maior */
#fx {
  z-index: 5;
}
.wincard .stars.big span.on {
  color: #ffcf1f;
  filter: drop-shadow(0 0 12px rgba(255, 200, 40, 1));
}
.wincard .stars.big span {
  animation-duration: 0.35s;
}
.wfox.small {
  width: 150px;
  top: -100px;
  margin-left: -75px;
}
.lv.lock .bg {
  filter: grayscale(0.85) brightness(0.95);
}
#tray {
  height: 138px;
}
#tray #fox {
  width: 162px;
}
#slots {
  grid-auto-rows: minmax(0, 60px);
}
body.land .round {
  width: 64px;
  height: 64px;
}
body.land .round svg {
  width: 36px;
  height: 36px;
}
body.land .pill {
  font-size: 24px;
  padding: 7px 18px;
}
body.land .lvl .stars i {
  font-size: 26px;
}
body.land .prog .bar {
  width: 70px;
  height: 20px;
}
body.land #panel {
  width: 270px;
}
body.land #top {
  right: calc(var(--sar) + 290px);
}
body.land #panel #slots {
  grid-auto-rows: 92px;
}
body.land #panel .slot canvas {
  width: 64px;
  height: 64px;
}
body.land .wincard .card {
  margin-top: 120px;
  padding-top: 60px;
}
body.land .wincard .wfox {
  width: 170px;
  top: -128px;
  margin-left: -85px;
}
body.land .wincard .parade canvas {
  width: 54px;
  height: 54px;
}
body.land .wincard .stars.big span {
  font-size: 54px;
}
@media (max-height: 500px) {
  body.land .round {
    width: 46px;
    height: 46px;
  }
  body.land .pill {
    font-size: 16px;
    padding: 4px 11px;
  }
  body.land #panel {
    width: 196px;
  }
  body.land #top {
    right: calc(var(--sar) + 212px);
  }
  body.land #panel #slots {
    grid-auto-rows: 1fr;
  }
  body.land #panel .slot canvas {
    width: 38px;
    height: 38px;
  }
}

body.land .wlogo {
  top: 3%;
  left: 2%;
  transform: none;
  width: min(20vw, 220px);
}
body.land .wincard .ribbon {
  font-size: 32px;
}
body.land .wincard .stars.big span {
  font-size: 64px;
}
body.land .wincard .parade canvas {
  width: 66px;
  height: 66px;
}
body.land .wincard p {
  font-size: 21px;
}

/* rodada 12: cores vivas (menos véu), raposa com contorno de adesivo, faixas com guirlanda, grade 3x2 */
.map {
  background: rgba(255, 246, 221, 0.18);
}
.title {
  background: radial-gradient(circle at 50% 30%, rgba(255, 250, 230, 0.35), rgba(255, 240, 200, 0) 55%);
}
.wfox {
  filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff)
    drop-shadow(0 0 22px rgba(255, 220, 120, 0.95));
}
.ribbon::before {
  content: '\1F33C\1F343';
}
.ribbon::after {
  content: '\1F343\1F33C';
}
#slots.c3 {
  grid-template-columns: repeat(3, minmax(0, 70px));
}
.qmark {
  position: absolute;
  left: 50%;
  top: -150px;
  margin-left: 58px;
  font-size: 44px;
  color: #ffd43b;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  animation: bob2 1.2s ease-in-out infinite;
}
.hintb.cost::before {
  content: '\2212\2605';
  background: linear-gradient(#ff8787, #fa5252);
  color: #fff;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}
#say {
  font-size: 18px;
}

/* rodada 13: moita no topo das janelas (a raposa fica atrás), desfile sobre tábua, álbum com ícones maiores */
.win .card .moita {
  position: absolute;
  left: 50%;
  top: -46px;
  width: 112%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}
.win .card .ribbon {
  position: relative;
  z-index: 2;
}
.wfox {
  z-index: 0;
}
.parade {
  position: relative;
  padding: 0 10px;
  margin: 6px 0 22px;
}
.parade::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 16px;
  background: linear-gradient(#e0a868, #c98b4e);
  border: 3.5px solid var(--ink);
  border-radius: 8px;
  z-index: 0;
}
.parade canvas {
  position: relative;
  z-index: 1;
  margin-bottom: -6px;
}
.pal canvas {
  width: 56px;
  height: 56px;
}
.pal {
  font-size: 12px;
}
#aclose {
  font-size: 28px;
  padding: 10px 20px;
  align-self: center;
  min-width: 60%;
}

.wfox {
  top: -182px;
}
.wfox.small {
  top: -126px;
}
body.land .wincard .wfox {
  top: -150px;
}
.qmark {
  top: -178px;
}
@media (max-height: 500px) {
  .wfox {
    top: -92px;
  }
}

.win .card .moita {
  top: -30px;
}
.wfox {
  top: -196px;
}
.wfox.small {
  top: -136px;
}
.qmark {
  top: -190px;
}

/* rodada 14: álbum cabe inteiro; moita e raposa proporcionais na vitória deitada */
.albumgrid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow-x: hidden;
}
.pal {
  min-width: 0;
}
.pal canvas {
  width: min(56px, 92%);
  height: auto;
  aspect-ratio: 1;
}
.pal span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.win .card .moita {
  max-width: 560px;
}
body.land .wincard .wfox {
  width: 220px;
  margin-left: -110px;
  top: -196px;
}
body.land .wincard .card {
  margin-top: 190px;
}

/* rodada 15: vitória sem placar atrás, glória atrás da raposa, álbum com nome inteiro */
body:has(.wincard) #top,
body:has(.wincard) #panel,
body:has(.wincard) #tray,
body:has(.wincard) #zbtns {
  visibility: hidden;
}
.wincard .wfox {
  filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff)
    drop-shadow(0 0 40px rgba(255, 214, 60, 1));
}
.wincard .card::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -150px;
  width: 420px;
  height: 420px;
  margin-left: -210px;
  z-index: -1;
  pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 236, 140, 0.55) 0 10deg, rgba(255, 236, 140, 0) 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%);
  mask: radial-gradient(circle, #000 25%, transparent 68%);
  animation: spin2 18s linear infinite;
}
@keyframes spin2 {
  to {
    transform: rotate(360deg);
  }
}
.parade canvas {
  width: 70px;
  height: 70px;
}
.wincard p {
  font-size: 20px;
}
.pal {
  position: relative;
}
.pal span {
  font-size: 11.5px;
  overflow: visible;
  text-overflow: clip;
}
.palx {
  position: absolute;
  top: -6px;
  right: -4px;
  background: #ffd43b;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  font-size: 11px;
  padding: 0 5px;
  line-height: 16px;
}

/* rodada 15b: desfile numa linha só; brilho girando atrás da raposa visível */
.wincard .parade {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
}
.wincard .parade canvas {
  width: min(68px, calc((100% - 30px) / var(--n, 4)));
  height: auto;
  aspect-ratio: 1;
}
.wincard .card::before {
  top: -330px;
  width: 460px;
  height: 460px;
  margin-left: -230px;
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 60%);
  mask: radial-gradient(circle, #000 20%, transparent 60%);
  z-index: 0;
  background: repeating-conic-gradient(rgba(255, 226, 90, 0.9) 0 9deg, rgba(255, 226, 90, 0) 9deg 24deg);
}
.wincard .card > * {
  position: relative;
  z-index: 1;
}
.wincard .card > .wfox,
.wincard .card > .moita,
.wincard .card > .qmark {
  position: absolute;
}

/* rodada 15c: balão centrado e maior, bichinhos enchendo os quadrinhos */
#say {
  text-align: center;
  font-size: 20px;
  line-height: 1.15;
}
#tray .slot canvas {
  width: 86%;
}
@media (max-width: 380px) {
  #say {
    font-size: 17px;
  }
}

/* rodada 16: deitado com bichinhos enchendo os quadrinhos e HUD maior no desktop */
body.land #panel .slot canvas {
  width: 82% !important;
  height: auto !important;
  aspect-ratio: 1;
}
@media (min-width: 1000px) and (min-height: 600px) {
  body.land .round {
    width: 74px;
    height: 74px;
  }
  body.land .round svg {
    width: 42px;
    height: 42px;
  }
  body.land .pill {
    font-size: 28px;
    padding: 8px 20px;
  }
  body.land .lvl .stars i {
    font-size: 30px;
  }
  body.land .prog .bar {
    width: 90px;
    height: 22px;
  }
}
/* mapa: cartões com contorno mais macio, como no mockup */
.lv {
  border-color: #6b4423;
}

/* rodada 16: tablet em pé com painel abaixo do placar, janelas com fundo desfocado, mapa e álbum */
@media (orientation: portrait) {
  body.land #top {
    right: calc(var(--sar) + 8px);
  }
  body.land #panel {
    top: calc(var(--sat) + 104px);
    max-height: calc(100% - var(--sat) - var(--sab) - 120px);
  }
}
body:has(.wincard) .foxwrap {
  visibility: hidden;
}
.win {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.maptop h2 {
  background: linear-gradient(#fffaf0, #f6e2bb);
  border: 4px solid var(--ink);
  border-radius: 999px;
  padding: 2px 16px;
  color: var(--ink);
  -webkit-text-stroke: 0;
  text-shadow: none;
}
.lv.lock b {
  font-size: 26px;
}
.pal span {
  font-size: 10.5px;
  letter-spacing: -0.2px;
}

/* rodada 17: pausa e vitória com títulos e botões maiores, mapa cabendo, barra sempre verde */
.ribbon::before,
.ribbon::after {
  content: none !important;
}
.ribbon {
  font-size: clamp(26px, 8.4vw, 36px) !important;
  padding: 6px 30px !important;
}
.win .col .big.alt {
  font-size: 24px;
  min-height: 56px;
}
.big.snd svg {
  width: 30px;
  height: 30px;
  vertical-align: -6px;
  fill: var(--ink);
}
.win .card .moita + .ribbon {
  margin-top: -26px;
}
.win {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.wincard .stars.big span {
  font-size: 74px;
}
.maptop h2 {
  flex: 0 1 auto;
  margin-right: auto;
}
@media (max-width: 440px) {
  .maptop {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .maptop h2 {
    font-size: 20px;
    padding: 2px 10px;
  }
  .maptop .pill {
    font-size: 15px;
    padding: 4px 9px;
  }
  .maptop .round {
    width: 46px;
    height: 46px;
  }
}
.prog .bar i {
  min-width: 10%;
}
.win .card:has(.albumgrid) {
  width: min(94vw, 430px);
}
.pal span {
  font-size: 12px;
}
body.land .wincard .ribbon {
  font-size: 40px !important;
}
body.land .wincard .stars.big span {
  font-size: 70px;
}
body.land .wincard .parade canvas {
  width: 60px;
}
body.land .wincard .big {
  min-height: 62px;
  font-size: 26px;
}

.win .card .qmark + .ribbon {
  margin-top: -30px;
}
.win .card {
  padding-top: 74px;
}

/* rodada 18: desfile sem prateleira (bichinhos espiando pela borda, como no mockup) */
.wincard .parade::after {
  display: none;
}
.wincard .parade {
  border-bottom: 4px solid var(--ink);
  padding-bottom: 0;
  margin-bottom: 18px;
}
.wincard .parade canvas {
  margin-bottom: -2px;
}

/* ===== Palco com a proporção do mockup: tudo escala por igual (nada deforma) ===== */
:root {
  --f: min(1vw, calc(var(--vh, 100vh) * 898 / 1751 / 100));
  --fh: calc(var(--f) * 1751 / 898);
  --g: min(1vw, calc(var(--vh, 100vh) * 1672 / 941 / 100));
  --gh: calc(var(--g) * 941 / 1672);
}
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(100vw, calc(var(--vh, 100vh) * 898 / 1751));
  aspect-ratio: 898 / 1751;
  container-type: size;
  pointer-events: none;
}
.stage > * {
  pointer-events: auto;
}
.stage.l {
  width: min(100vw, calc(var(--vh, 100vh) * 1672 / 941));
  aspect-ratio: 1672 / 941;
}
.stage.b {
  top: auto;
  bottom: 0;
  transform: translateX(-50%);
}
.title.lay,
.map.lay {
  position: absolute;
  inset: 0;
}
/* ===== Fidelidade ao mockup (07/11): telas montadas em % da tela pelo inventário ===== */
.win.lay {
  display: block;
  padding: 0;
}
.win.lay .pc {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.win.lay .pc > img {
  width: 100%;
  height: auto;
  display: block;
}
.win.wv {
  background: radial-gradient(ellipse 75% 70% at 50% 45%, rgba(40, 22, 12, 0.26) 35%, rgba(30, 16, 8, 0.6) 100%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.win.pv {
  background: rgba(58, 36, 22, 0.28);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body:has(.win.pv) #top,
body:has(.win.pv) #tray,
body:has(.win.pv) .foxwrap {
  visibility: visible !important;
  filter: none !important;
}
body:has(.win.pv) #fx {
  z-index: 5;
}
body:has(.win.wv) #fx {
  z-index: 7;
}
.wpanel {
  background: linear-gradient(#fef2d6, #fce6c0);
  border: max(5px, 0.85cqh) solid var(--ink);
  border-radius: 4.5cqh;
  box-shadow:
    inset 0 0 0 0.45cqh #fff7e4,
    0 0.8cqh 0 rgba(58, 36, 22, 0.35);
}
/* botões e faixas: arte do Codex com pontas que não esticam (border-image) */
.ibtn {
  border-style: solid;
  border-color: transparent;
  background: none;
  box-shadow: none;
  padding: 0;
  border-image-repeat: stretch;
  font-weight: 700;
  color: var(--ink);
  -webkit-text-stroke: 0;
  text-shadow: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.ibtn.green {
  border-image-source: url(../assets/ui/botao-verde.webp);
  border-image-slice: 0 78 fill;
}
.ibtn.cream {
  border-image-source: url(../assets/ui/botao-creme.webp);
  border-image-slice: 0 80 fill;
}
.wnext {
  border-width: 0 4.5cqh;
  font-size: 5.5cqh;
  padding-bottom: 0.6cqh;
}
.wsec,
.psec {
  border-width: 0 3.3cqh;
  font-size: 3.3cqh;
  gap: 1.2cqh;
  padding-bottom: 0.4cqh;
}
.wsec .ic {
  height: 3.4cqh;
  width: auto;
}
.psec {
  font-size: 3.6cqh;
}
.psec.snd .ic {
  height: 3.7cqh;
  width: auto;
  margin-right: 1.4cqh;
}
.presume {
  border-width: 0 5cqh;
  font-size: 5cqh;
  color: #fff;
  -webkit-text-stroke: 0.75cqh var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.4cqh 0 var(--ink);
  padding-bottom: 0.6cqh;
}
.wribbon {
  border-image-source: url(../assets/ui/faixa-creme.webp);
  border-image-slice: 0 150 fill;
  border-width: 0 7cqh;
  font-size: 3.9cqh;
  padding-bottom: 0.5cqh;
}
.pribbon {
  border-image-source: url(../assets/ui/pilula-amarela.webp);
  border-image-slice: 0 86 fill;
  border-width: 0 3.8cqh;
  font-size: 5.5cqh;
  padding-bottom: 0.6cqh;
}
.wmsg {
  font-size: 2.3cqh;
  font-weight: 700;
  color: var(--ink);
}
.whalo {
  background: radial-gradient(
    circle,
    rgba(255, 240, 150, 1) 0%,
    rgba(255, 210, 60, 0.85) 35%,
    rgba(255, 214, 70, 0) 68%
  );
  border-radius: 50%;
}
.wlogo {
  animation: popin 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.wfoxj {
  animation: wjump 1.1s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.wfoxj img {
  filter: drop-shadow(0.35cqh 0 0 #fff) drop-shadow(-0.35cqh 0 0 #fff) drop-shadow(0 0.35cqh 0 #fff)
    drop-shadow(0 -0.35cqh 0 #fff);
}
@keyframes wjump {
  0%,
  100% {
    transform: translateY(0) scale(1, 1);
  }
  40% {
    transform: translateY(-1.6vh) scale(0.98, 1.02);
  }
  55% {
    transform: translateY(-1.8vh) scale(1, 1);
  }
  85% {
    transform: translateY(0) scale(1.02, 0.98);
  }
}
.wstar {
  opacity: 0.35;
  filter: grayscale(1);
}
.wstar.on {
  opacity: 1;
  filter: drop-shadow(0 0 1.2cqh rgba(255, 210, 60, 0.9));
  animation: starpop 0.45s cubic-bezier(0.2, 1.8, 0.4, 1) both;
}
.wstar:nth-of-type(2) {
  animation-delay: 0.3s;
}
.wstar:nth-of-type(3) {
  animation-delay: 0.48s;
}
.wstar:nth-of-type(4) {
  animation-delay: 0.66s;
}
.wspark,
.pspark {
  display: block;
}
.wspark i,
.pspark i {
  position: absolute;
  width: 1cqh;
  height: 3cqh;
  border-radius: 1cqh;
  background: #ffd43b;
  border: 0.3cqh solid var(--ink);
}
.wspark.l i:nth-child(1),
.pspark.l i:nth-child(1) {
  left: 60%;
  top: 0;
  transform: rotate(-40deg);
}
.wspark.l i:nth-child(2),
.pspark.l i:nth-child(2) {
  left: 25%;
  top: 35%;
  transform: rotate(-75deg);
}
.wspark.l i:nth-child(3),
.pspark.l i:nth-child(3) {
  left: 55%;
  top: 68%;
  transform: rotate(-125deg);
}
.wspark.r i:nth-child(1),
.pspark.r i:nth-child(1) {
  left: 25%;
  top: 0;
  transform: rotate(40deg);
}
.wspark.r i:nth-child(2),
.pspark.r i:nth-child(2) {
  left: 60%;
  top: 35%;
  transform: rotate(75deg);
}
.wspark.r i:nth-child(3),
.pspark.r i:nth-child(3) {
  left: 30%;
  top: 68%;
  transform: rotate(125deg);
}
.wparade {
  align-items: flex-end;
  justify-content: space-around;
  border-bottom: 0.5cqh solid var(--ink);
}
.wparade i {
  position: relative;
  flex: 0 0 15%;
  display: block;
}
.wparade i canvas {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: -1.2cqh;
  animation:
    hop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1) both,
    bob2 1.6s ease-in-out 1.2s infinite;
}
.wparade i:nth-child(odd)::before {
  content: '';
  position: absolute;
  left: -6%;
  top: -18%;
  width: 1cqh;
  height: 2.4cqh;
  border-radius: 1cqh;
  background: #ffd43b;
  border: 0.25cqh solid var(--ink);
  transform: rotate(-30deg);
}
.wparade i:nth-child(odd)::after {
  content: '';
  position: absolute;
  right: -6%;
  top: -18%;
  width: 1cqh;
  height: 2.4cqh;
  border-radius: 1cqh;
  background: #ffd43b;
  border: 0.25cqh solid var(--ink);
  transform: rotate(30deg);
}
.pfox {
  animation: bob2 2s ease-in-out infinite;
}
.pfox img {
  filter: drop-shadow(0 0.6cqh 0 rgba(58, 36, 22, 0.2));
}

.win.lay .pc > img.ic,
.win.lay img.ic {
  width: auto;
  height: 3.4cqh;
  display: inline-block;
  flex: none;
}
.win.lay .psec.snd > img.ic {
  height: 3.7cqh;
}
.wparade i {
  flex: 0 0 16%;
}
.wparade i canvas {
  margin-bottom: -2.6cqh;
}

/* vitória deitada (m11) */
.lv2 .lpanel {
  border-radius: 6cqh;
}
.lribbon {
  border-image-source: url(../assets/ui/pilula-amarela.webp);
  border-image-slice: 0 86 fill;
  border-width: 0 6.5cqh;
  font-size: 7.6cqh;
  padding-bottom: 0.8cqh;
}

/* End of css/game.css */
