/* Fredoka 600 (SIL Open Font License 1.1, fonts/Fredoka-OFL.txt). Cyrillic, Japanese, Korean and Chinese letters use the
   fonts of the device. */
@font-face {
  font-family: Fredoka;
  src: url(../fonts/fredoka-600-latin.woff2) format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Fredoka;
  src: url(../fonts/fredoka-600-latin-ext.woff2) format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Dig Gold Miner — screens. One unit (--u) = 1% of the stage width; the stage is 100u x 200u. */
:root {
  --gold: #f2b632;
  --ink: #fff1cf;
  --wood: #2e1b10;
  --cap: 0.04em;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #120a06;
  font-family: Fredoka, system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink);
}
/* The stage is the whole screen, in any shape. Sizes still come from --u, so the interface keeps its proportions:
   on a phone 100u is the width; on wide screens --u follows the height and the interface sits at the screen edges. */
#stage {
  position: fixed;
  inset: 0;
  --u: min(1vw, 0.5vh);
  --u: min(1vw, 0.5dvh);
  --rail: 64.4%;
  overflow: hidden;
  font-size: calc(var(--u) * 4.4);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
}
/* the centred column must not swallow touches meant for the corner buttons behind it */
.col {
  pointer-events: none;
}
.screen.on .col > *:not(img) {
  pointer-events: auto;
} /* only on the screen that is showing: hidden screens must never catch the pointer */
/* HUD pieces that are not buttons let the pointer through, so you can dig under them */
#lvl,
#bar,
#gems,
#hint {
  pointer-events: none;
}
#levels > .tl {
  z-index: 2;
}
/* small or lying-down phones: the in-game HUD and the corner buttons never go below a finger-sized target, and panels
   use the height that is available instead of the narrow column scale */
#game,
#snd,
#gear,
#levels > .tl {
  --u: max(min(1vw, 0.5vh), 3.8px);
  --u: max(min(1vw, 0.5dvh), 3.8px);
}
#veil {
  --u: max(min(1vw, 0.5vh), min(1vw, 0.58vh, 6px));
  --u: max(min(1vw, 0.5dvh), min(1vw, 0.58dvh, 6px));
  font-size: calc(var(--u) * 4.4);
}
.col {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: calc(var(--u) * 100);
  margin-left: calc(var(--u) * -50);
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  outline: none;
}
img {
  -webkit-user-drag: none;
  pointer-events: none;
}
[hidden] {
  display: none !important;
}

