html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #42634a;
}
.sw-adventure {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) 56px;
  gap: 4px;
  color: #493c2c;
  position: relative;
}
.sw-caption {
  margin: 0;
  min-height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: clamp(18px, 2.5vmin, 26px);
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 1px 0 #fff7de;
  background: #fff8e5ed;
  border-radius: 24px;
  padding: 5px 14px;
  justify-self: center;
  max-width: 92%;
}
.sw-scene {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(64px, 1fr) minmax(0, 5fr) minmax(64px, 1fr);
  align-items: center;
  gap: 4px;
}
.sw-adventure .sw-actor {
  width: 100%;
  height: clamp(100px, 26vh, 280px);
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
  align-self: end;
  filter: drop-shadow(0 8px 5px #243c3936);
  pointer-events: none;
}
.sw-tray {
  grid-template-columns: minmax(0, 1fr);
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  height: auto;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2vmin, 18px);
  box-sizing: border-box;
  border: 18px solid transparent;
  border-image: url("shell/assets/images/board-tray.webp") 17% fill / 26px / 0
    round;
}
.sw-stage {
  position: relative;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1000/680;
  max-height: 100%;
  container-type: size;
  touch-action: none;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}
.sw-stage:focus-visible {
  outline: 3px solid #76593d;
  outline-offset: 3px;
  border-radius: 16px;
}
.sw-adventure .sw-butterfly {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: fill;
  pointer-events: none;
  filter: none;
}
.sw-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.sw-axis {
  stroke: #785b40;
  stroke-width: 4;
  stroke-dasharray: 10 10;
  opacity: 0.8;
}
.sw-arc-base {
  fill: none;
  stroke: #fff8e5;
  stroke-width: 20;
  stroke-linecap: round;
}
.sw-arc {
  fill: none;
  stroke: #9767a0;
  stroke-width: 11;
  stroke-dasharray: 15 18;
  stroke-linecap: round;
}
.sw-traced {
  fill: none;
  stroke: #e9b34a;
  stroke-width: 13;
  stroke-linecap: round;
}
.sw-spot {
  fill: #744582;
  stroke: #fff9e9;
  stroke-width: 7;
}
.sw-target-mark {
  fill: none;
  stroke: #bb9143;
  stroke-width: 4;
  stroke-dasharray: 8 8;
}
.sw-match-line {
  stroke: #b18b48;
  stroke-width: 3;
  stroke-dasharray: 8 8;
}
.sw-candidate {
  position: absolute;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  cursor: grab;
  touch-action: none;
  z-index: 2;
}
.sw-candidate::after {
  content: "";
  position: absolute;
  width: clamp(17px, 5cqw, 38px);
  height: clamp(17px, 5cqw, 38px);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #744582;
  border: 3px solid #fff9e9;
  box-shadow: 0 0 0 2px #674b72;
}
.sw-candidate:focus-visible {
  outline: 3px solid #76593d;
  outline-offset: 1px;
}
.sw-access-row {
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 3;
}
.sw-trace-access {
  position: relative;
  min-height: 56px;
  border: 2px solid #a78044;
  border-radius: 22px;
  background: #fff5da;
  color: #523e26;
  font: 600 clamp(17px, 2vmin, 21px)
    var(--wm-font-family, "Fredoka", sans-serif);
  padding: 7px 17px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 0 #ad814c;
}
.sw-trace-access:focus-visible {
  outline: 3px solid #6f4e77;
  outline-offset: 3px;
}
.sw-hand {
  position: fixed;
  width: 72px;
  height: 92px;
  object-fit: contain;
  pointer-events: none;
  z-index: 15;
  filter: drop-shadow(0 2px 2px #41301955);
  transform: translate(-20%, -10%);
}
.sw-adventure [hidden],
.sw-hand[hidden] {
  display: none !important;
}
@media (orientation: portrait) {
  .sw-scene {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    position: relative;
  }
  .sw-tray {
    margin-bottom: 80px;
    height: auto;
    width: 100%;
    border-width: 12px;
    padding: 5px;
  }
  .sw-adventure .sw-actor {
    position: absolute;
    bottom: 0;
    width: 84px;
    height: 100px;
    z-index: 0;
  }
  .sw-ori {
    left: 5%;
  }
  .sw-suvi {
    right: 5%;
  }
  .sw-caption {
    font-size: 20px;
    padding: 6px 13px;
    min-height: 42px;
  }
  .sw-trace-access {
    font-size: 17px;
    padding: 4px 10px;
  }
  .sw-hand {
    width: 62px;
    height: 78px;
  }
}
@media (max-height: 650px) and (orientation: landscape) {
  .sw-caption {
    font-size: 18px;
    min-height: 26px;
    padding: 2px 13px;
  }
  .sw-tray {
    border-width: 10px;
    padding: 3px;
  }
  .sw-scene {
    grid-template-columns: minmax(55px, 1fr) minmax(0, 5fr) minmax(55px, 1fr);
  }
  .sw-trace-access {
    font-size: 16px;
    padding: 3px 10px;
  }
  .sw-adventure .sw-actor {
    height: 130px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sw-hand {
    transition: none;
  }
}

.sw-start {
  fill: #fff5da;
  stroke: #9767a0;
  stroke-width: 5;
}
.sw-start-dot {
  fill: #9767a0;
}
.sw-demo-guide {
  stroke: #9c7638;
  stroke-width: 6;
  stroke-dasharray: 11 9;
}

@media (max-height: 500px) and (orientation: landscape) {
  .sw-adventure {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .sw-scene {
    grid-template-columns: 126px minmax(0, 1fr) 76px;
  }
  .sw-access-row {
    position: absolute;
    left: 0;
    top: 40px;
    width: 126px;
    height: 56px;
  }
  .sw-trace-access {
    max-width: 120px;
    min-width: 112px;
    white-space: normal;
    font-size: 16px;
    padding: 3px 8px;
  }
  .sw-adventure .sw-actor {
    height: 80px;
  }
  .sw-tray {
    padding: 3px;
    border-width: 10px;
  }
}
.sw-tray {
  justify-self: center;
}
