@charset "UTF-8";
.home-body {
  width: 560px;
}

.pre-game {
  margin: auto;
  width: min-content;
  min-width: 550px;
  width: 98vw;
}

.wrapper {
  text-align: center;
  min-width: 550px;
  width: 98vw;
}

.game {
  position: relative;
  width: 550px;
  height: 400px;
  margin: 0 auto;
  margin-bottom: 0.5rem;
  border: 1px solid gray;
  overflow: hidden;
}
.game * {
  position: absolute;
}

div[class$=-button] {
  cursor: pointer;
}

div[data-stage=intro] img {
  left: -9px;
  top: 14px;
}
div[data-stage=intro] .start-button > img {
  left: 351px;
  top: 116px;
  transform: scale(1.93);
}

div[data-stage=question] img {
  left: 16px;
  top: 15px;
}
div[data-stage=question] .yes-button {
  left: 290px;
  top: 256px;
}
div[data-stage=question] .halpa-button {
  left: 330px;
  top: 80px;
}
div[data-stage=question] .hyva-button {
  left: 320px;
  top: 170px;
}
div[data-stage=question] .continue-button {
  left: 337px;
  top: 270px;
}

div[data-stage=selectedNo] img {
  left: 344px;
  top: 75px;
  scale: 2.6;
}

div[data-stage=selectedYes] img {
  left: 94px;
  top: 9px;
}
div[data-stage=selectedYes] .trst {
  left: -352px;
  top: 50px;
  animation: move-to-right 2s steps(28, end) infinite;
}
div[data-stage=selectedYes] .gig {
  left: -50px;
  top: 22px;
  transform: scale(0.8);
}
@keyframes move-to-right {
  to {
    transform: translate(455px);
  }
}

div[data-stage=tickling] .trst-gig {
  left: 355px;
  top: 125px;
  animation: spaz-out 0.35s steps(1, end) infinite;
}
div[data-stage=tickling] .text {
  left: 7px;
  top: 61px;
}
@keyframes spaz-out {
  0% {
    transform: translate(0px, 0px);
  }
  33% {
    transform: translate(5px, -6px);
  }
  66% {
    transform: translate(-1px, 4px);
  }
  100% {
    transform: translate(-4px, 2px);
  }
}

div[data-stage=gameLost] img {
  left: -8px;
  top: 25px;
}
div[data-stage=gameLost] .retry-button {
  left: 238px;
  top: 282px;
}

div[data-stage=gameWon] img {
  left: 5px;
  top: 15px;
}
div[data-stage=gameWon] .retry-button {
  left: 270px;
  top: 242px;
}
div[data-stage=gameWon] .spotify {
  left: 410px;
  top: 322px;
}
div[data-stage=gameWon] .youtube {
  left: 470px;
  top: 322px;
}
div[data-stage=gameWon] .instagram {
  left: 350px;
  top: 322px;
}

.pre-game {
  display: flex;
  justify-content: center;
  align-items: center;
}

.captcha-card {
  width: min(620px, 94vw);
  border: 6px solid #000;
  margin: auto;
  padding: 18px;
  background: #fff;
}

.captcha-top {
  margin-bottom: 14px;
}

.captcha-badge {
  display: inline-block;
  border: 4px solid #000;
  padding: 4px 10px;
  font-weight: 700;
  margin-bottom: 10px;
}

.captcha-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.captcha-sub {
  font-size: 14px;
  line-height: 1.3;
  max-width: 70ch;
}

.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.captcha-tile {
  aspect-ratio: 1/1;
  /* neliö */
  width: 100%;
  border: 6px solid #000;
  padding: 0;
  background: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  /* ettei kuva/border vuoda */
}

.captcha-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* rajaa kuvan neliöön */
  display: block;
}

/* VALINTA */
.captcha-tile.is-selected {
  outline: 8px solid #000;
  outline-offset: -8px;
}

/* pieni "check" -fiilis */
.captcha-tile.is-selected::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 28px;
  font-weight: 900;
  background: #fff;
  border: 4px solid #000;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.captcha-bottom {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-top: 4px solid #000;
  padding-top: 12px;
}

.captcha-disclaimer {
  font-size: 12px;
  line-height: 1.2;
  max-width: 62ch;
}

.captcha-submit {
  border: 6px solid #000;
  background: #fff;
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: #fff;
  border: 6px solid #000;
  padding: 12px 16px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-error {
  border-color: #c00;
  color: #c00;
}