/* 9-slice pieces: the CSS names the art, nine.js bakes it at the exact pixel size */
.band,
.sq,
.btn,
.panel {
  border-color: transparent;
}
.nine {
  border-image-source: none !important;
  background-origin: border-box;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.band {
  border-style: solid;
  border-width: 0 calc(var(--u) * 4.4);
  border-image: url(../assets/img/band.webp) 0 70 fill;
  height: calc(var(--u) * 9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 1.5);
  white-space: nowrap;
  padding-top: var(--cap);
}
.sq {
  width: calc(var(--u) * 10.5);
  height: calc(var(--u) * 10.5);
  border-style: solid;
  border-width: calc(var(--u) * 3.2);
  border-image: url(../assets/img/btn-square.webp) 88 fill;
  display: inline-grid;
  place-items: center;
}
.sq img {
  width: calc(var(--u) * 6);
  height: calc(var(--u) * 6);
  object-fit: contain;
  margin: calc(var(--u) * -2);
}
.btn {
  height: calc(var(--u) * 14);
  min-width: calc(var(--u) * 40);
  border-style: solid;
  border-width: 0 calc(var(--u) * 7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 2);
  white-space: nowrap;
  font-size: calc(var(--u) * 5.4);
  padding-bottom: calc(var(--u) * 0.9);
  text-shadow: 0 calc(var(--u) * 0.35) 0 #00000055;
}
.btn.amber {
  border-image: url(../assets/img/btn-amber.webp) 0 78 fill;
}
.btn.wood {
  border-image: url(../assets/img/btn-wood.webp) 0 70 fill;
}
.btn.big {
  height: calc(var(--u) * 19);
  min-width: calc(var(--u) * 70);
  font-size: calc(var(--u) * 8);
  border-width: 0 calc(var(--u) * 9.5);
}
.btn img {
  height: calc(var(--u) * 6);
  width: auto;
}
.btn.big img {
  height: calc(var(--u) * 8);
}
/* press: down at once, back with a spring. Separate translate/scale, never transform: the entries use transform */
.btn,
.sq,
.x,
.tile,
#langGrid button,
button.row {
  transition:
    translate 0.34s cubic-bezier(0.22, 1.5, 0.4, 1),
    scale 0.34s cubic-bezier(0.22, 1.5, 0.4, 1),
    filter 0.12s;
}
:is(.btn, .sq, .x, .tile, #langGrid button, button.row)[data-down] {
  transition-duration: 60ms;
  transition-timing-function: ease-out;
  filter: brightness(0.9);
}
.btn[data-down] {
  translate: 0 calc(var(--u) * 0.8);
  scale: 0.96 0.91;
}
:is(.sq, .x, .tile)[data-down] {
  scale: 0.88;
}
:is(#langGrid button, button.row)[data-down] {
  scale: 0.97;
}
@media (hover: hover) {
  .btn:not(:disabled, [data-down]):hover {
    translate: 0 -4%;
  }
  :is(.sq, .x):not([data-down]):hover {
    scale: 1.06;
  }
}
.panel[data-out],
.panel[data-out] * {
  pointer-events: none !important;
}

/* screens */
.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}
.screen.on {
  opacity: 1;
  pointer-events: auto;
}
#menu,
#levels {
  background: #1a0e08 url(../assets/img/menu-bg.webp) center / auto 100% no-repeat;
}
@media (min-aspect-ratio: 5/8) {
  #stage {
    --rail: 76.6%;
  }
  #logo {
    top: calc(var(--u) * 4);
  }
  #menu,
  #levels {
    background-image: url(../assets/img/menu-bg-wide.webp);
    background-size: cover;
    background-position: 50% 100%;
  }
}
@media (min-aspect-ratio: 16/9) {
  #menu,
  #levels {
    background-size: auto 100%;
    background-color: #120a06;
  }
}
#levels::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #140b06b0;
}
#cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
/* sound and settings stay above the dark veil: they open over the pause and the end of a level */
#snd,
#gear {
  z-index: 3;
}
.tr1 {
  position: absolute;
  top: calc(var(--u) * 2 + var(--st));
  right: calc(var(--u) * 2 + var(--sr));
}
.tr2 {
  position: absolute;
  top: calc(var(--u) * 2 + var(--st));
  right: calc(var(--u) * 13.5 + var(--sr));
}
.tl {
  position: absolute;
  top: calc(var(--u) * 2 + var(--st));
  left: calc(var(--u) * 2 + var(--sl));
}
.bl1 {
  position: absolute;
  bottom: calc(var(--u) * 1.5 + var(--sb));
  left: calc(var(--u) * 2 + var(--sl));
}
.bl2 {
  position: absolute;
  bottom: calc(var(--u) * 1.5 + var(--sb));
  left: calc(var(--u) * 13.5 + var(--sl));
}

/* titles and big buttons are upper case in every language */
.title,
.btn.big,
#menuPair .btn,
#lvl,
#worldName {
  text-transform: uppercase;
}

