/* Painted pieces are anchored to the ground in the same coordinate system as the stepping stones. */
.hunt-find, .hunt-guide {
  position: absolute;
  z-index: 1;
  display: block;
  width: clamp(72px, 8.6vw, 128px);
  aspect-ratio: 1;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 35%;
  background: transparent;
  box-shadow: none;
  translate: -50% -50%;
  color: #fff9e0;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hunt-find:active, .hunt-guide:active { transform: none; }
.hunt-vignette, .hunt-cover, .hunt-relic, .hunt-trace, .hunt-guide-art {
  display: block;
  pointer-events: none;
  user-select: none;
}
.hunt-vignette { position: absolute; inset: 0; isolation: isolate; }
.hunt-vignette::before, .hunt-guide::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 6%;
  bottom: 1%;
  height: 19%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #262c2859 0%, #31282535 48%, transparent 72%);
}
.hunt-find[data-biome="islands"]:not([data-afloat]) .hunt-vignette::before,
.hunt-guide[data-world="islands"]::before {
  left: 2%; right: 1%; bottom: 0; height: 24%;
  border: 2px solid #e5d09c; border-radius: 61% 36% 63% 41% / 59% 53% 55% 40%;
  background: linear-gradient(170deg, #90a362 28%, #eee0ad 80%);
  box-shadow: 0 2px 0 #8accbd, 0 4px 0 #6bb9b4;
}
.hunt-cover, .hunt-relic, .hunt-trace { position: absolute; }
.hunt-cover {
  z-index: 2;
  bottom: 4%;
  left: 2%;
  width: 90%;
  aspect-ratio: 1;
  background-repeat: no-repeat;
  background-size: 400% 300%;
  transform-origin: 50% 92%;
}
.hunt-wilderness { background-image: url("assets/trail-wilderness.webp"); }
.hunt-landmark { background-image: url("assets/trail-landmarks.webp"); }
.hunt-relic {
  z-index: 1;
  width: 38%;
  aspect-ratio: 1;
  top: 51%;
  left: 62%;
  rotate: var(--hunt-tilt, 0deg);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  filter: drop-shadow(0 1px 1px #46301d);
}
.hunt-relic.hunt-atlas-relic { background-image: url("assets/case-tools.webp"); background-size: 400% 300%; }
.hunt-find[data-peek="left"] .hunt-cover { left: 8%; }
.hunt-find[data-peek="left"] .hunt-relic { left: 0; }
.hunt-trace {
  z-index: 3;
  right: 2%;
  bottom: 9%;
  width: 15%;
  height: 9%;
  opacity: .9;
  rotate: -22deg;
  --hunt-trace-color: #dbd3ad;
}
.hunt-find[data-peek="left"] .hunt-trace { right: auto; left: 1%; rotate: 19deg; }
.hunt-trace::before, .hunt-trace::after {
  content: ""; position: absolute; top: 6%; left: 8%; width: 45%; height: 65%;
  border-radius: 85% 12% 80% 16%; background: var(--hunt-trace-color);
}
.hunt-trace::after { top: 68%; left: 64%; width: 43%; height: 53%; rotate: 47deg; }
.hunt-trace[data-kind="leaf"] { --hunt-trace-color: #b38739; }
.hunt-trace[data-kind="sand"] { --hunt-trace-color: #825535; opacity: .72; }
.hunt-trace[data-kind="sand"]::before, .hunt-trace[data-kind="sand"]::after { border-radius: 60%; }
.hunt-trace[data-kind="spark"] { --hunt-trace-color: #d7cefd; }
.hunt-trace[data-kind="ripple"]::before, .hunt-trace[data-kind="ripple"]::after {
  height: 40%; width: 72%; background: transparent; border-bottom: 1.5px solid #d5f6df; border-radius: 50%; rotate: -5deg;
}
.hunt-trace[data-kind="star"] { --hunt-trace-color: #fae3aa; }
.hunt-trace[data-kind="rift"] { --hunt-trace-color: #efa2ef; }
.hunt-trace:is([data-kind="star"], [data-kind="rift"], [data-kind="spark"])::before,
.hunt-trace:is([data-kind="star"], [data-kind="rift"], [data-kind="spark"])::after {
  border-radius: 0; clip-path: polygon(50% 0, 62% 35%, 100% 50%, 64% 61%, 50% 100%, 38% 64%, 0 50%, 35% 36%);
}
.hunt-find:is([data-state="found"], [data-state="solved"]) .hunt-cover {
  translate: -7% -3%; rotate: -4deg;
}
.hunt-find:is([data-state="found"], [data-state="solved"])[data-peek="left"] .hunt-cover {
  translate: 7% -3%; rotate: 4deg;
}
.hunt-find:is([data-state="found"], [data-state="solved"]) .hunt-relic {
  z-index: 4; left: 48%; top: 48%; width: 48%; rotate: 0deg;
}
.hunt-find:is([data-state="found"], [data-state="solved"])[data-peek="left"] .hunt-relic { left: 3%; }
.hunt-examine {
  position: absolute; z-index: 4;
  right: 0; bottom: -7px; padding: 2px 6px;
  border: 1px solid #e8cd85; border-radius: .65em; color: #fff4d9; background: #25473f;
  font: 760 .76rem/1.26 system-ui, sans-serif;
  opacity: 0;
}
.hunt-new .hunt-examine, .hunt-find[data-state="found"]:focus-visible .hunt-examine { opacity: 1; }
.hunt-find[data-state="solved"] .hunt-trace {
  z-index: 5; bottom: 4%; right: 1%; left: auto; width: auto; height: auto; rotate: 0deg;
}
.hunt-find[data-state="solved"] .hunt-trace::before {
  content: "✓"; position: static; display: block; width: 15px; height: 15px; padding: 0;
  clip-path: none; border: 1px solid #e0e8b3; border-radius: 50%;
  background: #305446; color: #fff4ca; font: bold 12px/15px system-ui, sans-serif; text-align: center;
}
.hunt-find[data-state="solved"] .hunt-trace::after { display: none; }
.hunt-find:focus-visible, .hunt-guide:focus-visible, .hunt-hint-close:focus-visible {
  outline: 3px solid #fff3a7; outline-offset: 3px; box-shadow: 0 0 0 7px #28372f;
}
.hunt-guide { width: clamp(72px, 8.8vw, 114px); }
.hunt-guide-art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.hunt-whisper {
  position: absolute; z-index: 1; right: 2%; top: 7%;
  min-width: 22px; padding: 0 4px 3px; border: 1.5px solid #624b33;
  border-radius: 11px 11px 11px 2px; color: #382d26; background: #fff1cd;
  font: 900 14px/1 system-ui, sans-serif; text-align: center;
}
.hunt-hint {
  padding: clamp(14px, 4vw, 25px); max-width: min(440px, calc(100vw - 28px));
  border: 2px solid #6b563d; border-radius: 22px; color: #302e24; background: #fff4d7;
}
.hunt-hint[open] { display: flex; align-items: flex-start; gap: 14px; }
.hunt-hint::backdrop { background: #182b26a6; }
.hunt-speaker { flex: 0 0 auto; width: clamp(49px, 8vw, 78px); align-self: center; }
.hunt-speaker-name { margin: 0 0 6px; font-size: 1.22rem; }
.hunt-clue { margin: 0 0 12px; line-height: 1.4; }
.hunt-hint-close {
  padding: 6px 12px; min-height: 44px; border: 0; border-radius: 12px;
  background: #2a4e42; color: #fff4d7; font-weight: 780; cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .hunt-cover, .hunt-relic { transition: translate .28s ease-out, rotate .28s ease-out, scale .2s ease-out; }
  .hunt-find[data-state="hidden"]:is(:hover, :focus-visible) .hunt-cover { rotate: -2deg; }
  .hunt-new .hunt-relic { animation: hunt-unearth .38s ease-out; }
  @keyframes hunt-unearth { 0% { translate: 0 12%; scale: .8; } 55% { translate: 0 -12%; scale: 1.08; } }
}
@media (forced-colors: active) {
  .hunt-find, .hunt-guide { outline: 1px dashed ButtonText; }
  .hunt-find:focus-visible, .hunt-guide:focus-visible, .hunt-hint-close:focus-visible { outline: 3px solid Highlight; }
}
