﻿/* Story 06 scene contracts.
   Every target sits on a visible object in its exact illustration. */

.time-clue-hotspots,
.storm-image-hotspots {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: none;
}

.p1 .time-clue-hotspots,
.p4 .storm-image-hotspots {
  display: block;
}

.time-clue-hotspots button,
.p2 .image-word-hotspots button,
.p3 .route-image-hotspots button,
.p4 .storm-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;
}

.time-clue-hotspots button span,
.p2 .image-word-hotspots button span,
.p3 .route-image-hotspots button span,
.p4 .storm-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;
}

.time-clue-hotspots button:hover,
.time-clue-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,
.p4 .storm-image-hotspots button:hover,
.p4 .storm-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);
}

.time-clue-hotspots button:focus-visible span,
.time-clue-hotspots button:hover span,
.time-clue-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,
.p4 .storm-image-hotspots button:focus-visible span,
.p4 .storm-image-hotspots button:hover span,
.p4 .storm-image-hotspots button.visited span {
  color: #fff7dd;
  background: rgba(10, 57, 47, .88);
}

.time-clue-hotspots button.visited,
.p3 .route-image-hotspots button.visited,
.p4 .storm-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);
}

.time-clue-hotspots [data-home-detail="trapped-monkey"] {
  left: 65%;
  top: 52%;
  width: 31%;
  height: 44%;
  border-radius: 50%;
}

.time-clue-hotspots [data-home-detail="five-elements-mountain"] {
  left: 29%;
  top: 1%;
  width: 42%;
  height: 61%;
  border-radius: 42% 44% 28% 32%;
}

.time-clue-hotspots [data-home-detail="golden-seal"] {
  left: 76%;
  top: 3%;
  width: 18%;
  height: 31%;
  border-radius: 44% 48% 36% 42%;
}

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

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

.p2 .image-word-hotspots [data-image-word="1"] {
  left: 67%;
  top: 0;
  width: 20%;
  height: 28%;
  border-radius: 28% 36% 22% 30%;
}

.p2 .image-word-hotspots [data-image-word="2"] {
  left: 22%;
  top: 38%;
  width: 34%;
  height: 45%;
  border-radius: 46% 42% 34% 38%;
}

.p2 .image-word-hotspots [data-image-word="3"] {
  left: 0;
  top: 45%;
  width: 34%;
  height: 55%;
  border-radius: 42% 38% 30% 34%;
}

.p2 .image-word-hotspots button.wrong,
.p3 .route-image-hotspots button.wrong,
.p4 .storm-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: 22%;
  width: 29%;
  height: 67%;
  border-radius: 42% 46% 32% 38%;
}

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

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

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

.p4 .storm-image-hotspots [data-storm-image="1"] {
  left: 51%;
  top: 54%;
  width: 16%;
  height: 24%;
  border-radius: 48% 36% 22% 38%;
}

.p4 .storm-image-hotspots [data-storm-image="2"] {
  left: 29%;
  top: 52%;
  width: 18%;
  height: 23%;
  border-radius: 42% 42% 28% 30%;
}

.p4 .storm-image-hotspots [data-storm-image="3"] {
  left: 43%;
  top: 55%;
  width: 12%;
  height: 21%;
  border-radius: 44% 38% 30% 34%;
}

.lesson03-open-book {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid rgba(211, 167, 66, .82);
  border-radius: 34px 34px 22px 22px;
  background: #f7ecc9;
  box-shadow:
    inset 0 0 0 12px #0a3029,
    inset 0 0 0 14px rgba(216, 174, 78, .72),
    0 28px 52px rgba(0, 0, 0, .36);
}

.lesson03-page {
  position: relative;
  min-width: 0;
  margin: 18px 12px 18px 18px;
  overflow: hidden;
  border: 1px solid rgba(167, 129, 54, .54);
  background: #fff5d5;
}

.lesson03-page-right {
  margin: 18px 18px 18px 12px;
}

.lesson03-page img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .31;
}

.lesson03-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 248, 220, .96) 0 44%, rgba(255, 248, 220, .52) 68%, rgba(8, 49, 41, .2));
}

.lesson03-page-right::after {
  background: linear-gradient(90deg, rgba(255, 248, 220, .9) 0 52%, rgba(255, 248, 220, .4) 75%, rgba(8, 49, 41, .18));
}

.lesson03-page > div {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 12px;
  width: 62%;
  height: 100%;
  padding: clamp(28px, 4vw, 62px);
  color: #123b32;
}

.lesson03-page small {
  color: #8a6423;
  font-size: clamp(8px, .8vw, 13px);
  font-weight: 900;
  letter-spacing: .22em;
}

.lesson03-page strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4.3vw, 70px);
  line-height: .92;
  letter-spacing: -.05em;
}

.lesson03-page-right strong {
  font-size: clamp(22px, 3.3vw, 54px);
}

.lesson03-page span {
  max-width: 26ch;
  color: #596b5f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(10px, 1.1vw, 17px);
  line-height: 1.45;
}

.lesson03-closed-book {
  overflow: hidden;
  border: 3px solid rgba(216, 174, 78, .8);
  border-radius: 26px 12px 12px 26px;
  background: #0a3029;
  box-shadow:
    inset 16px 0 30px rgba(0, 0, 0, .36),
    0 30px 60px rgba(0, 0, 0, .42);
}

.lesson03-closed-book img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .34;
}

.lesson03-closed-book::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 40, 33, .92), rgba(6, 40, 33, .46));
}

.lesson03-closed-book > div {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 12px;
  width: 58%;
  height: 100%;
  padding: clamp(32px, 5vw, 72px);
  color: #fff1c2;
}

.lesson03-closed-book small,
.lesson03-closed-book span {
  color: #e5c66f;
  font-weight: 900;
  letter-spacing: .2em;
}

.lesson03-closed-book strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 72px);
  line-height: .95;
}

.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;
}

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

@media (max-width: 720px) {
  .intro-book-art {
    width: 100%;
    max-width: 100%;
  }

  .time-clue-hotspots button span,
  .p2 .image-word-hotspots button span,
  .p3 .route-image-hotspots button span,
  .p4 .storm-image-hotspots button span {
    font-size: .6rem;
    padding: .26rem .4rem;
  }

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

  .lesson03-open-book {
    border-radius: 20px 20px 14px 14px;
    box-shadow:
      inset 0 0 0 7px #0a3029,
      inset 0 0 0 9px rgba(216, 174, 78, .72),
      0 20px 42px rgba(0, 0, 0, .34);
  }

  .lesson03-page {
    margin: 11px 6px 11px 11px;
  }

  .lesson03-page-right {
    margin: 11px 11px 11px 6px;
  }

  .lesson03-page > div {
    width: 76%;
    gap: 6px;
    padding: 18px;
  }

  .lesson03-page strong {
    font-size: clamp(20px, 7vw, 38px);
  }

  .lesson03-page-right strong {
    font-size: clamp(17px, 5.6vw, 30px);
  }

  .lesson03-page span {
    display: none;
  }
}