/* HUD */
#lvl {
  position: absolute;
  top: calc(var(--u) * 2.7 + var(--st));
  left: calc(var(--u) * 2 + var(--sl));
  font-size: calc(var(--u) * 4.2);
}
#bar {
  position: absolute;
  top: calc(var(--u) * 8 + var(--st));
  left: 50%;
  margin-left: calc(var(--u) * -18);
  width: min(calc(var(--u) * 41), calc(51vw - var(--u) * 10.4));
  height: calc(var(--u) * 5.6);
  border-radius: calc(var(--u) * 3);
  background: #1c100a;
  border: calc(var(--u) * 0.55) solid var(--gold);
  box-shadow:
    0 calc(var(--u) * 0.5) 0 #0008,
    inset 0 calc(var(--u) * 0.5) calc(var(--u) * 0.8) #000a;
}
#fill {
  height: 100%;
  width: 0;
  border-radius: calc(var(--u) * 3);
  background: linear-gradient(#ffe27a, #f5a80f 60%, #c97a05);
  transition: width 0.18s;
}
#pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: calc(var(--u) * 3.3);
  text-shadow: 0 1px 2px #000c;
  padding-top: var(--cap);
}
.tick {
  position: absolute;
  top: calc(var(--u) * -6.2);
  width: calc(var(--u) * 6);
  margin-left: calc(var(--u) * -3);
  transition: transform 0.4s cubic-bezier(0.3, 1.9, 0.5, 1);
}
.tick:nth-of-type(1) {
  left: calc(50% - var(--u) * 7.5);
}
.tick:nth-of-type(2) {
  left: 50%;
}
.tick:nth-of-type(3) {
  left: calc(50% + var(--u) * 7.5);
} /* the three stars sit together, centred over the bar */
.tick.on {
  transform: scale(1.22);
}
#done {
  position: absolute;
  bottom: calc(var(--u) * 1.2 + var(--sb));
  left: 50%;
  margin-left: calc(var(--u) * -19);
  height: calc(var(--u) * 11);
  min-width: calc(var(--u) * 38);
  border-width: 0 calc(var(--u) * 5.5);
  font-size: calc(var(--u) * 4.6);
  animation: pop 0.4s cubic-bezier(0.3, 1.7, 0.5, 1);
}
#gems {
  position: absolute;
  bottom: calc(var(--u) * 2.2 + var(--sb));
  right: calc(var(--u) * 2 + var(--sr));
}
#gems img {
  height: calc(var(--u) * 5.4);
}
#goalIc2 {
  position: absolute;
  left: calc(var(--u) * 4.6);
  top: 50%;
  transform: translateY(-50%);
  width: calc(var(--u) * 7);
  height: calc(var(--u) * 7);
  object-fit: contain;
  filter: drop-shadow(0 1px 2px #0008);
} /* the second metal when a level fills a gold and a silver cart */
#goalIc {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: calc(var(--u) * 7);
  height: calc(var(--u) * 7);
  object-fit: contain;
  filter: drop-shadow(0 1px 2px #0008);
}
#hint {
  position: absolute;
  top: calc(var(--u) * 21);
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(var(--u) * 3.8);
}
/* a phone lying down: the top of the mine is where the gold is, so the tip waits just above the gallery */
@media (min-aspect-ratio: 3/2) and (max-height: 520px) {
  #hint {
    top: 60%;
  }
}
/* finger-sized targets (44 px) even where the scale makes the drawing smaller */
.panel .btn,
.panel .sq,
.x,
#worldRow .sq,
#levels > .tl {
  min-height: 44px;
}
.panel .sq,
.x,
#worldRow .sq,
#levels > .tl {
  min-width: 44px;
}

/* menu */
#logo {
  position: absolute;
  top: max(calc(var(--u) * 6), calc(var(--rail) - var(--u) * 112));
  left: 6%;
  width: 88%;
}
.scene {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--rail) - var(--u) * 35);
  height: calc(var(--u) * 36);
} /* feet and wheels on the painted rail */
.scene .mole {
  position: absolute;
  left: calc(var(--u) * 16);
  bottom: 0;
  height: calc(var(--u) * 35);
  transform-origin: 50% 100%;
  animation: breathe 3.2s ease-in-out infinite;
}
.scene .cartWrap {
  position: absolute;
  left: calc(var(--u) * 40);
  bottom: calc(var(--u) * -0.5);
  width: calc(var(--u) * 42);
}
.scene .cart {
  width: 100%;
  display: block;
  position: relative;
}
/* the load sits inside the open cart: full cart, then the gold, then the cart's front wall on top */
.scene .heap {
  position: absolute;
  width: 78%;
  left: 11%;
  top: -7%;
}
.scene .front {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}
#menuBtns {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--rail) + var(--u) * 8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 4);
}
.pair {
  display: flex;
  gap: calc(var(--u) * 3);
  justify-content: center;
}
#menuPair .btn {
  min-width: calc(var(--u) * 44);
  height: calc(var(--u) * 13);
  font-size: calc(var(--u) * 4.8);
  border-width: 0 calc(var(--u) * 6.5);
}

