/* Mahjong Treasure Quest styles, part 1 of 4: base styles: fonts, canvas, top bar, helpers, first screens.
   The four files are loaded in order (see index.html) and each one can override the one before it:
   to change a rule, edit the LAST file that sets it (many pirate theme rules are in 04-overrides.css). */

:root {
  --wf: url(../assets/treasure/portrait-0.png);
  --wfl: none;
  --wflu: none;
  --wm: none;
  --wmd: none;
  --wmu: none;
  --wma: none;
  --wmpu: none;
  --wmpa: none;
} /* scenery of world 1; the other worlds switch it via body[data-world] */
@font-face {
  font-family: 'Fredoka';
  font-weight: 400 700;
  font-display: swap;
  src: url(../assets/fonts/fredoka-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-weight: 400 700;
  font-display: swap;
  src: url(../assets/fonts/fredoka-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
:root {
  --ink: #3a2416;
  --line: #6b4529; /* thin, medium-brown borders, as in the design */
  --cream: #fff6e2;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --u: 4px;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Fredoka', system-ui, sans-serif;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
body {
  background: #8fd36a var(--wf) center / cover no-repeat;
}
body.land {
  background-image: var(--wfl);
}
#back {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#ui > * {
  pointer-events: auto;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* thick-bordered plaques with volume (never a black box with text) */
.round {
  width: clamp(60px, 8.5vmin, 88px);
  height: clamp(60px, 8.5vmin, 88px);
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--cream);
  box-shadow: 0 5px 0 rgba(107, 69, 41, 0.6);
  display: grid;
  place-items: center;
  position: relative;
  padding: 0;
  transition: transform 0.08s;
}
.round:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(107, 69, 41, 0.6);
}
.round svg {
  width: 58%;
  height: 58%;
  fill: var(--ink);
  stroke: var(--ink);
}
.round.small {
  width: clamp(48px, 13vw, 66px);
  height: clamp(48px, 13vw, 66px);
}
.round.small {
  background: linear-gradient(#ffd84a, #f5b417);
}
.round.small svg {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 1;
}
.pill {
  height: clamp(44px, 6vmin, 58px);
  padding: 0 18px;
  border-radius: 30px;
  border: 2.5px solid var(--line);
  background: var(--cream);
  box-shadow: 0 3px 0 rgba(58, 36, 22, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
}
.pill b {
  font-size: 24px;
}
.pill.level {
  min-width: 24vw;
  max-width: 190px;
  justify-content: center;
}
.pill.level b {
  font-size: clamp(28px, 7.5vw, 40px);
}
.pill.coins b {
  font-size: clamp(24px, 6.5vw, 34px);
}
.topbar .coins {
  max-width: 220px;
}
.pill {
  border-width: 3.5px !important;
}
.rem {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 3px solid rgba(58, 36, 22, 0.25);
  font-size: 18px;
  font-weight: 700;
}
.rem i {
  width: 14px;
  height: 16px;
  border: 2.5px solid var(--ink);
  border-radius: 4px;
  background: #fffbf2;
  display: block;
}
.rem em {
  font-style: normal;
}
.rem small {
  font-size: 15px;
  font-weight: 600;
}
@media (max-width: 349px) {
  .rem small {
    display: none;
  }
}
@media (max-width: 400px) {
  .pill {
    padding: 0 10px;
    font-size: 15px;
    gap: 4px;
  }
  .rem small {
    font-size: 13px;
  }
  .tagline {
    font-size: 15px;
  }
  .pill b {
    font-size: 20px;
  }
  .rem {
    font-size: 15px;
    padding-left: 7px;
    margin-left: 3px;
  }
  .coins i {
    width: 24px;
    height: 24px;
  }
}

.topbar {
  position: absolute;
  top: calc(var(--sat) + 10px);
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.topbar .level {
  position: absolute;
  left: 36%;
  width: 19%;
  padding: 0;
}
.topbar .coins {
  position: relative;
  width: 31%;
  margin-right: 3%;
  justify-content: flex-end;
  padding-right: 16px;
}
.topbar .coins i {
  position: absolute;
  left: -6px;
  width: 46px;
  height: 46px;
  margin: 0;
}
.topbar .coins b {
  flex: 1;
  text-align: center;
  padding-left: 26px;
}
.round .spark,
.spark {
  position: absolute;
  width: 28px;
  height: 22px;
  left: -12px;
  top: -14px;
  stroke: #ffc531 !important;
  fill: none !important;
  pointer-events: none;
}
.coins .spark {
  left: -6px;
  top: -16px;
}
.coins i {
  width: 38px;
  height: 38px;
  margin-left: -12px;
  background: none center / contain no-repeat;
  display: block;
}
.coins.bump {
  animation: bump 0.2s ease-out;
}
@keyframes bump {
  40% {
    transform: scale(1.08);
  }
}
.helper.used {
  animation: used 0.35s ease-out;
}
@keyframes used {
  30% {
    transform: scale(0.9);
  }
  70% {
    transform: scale(1.08);
  }
}

.mascot {
  position: absolute;
  right: var(--mascot-right, 8px);
  bottom: var(--mascot-bottom, 70%);
  height: var(--mascot-h, 110px);
  transition: opacity 0.2s;
  transform-origin: 50% 100%;
  animation: breathe 3.2s ease-in-out infinite;
  pointer-events: none;
  filter: drop-shadow(0 4px 0 rgba(58, 36, 22, 0.25));
}
.mascot.boing {
  animation:
    boing 0.42s cubic-bezier(0.3, 1.6, 0.5, 1),
    breathe 3.2s 0.42s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    transform: scale(1.012, 0.99);
  }
}
@keyframes boing {
  0% {
    transform: scale(0.94, 1.05);
  }
  60% {
    transform: scale(1.04, 0.97);
  }
  100% {
    transform: scale(1);
  }
}

.helpers {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--sab) + 2.5vh);
  display: flex;
  justify-content: center;
  gap: min(6vw, 40px);
  pointer-events: none;
}
.helper {
  width: min(20vw, 110px) !important;
  height: min(20vw, 110px) !important;
  box-shadow:
    0 6px 0 rgba(107, 69, 41, 0.6),
    0 10px 14px rgba(58, 36, 22, 0.25) !important;
}
.helper img {
  width: 66%;
  height: 66%;
  object-fit: contain;
  pointer-events: none;
}
.hwrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: auto;
}
.hlabel {
  font-size: clamp(14px, 2.1vmin, 19px);
  font-weight: 700;
  color: var(--ink);
}
.helpers > * {
  pointer-events: auto;
}
.helper .badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 36px;
  height: 36px;
  border-radius: 18px;
  font-size: 20px !important;
  background: #4cbb4a;
  color: #fff;
  border: 2.5px solid var(--line);
  font-weight: 700;
  font-size: 16px;
  display: grid;
  place-items: center;
}
.helper.off {
  opacity: 0.55;
}
.helper.off .badge {
  background: #a99;
}
.shake {
  animation: shake 0.3s;
}
@keyframes shake {
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
}
.helper svg {
  stroke: var(--ink);
  fill: none;
}
.helper[data-h='hint'] svg circle {
  fill: #ffe066;
}

/* landscape: mascot on the left, helpers in a column on the right */
body.land .mascot {
  left: calc(var(--sx) + 2 * var(--sw) / 100);
  right: auto;
  top: auto;
  bottom: calc(var(--sab) + 18px);
}
body.modal-open .mascot {
  opacity: 0;
}
body.land .helpers {
  left: auto;
  right: calc(var(--sx) + 3 * var(--sw) / 100);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  flex-direction: column;
}
body.land .helper {
  width: clamp(72px, calc(11 * var(--uh)), 104px) !important;
  height: clamp(72px, calc(11 * var(--uh)), 104px) !important;
}

