:root {
  --parchment: #FBE7BC;
  --parch2: #F0D094;
  --wood: #A85A32;
  --wood-d: #6E3418;
  --wood-dd: #4A2010;
  --plank: #B5613C;
  --rope: #D2A05C;
  --ink: #5A2E1B;
  --gold: #FFC61A;
  --gold-d: #e0a400;
  --cell: 64px;
  --sh: 0 10px 28px rgba(0,0,0,.4)
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none
}
body,
html {
  height: 100%;
  height: -webkit-fill-available;
  margin: 0
}
body {
  font-family: "Baloo 2","Nunito","Segoe UI",system-ui,sans-serif;
  color: var(--ink);
  background: #0b1e2b;
  overflow: hidden;
  display: grid;
  place-items: center
}
img {
  display: block;
  -webkit-user-drag: none;
  pointer-events: none
}
#backdrop {
  position: fixed;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(.55) saturate(1.2);
  transition: background-image .5s
}
#stage {
  position: relative;
  width: min(100vw,92vh);
  height: 100vh;
  height: -webkit-fill-available;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,.6)
}
@supports (height:100svh) {
  #stage {
    width: min(100vw,92svh);
    height: 100svh
  }
}
.scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity .32s ease,transform .32s ease,visibility .32s
}
.scene.show {
  opacity: 1;
  visibility: visible;
  transform: none
}
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(255,255,255,.05),rgba(0,0,0,.12)),var(--veil, transparent)
}
#scene-start {
  justify-content: flex-start;
  padding-top: 7vh;
  gap: 0
}
.logo-wrap {
  position: relative;
  text-align: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center
}
.logo-wrap .t1 {
  font-size: 58px;
  font-weight: 800;
  color: #fff;
  line-height: 1.02;
  margin: 2px 0 0;
  text-shadow: 0 3px 0 var(--wood-dd),0 6px 0 rgba(0,0,0,.25),0 10px 20px rgba(0,0,0,.5);
  letter-spacing: 2px
}
.logo-wrap .t1 b {
  color: var(--gold)
}
.logo-wrap .t2 {
  font-size: 20px;
  color: #ffe9c4;
  font-weight: 700;
  margin-top: 14px;
  text-shadow: 0 2px 6px rgba(0,0,0,.6)
}
.logo-gem {
  width: 88px;
  margin: 0 auto 14px;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.5));
  animation: bob 2.4s ease-in-out infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden
}
@keyframes bob {
  0%,
  100% {
    transform: translate3d(0,0,0) rotate(-4deg)
  }
  50% {
    transform: translate3d(0,-10px,0) rotate(4deg)
  }
}
.play-big {
  margin-top: 6vh;
  width: 240px;
  height: 82px;
  position: relative;
  cursor: pointer;
  transition: transform .1s;
  z-index: 1
}
.play-big:active {
  transform: scale(.95)
}
.play-big img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.4))
}
.play-big span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 3px rgba(0,0,0,.4);
  letter-spacing: 1px
}
.start-row {
  margin-top: 5vh;
  display: flex;
  gap: 20px;
  z-index: 1
}
.cbtn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .1s;
  background: radial-gradient(circle at 38% 28%,#5cc0ff,#1f7fd0);
  border: 3px solid #eaf6ff;
  box-shadow: 0 5px 0 #145a99,0 8px 14px rgba(0,0,0,.45)
}
.cbtn:active {
  transform: scale(.92)
}
.cbtn svg {
  width: 56%;
  height: 56%;
  fill: #fff;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35))
}
.hello {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 2px 6px rgba(0,0,0,.7);
  cursor: pointer
}
.hello::after {
  content: " ✎";
  opacity: .7;
  font-size: 13px
}
.crab-lane {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5%;
  height: 70px;
  pointer-events: none;
  z-index: 2;
  overflow: hidden
}
.crab {
  position: absolute;
  bottom: 0;
  left: -100px;
  filter: drop-shadow(0 5px 4px rgba(0,0,0,.28));
  animation: crab-walk 26s linear infinite;
  transform-origin: center bottom
}
.crab svg {
  display: block;
  animation: crab-bob .5s ease-in-out infinite
}
.crab .claw-l {
  transform-origin: 32px 30px;
  animation: claw-l 1.1s ease-in-out infinite
}
.crab .claw-r {
  transform-origin: 88px 30px;
  animation: claw-r 1.1s ease-in-out infinite
}
.crab .leg {
  animation: leg-step .5s ease-in-out infinite;
  transform-origin: top
}
.crab .leg:nth-child(2),
.crab .leg:nth-child(4) {
  animation-delay: .25s
}
@keyframes crab-walk {
  0% {
    left: -100px;
    transform: scaleX(1)
  }
  47% {
    left: calc(100% + 10px);
    transform: scaleX(1)
  }
  48% {
    left: calc(100% + 10px);
    transform: scaleX(-1)
  }
  95% {
    left: -100px;
    transform: scaleX(-1)
  }
  96% {
    left: -100px;
    transform: scaleX(1)
  }
  100% {
    left: -100px;
    transform: scaleX(1)
  }
}
@keyframes crab-bob {
  0%,
  100% {
    transform: translateY(0)
  }
  50% {
    transform: translateY(-3px)
  }
}
@keyframes claw-l {
  0%,
  100% {
    transform: rotate(0)
  }
  50% {
    transform: rotate(-12deg)
  }
}
@keyframes claw-r {
  0%,
  100% {
    transform: rotate(0)
  }
  50% {
    transform: rotate(12deg)
  }
}
@keyframes leg-step {
  0%,
  100% {
    transform: translateY(0)
  }
  50% {
    transform: translateY(-2px)
  }
}
@media (prefers-reduced-motion:reduce) {
  .crab {
    animation-duration: 60s
  }
  .crab .claw-l,
  .crab .claw-r,
  .crab .leg,
  .crab svg {
    animation: none
  }
}
.iconbtn {
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: transform .1s;
  flex: 0 0 auto
}
.iconbtn:active {
  transform: scale(.9)
}
.iconbtn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.4))
}
.iconbtn.big {
  width: 64px;
  height: 64px
}
.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  z-index: 2
}
.chip {
  height: 42px;
  padding: 0 16px 0 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  background: linear-gradient(180deg,rgba(0,0,0,.42),rgba(0,0,0,.58));
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 22px;
  text-shadow: 0 1px 2px rgba(0,0,0,.7)
}
.chip img {
  width: 30px;
  height: 30px
}
.spacer {
  flex: 1
}
#scene-map {
  justify-content: flex-start
}
.map-title {
  margin: 4px 0 2px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 2px 0 var(--wood-dd),0 4px 10px rgba(0,0,0,.5);
  z-index: 2
}
.map-scroll {
  flex: 1;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  overflow-y: auto;
  padding: 6px 12px 30px;
  z-index: 1
}
.world {
  margin: 10px 6px 18px;
  background: rgba(255,255,255,.16);
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 20px;
  padding: 12px 10px 16px
}
.world h3 {
  color: #fff;
  font-size: 17px;
  margin: 2px 10px 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,.7);
  text-align: center
}
.nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center
}
.node {
  width: 88px;
  height: 100px;
  position: relative;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .12s
}
.node:active {
  transform: scale(.94)
}
.node .disc {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 26px;
  color: #fff;
  background: radial-gradient(circle at 35% 30%,#ffd873,var(--gold-d));
  border: 4px solid #fff8e0;
  box-shadow: 0 5px 0 #a9760a,0 8px 14px rgba(0,0,0,.4);
  text-shadow: 0 2px 2px rgba(0,0,0,.35)
}
.node.locked .disc {
  background: radial-gradient(circle at 35% 30%,#9a8f80,#5e5347);
  box-shadow: 0 5px 0 #3f382e,0 8px 14px rgba(0,0,0,.4);
  color: #d9d2c6
}
.node .stars {
  position: absolute;
  top: -4px
}
.node .stars img {
  width: 56px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5))
}
#scene-level {
  justify-content: flex-start
}
.hud {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 16px;
  z-index: 2
}
.moves {
  width: 82px;
  height: 82px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: radial-gradient(circle at 40% 32%,#ffe08a,var(--gold-d));
  border-radius: 50%;
  border: 4px solid #fff8e0;
  box-shadow: 0 5px 0 #a9760a,0 8px 14px rgba(0,0,0,.4)
}
.moves .n {
  font-size: 32px;
  font-weight: 800;
  color: #5a2e1b;
  text-shadow: 0 1px 0 rgba(255,255,255,.4)
}
.moves .lbl {
  position: absolute;
  bottom: 9px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7a4a20
}
.goals {
  flex: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center
}
.goal {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg,var(--parchment),var(--parch2));
  border: 2px solid var(--wood);
  border-radius: 16px;
  padding: 5px 14px 5px 6px;
  box-shadow: 0 3px 0 var(--wood-d)
}
.goal img {
  width: 44px;
  height: 44px
}
.goal .g-txt {
  font-weight: 800;
  font-size: 19px;
  line-height: 1;
  color: var(--ink)
}
.goal.done {
  filter: saturate(.7) brightness(1.05)
}
.goal.done .g-txt::after {
  content: " ✓";
  color: #2e8b32
}
.progressbar {
  height: 18px;
  margin: 0 auto 2px;
  border-radius: 9px;
  background: rgba(0,0,0,.4);
  border: 2px solid var(--wood-d);
  overflow: hidden;
  z-index: 2;
  flex: 0 0 auto;
  box-shadow: 0 3px 8px rgba(0,0,0,.3)
}
.progressbar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg,var(--gold),#ffe39a);
  transition: width .35s
}
.board-area {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 1;
  overflow: hidden
}
.board-wrap {
  position: relative;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg,var(--plank),var(--wood-d));
  box-shadow: var(--sh),inset 0 0 0 3px rgba(255,255,255,.12),inset 0 -6px 0 rgba(0,0,0,.25)
}
.board {
  position: relative;
  border-radius: 12px;
  overflow: hidden
}
.cellbg {
  position: absolute;
  background-size: cover;
  border-radius: 8px;
  opacity: .92
}
.gem {
  position: absolute;
  left: 0;
  top: 0;
  transition: transform .2s cubic-bezier(.3,1.3,.5,1);
  z-index: 2;
  cursor: pointer
}
.gem img.face {
  width: 100%;
  height: 100%
}
.gem.sel {
  filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 16px var(--gold));
  z-index: 4
}
.gem.hint {
  animation: hint 1s ease-in-out infinite
}
@keyframes hint {
  0%,
  100% {
    transform: var(--pos) scale(1)
  }
  50% {
    transform: var(--pos) scale(1.13)
  }
}
.gem.pop {
  animation: pop .3s ease forwards;
  z-index: 5;
  pointer-events: none
}
@keyframes pop {
  0% {
    transform: var(--pos) scale(1)
  }
  40% {
    transform: var(--pos) scale(1.22) rotate(8deg)
  }
  100% {
    transform: var(--pos) scale(0) rotate(24deg);
    opacity: 0
  }
}
.gem.drop {
  animation: drop .32s ease
}
@keyframes drop {
  0% {
    opacity: .15
  }
  100% {
    opacity: 1
  }
}
.ice {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  background-size: cover
}
.ice.crack {
  animation: crack .3s ease
}
@keyframes crack {
  0% {
    transform: var(--ipos) scale(1)
  }
  50% {
    transform: var(--ipos) scale(1.15)
  }
  100% {
    transform: var(--ipos) scale(1)
  }
}
.spark {
  position: absolute;
  z-index: 6;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,#fff,rgba(255,220,120,.7));
  animation: spark .5s ease forwards
}
@keyframes spark {
  to {
    transform: translate(var(--dx),var(--dy)) scale(.2);
    opacity: 0
  }
}
.floatscore {
  position: absolute;
  z-index: 7;
  font-weight: 800;
  color: #fff;
  font-size: calc(var(--cell)*.42);
  text-shadow: 0 2px 4px rgba(0,0,0,.7),0 0 10px var(--gold);
  pointer-events: none;
  animation: fs 1s ease forwards
}
@keyframes fs {
  0% {
    transform: translate(-50%,-40%) scale(.5);
    opacity: 0
  }
  25% {
    opacity: 1;
    transform: translate(-50%,-70%) scale(1.15)
  }
  100% {
    transform: translate(-50%,-150%);
    opacity: 0
  }
}
.combo {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%,-50%);
  z-index: 8;
  pointer-events: none;
  font-weight: 800;
  font-size: 38px;
  color: #fff;
  text-shadow: 0 3px 0 var(--gold-d),0 6px 14px rgba(0,0,0,.6);
  animation: combo .8s ease forwards
}
@keyframes combo {
  0% {
    transform: translate(-50%,-50%) scale(.4);
    opacity: 0
  }
  30% {
    transform: translate(-50%,-50%) scale(1.18);
    opacity: 1
  }
  100% {
    transform: translate(-50%,-90%) scale(1);
    opacity: 0
  }
}
.board-wrap.shake {
  animation: shake .3s
}
@keyframes shake {
  0%,
  100% {
    transform: translate(0,0)
  }
  25% {
    transform: translate(-5px,3px)
  }
  75% {
    transform: translate(5px,-3px)
  }
}
.boosters {
  display: flex;
  gap: 14px;
  padding: 6px 0 calc(10px + env(safe-area-inset-bottom,0px));
  z-index: 2;
  flex: 0 0 auto
}
.boost {
  width: 56px;
  height: 66px;
  position: relative;
  cursor: pointer;
  transition: transform .1s;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden
}
.boost:active {
  transform: scale(.92)
}
.boost img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.45))
}
.boost .cnt {
  position: absolute;
  right: 0;
  bottom: 2px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  border: 2px solid #fff
}
.boost.armed {
  filter: drop-shadow(0 0 12px var(--gold));
  transform: translateY(-4px)
}
.boost.empty {
  filter: grayscale(1) brightness(.8);
  opacity: .65
}
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,6,3,.72);
  display: none;
  place-items: center;
  z-index: 50;
  padding: 16px;
  opacity: 0;
  transition: opacity .25s
}
.overlay.show {
  display: grid;
  opacity: 1
}
.panel {
  position: relative;
  width: min(92vw,440px);
  max-height: 90vh;
  display: flex;
  animation: panelIn .3s ease
}
@keyframes panelIn {
  from {
    transform: translateY(16px) scale(.94);
    opacity: 0
  }
  to {
    transform: none;
    opacity: 1
  }
}
.panel .panelbg {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(180deg,var(--parchment),var(--parch2));
  border: 5px solid var(--wood);
  box-shadow: 0 0 0 3px var(--wood-d),0 14px 40px rgba(0,0,0,.5),inset 0 2px 8px rgba(255,255,255,.4)
}
.panelbody {
  position: relative;
  flex: 1;
  min-height: 0;
  max-height: 90vh;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto;
  scrollbar-width: none
}
.panelbody::-webkit-scrollbar {
  display: none
}
.panelbody h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 26px;
  text-shadow: 0 2px 0 rgba(255,255,255,.4)
}
.panelbody p {
  margin: 4px 0;
  color: #7a4a20;
  font-weight: 700;
  font-size: 16px
}
.panelclose {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  z-index: 5;
  border-radius: 50%;
  background: var(--wood-d);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.4)
}
.panelclose::before {
  content: "";
  width: 15px;
  height: 15px;
  background: linear-gradient(45deg,transparent 43%,var(--gold) 43%,var(--gold) 57%,transparent 57%),linear-gradient(-45deg,transparent 43%,var(--gold) 43%,var(--gold) 57%,transparent 57%)
}
.panelclose:active {
  transform: scale(.92)
}
.stars-big {
  width: 78%;
  margin: 6px 0 4px
}
.pill {
  cursor: pointer;
  border: 0;
  background: transparent;
  position: relative;
  width: 170px;
  height: 60px;
  font-family: inherit;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  text-shadow: 0 2px 2px rgba(0,0,0,.45);
  transition: transform .08s;
  margin: 4px
}
.pill:active {
  transform: translateY(2px)
}
.pill img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}
.pill span {
  position: relative;
  z-index: 1
}
.prow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px
}
.field {
  width: 86%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--wood);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin: 10px 0;
  outline: none
}
.shoprow {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  margin: 3px 0;
  border-radius: 12px;
  background: rgba(255,255,255,.5);
  border: 2px solid var(--parch2)
}
.shoprow img.ic {
  width: 40px;
  height: 40px;
  flex: 0 0 auto
}
.shoprow .info {
  flex: 1;
  text-align: left
}
.shoprow .info b {
  font-size: 16px;
  color: var(--ink)
}
.shoprow .info small {
  display: block;
  color: #7a4a20;
  font-size: 13px
}
.buy {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  background: linear-gradient(180deg,var(--gold),var(--gold-d));
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 3px 0 #a9760a;
  display: flex;
  align-items: center;
  gap: 4px
}
.buy:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #a9760a
}
.buy img {
  width: 20px;
  height: 20px
}
.buy:disabled {
  filter: grayscale(1);
  opacity: .6
}
.lbrow {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 7px 12px;
  margin: 3px 0;
  border-radius: 10px;
  background: rgba(255,255,255,.5)
}
.lbrow .rank {
  width: 30px;
  font-weight: 800;
  color: var(--gold-d)
}
.lbrow .nm {
  flex: 1;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}