/* level select */
#worldRow {
  position: absolute;
  top: calc(var(--u) * 16 + var(--st));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--u) * 2);
}
#worldName {
  min-width: calc(var(--u) * 60);
  height: calc(var(--u) * 11);
  font-size: calc(var(--u) * 4.6);
}
#grid {
  position: absolute;
  top: calc(var(--u) * 32 + var(--st));
  left: calc(var(--u) * 4);
  right: calc(var(--u) * 4);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: calc(var(--u) * 2.4);
}
.tile {
  aspect-ratio: 220 / 208;
  background: url(../assets/img/tile.webp) center / 100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--u) * 7);
  line-height: 1;
  padding-top: calc(var(--u) * 0.6);
}
.tile.now {
  background-image: url(../assets/img/tile-now.webp);
}
.tile.locked {
  background-image: url(../assets/img/tile-locked.webp);
  color: #b9a68c;
}
.tile .st {
  display: flex;
  height: calc(var(--u) * 3.6);
  margin-top: calc(var(--u) * 0.6);
}
.tile .st img {
  height: 100%;
}
.tile .lk {
  height: calc(var(--u) * 4.6);
  margin-top: calc(var(--u) * 0.4);
  opacity: 0.85;
}
#total {
  position: absolute;
  top: calc(var(--rail) + var(--u) * 12);
  left: 50%;
  transform: translateX(-50%);
  min-width: calc(var(--u) * 44);
  height: calc(var(--u) * 11);
  font-size: calc(var(--u) * 5.2);
}
#total img {
  height: calc(var(--u) * 6.5);
}
/* panels */
#veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0a0503c9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
#veil.on {
  opacity: 1;
  pointer-events: auto;
}
.panel {
  display: none;
  grid-area: 1 / 1;
  position: relative;
  width: calc(var(--u) * 86);
  border-style: solid;
  border-width: calc(var(--u) * 6);
  border-image: url(../assets/img/panel.webp) 70 fill;
  padding: calc(var(--u) * 9) calc(var(--u) * 2) calc(var(--u) * 3);
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 3.2);
}
.panel.on {
  display: flex;
}
.panel .title {
  position: absolute;
  top: calc(var(--u) * -12);
  left: calc(var(--u) * -3);
  right: calc(var(--u) * -3);
  height: calc(var(--u) * 13.5);
  border-width: 0 calc(var(--u) * 6.6);
  font-size: calc(var(--u) * 6);
}
.x {
  position: absolute;
  top: calc(var(--u) * -15.5);
  right: calc(var(--u) * -8.5);
  width: calc(var(--u) * 11);
  height: calc(var(--u) * 11);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #5a3520, #2a170c);
  border: calc(var(--u) * 0.7) solid var(--gold);
  display: grid;
  place-items: center;
  box-shadow: 0 calc(var(--u) * 0.6) 0 #0009;
}
.x img {
  width: 52%;
}
.row {
  width: 100%;
  min-height: calc(var(--u) * 15);
  display: grid;
  grid-template-columns: calc(var(--u) * 9) minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(var(--u) * 3);
  padding: 0 calc(var(--u) * 2);
  font-size: calc(var(--u) * 5);
  text-align: left;
  border-bottom: calc(var(--u) * 0.3) solid #00000040;
}
.row:last-child {
  border-bottom: 0;
}
.row > img {
  width: calc(var(--u) * 8);
  height: calc(var(--u) * 8);
  object-fit: contain;
}
.row b {
  font-weight: 600;
  background: #1c100a;
  border: calc(var(--u) * 0.5) solid var(--gold);
  border-radius: calc(var(--u) * 5);
  padding: calc(var(--u) * 1.6) calc(var(--u) * 4);
  font-size: calc(var(--u) * 4.2);
}
#pSound .row {
  grid-template-columns: calc(var(--u) * 9) minmax(0, 1fr);
  grid-template-rows: auto auto;
  row-gap: 0;
  padding-bottom: calc(var(--u) * 3);
}
#pSound .row > img {
  grid-row: span 2;
}
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: calc(var(--u) * 5);
  border-radius: calc(var(--u) * 3);
  background: linear-gradient(90deg, #ffd45a, #f09a0c) 0 / var(--v, 50%) 100% no-repeat #1c100a;
  border: calc(var(--u) * 0.5) solid var(--gold);
  margin: calc(var(--u) * 2.5) 0;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: calc(var(--u) * 8.5);
  height: calc(var(--u) * 8.5);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff0a8, #f2a71a 60%, #b96c05);
  border: calc(var(--u) * 0.5) solid #7a4706;
  box-shadow: 0 calc(var(--u) * 0.5) 0 #0008;
}
input[type='range']::-moz-range-thumb {
  width: calc(var(--u) * 8);
  height: calc(var(--u) * 8);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff0a8, #f2a71a 60%, #b96c05);
  border: calc(var(--u) * 0.5) solid #7a4706;
}
.sw {
  -webkit-appearance: none;
  appearance: none;
  width: calc(var(--u) * 19);
  height: calc(var(--u) * 9);
  border-radius: calc(var(--u) * 5);
  background: #1c100a;
  border: calc(var(--u) * 0.5) solid var(--gold);
  position: relative;
  margin: 0;
  transition: background 0.18s;
}
.sw::after {
  content: '';
  position: absolute;
  top: calc(var(--u) * 0.4);
  left: calc(var(--u) * 0.5);
  width: calc(var(--u) * 7.2);
  height: calc(var(--u) * 7.2);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff0a8, #f2a71a 60%, #b96c05);
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.sw:checked {
  background: linear-gradient(#f7c33c, #e59a0c);
}
.sw:checked::after {
  transform: translateX(calc(var(--u) * 10));
}
#langGrid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--u) * 2);
}
#langGrid button {
  height: calc(var(--u) * 11.5);
  border-radius: calc(var(--u) * 3);
  background: #1c100a;
  border: calc(var(--u) * 0.5) solid #7a5a2a;
  font-size: calc(var(--u) * 4.3);
}
#langGrid button.on {
  border-color: var(--gold);
  background: linear-gradient(#f7c33c, #e59a0c);
  color: #2a1608;
}
.panel .btn {
  width: 92%;
}
.how {
  width: 100%;
  display: grid;
  grid-template-columns: calc(var(--u) * 11) minmax(0, 1fr);
  gap: calc(var(--u) * 3);
  align-items: center;
  font-size: calc(var(--u) * 4);
  line-height: 1.25;
  text-align: left;
  padding: 0 calc(var(--u) * 2);
}
.how img {
  width: calc(var(--u) * 10);
  height: calc(var(--u) * 10);
  object-fit: contain;
}
/* end of level */
#pEnd {
  padding-top: calc(var(--u) * 13);
  gap: calc(var(--u) * 2.4);
  margin-top: calc(var(--u) * 26);
} /* room for the big stars that hang above it: the veil centres panel + stars */
#endStars {
  position: absolute;
  top: calc(var(--u) * -31);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: calc(var(--u) * 1);
}
#endStars img {
  width: calc(var(--u) * 21);
}
#endStars img:nth-child(2) {
  margin-top: calc(var(--u) * -4);
}
#endStars img.hit {
  animation: stamp 0.5s cubic-bezier(0.3, 1.8, 0.5, 1) both;
}
#endMole {
  height: calc(var(--u) * 44);
  transform-origin: 50% 100%;
  animation: breathe 1.1s ease-in-out infinite;
}
#endBar {
  width: 88%;
  height: calc(var(--u) * 6);
  border-radius: calc(var(--u) * 3);
  background: #1c100a;
  border: calc(var(--u) * 0.55) solid var(--gold);
  position: relative;
  margin-top: calc(var(--u) * 3);
}
#endFill {
  height: 100%;
  border-radius: calc(var(--u) * 3);
  background: linear-gradient(#ffe27a, #f5a80f 60%, #c97a05);
}
#endGoal {
  position: absolute;
  left: 60%;
  top: calc(var(--u) * -3.2);
  width: calc(var(--u) * 7);
  margin-left: calc(var(--u) * -3.5);
}
.stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 3);
  min-width: 62%;
  height: calc(var(--u) * 10.5);
  border-radius: calc(var(--u) * 6);
  background: #1c100a;
  border: calc(var(--u) * 0.5) solid var(--gold);
  font-size: calc(var(--u) * 5.2);
  padding: var(--cap) calc(var(--u) * 5) 0;
  white-space: nowrap;
}
.stat img {
  height: calc(var(--u) * 7);
}
#loading {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: #140b06;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: calc(var(--u) * 8);
  transition: opacity 0.4s;
}
#loading img {
  width: calc(var(--u) * 80);
}
#loading.off {
  opacity: 0;
  pointer-events: none;
}
#loadBar {
  width: calc(var(--u) * 60);
  height: calc(var(--u) * 4);
  border-radius: calc(var(--u) * 2);
  background: #1c100a;
  border: calc(var(--u) * 0.5) solid var(--gold);
}
#loadFill {
  height: 100%;
  width: 0;
  border-radius: calc(var(--u) * 2);
  background: linear-gradient(#ffe27a, #f09a0c);
  transition: width 0.2s;
}