.toast {
  position: absolute;
  left: 50%;
  top: calc(var(--sat) + 76px);
  transform: translate(-50%, -10px);
  opacity: 0;
  max-width: min(86vw, 520px);
  background: var(--cream);
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 10px 18px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 0 var(--ink);
  transition:
    opacity 0.25s,
    transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(58, 36, 22, 0.48);
  animation: fade 0.35s ease-out;
}
.modal {
  width: min(88cqw, 85.11cqw);
  background: var(--cream);
  border: 3px solid var(--line);
  border-radius: 5.96cqw;
  box-shadow: 0 1.7cqw 0 rgba(107, 69, 41, 0.6);
  padding: 3.83cqw 4.68cqw 4.68cqw;
  text-align: center;
  position: relative;
  animation: pop 0.28s ease-out;
}
.modal h2 {
  margin: 1.28cqw 0;
  font-size: 7.23cqw;
}
.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 4px;
}
.star {
  width: 52px;
  height: 52px;
  fill: #e6d8bf;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
  animation: starIn 0.42s backwards ease-out;
}
.star:nth-child(2) {
  margin-top: -10px;
  width: 62px;
  height: 62px;
}
.star.on {
  fill: #ffd23a;
}
@keyframes starIn {
  0% {
    transform: scale(0.5) rotate(-30deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
.earn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.28cqw;
  font-size: 5.53cqw !important;
  font-weight: 700;
}
.earn i {
  width: 6.38cqw;
  height: 6.38cqw;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  display: block;
  background: radial-gradient(circle at 35% 35%, #fff6a8, #ffd23a 45%, #f0a91c);
}
.modal p {
  margin: 1.28cqw 0 2.98cqw;
  font-size: 3.83cqw;
  text-wrap: balance;
}
.m-face.late {
  animation: pop 0.3s 0.22s backwards ease-out;
}
.m-face {
  height: 25.53cqw;
  margin-top: -17.02cqw;
}
.row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  border: 3px solid var(--line);
  border-radius: 20px;
  padding: 12px 26px;
  font-size: 23px;
  font-weight: 700;
  background: var(--cream);
  box-shadow: 0 5px 0 rgba(107, 69, 41, 0.6);
  transition: transform 0.08s;
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(107, 69, 41, 0.6);
}
.btn.go {
  background: linear-gradient(#8ee36f, #4cbb4a);
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
}
@keyframes pop {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  65% {
    transform: scale(1.03);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

.home {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: 12px;
  padding: calc(var(--sat) + 20px) 16px calc(var(--sab) + 20px);
  overflow-y: auto;
}
.home-mascot {
  height: min(24vh, 300px);
  animation: breathe 3.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.title {
  margin: 0;
  font-size: clamp(34px, min(9vw, 7.5vh), 84px);
  color: #fff;
  letter-spacing: 1px;
  text-align: center;
  -webkit-text-stroke: 7px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink);
}
.tagline {
  margin: 0 0 10px;
  font-size: clamp(17px, 2.6vmin, 24px);
  max-width: calc(100vw - 32px);
  font-weight: 600;
  background: var(--cream);
  border: 3px solid var(--line);
  border-radius: 16px;
  padding: 6px 14px;
  text-align: center;
}
.home h3 {
  margin: 14px 0 4px;
  color: #fff;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  font-size: 24px;
}
.levels {
  --lv: clamp(46px, min(9vmin, 7.2vh), 84px);
  display: grid;
  grid-template-columns: repeat(5, var(--lv));
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 246, 226, 0.92);
  border: 2.5px solid var(--line);
  max-width: calc(100vw - 24px);
}
.lv {
  width: var(--lv);
  height: var(--lv);
  border-radius: 16px;
  border: 3px solid var(--line);
  background: #ffe28a;
  box-shadow: 0 4px 0 var(--ink);
  font-size: 22px;
  font-weight: 700;
}
.lv.locked {
  background: #e3d6bf;
  color: #7d6a52;
  box-shadow: 0 4px 0 #9c8a70;
  border-color: #9c8a70;
}
.sound {
  position: absolute;
  top: calc(var(--sat) + 10px);
  right: 12px;
}
.sound.muted {
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  .mascot,
  .home-mascot,
  .mascot.boing {
    animation: none;
  }
  .modal,
  .toast {
    animation: none;
    transition: none;
  }
}

.home {
  justify-content: safe center;
  gap: 1.6vh;
  padding-top: calc(var(--sat) + 9vh);
}
.home-coins {
  position: absolute;
  top: calc(var(--sat) + 10px);
  right: 3%;
  width: min(36%, 220px);
  height: clamp(44px, 6vmin, 58px);
}
.home-coins i {
  position: absolute;
  left: -6px;
  width: 46px;
  height: 46px;
}
.home-coins b {
  flex: 1;
  text-align: center;
  padding-left: 26px;
  font-size: clamp(24px, 6.5vw, 34px);
}
.home-mascot {
  height: min(22vh, 230px);
  margin-bottom: -5vh;
  position: relative;
  z-index: 0;
}
.logo {
  width: min(86vw, 520px);
  max-height: 34vh;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 0 rgba(107, 69, 41, 0.35));
  animation: logoIn 0.6s ease-out;
}
@keyframes logoIn {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }
  70% {
    transform: scale(1.03);
    opacity: 1;
  }
}
.btn .bi {
  width: 0.9em;
  height: 0.9em;
  fill: currentColor;
  vertical-align: -0.08em;
  filter: drop-shadow(0 2px 0 rgba(58, 36, 22, 0.6));
}
.home-row {
  display: flex;
  gap: 8vw;
  margin-top: 2vh;
}
.small-btn {
  width: clamp(64px, 17vw, 96px) !important;
  height: clamp(64px, 17vw, 96px) !important;
}
.small-btn svg {
  fill: #ffc531 !important;
  stroke: var(--line) !important;
  width: 56% !important;
  height: 56% !important;
}
.small-btn.muted {
  opacity: 0.55;
}

.map {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.map-art {
  position: absolute;
  background: var(--wm) center / 100% 100% no-repeat;
}
.topbar .round.small svg {
  fill: var(--ink);
}

.ribbon {
  position: relative;
  margin: -1.28cqw auto 2.13cqw;
  width: 108%;
  margin-left: -4%;
  aspect-ratio: 900 / 219;
  background: none center / contain no-repeat;
  display: grid;
  place-items: center;
}
.ribbon.green {
  background-image: none;
}
.ribbon span {
  font-size: clamp(5.11cqw, 6.6cqw, 7.23cqw);
  font-weight: 700;
  color: var(--ink);
  margin-top: -0.85cqw;
}
.ribbon.green span {
  color: #fff;
  -webkit-text-stroke: 1.06cqw #5b7a2a;
  paint-order: stroke fill;
}
.modal {
  padding-top: 1.28cqw;
}
.m-face {
  height: 27.66cqw;
  margin: -21.28cqw auto -3.83cqw;
  display: block;
  position: relative;
  z-index: 1;
}
.m-body p {
  margin: 0.85cqw 0 2.98cqw;
}
.btn.yellow {
  background: linear-gradient(#ffe27a, #ffc531);
}
.btn.wide {
  width: 100%;
  font-size: clamp(22px, 6vw, 28px);
  padding: 12px 0;
  margin: 5px 0;
}
.btn .bbadge {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 13px;
  margin-left: 6px;
  background: #4cbb4a;
  color: #fff;
  border: 2px solid var(--line);
  font-size: 16px;
  text-shadow: none;
  vertical-align: 2px;
}
.col {
  display: flex;
  flex-direction: column;
}
.switches {
  display: flex;
  gap: 2.13cqw;
  margin: 2.13cqw 0 0;
}
.switch {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.28cqw;
  border: 2.5px solid var(--line);
  border-radius: 3.4cqw;
  background: #fff8e8;
  padding: 1.7cqw 2.13cqw;
  font-weight: 700;
  font-size: 3.4cqw;
}
.switch b {
  width: 9.36cqw;
  height: 5.11cqw;
  border-radius: 2.55cqw;
  background: #cbbfae;
  position: relative;
  border: 2px solid var(--line);
}
.switch b::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 3.83cqw;
  height: 3.83cqw;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}
.switch.on b {
  background: #4cbb4a;
}
.switch.on b::after {
  left: 4.47cqw;
}
.mini-tray {
  display: flex;
  justify-content: center;
  gap: 0.85cqw;
  padding: 1.7cqw;
  border-radius: 3.4cqw;
  border: 2.5px solid var(--line);
  background: linear-gradient(#f4b465, #cf843d);
  margin: 2px 0 1.7cqw;
}
.mini-tray i {
  width: 11%;
  aspect-ratio: 1;
  border-radius: 1.7cqw;
  border: 2px solid var(--line);
  background: #fff6dc center / 78% no-repeat;
}
.modal.win .stars {
  margin-top: 0.85cqw;
}
.modal.win .star {
  width: 13.62cqw;
  height: 13.62cqw;
}
.modal.win .star:nth-child(2) {
  width: 16.6cqw;
  height: 16.6cqw;
  margin-top: -3.4cqw;
}
.earn {
  background: #fff8e8;
  border: 2.5px solid var(--line);
  border-radius: 212.55cqw;
  width: max-content;
  margin: 1.28cqw auto 2.98cqw !important;
  padding: 2px 3.4cqw 2px 1.28cqw;
}
.earn i {
  width: 7.23cqw;
  height: 7.23cqw;
  border: none;
  background: none center / contain no-repeat;
}

.bubble {
  position: absolute;
  right: calc(var(--mascot-right, 8px) + 30vw);
  top: calc(var(--sat) + 9vh);
  max-width: 46vw;
  background: #fff;
  border: 2.5px solid var(--line);
  border-radius: 18px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: clamp(14px, 3.8vw, 18px);
  text-align: center;
  animation: pop 0.4s ease-out;
  pointer-events: none;
}
.bubble::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 40%;
  border: 8px solid transparent;
  border-left-color: var(--line);
}
.hand {
  position: absolute;
  width: clamp(64px, 17vw, 96px);
  transform: translate(-20%, -10%);
  pointer-events: none;
  animation: tap 1.1s ease-in-out infinite;
  filter: drop-shadow(0 4px 2px rgba(58, 36, 22, 0.3));
}
@keyframes tap {
  0%,
  100% {
    translate: 10px 14px;
  }
  50% {
    translate: 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hand,
  .stop.cur,
  .logo {
    animation: none;
  }
}
.btn {
  font-size: clamp(20px, 5.4vw, 26px);
  border-width: 3.5px !important;
}
.btn.go {
  background: linear-gradient(#86e35e, #3fae37);
  color: #fff;
  -webkit-text-stroke: 4px #2e6b1f;
  paint-order: stroke fill;
  text-shadow: none;
  box-shadow: 0 5px 0 #2e6b1f;
}
.btn.yellow {
  -webkit-text-stroke: 0;
  color: var(--ink);
  box-shadow: 0 5px 0 #a8741c;
}
.btn.ghost {
  background: linear-gradient(#fffaf0, #f3e2c2);
}
.row {
  flex-wrap: nowrap;
}
.row .btn {
  flex: 1;
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
}
.modal.win,
.modal.lose {
  width: min(92cqw, 91.49cqw);
}
.home-mascot {
  height: min(30vh, 300px);
  margin-bottom: -9vh;
}

.hlabel {
  display: none;
}
body.land .hlabel {
  display: block;
  background: var(--cream);
  border: 2.5px solid var(--line);
  border-radius: 12px;
  padding: 1px 10px;
  margin-top: -10px;
  position: relative;
  z-index: 1;
}
body.land .hwrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo {
  width: min(92vw, 560px);
  max-height: 40vh;
}
body.land .home {
  flex-direction: column;
  padding-top: calc(var(--sat) + 4vh);
}
body.land .home-mascot {
  position: absolute;
  left: calc(var(--sx) + 4 * var(--sw) / 100);
  bottom: 4vh;
  height: min(calc(62 * var(--uh)), 460px);
  margin: 0;
}
body.land .logo {
  width: min(calc(46 * var(--su) / 100), 620px);
  max-height: calc(52 * var(--uh));
}
.modal.lose .scene {
  height: 18cqh;
  border-radius: 3.4cqw;
  border: 2.5px solid var(--line);
  margin: 0 0 2.13cqw;
  position: relative;
  overflow: hidden;
  background: var(--wf) center 35% / 160% auto no-repeat;
}
.modal.lose .scene img {
  position: absolute;
  left: 50%;
  bottom: -8%;
  height: 100%;
  transform: translateX(-50%);
}
.modal.lose .m-face {
  display: none;
}
.modal.win .m-face {
  filter: drop-shadow(0 0 3.83cqw rgba(255, 225, 110, 0.95));
}
.modal.win::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -23.4cqw;
  width: 46.81cqw;
  height: 46.81cqw;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 238, 150, 0.9), rgba(255, 238, 150, 0) 65%);
  pointer-events: none;
}

.bi {
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  vertical-align: -0.22em;
  filter: none !important;
}
.small-btn img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}
.yellow-btn {
  background: linear-gradient(#ffe27a, #ffc531) !important;
}
.yellow-btn img {
  width: 62%;
  height: 62%;
  object-fit: contain;
  filter: brightness(0.35) sepia(1) hue-rotate(-20deg);
}
img.star {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.35) opacity(0.75);
  animation: starIn 0.42s backwards ease-out;
}
img.star.on {
  filter: drop-shadow(0 0 10px rgba(255, 220, 90, 0.9));
}
.modal.win img.star {
  width: 18.3cqw;
  height: 18.3cqw;
}
.modal.win img.star:nth-child(2) {
  width: 22.55cqw;
  height: 22.55cqw;
  margin-top: -4.68cqw;
}
.ribbon.gold {
  background-image: none;
  aspect-ratio: 900 / 245;
}
.ribbon.gold span {
  color: #fff;
  -webkit-text-stroke: 1.06cqw #8a5a14;
  paint-order: stroke fill;
}
.modal {
  background: none center / 100% 100% no-repeat;
  border: none !important;
  box-shadow: none !important;
  padding: 2.13cqw 5.53cqw 6.38cqw;
  filter: drop-shadow(0 1.7cqw 0 rgba(107, 69, 41, 0.45));
}
.m-foot {
  display: block;
  width: 46%;
  margin: 2.55cqw auto -8.51cqw;
}
.home-mascot {
  height: min(32vh, 320px);
}
body.land .helper {
  width: clamp(80px, calc(14 * var(--uh)), 120px) !important;
  height: clamp(80px, calc(14 * var(--uh)), 120px) !important;
}
body.land .hlabel {
  font-size: clamp(15px, calc(2.4 * var(--uh)), 20px);
}

.btn {
  border: 4px solid var(--ink) !important;
  position: relative;
  line-height: 1.15;
  font-size: clamp(24px, 6.6vw, 32px);
  padding: 12px 22px;
}
.btn::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 6%;
  height: 32%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}
.btn.wide {
  font-size: clamp(26px, 7vw, 34px);
  padding: 14px 0;
}
.modal .row .btn {
  font-size: clamp(4.26cqw, 5.4cqw, 5.53cqw);
}
.lvw {
  display: none;
}
body.land .lvw {
  display: inline;
  font-size: 22px;
  font-weight: 700;
}
body.land .pill.level {
  max-width: 220px;
  min-width: 170px;
}
.modal.lose .row {
  padding: 0 2px;
}
.modal.lose .row .btn {
  flex: 1 1 0;
  min-width: 0;
  font-size: clamp(3.62cqw, 4.6cqw, 4.68cqw);
  padding: 2.55cqw 1.28cqw;
}
.modal.lose .scene {
  background-position: center 22%;
  background-size: 220% auto;
}
.mini-tray i {
  width: 13.5%;
}
.bubble {
  font-size: clamp(17px, 4.6vw, 22px);
  padding: 12px 16px;
  max-width: 54vw;
  border-width: 3px;
}
.bubble::after {
  right: -18px;
  border-width: 12px;
}
.hand {
  width: clamp(76px, 20vw, 110px);
}
.modal.pause .m-face,
.modal.win .m-face {
  margin-bottom: -9.79cqw;
  z-index: 0;
}
.ribbon {
  z-index: 1;
}
.earn {
  font-size: clamp(6.38cqw, 8cqw, 8.51cqw) !important;
}
.earn i {
  width: 8.94cqw;
  height: 8.94cqw;
}
.modal.win::before {
  top: -27.66cqw;
  width: 63.83cqw;
  height: 63.83cqw;
}
body.land .home-coins {
  right: 2%;
  width: min(22%, 240px);
}
body.land .small-btn {
  width: clamp(70px, calc(11 * var(--uh)), 100px) !important;
  height: clamp(70px, calc(11 * var(--uh)), 100px) !important;
}
.home-next {
  display: none;
}
body.land .home-next {
  display: flex;
  position: absolute;
  right: calc(var(--sx) + 4 * var(--sw) / 100);
  top: 22vh;
  flex-direction: column;
  gap: calc(4 * var(--uh));
  align-items: center;
}
body.land .home-next .stop {
  position: relative;
  transform: none;
}
body.land .home-next .stop.cur {
  animation: none;
}
.title-sparks {
  position: relative;
}
.modal.lose .row .btn {
  white-space: nowrap;
  font-size: 4.26cqw !important;
  padding: 2.55cqw 0.85cqw !important;
}
.modal.lose .row .btn .bi {
  width: 1em;
  height: 1em;
}
.modal.lose .row .btn .bbadge {
  min-width: 4.68cqw;
  height: 4.68cqw;
  font-size: 2.98cqw;
  margin-left: 3px;
}
body.land .helper {
  width: clamp(90px, calc(19 * var(--uh)), 140px) !important;
  height: clamp(90px, calc(19 * var(--uh)), 140px) !important;
}
body.land .hlabel {
  font-size: clamp(16px, calc(3 * var(--uh)), 24px);
}

.home {
  padding-top: calc(var(--sat) + 4vh);
  padding-bottom: calc(var(--sab) + 6vh);
  gap: 1.2vh;
}
.home-mascot {
  height: min(25vh, 260px);
  margin-bottom: -7vh;
}
.logo {
  width: min(94vw, 600px);
  max-height: 46vh;
}
.modal.pause .m-face {
  margin-bottom: -4.26cqw;
}
.modal.win .m-face {
  height: 40.43cqw;
  margin: -31.91cqw auto -5.53cqw;
}
.modal.win .stars {
  position: relative;
}
.modal.win .stars::before {
  content: '';
  position: absolute;
  inset: -30% -10%;
  z-index: -1;
  background: radial-gradient(ellipse, rgba(255, 236, 140, 0.95), rgba(255, 236, 140, 0) 70%);
}
.modal.win .row .btn {
  font-size: clamp(4.68cqw, 6cqw, 5.96cqw);
  padding: 2.98cqw 2.13cqw;
}
.m-foot {
  width: 40%;
  margin-top: 3.83cqw;
}
.modal.lose .row .btn.yellow {
  white-space: normal;
  line-height: 1.05;
}
.modal.lose .scene {
  height: 20cqh;
  background-position: 30% 18%;
  background-size: 260% auto;
}
.ribbon {
  width: 116%;
  margin-left: -8%;
}
.hand {
  width: clamp(90px, 24vw, 128px);
  transform: translate(-6%, 12%);
}
body.land .home-mascot {
  height: min(calc(48 * var(--uh)), 360px);
}
body.land .home-row {
  position: absolute;
  top: calc(var(--sat) + 10px);
  left: 12px;
  margin: 0;
  gap: 12px;
}
body.land .helpers {
  right: calc(var(--sx) + 4 * var(--sw) / 100);
}

.modal.lose .row .btn.yellow {
  white-space: nowrap;
  color: var(--ink);
  -webkit-text-stroke: 0;
}
.mini-tray i.pair {
  box-shadow: 0 0 2.13cqw 3px rgba(255, 220, 90, 0.95);
  background-color: #fff3c4;
}
.modal.lose .scene {
  border: none;
  background-color: transparent;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 55%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 55%, transparent 78%);
}
.switch span {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.85cqw;
}
.switch {
  font-size: 3.19cqw;
  padding: 1.7cqw 1.7cqw;
}
.stars {
  position: relative;
}
.stars .spark {
  width: 40px;
  height: 32px;
  left: -8px;
  top: 10px;
}
.stars .spark.r {
  left: auto;
  right: -8px;
  transform: scaleX(-1);
}
.plate {
  display: none;
  height: 46px;
  position: absolute;
  left: 16%;
  top: -2px;
}
.plate.show,
body.land .plate {
  display: block;
}
.rays {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ray {
  position: absolute;
  width: 34px;
  height: 30px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 24'%3E%3Cpath d='M4 16 9 13M8 7l4 4M17 3v6' stroke='%23ffc531' stroke-width='3.4' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
}
.ray.l {
  left: 14%;
  top: 14%;
}
.ray.r {
  right: 14%;
  top: 14%;
  transform: scaleX(-1);
}
.ray.l2 {
  left: 2%;
  bottom: 14%;
}
.ray.r2 {
  right: 2%;
  bottom: 14%;
  transform: scaleX(-1);
}
.home-mascot {
  height: min(28vh, 290px);
}
body.land .home-next {
  right: calc(var(--sx) + 9 * var(--sw) / 100);
  top: 16vh;
}
body.land .home-next::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 4%;
  bottom: 4%;
  width: 46px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(#e9d3a8 0 22px, #d8bb88 22px 26px);
  border-radius: 22px;
  border: 2.5px solid rgba(107, 69, 41, 0.45);
  z-index: -1;
}
body.land .home > .rays:first-child {
  position: absolute;
  left: calc(var(--sx) + 4 * var(--sw) / 100);
  bottom: 4vh;
}
body.land .home > .rays:first-child .home-mascot {
  position: static;
}
.modal.lose .row .btn.yellow {
  font-size: 3.62cqw !important;
}
.plate {
  height: 62px;
  top: -8px;
}

.mascot.hop {
  animation:
    hop 0.42s ease-out,
    breathe 3.2s 0.42s ease-in-out infinite;
}
@keyframes hop {
  35% {
    transform: translateY(-8%);
  }
  70% {
    transform: translateY(0) scale(1.03, 0.97);
  }
}
.home-mascot {
  height: min(34vh, 340px);
  margin-bottom: -10vh;
}
.small-btn {
  width: clamp(78px, 21vw, 112px) !important;
  height: clamp(78px, 21vw, 112px) !important;
  border: 4px solid #c98a2a !important;
  box-shadow:
    0 0 0 3px var(--line),
    0 6px 0 rgba(107, 69, 41, 0.6) !important;
}
.btn.ghost {
  background: linear-gradient(#fff6dc, #f1d9a6);
  border-color: #9b6a2e !important;
}
.btn.wide .bi {
  width: 1.3em;
  height: 1.3em;
}
.m-foot {
  margin-top: 5.53cqw;
  width: 38%;
}
.modal.win .m-face {
  animation:
    pop 0.3s 0.22s backwards ease-out,
    winHop 0.9s 0.6s ease-in-out infinite;
}
@keyframes winHop {
  50% {
    transform: translateY(-7%);
  }
}
.modal.win .row {
  margin-top: 0.85cqw;
}
.modal.lose .row .btn.yellow {
  white-space: normal !important;
  line-height: 1.05;
  font-size: 3.83cqw !important;
}
.modal.lose .two {
  display: inline-block;
  max-width: none;
  white-space: nowrap;
  vertical-align: middle;
}
.helper {
  width: min(23vw, 124px) !important;
  height: min(23vw, 124px) !important;
}
body.land .home-mascot {
  height: min(calc(40 * var(--uh)), 300px);
}
body.land .plate {
  left: 6.5%;
  height: 56px;
}
@media (prefers-reduced-motion: reduce) {
  .mascot.hop,
  .modal.win .m-face {
    animation: none;
  }
}
.logo {
  max-height: 36vh;
}
.home-mascot {
  height: min(30vh, 320px);
  margin-bottom: -9vh;
}
.home {
  justify-content: flex-start;
}

.home {
  justify-content: center;
}
.home-mascot {
  height: min(33vh, 340px);
}
.logo {
  max-height: 41vh;
  width: min(96vw, 620px);
}
.modal-back {
  align-items: start;
  padding-top: calc(var(--sat) + 22cqh);
}
.earn.wait {
  visibility: hidden;
}
.modal {
  animation: pop 0.38s ease-out;
}
@keyframes pop {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  55% {
    transform: scale(1.06);
    opacity: 1;
  }
  80% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}
.modal.lose .row .btn.yellow {
  color: #3a2416 !important;
  font-weight: 800;
}
.modal.lose .scene {
  background-size: 200% auto;
  background-position: 18% 20%;
}
.m-foot {
  margin-top: 7.23cqw;
}
body.land .home-mascot {
  height: min(calc(52 * var(--uh)), 380px);
}
.modal-back {
  align-items: center;
  padding-top: 0;
}
.modal-back:has(.win) {
  align-items: start;
  padding-top: calc(var(--sat) + 22cqh);
}

.modal.win img.star {
  width: 18.3cqw !important;
  height: 18.3cqw !important;
  margin-top: 0 !important;
}
.modal.win img.star:nth-of-type(2) {
  width: 22.98cqw !important;
  height: 22.98cqw !important;
  margin-top: -5.11cqw !important;
}
.btn::after {
  top: 5%;
  height: 24%;
  background: rgba(255, 255, 255, 0.3);
  z-index: 0;
}
.btn.yellow {
  color: #3a2416 !important;
}
.modal.lose .row .btn.yellow {
  font-size: 4.04cqw !important;
}
.modal .row .btn {
  font-size: clamp(4.68cqw, 6cqw, 5.96cqw);
  padding: 3.19cqw 2.13cqw;
}
.modal.pause .m-face {
  height: 31.91cqw;
  margin-top: -25.53cqw;
}
.m-foot {
  width: 32%;
  margin: 6.38cqw auto -7.23cqw;
}
.sep {
  display: flex;
  align-items: center;
  gap: 1.7cqw;
  margin: 2.13cqw 0.85cqw 2px;
  color: #ff8fb8;
  font-size: 4.26cqw;
}
.sep span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(155, 106, 46, 0.45);
}
.sep i {
  font-style: normal;
}
.hand {
  transform: translate(18%, 30%);
}
.modal-back:has(.pause) {
  align-items: start;
  padding-top: calc(var(--sat) + 19cqh);
}

.home {
  padding-top: calc(var(--sat) + 8vh);
}
.home-coins,
.topbar .coins {
  margin-top: 6px;
}
.modal-back:has(.pause) {
  padding-top: calc(var(--sat) + 24cqh);
}
.modal-back:has(.win) {
  padding-top: calc(var(--sat) + 26cqh);
}
body.land .hlabel {
  margin-top: 4px;
}
body.land .home-next {
  gap: calc(2.5 * var(--uh));
}
body.land .home-next::before {
  display: none;
}
body.land .home-next .stop:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 14px;
  height: calc(2.5 * var(--uh));
  transform: translateX(-50%);
  background: #e9d3a8;
  border: 2px solid rgba(107, 69, 41, 0.4);
  border-radius: 6px;
}
.modal-back:has(.pause) {
  padding-top: calc(var(--sat) + 17cqh);
}
.modal.pause .btn.wide {
  padding: 2.34cqw 0;
  margin: 0.85cqw 0;
}
.modal.pause .m-foot {
  margin-bottom: -5.53cqw;
}
.modal-back:has(.pause) {
  padding-top: calc(var(--sat) + 20cqh);
}
.modal.pause .m-face {
  height: 25.11cqw;
  margin-top: -19.57cqw;
}
.modal.pause .ribbon span {
  font-size: clamp(5.96cqw, 7.6cqw, 8.09cqw);
}

