/* Lesson 02 scene contracts.
   Every target sits on a visible story object or action—never on an arbitrary grid. */

.home-detail-hotspots {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: none;
}

.p1 .home-detail-hotspots {
  display: block;
}

.home-detail-hotspots button,
.p2 .image-word-hotspots button,
.p3 .route-image-hotspots button {
  position: absolute;
  min-width: 48px;
  min-height: 48px;
  border: 2px solid transparent;
  color: transparent;
  background: transparent;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.home-detail-hotspots button span,
.p2 .image-word-hotspots button span,
.p3 .route-image-hotspots button span {
  position: absolute;
  left: 50%;
  bottom: 8px;
  translate: -50% 0;
  padding: .34rem .58rem;
  border-radius: 999px;
  color: transparent;
  background: transparent;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  white-space: nowrap;
}

.home-detail-hotspots button:hover,
.home-detail-hotspots button:focus-visible,
.p2 .image-word-hotspots button:hover,
.p2 .image-word-hotspots button:focus-visible,
.p3 .route-image-hotspots button:hover,
.p3 .route-image-hotspots button:focus-visible {
  border-color: rgba(249, 215, 125, .95);
  background: rgba(255, 226, 143, .09);
  box-shadow: 0 0 0 4px rgba(249, 215, 125, .18), inset 0 0 30px rgba(249, 215, 125, .09);
}

.home-detail-hotspots button:focus-visible span,
.home-detail-hotspots button:hover span,
.home-detail-hotspots button.visited span,
.p2 .image-word-hotspots button:focus-visible span,
.p2 .image-word-hotspots button:hover span,
.p3 .route-image-hotspots button:focus-visible span,
.p3 .route-image-hotspots button:hover span,
.p3 .route-image-hotspots button.visited span {
  color: #fff7dd;
  background: rgba(10, 57, 47, .88);
}

.home-detail-hotspots button.visited,
.p3 .route-image-hotspots button.visited {
  border-color: rgba(174, 221, 181, .95);
  background: rgba(67, 139, 94, .12);
  box-shadow: 0 0 0 4px rgba(174, 221, 181, .14);
}

.home-detail-hotspots [data-home-detail="bridge"] {
  left: 0;
  top: 50%;
  width: 34%;
  height: 48%;
  border-radius: 45% 55% 18% 26%;
}

.home-detail-hotspots [data-home-detail="hall"] {
  left: 30%;
  top: 8%;
  width: 44%;
  height: 55%;
  border-radius: 35% 40% 28% 32%;
}

.home-detail-hotspots [data-home-detail="water"] {
  left: 55%;
  top: 53%;
  width: 44%;
  height: 45%;
  border-radius: 52% 38% 28% 42%;
}

.p2 .image-word-hotspots {
  inset: 0;
  width: auto;
  height: auto;
  display: block;
}

.p2 .image-word-hotspots [data-image-word="0"] {
  left: 0;
  top: 48%;
  width: 40%;
  height: 50%;
  border-radius: 46% 54% 24% 32%;
}

.p2 .image-word-hotspots [data-image-word="1"] {
  left: 35%;
  top: 14%;
  width: 28%;
  height: 40%;
  border-radius: 42% 44% 28% 30%;
}

.p2 .image-word-hotspots [data-image-word="2"] {
  left: 62%;
  top: 61%;
  width: 37%;
  height: 37%;
  border-radius: 44% 38% 22% 30%;
}

.p2 .image-word-hotspots [data-image-word="3"] {
  left: 59%;
  top: 13%;
  width: 40%;
  height: 44%;
  border-radius: 42% 38% 30% 34%;
}

.p2 .image-word-hotspots button.wrong,
.p3 .route-image-hotspots button.wrong {
  border-color: transparent;
  background: rgba(255, 255, 255, .04);
  box-shadow: none;
  animation: shake .28s ease;
}

.p3 .route-image-hotspots [data-route-image="1"] {
  left: 0;
  top: 9%;
  width: 25%;
  height: 56%;
  border-radius: 42% 46% 32% 38%;
}

.p3 .route-image-hotspots [data-route-image="2"] {
  left: 25%;
  top: 28%;
  width: 29%;
  height: 53%;
  border-radius: 40% 52% 28% 36%;
}

.p3 .route-image-hotspots [data-route-image="3"] {
  left: 47%;
  top: 44%;
  width: 35%;
  height: 44%;
  border-radius: 44% 54% 26% 34%;
}

.p3 .route-image-hotspots [data-route-image="4"] {
  left: 78%;
  top: 14%;
  width: 21%;
  height: 56%;
  border-radius: 48% 34% 28% 44%;
}

.home-evidence,
.trait-grid {
  display: grid;
  gap: .72rem;
  margin: 1rem 0;
}

.home-evidence div {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 52px;
  padding: .7rem .9rem;
  border: 1px dashed rgba(16, 75, 62, .24);
  border-radius: 14px;
  color: #6a746c;
  background: rgba(255, 255, 255, .45);
}

.home-evidence div.complete {
  color: #0f5949;
  border-style: solid;
  border-color: rgba(68, 143, 98, .45);
  background: rgba(202, 232, 208, .5);
}

.trait-grid {
  grid-template-columns: 1fr 1fr;
}

.trait-grid button {
  min-height: 58px;
  padding: .8rem;
  border: 1px solid rgba(14, 70, 57, .2);
  border-radius: 16px;
  color: #164d41;
  background: #fffaf0;
  font-weight: 900;
}

.trait-grid button:hover,
.trait-grid button:focus-visible {
  border-color: #d5a833;
  box-shadow: 0 0 0 4px rgba(213, 168, 51, .14);
}

.trait-grid button.correct {
  border-color: #76a982;
  color: #0e5a46;
  background: #e1efdf;
}

.trait-grid button.incorrect {
  border-color: rgba(185, 139, 71, .35);
  color: #76562a;
  background: #fff6df;
  animation: shake .28s ease;
}

@media (max-width: 720px) {
  .home-detail-hotspots button span,
  .p2 .image-word-hotspots button span,
  .p3 .route-image-hotspots button span {
    font-size: .6rem;
    padding: .26rem .4rem;
  }

  .trait-grid {
    grid-template-columns: 1fr;
  }
}