.fly {
  position: fixed;
  z-index: 8;
  pointer-events: none;
}
.tile {
  animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
/* the level you are on breathes a little; stars in the grid arrive one after another */
.tile.now {
  animation:
    pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) both,
    tilenow 1.8s ease-in-out 0.5s infinite;
}
@keyframes tilenow {
  50% {
    transform: scale(1.045);
  }
}
.tile .st img {
  animation: pop 0.3s cubic-bezier(0.3, 1.8, 0.5, 1) both;
  animation-delay: inherit;
}
.tile .st img:nth-child(2) {
  margin-top: 0;
}
/* a world turned by the arrows slides in whole (uifx.slideCards): its tiles do not pop one by one */
#grid[data-slid] .tile:not(.now),
#grid[data-slid] .tile .st img {
  animation-duration: 1ms;
}
#grid[data-slid] .tile.now {
  animation-duration: 1ms, 1.8s;
}
@keyframes pop {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
}
@keyframes stamp {
  from {
    transform: scale(2.4) rotate(-18deg);
    opacity: 0;
  }
}
@keyframes breathe {
  50% {
    transform: scale(1.012, 1.035);
  }
}
#done.btn {
  animation-fill-mode: both;
}
/* less motion: entrances get 1ms (never `none`, or they replay and blink when the option is turned off); loops stop */
.calm *,
.calm {
  animation-duration: 1ms !important;
  transition-duration: 1ms !important;
}
.calm .mole,
.calm #endMole,
.calm .tile.now {
  animation: none !important;
}
/* short screens: a smaller mole in the end panel keeps the big stars above it on the screen */
@media (max-height: 520px) {
  #endMole {
    height: calc(var(--u) * 28);
  }
  #pEnd {
    gap: calc(var(--u) * 1.6);
  }
}
/* End of src/style.css (complete file). */