.home {
  padding-top: calc(var(--sat) + 11vh);
}
.modal-back:has(.win) {
  padding-top: calc(var(--sat) + 29cqh);
}
.modal.win {
  padding-bottom: 8.51cqw;
}
.modal.win .stars .spark {
  width: 11.06cqw;
  height: 8.94cqw;
  top: 0;
}
body.land .topbar {
  top: calc(var(--sat) + 14px);
}
body.land .helpers {
  top: 56%;
  right: calc(var(--sx) + 5 * var(--sw) / 100);
}
body.land .logo {
  width: min(calc(52 * var(--su) / 100), 700px);
  max-height: calc(56 * var(--uh));
}
body.land .home-next {
  right: calc(var(--sx) + 6 * var(--sw) / 100);
}

.home {
  padding-top: calc(var(--sat) + 7vh);
  padding-bottom: calc(var(--sab) + 4vh);
}
.home-mascot {
  height: min(29vh, 300px);
}
.home-coins {
  z-index: 2;
}
.modal.win {
  padding-bottom: 12.34cqw;
}
.modal.win .row .btn {
  font-size: clamp(5.11cqw, 6.6cqw, 6.38cqw);
}
.helpers {
  bottom: calc(var(--sab) + 3.5vh);
}
.helper {
  width: min(21vw, 118px) !important;
  height: min(21vw, 118px) !important;
}
.hand {
  transform: translate(34%, 46%);
}
body.land .hlabel {
  font-size: clamp(18px, calc(3.4 * var(--uh)), 26px);
}
body.land .lvw,
body.land .pill.level b {
  font-size: 28px;
}

