/* the splash: the studio mark on deep navy, the same in every skin so the native launch screen can match it, then the home screen */
.splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #0e1a55;
  transition: opacity 0.45s ease;
}
.splash .fw {
  width: min(58vw, 250px);
  height: auto;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.55s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.splash.in .fw {
  opacity: 1;
  transform: none;
}
.splash.out {
  opacity: 0;
  pointer-events: none;
}
/* home: the gold piece over a small board, the name, then the ways to play */
.home {
  position: fixed;
  inset: 0;
  z-index: 9;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: radial-gradient(85% 44% at 50% 30%, var(--cobalt-2), transparent 74%), var(--cobalt);
}
.home:focus {
  outline: none;
}
.hwrap {
  box-sizing: border-box;
  min-height: 100%;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}
.htop {
  display: flex;
  justify-content: flex-end;
}
.hero {
  flex: 1 0 auto;
  display: grid;
  place-items: center;
  padding: 4px 0 10px;
}
.hero svg {
  display: block;
  width: min(92%, 340px);
  max-height: 36vh;
  height: auto;
  overflow: visible;
}
.hbob {
  animation: hbob 3.4s ease-in-out infinite;
}
.hshadow {
  transform-box: fill-box;
  transform-origin: center;
  animation: hshadow 3.4s ease-in-out infinite;
}
@keyframes hbob {
  50% {
    transform: translateY(-9px);
  }
}
@keyframes hshadow {
  50% {
    transform: scale(0.8);
    opacity: 0.55;
  }
}
#homeTitle {
  margin: 0;
  text-align: center;
  font-size: clamp(36px, 10.6vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-shadow: 0 4px 0 rgba(var(--shade), 0.3);
}
.hact {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.hact .key {
  min-height: 56px;
  font-size: 19px;
  width: 100%;
}
#homeLevels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}
#homeLevels .cs {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--label);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#homeLevels .cs svg {
  width: 17px;
  height: 17px;
}
.hend {
  margin-top: 24px;
}
.hfoot {
  display: flex;
  justify-content: center;
  padding-top: 24px;
}
.hfoot .fw {
  height: 15px;
  width: auto;
  opacity: 0.62;
}
@media (max-height: 700px) {
  .hero svg {
    max-height: 30vh;
  }
  .hact {
    margin-top: 16px;
  }
  .hend {
    margin-top: 16px;
  }
  .hfoot {
    padding-top: 14px;
  }
}
/* the map: a back button, its name and the stars, kept in view while the chapters scroll */
.mwrap {
  padding-top: 0;
}
.mhead {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -16px;
  padding: max(14px, env(safe-area-inset-top)) 16px 14px;
  background: linear-gradient(var(--cobalt) 76%, rgba(0, 0, 0, 0));
}
#menuTitle {
  font-size: clamp(28px, 7.6vw, 36px);
}
.mstars {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mstars svg {
  width: 17px;
  height: 17px;
}
.mhead + #chapters .chap:first-child {
  margin-top: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .hbob,
  .hshadow {
    animation: none;
  }
  .splash .fw {
    transform: none;
    transition: opacity 0.3s;
  }
}