.lbrow .sc {
  font-weight: 800;
  color: var(--ink)
}
.lbrow.me {
  background: rgba(255,201,26,.35)
}
@media (prefers-reduced-motion:reduce) {
  * {
    animation-duration: .01ms!important;
    transition-duration: .08s!important
  }
}
.ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5
}
.mote {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(255,255,255,.95),rgba(255,235,150,.25));
  opacity: 0;
  animation: drift linear infinite
}
@keyframes drift {
  0% {
    transform: translate(0,0);
    opacity: 0
  }
  12% {
    opacity: .55
  }
  88% {
    opacity: .5
  }
  100% {
    transform: translate(24px,-140px);
    opacity: 0
  }
}
.scene::after {
  content: "";
  position: absolute;
  top: -12%;
  right: -6%;
  width: 52%;
  height: 36%;
  pointer-events: none;
  background: radial-gradient(circle,rgba(255,245,200,.5),transparent 68%);
  animation: sun 7s ease-in-out infinite
}
@keyframes sun {
  0%,
  100% {
    opacity: .45;
    transform: scale(1)
  }
  50% {
    opacity: .7;
    transform: scale(1.08)
  }
}
.confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden
}
.confetti {
  position: absolute;
  top: -30px;
  width: 11px;
  height: 16px;
  border-radius: 2px;
  animation: confall linear forwards
}
@keyframes confall {
  0% {
    transform: translateY(-30px) rotate(0);
    opacity: 1
  }
  100% {
    transform: translateY(115vh) rotate(760deg);
    opacity: .9
  }
}
.block {
  position: absolute;
  z-index: 3;
  background-size: cover;
  pointer-events: none
}
.block.shatter {
  animation: shatter .36s ease forwards
}
@keyframes shatter {
  0% {
    transform: var(--bpos) scale(1);
    opacity: 1
  }
  45% {
    transform: var(--bpos) scale(1.18) rotate(6deg)
  }
  100% {
    transform: var(--bpos) scale(0) rotate(22deg);
    opacity: 0
  }
}
.chainov {
  position: absolute;
  inset: 0;
  background-size: cover;
  pointer-events: none;
  z-index: 3
}
.chainov.brk {
  animation: crack .3s ease
}
.gem.locked {
  cursor: default
}
.gem.intro {
  animation: gemin .45s ease backwards
}
@keyframes gemin {
  0% {
    transform: var(--pos) scale(.2) rotate(-18deg);
    opacity: 0
  }
  100% {
    transform: var(--pos) scale(1);
    opacity: 1
  }
}
.block.hit {
  animation: blockhit .3s ease
}
@keyframes blockhit {
  0% {
    transform: var(--bpos) scale(1)
  }
  50% {
    transform: var(--bpos) scale(1.12)
  }
  100% {
    transform: var(--bpos) scale(1)
  }
}
.play-area {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center
}
.side {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto
}
@media (min-width:820px) and (orientation:landscape) {
  #stage {
    width: 100vw
  }
  .play-area {
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    padding: 0 18px 16px
  }
  .side {
    width: 180px;
    flex: 0 0 180px;
    justify-content: center;
    gap: 18px
  }
  .side.left {
    order: 0
  }
  .board-area {
    order: 1
  }
  .side.right {
    order: 2
  }
  .hud {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0;
    width: auto
  }
  .goals {
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto
  }
  .progressbar {
    width: 160px;
    margin: 8px 0
  }
  .boosters {
    flex-direction: column;
    gap: 20px;
    padding: 0
  }
  .boost {
    width: 84px;
    height: 96px
  }
  .board-area {
    flex: 1;
    min-width: 0
  }
}
.map-scroll::-webkit-scrollbar {
  width: 12px
}
.map-scroll::-webkit-scrollbar-track {
  background: rgba(0,0,0,.18);
  border-radius: 8px;
  margin: 6px
}
.map-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg,var(--gold),var(--gold-d));
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.45)
}
.map-scroll::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.08)
}
.map-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-d) rgba(0,0,0,.18)
}
.lvl-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  text-align: center;
  z-index: 40;
  pointer-events: none
}
.lvl-banner .b1 {
  display: inline-block;
  background: linear-gradient(180deg,var(--gold),var(--gold-d));
  color: var(--ink);
  font-weight: 800;
  font-size: 26px;
  padding: 14px 34px;
  border-radius: 22px;
  border: 3px solid #fff8e0;
  box-shadow: 0 8px 0 #a9760a,0 12px 24px rgba(0,0,0,.5);
  animation: bannerIn 1.6s ease forwards
}
@keyframes bannerIn {
  0% {
    transform: translateY(20px) scale(.7);
    opacity: 0
  }
  18% {
    transform: translateY(0) scale(1);
    opacity: 1
  }
  75% {
    opacity: 1
  }
  100% {
    transform: scale(1.05);
    opacity: 0
  }
}
.gem.born {
  animation: born .5s ease
}
@keyframes born {
  0% {
    filter: drop-shadow(0 0 0 #fff)
  }
  40% {
    filter: drop-shadow(0 0 14px #fff) drop-shadow(0 0 20px var(--gold))
  }
  100% {
    filter: none
  }
}
.stars-big {
  animation: starpop .6s cubic-bezier(.3,1.5,.5,1) both
}
@keyframes starpop {
  0% {
    transform: scale(0) rotate(-30deg);
    opacity: 0
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1
  }
}
.board-wrap.mix {
  animation: mix .55s ease
}
@keyframes mix {
  0%,
  100% {
    transform: translate(0,0) rotate(0)
  }
  12% {
    transform: translate(-9px,5px) rotate(-2deg)
  }
  28% {
    transform: translate(9px,-5px) rotate(2deg)
  }
  44% {
    transform: translate(-8px,-4px) rotate(-1.6deg)
  }
  60% {
    transform: translate(8px,4px) rotate(1.6deg)
  }
  78% {
    transform: translate(-5px,3px) rotate(-1deg)
  }
  90% {
    transform: translate(4px,-2px) rotate(.6deg)
  }
}
.boom {
  position: absolute;
  z-index: 9;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle,rgba(255,244,190,.95),rgba(255,140,40,.6) 42%,transparent 72%);
  animation: boom .5s ease-out forwards
}
@keyframes boom {
  0% {
    width: 24px;
    height: 24px;
    opacity: 1
  }
  100% {
    width: 260px;
    height: 260px;
    opacity: 0
  }
}
.boomring {
  position: absolute;
  z-index: 9;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%,-50%);
  border: 6px solid rgba(255,225,160,.9);
  animation: boomring .5s ease-out forwards
}
@keyframes boomring {
  0% {
    width: 12px;
    height: 12px;
    opacity: 1
  }
  100% {
    width: 280px;
    height: 280px;
    opacity: 0;
    border-width: 1px
  }
}
.gem.crackgem {
  animation: crackgem .26s ease;
  z-index: 6
}
@keyframes crackgem {
  0% {
    transform: var(--pos)
  }
  20% {
    transform: var(--pos) translateX(-3px) rotate(-7deg)
  }
  40% {
    transform: var(--pos) translateX(3px) rotate(7deg)
  }
  60% {
    transform: var(--pos) translateX(-2px) rotate(-5deg)
  }
  80% {
    transform: var(--pos) translateX(2px) rotate(5deg)
  }
  100% {
    transform: var(--pos)
  }
}
.moves.low {
  animation: movelow .75s ease-in-out infinite
}
@keyframes movelow {
  0%,
  100% {
    box-shadow: 0 5px 0 #a9760a,0 8px 14px rgba(0,0,0,.4)
  }
  50% {
    box-shadow: 0 0 0 5px #ff5a4d,0 5px 0 #a9760a,0 8px 20px rgba(255,60,50,.55)
  }
}
.chip.pulse {
  animation: chippulse .45s ease
}
@keyframes chippulse {
  0%,
  100% {
    transform: scale(1)
  }
  40% {
    transform: scale(1.2)
  }
}
.boost:not(.empty):not(.armed) {
  animation: bfloat 3s ease-in-out infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden
}
@keyframes bfloat {
  0% {
    transform: translate3d(0,0,0) rotate(0)
  }
  25% {
    transform: translate3d(2px,-7px,0) rotate(1.5deg)
  }
  50% {
    transform: translate3d(0,-9px,0) rotate(0)
  }
  75% {
    transform: translate3d(-2px,-7px,0) rotate(-1.5deg)
  }
  100% {
    transform: translate3d(0,0,0) rotate(0)
  }
}
.boost:nth-child(2) {
  animation-delay: .5s
}
.boost:nth-child(3) {
  animation-delay: 1s
}
.boost:nth-child(4) {
  animation-delay: 1.5s
}
@media (hover:hover) {
  .cbtn:hover,
  .iconbtn:hover {
    filter: brightness(1.08)
  }
  .pill:hover {
    filter: brightness(1.05)
  }
  .node:hover .disc {
    filter: brightness(1.07)
  }
}
.gem img.face {
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.30))
}
.board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 12px;
  z-index: 4;
  box-shadow: inset 0 0 36px rgba(0,0,0,.32),inset 0 3px 8px rgba(255,255,255,.10)
}
.board-wrap::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  height: 26%;
  pointer-events: none;
  z-index: 3;
  border-radius: 12px 12px 50% 50%;
  background: linear-gradient(180deg,rgba(255,255,255,.16),transparent)
}
#stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  box-shadow: inset 0 0 140px rgba(0,0,0,.30)
}
.moves::after {
  content: "";
  position: absolute;
  left: 16%;
  top: 12%;
  width: 44%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(255,255,255,.6),transparent 70%);
  pointer-events: none
}
.chip {
  position: relative;
  overflow: hidden
}
.chip::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg,rgba(255,255,255,.18),transparent);
  pointer-events: none
}
.goal {
  position: relative
}
.goal.done {
  box-shadow: 0 3px 0 var(--wood-d),0 0 14px rgba(90,220,120,.5)
}
.burn-spark {
  position: absolute;
  width: 44px;
  height: 44px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 9;
  pointer-events: none;
  filter: drop-shadow(0 0 8px var(--gold));
  transition: transform .42s cubic-bezier(.5,-0.4,.3,1),opacity .42s ease;
  transform: scale(.4) rotate(0);
  opacity: 0
}
.burn-spark.fly {
  transform: translate(60px,-90px) scale(1.15) rotate(200deg);
  opacity: 1
}
.moves.burn .n {
  animation: moves-burn .18s ease;
  color: var(--gold)
}
@keyframes moves-burn {
  0% {
    transform: scale(1)
  }
  50% {
    transform: scale(1.5);
    text-shadow: 0 0 12px var(--gold)
  }
  100% {
    transform: scale(1)
  }
}
.combo.big {
  font-size: 46px;
  color: var(--gold)
}
.combo.mega {
  font-size: 56px;
  color: #ff5a3c;
  animation: combo-pop .5s cubic-bezier(.3,1.6,.5,1)
}
@keyframes combo-pop {
  0% {
    transform: translate(-50%,-50%) scale(.3) rotate(-8deg);
    opacity: 0
  }
  60% {
    transform: translate(-50%,-50%) scale(1.25) rotate(4deg);
    opacity: 1
  }
  100% {
    transform: translate(-50%,-50%) scale(1) rotate(0);
    opacity: 1
  }
}
.node {
  overflow: visible
}
.node-path {
  position: absolute;
  left: -20px;
  top: 50%;
  width: 20px;
  height: 4px;
  transform: translateY(-50%);
  background-image: linear-gradient(90deg, var(--rope) 0 6px, transparent 6px 12px);
  background-size: 12px 4px;
  background-repeat: repeat-x;
  opacity: .35
}
.node-path.done {
  opacity: .9
}
.node-path.drawing {
  animation: path-draw .6s ease forwards
}
@keyframes path-draw {
  from {
    width: 0;
    opacity: 0
  }
  to {
    width: 20px;
    opacity: .9
  }
}
.node.current .disc {
  animation: node-pulse 1.4s ease-in-out infinite
}
@keyframes node-pulse {
  0%,
  100% {
    box-shadow: 0 5px 0 #a9760a,0 8px 14px rgba(0,0,0,.4)
  }
  50% {
    box-shadow: 0 5px 0 #a9760a,0 0 0 6px rgba(255,198,26,.35),0 8px 14px rgba(0,0,0,.4)
  }
}
.empty-state {
  text-align: center;
  padding: 22px 12px 8px;
  color: var(--ink)
}
.empty-state.small {
  padding: 10px 12px
}
.empty-state .emoji {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 8px;
  animation: es-bob 2.2s ease-in-out infinite
}
.empty-state.small .emoji {
  font-size: 34px
}
.empty-state b {
  display: block;
  font-size: 18px;
  margin-bottom: 4px
}
.empty-state p {
  margin: 0 auto;
  max-width: 240px;
  font-size: 14px;
  opacity: .75;
  font-weight: 600
}
@keyframes es-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg)
  }
  50% {
    transform: translateY(-6px) rotate(3deg)
  }
}
.shoprow.cant {
  opacity: .55
}
.shoprow.cant .buy {
  filter: grayscale(.6)
}