.hand {
  transform: translate(-12%, -6%);
}
body.land .helpers {
  top: 47%;
}
body.land .home-next {
  right: calc(var(--sx) + 10 * var(--sw) / 100);
  top: 18vh;
  gap: calc(3.2 * var(--uh));
}
body.land .home-next .stop {
  width: 84px;
  height: 76px;
}
body.land .home-next .stop.cur {
  width: 108px;
  height: 96px;
}

body.land .helpers {
  top: 58%;
}
body.land .topbar .coins,
body.land .home-coins {
  margin-right: calc(3 * var(--su) / 100);
}
body.land .home-next {
  right: calc(var(--sx) + 14 * var(--sw) / 100);
  top: 20vh;
}
body.land .home-next .stop {
  width: 96px;
  height: 86px;
}
body.land .home-next .stop.cur {
  width: 120px;
  height: 106px;
}
body.land .home-next .stop:not(:last-child)::after {
  width: 22px;
  height: calc(3.2 * var(--uh));
}
body.land .helpers {
  top: 54%;
  gap: calc(2.4 * var(--uh));
}
body.land .helper {
  width: clamp(76px, calc(14 * var(--uh)), 108px) !important;
  height: clamp(76px, calc(14 * var(--uh)), 108px) !important;
}

.stop {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(64px, 17.5vw, 106px);
  aspect-ratio: 240 / 210;
  height: auto;
  padding: 14% 0 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: none center / contain no-repeat;
  filter: drop-shadow(0 3px 2px rgba(107, 69, 41, 0.35));
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stop b {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: clamp(22px, 6vw, 34px);
  line-height: 1;
  color: #5a3518;
  font-weight: 800;
  -webkit-text-stroke: 0;
}
.stop .sstars {
  position: absolute;
  left: 50%;
  bottom: 13%;
  transform: translateX(-50%);
  display: flex;
}
.sstars .star {
  width: clamp(13px, 3.8vw, 20px);
  height: clamp(13px, 3.8vw, 20px);
  animation: none;
  stroke-width: 2.4;
  margin: 0;
}
.stop.cur {
  background-image: url(../assets/ui/stop-gold.webp);
  width: clamp(74px, 21vw, 124px);
  z-index: 2;
  filter: drop-shadow(0 0 12px rgba(255, 215, 70, 0.95));
  animation: curPulse 1.6s ease-in-out infinite;
}
.stop.cur b {
  font-size: clamp(28px, 7.6vw, 42px);
  color: #fff;
  -webkit-text-stroke: 5px #8a5a14;
  paint-order: stroke fill;
}
@keyframes curPulse {
  50% {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

.stop.locked {
  background-image: none;
}
.stop.locked b {
  color: #4f4a45;
  top: 32%;
}
.stop .lock {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  width: 32%;
  aspect-ratio: 1;
  background: none center / contain no-repeat;
}
.stop .spark {
  left: -14px;
  top: -6px;
}
.stop .spark.r {
  left: auto;
  right: -14px;
  transform: scaleX(-1);
}
.map-mascot {
  position: absolute;
  height: clamp(130px, 32vw, 200px);
  transform: translate(-135%, -112%);
  pointer-events: none;
}
.map-head {
  position: absolute;
  top: calc(var(--sat) + 30px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}
.logo-s {
  width: min(62vw, 320px);
  max-height: 17vh;
  object-fit: contain;
}
.map-head .sign {
  margin-top: -6px;
  background: var(--cream);
  border: 2.5px solid var(--line);
  border-radius: 20px;
  padding: 3px 18px 4px;
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(15px, 4vw, 20px);
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(107, 69, 41, 0.35);
}
body.land .home-next .stop {
  position: relative;
  transform: none;
  width: 96px;
}
body.land .home-next .stop.cur {
  width: 132px;
  animation: none;
}
body.land .home-next .stop {
  height: auto;
}
body.land .home-next .stop::after {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .stop.cur {
    animation: none;
  }
}

.btn.big {
  width: min(92vw, 520px);
  aspect-ratio: 900 / 247;
  height: auto;
  padding: 0 0 1.5%;
  margin-top: 1vh;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
  background: url(../assets/treasure/button.png) center / 100% 100% no-repeat !important;
  filter: drop-shadow(0 6px 0 rgba(46, 107, 31, 0.55));
  font-size: clamp(36px, 10vw, 58px);
  color: #fff;
  -webkit-text-stroke: 6px #2e6b1f;
  paint-order: stroke fill;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
}
.btn.big .bi {
  width: 1em;
  height: 1em;
  fill: #ffd84a;
  filter: drop-shadow(0 3px 0 #2e6b1f);
  -webkit-text-stroke: 0;
}
body.land .btn.big {
  width: min(calc(44 * var(--su) / 100), 620px);
  font-size: clamp(40px, calc(8 * var(--uh)), 70px);
}

body.land .helper {
  width: clamp(100px, calc(20 * var(--uh)), 156px) !important;
  height: clamp(100px, calc(20 * var(--uh)), 156px) !important;
}
body.land .home-mascot {
  height: min(calc(62 * var(--uh)), 470px);
}
body.land .home > .rays:first-child {
  left: calc(var(--sx) + 1.5 * var(--sw) / 100);
  bottom: 3vh;
}
.sstars .star {
  width: clamp(16px, 4.6vw, 24px);
  height: clamp(16px, 4.6vw, 24px);
}

.plate {
  height: 58px;
  top: -6px;
  left: 15%;
}
body.land .plate {
  height: calc(14.5 * var(--uh));
  left: 7.5%;
  top: -2px;
}
.m-foot {
  width: 56%;
}
.modal.lose .ribbon.gold {
  filter: hue-rotate(-38deg) saturate(1.15);
}
.modal.lose .lose-head {
  font-weight: 800;
  font-size: 1.15em;
  margin-bottom: 0;
}
.modal.lose .lose-head + p {
  margin-top: 2px;
  font-size: 0.92em;
}
.modal.lose .row .btn {
  position: relative;
}
.modal.lose .row .btn .bbadge {
  position: absolute;
  top: -2.55cqw;
  right: -1.7cqw;
  margin: 0;
  min-width: 5.96cqw;
  height: 5.96cqw;
  font-size: 3.4cqw;
}
.modal.lose .mini-tray {
  gap: 2px;
  padding: 1.28cqw;
}
.modal.lose .mini-tray i {
  width: 14%;
}

body:not(.land) .pill.level.tut {
  display: none;
}
body:not(.land) .plate.show {
  left: 24%;
  height: 62px;
  top: -8px;
}
.home-mascot {
  height: min(36vh, 360px);
}

.modal .m-face.peek,
.modal.pause .m-face.peek,
.modal.lose .m-face.peek {
  display: block;
  height: clamp(23.4cqw, 30cqw, 31.91cqw);
  margin: calc(clamp(23.4cqw, 30cqw, 31.91cqw) * -0.86) auto -0.85cqw;
  z-index: 2;
}

.stop,
.stop.cur {
  width: auto;
}
.stop.cur b {
  font-size: inherit;
}
.map-mascot {
  transform: translate(-50%, -50%);
}
.map-sign {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.map-head {
  top: calc(var(--sat) + 3.5vh);
}
.logo-s {
  width: 52.5vw;
  max-width: 420px;
  max-height: none;
}
.map-head .sign {
  width: 46vw;
  max-width: 380px;
  height: 4.4vh;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 2.2vh;
  margin-top: -0.6vh;
}
body:not(.land) .topbar .coins {
  height: calc(9 * var(--pu) / 100);
  max-height: 52px;
}
body:not(.land) .topbar .pill.level {
  position: fixed;
  left: calc(var(--px) + 36 * var(--pw) / 100);
  top: calc(var(--sat) + 3.2vh);
  width: calc(19 * var(--pu) / 100);
  min-width: 0;
  max-width: none;
  height: calc(7.8 * var(--pu) / 100);
  max-height: 44px;
  margin: 0;
}

body.land .topbar .round.small {
  position: fixed;
  left: calc(var(--sx) + 2 * var(--sw) / 100);
  top: 2.5vh;
  width: calc(6 * var(--su) / 100) !important;
  height: calc(6 * var(--su) / 100) !important;
  margin: 0;
}
body.land .plate {
  position: fixed;
  left: calc(var(--sx) + 11 * var(--sw) / 100);
  top: 2vh;
  height: calc(17.5 * var(--uh));
  width: auto;
}
body.land .topbar .pill.level {
  min-width: 0;
  max-width: none;
  position: fixed;
  left: calc(var(--sx) + 37 * var(--sw) / 100);
  top: 3vh;
  width: calc(15.5 * var(--su) / 100);
  height: calc(9 * var(--uh));
  font-size: calc(5 * var(--uh));
  margin: 0;
  justify-content: center;
}
body.land .topbar .coins {
  position: fixed;
  left: calc(var(--sx) + 60 * var(--sw) / 100);
  top: 2.5vh;
  width: calc(18.5 * var(--su) / 100);
  height: calc(9.5 * var(--uh));
  font-size: calc(5 * var(--uh));
  margin: 0;
}
body.land .mascot {
  left: calc(var(--sx) + 1 * var(--sw) / 100) !important;
  top: 39vh !important;
  bottom: auto !important;
  width: calc(24 * var(--su) / 100);
  height: auto !important;
}
body.land .helpers {
  position: fixed;
  inset: 0;
  transform: none;
  display: block;
  pointer-events: none;
}
body.land .hwrap {
  position: fixed;
  display: block;
  width: calc(11 * var(--su) / 100);
  pointer-events: auto;
}
body.land .hwrap:nth-child(1) {
  left: calc(var(--sx) + 84.5 * var(--sw) / 100);
  top: 12.5vh;
}
body.land .hwrap:nth-child(2) {
  left: calc(var(--sx) + 84.5 * var(--sw) / 100);
  top: 37.5vh;
}
body.land .hwrap:nth-child(3) {
  left: calc(var(--sx) + 84 * var(--sw) / 100);
  top: 62.5vh;
  width: calc(11.5 * var(--su) / 100);
}
body.land .hwrap .helper {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
}
body.land .hwrap .hlabel {
  position: absolute;
  left: 0;
  top: 17vh;
  width: 100%;
  height: calc(5 * var(--uh));
  font-size: calc(3.6 * var(--uh));
  display: grid;
  place-items: center;
  padding: 0;
}
body.land .hwrap:nth-child(3) .hlabel {
  left: calc(-0.75 * var(--sw) / 100);
  width: calc(13 * var(--su) / 100);
  top: 17.5vh;
}
body.land .hwrap .helper .badge {
  top: 0;
  right: auto;
  left: 63.6%;
  width: calc(4.5 * var(--su) / 100);
  min-width: 0;
  height: calc(8 * var(--uh));
  font-size: calc(4.4 * var(--uh)) !important;
}

body.land.s-home {
  background-image: none;
}
.home-bar {
  display: none;
}
body.land.s-home .ray {
  display: none;
}
body.land.s-home .home .logo {
  content: none;
  position: fixed;
  left: calc(var(--sx) + 29 * var(--sw) / 100);
  top: 2vh;
  width: calc(42 * var(--su) / 100);
  height: auto;
  max-height: none;
  margin: 0;
}
body.land.s-home .home .btn.big {
  position: fixed;
  left: calc(var(--sx) + 28 * var(--sw) / 100);
  top: 58vh;
  width: calc(43 * var(--su) / 100);
  margin: 0;
}
body.land.s-home .home-mascot {
  position: fixed !important;
  left: calc(var(--sx) + 2 * var(--sw) / 100);
  top: 34vh;
  bottom: auto;
  height: calc(46 * var(--uh)) !important;
  margin: 0;
}
body.land.s-home .home-row .small-btn:not(.home-gear) {
  display: none;
}
body.land.s-home .home-gear {
  position: fixed;
  left: calc(var(--sx) + 2 * var(--sw) / 100);
  top: 2.5vh;
  width: calc(6 * var(--su) / 100) !important;
  height: calc(6 * var(--su) / 100) !important;
}
body.land.s-home .home-coins {
  position: fixed;
  left: calc(var(--sx) + 79.5 * var(--sw) / 100);
  top: 2.5vh;
  right: auto;
  width: calc(18.5 * var(--su) / 100);
  height: calc(9.5 * var(--uh));
  font-size: calc(5 * var(--uh));
  margin: 0;
}
body.land.s-home .home-next .stop {
  position: fixed !important;
  transform: none !important;
  height: auto;
}
body.land.s-home .home-next .stop:nth-of-type(1) {
  left: calc(var(--sx) + 88 * var(--sw) / 100);
  top: 30.5vh;
  width: calc(6.5 * var(--su) / 100);
}
body.land.s-home .home-next .stop:nth-of-type(2) {
  left: calc(var(--sx) + 81 * var(--sw) / 100);
  top: 38.5vh;
  width: calc(7.5 * var(--su) / 100);
}
body.land.s-home .home-next .stop:nth-of-type(3) {
  left: calc(var(--sx) + 86.5 * var(--sw) / 100);
  top: 48.5vh;
  width: calc(8 * var(--su) / 100);
}
body.land.s-home .home-next .stop:nth-of-type(4) {
  left: calc(var(--sx) + 76 * var(--sw) / 100);
  top: 58vh;
  width: calc(11 * var(--su) / 100);
}
body.land.s-home .home-next .stop b {
  font-size: calc(4.4 * var(--uh));
}
body.land.s-home .home-next .stop.cur b {
  font-size: calc(6 * var(--uh));
}
body.land.s-home .home-bar {
  display: flex;
  position: fixed;
  left: calc(var(--sx) + 20.5 * var(--sw) / 100);
  top: 83vh;
  width: calc(59 * var(--su) / 100);
  height: calc(15 * var(--uh));
  justify-content: center;
  gap: calc(2.5 * var(--su) / 100);
}
.bar-btn {
  width: 12.6vw;
  height: 100%;
  border: none;
  padding: 0 0 0.6vh;
  background: none center / 100% 100% no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2vh;
  font-weight: 800;
  font-size: 3.6vh;
  color: var(--ink);
}
.bar-btn .bi,
.bar-btn img,
.bar-btn svg {
  width: 7vh;
  height: 7vh;
}
.bar-btn.off {
  filter: grayscale(0.7) brightness(0.92);
}

.logo-s {
  width: 50vw;
}
body:not(.land) .topbar .coins {
  width: calc(35 * var(--pu) / 100);
  max-width: 240px;
}
body:not(.land) .helper .badge {
  min-width: calc(7 * var(--pu) / 100);
  width: calc(7 * var(--pu) / 100);
  height: calc(7 * var(--pu) / 100);
  font-size: calc(4.4 * var(--pu) / 100) !important;
}
.front-flowers {
  display: none;
}
body.land .front-flowers {
  display: block;
  position: fixed;
  left: 0;
  top: 68vh;
  width: calc(22 * var(--su) / 100);
  height: calc(32 * var(--uh));
  object-fit: cover;
  object-position: top;
  pointer-events: none;
}
body.land.s-home .home-next .stop {
  background-size: 100% 100%;
  padding: 0;
}
body.land.s-home .home-next .stop:nth-of-type(1) {
  height: calc(8.5 * var(--uh));
}
body.land.s-home .home-next .stop:nth-of-type(2) {
  height: calc(10 * var(--uh));
}
body.land.s-home .home-next .stop:nth-of-type(3) {
  height: calc(10 * var(--uh));
}
body.land.s-home .home-next .stop:nth-of-type(4) {
  height: calc(14 * var(--uh));
}

.map-head .sign {
  background: none center / 100% 100% no-repeat !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  color: var(--ink);
  font-weight: 800;
  -webkit-text-stroke: 0;
}

.fx-rays {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  aspect-ratio: 30 / 24;
}
.fx-rays .spark {
  position: static;
  width: 100%;
  height: 100%;
}
body:not(.land) .fx-rays {
  left: calc(var(--px) + 54.5 * var(--pw) / 100);
  top: calc(var(--sat) + 9.5vh);
  width: calc(7 * var(--pu) / 100);
  height: 5.5vh;
  aspect-ratio: auto;
}
body.land .fx-rays {
  left: calc(var(--sx) + 53.5 * var(--sw) / 100);
  top: 9vh;
  width: calc(6 * var(--su) / 100);
  height: calc(9 * var(--uh));
  aspect-ratio: auto;
  transform: scaleX(-1);
}
.map-art .fx-rays {
  position: absolute;
  transform: translate(-50%, -50%) scaleX(-1);
}
.home-rays {
  display: none;
}
body.land.s-home .home-rays {
  display: block;
  left: calc(var(--sx) + 22 * var(--sw) / 100);
  top: 44vh;
  width: calc(6 * var(--su) / 100);
  height: calc(9 * var(--uh));
  aspect-ratio: auto;
  transform: scaleX(-1);
}
.helper .spark {
  left: 8%;
  top: 4%;
  width: 34%;
  height: 32%;
  z-index: 1;
}

.sstars .star {
  stroke-width: 3.4;
  stroke: #6b4529 !important;
}
body.land.s-home .home .btn.big .bi {
  display: none;
}
body.land.s-home .home .btn.big {
  font-size: calc(10 * var(--uh));
  -webkit-text-stroke: 8px #2e6b1f;
}
body.land.s-home .home-gear {
  background: linear-gradient(#ffe27a, #ffc531) !important;
}
body.land.s-home .home-gear img {
  width: 62%;
  height: 62%;
  object-fit: contain;
  filter: brightness(0.35) sepia(1) hue-rotate(-20deg);
}

body:not(.land) .map ~ .topbar .coins {
  position: fixed;
  left: calc(var(--px) + 65 * var(--pw) / 100);
  top: calc(var(--sat) + 2.5vh);
  width: calc(32 * var(--pu) / 100);
  margin: 0;
}

.modal .btn.go,
.modal .btn.ghost,
.modal .btn.yellow {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: center / 100% 100% no-repeat !important;
}
.modal .btn.go {
  background-image: none !important;
}
.modal .btn.ghost {
  background-image: none !important;
}
.modal .btn.yellow {
  background-image: none !important;
}
.modal .ribbon {
  background: center / 100% 100% no-repeat !important;
  filter: none !important;
  aspect-ratio: auto;
}
.modal.lose .ribbon {
  background-image: none !important;
}
.modal.win .ribbon {
  background-image: none !important;
}
.modal.pause .ribbon {
  background-image: none !important;
}
.modal.lose .ribbon span,
.modal.win .ribbon span {
  color: #fff;
  -webkit-text-stroke: 1.06cqw #7a3a1c;
  paint-order: stroke fill;
}
.modal.win .ribbon span {
  color: #5a3518;
  -webkit-text-stroke: 0;
}
.modal.pause .ribbon span {
  color: #5a3518;
  -webkit-text-stroke: 0;
}
body.land.s-home .home-gear img {
  filter: brightness(0.35) sepia(1) hue-rotate(-20deg) !important;
}

/* portrait windows: each tile in the inventory box (position relative to the panel = screen box - panel corner) */
body .lose-back,
body .win-back {
  background: transparent !important;
  backdrop-filter: none !important;
}
body:not(.land) .pause-back {
  background: rgba(58, 36, 22, 0.45) !important;
  backdrop-filter: blur(3px);
}
body .lose-back,
body .win-back,
body .pause-back {
  display: block !important;
  padding: 0 !important;
}
body .modal.lose,
body .modal.win,
body .modal.pause {
  position: fixed !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  max-height: none !important;
}
body .modal.lose .m-body,
body .modal.win .m-body,
body .modal.pause .m-body,
body .modal .row,
body .modal .col,
body .modal .switches {
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
}
body .modal.lose > *,
body .modal.win > *,
body .modal.pause > * {
  margin: 0 !important;
}
body .modal .ribbon,
body .modal .m-face,
body .modal .m-foot,
body .modal.lose .m-body > *,
body .modal.win .m-body > *,
body .modal .row .btn,
body .modal.pause .col .btn,
body .modal .sep,
body .modal .switch {
  position: absolute !important;
  margin: 0 !important;
}
body .modal .ribbon {
  display: grid;
  place-items: center;
}
body .modal .row .btn,
body .modal.pause .col .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0 0 0.6cqh !important;
}
/* derrota [3,31,94,49] */
body .modal.lose {
  left: 3cqw;
  top: 31cqh;
  width: 94cqw;
  height: 49cqh;
}
body .modal.lose .ribbon {
  left: 6cqw;
  top: -4.5cqh;
  width: 82cqw;
  height: 9.5cqh;
}
body .modal.lose .ribbon span {
  font-size: 3.4cqh;
}
body .modal.lose .scene {
  left: 6cqw;
  top: 3.5cqh;
  width: 82cqw;
  height: 15.5cqh;
}
body .modal.lose .scene img {
  position: absolute;
  left: 24cqw;
  top: 0;
  width: 32cqw;
  height: 15.5cqh;
  object-fit: contain;
  object-position: bottom;
}
body .modal.lose .mini-tray {
  left: 4cqw;
  top: 18.5cqh;
  width: 86cqw;
  height: 11cqh;
  box-sizing: border-box;
  align-items: center;
}
body .modal.lose .mini-tray i {
  width: 11cqw;
  height: auto;
}
body .modal.lose .lose-head {
  left: 25cqw;
  top: 30.5cqh;
  width: 44cqw;
  font-size: 2.6cqh;
  line-height: 3cqh;
  text-align: center;
}
body .modal.lose .lose-head + p {
  left: 17cqw;
  top: 33.5cqh;
  width: 60cqw;
  font-size: 2cqh;
  line-height: 2.5cqh;
  text-align: center;
}
body .modal.lose .row .btn:nth-child(1) {
  left: 6cqw;
  top: 38cqh;
  width: 39cqw;
  height: 8cqh;
  font-size: 3.4cqh;
}
body .modal.lose .row .btn:nth-child(2) {
  left: 48cqw;
  top: 38cqh;
  width: 40cqw;
  height: 8cqh;
  font-size: 3cqh;
  line-height: 1;
}
body .modal.lose .row .btn .bbadge {
  position: absolute !important;
  left: 32cqw;
  top: -1.5cqh;
  right: auto;
  width: 7cqw;
  height: 4.5cqh;
  min-width: 0;
  font-size: 2.4cqh;
}
body .modal.lose .row .btn .bi {
  width: 4.6cqh;
  height: 4.6cqh;
}
/* victory [4.5,36,91,42] */
body .modal.win {
  left: 4.5cqw;
  top: 39.5cqh;
  width: 91cqw;
  height: 38.5cqh;
}
body .modal.win .m-face {
  left: 24.5cqw;
  top: -30.5cqh;
  width: 40cqw;
  height: 24cqh;
  object-fit: contain;
}
body .modal.win .ribbon {
  left: 3cqw;
  top: -5cqh;
  width: 85cqw;
  height: 9cqh;
}
body .modal.win .ribbon span {
  font-size: 3.4cqh;
}
body .modal.win .stars {
  left: 13.5cqw;
  top: 4cqh;
  width: 64cqw;
  height: 14cqh;
  display: flex;
  justify-content: center;
  align-items: center;
}
body .modal.win .earn {
  left: 27.5cqw;
  top: 19cqh;
  width: 35cqw;
  height: 7cqh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4cqh;
}
body .modal.win .row .btn:nth-child(1) {
  left: 5cqw;
  top: 28.5cqh;
  width: 32cqw;
  height: 7.5cqh;
  font-size: 3cqh;
}
body .modal.win .row .btn:nth-child(2) {
  left: 39.5cqw;
  top: 28cqh;
  width: 46cqw;
  height: 8.5cqh;
  font-size: 3.4cqh;
}
body .modal.win::before,
body .modal.win::after {
  content: '';
  position: absolute;
  top: 18.5cqh;
  width: 20cqw;
  height: 9cqh;
  background: none center / contain no-repeat;
  pointer-events: none;
}
body .modal.win::before {
  left: 1.5cqw;
}
body .modal.win::after {
  left: 69.5cqw;
  transform: scaleX(-1);
}
/* pausa [7,25,86,60] */
body .modal.pause {
  left: 7cqw;
  top: 28.1cqh;
  width: 86cqw;
  height: 56.9cqh;
}
body .modal.pause .m-face {
  left: 24cqw;
  top: -18.1cqh;
  width: 38cqw;
  height: 15cqh;
  object-fit: contain;
  object-position: bottom;
}
body .modal.pause .ribbon {
  left: 5cqw;
  top: -5.6cqh;
  width: 76cqw;
  height: 10.5cqh;
}
body .modal.pause .ribbon span {
  font-size: 3.2cqh;
}
body .modal.pause [data-a='go'] {
  left: 7.5cqw;
  top: 6.9cqh;
  width: 71cqw;
  height: 11cqh;
  font-size: 3.4cqh;
}
body .modal.pause [data-a='restart'] {
  left: 9cqw;
  top: 19.4cqh;
  width: 68cqw;
  height: 8.5cqh;
  font-size: 3cqh;
}
body .modal.pause [data-a='map'] {
  left: 9cqw;
  top: 29.4cqh;
  width: 68cqw;
  height: 8.5cqh;
  font-size: 3cqh;
}
body .modal.pause .sep {
  left: 11cqw;
  top: 38.9cqh;
  width: 64cqw;
  height: 2cqh;
}
body .modal.pause .switch[data-k='sound'] {
  left: 4.5cqw;
  top: 42.4cqh;
  width: 37cqw;
  height: 6.5cqh;
  font-size: 2cqh;
}
body .modal.pause .switch[data-k='music'] {
  left: 43.5cqw;
  top: 42.4cqh;
  width: 38cqw;
  height: 6.5cqh;
  font-size: 2cqh;
}
body .modal.pause .m-foot {
  left: 10cqw;
  top: 50.4cqh;
  width: 66cqw;
  height: 10cqh;
  object-fit: contain;
}

body.modal-open.m-lose .mascot {
  opacity: 1;
}
body .modal.lose .lose-head {
  left: 12cqw;
  width: 70cqw;
  white-space: nowrap;
}
body .modal.lose .lose-head + p {
  left: 7cqw;
  width: 80cqw;
  white-space: nowrap;
}

body .modal.lose .scene img {
  position: absolute !important;
  left: 24cqw !important;
  top: 0 !important;
  transform: none !important;
}
body .modal.lose .lose-head,
body .modal.lose .lose-head + p {
  left: 47cqw !important;
  width: auto !important;
  transform: translateX(-50%);
}

/* End of css/01-base.css */
