/* The screenshot is the 248 x 338 original. Overlay hit areas use its coordinate space. */
.hunt-chapter {
  isolation: isolate;
}
.hunt-chapter .chapter-heading {
  position: relative;
  z-index: 1;
}
.hunt-scene {
  position: relative;
  isolation: isolate;
  margin: clamp(12px, 3vw, 44px) auto 0;
}
.hunt-world {
  position: absolute;
  z-index: -1;
  inset: -12% -3% -10%;
  background: linear-gradient(0deg, rgba(8, 20, 34, .34), rgba(5, 20, 38, .46)),
              url("./scene/route-2.webp") 55% 55% / cover;
  filter: saturate(.54);
  opacity: .7;
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 84%, transparent),
              linear-gradient(to bottom, transparent, #000 19%, #000 80%, transparent),
              radial-gradient(ellipse 61% 59% at 56% 53%, #000 12%, rgba(0, 0, 0, .88) 42%, transparent 100%);
  mask-composite: intersect;
  pointer-events: none;
}
.hunt-spread {
  width: min(90%, 980px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, .95fr);
  grid-template-areas: "notes exhibit";
  align-items: center;
  gap: clamp(32px, 7%, 96px);
}
.hunt-journal {
  grid-area: notes;
  text-shadow: 0 2px 10px #06101c, 0 0 30px #06101c;
}
.hunt-edition {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #afd3eb;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hunt-sigil {
  color: #dbbd85;
  font: 1.5rem/.8 Georgia, serif;
}
.hunt-journal h3 {
  margin: 16px 0 21px;
  max-width: 18em;
  color: #f1f1e9;
  font: 400 clamp(1.68rem, 2.5vw, 2.65rem)/1.12 var(--serif);
  text-wrap: balance;
}
.hunt-notes {
  display: grid;
  gap: 4px;
}
.hunt-note {
  padding-left: 22px;
}
.hunt-note > button {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-left: -21px;
  min-height: 39px;
  padding: 3px 12px 3px 3px;
  color: #b4c8dc;
  font: 600 1.12rem/1.25 Myriad, sans-serif;
  text-align: start;
}
.hunt-note > button i {
  width: 6px;
  height: 6px;
  flex: none;
  transform: rotate(45deg);
  border: 1px solid #839bb0;
}
.hunt-note > button:hover, .hunt-note > button[aria-expanded="true"] {
  color: #ffedcf;
}
.hunt-note > button[aria-expanded="true"] i {
  background: #e7c891;
  border-color: #f5e1ba;
  box-shadow: 0 0 10px #e7b26981;
}
.hunt-note p {
  max-width: 39ch;
  padding: 0 0 7px;
  color: #d6e2ee;
  font-size: 1rem;
  line-height: 1.45;
}
.hunt-note p strong {
  color: #f9f3de;
}
.hunt-exhibit {
  grid-area: exhibit;
  margin: 0;
  text-align: center;
}
.hunt-mount {
  --hunt-reach: 1;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-height: clamp(355px, 33vw, 445px);
}
.hunt-aura {
  position: absolute;
  z-index: -1;
  inset: auto 0 2%;
  margin: auto;
  height: 15%;
  width: min(100%, 395px);
  transform: scale(var(--hunt-reach));
  transition: transform .18s ease;
  border-radius: 50%;
  border: 1px solid #a1d5e83d;
  background: radial-gradient(ellipse, #76afbc1c 6%, #57839219 58%, transparent 76%);
  box-shadow: 0 0 28px #5aa7cb23, inset 0 0 18px #73bad738;
}
.hunt-aura i {
  position: absolute;
  inset: 9%;
  border: 1px dashed #bcdce02e;
  border-radius: 50%;
}
.hunt-window {
  width: clamp(264px, 23vw, 310px);
  max-width: 100%;
  position: relative;
  aspect-ratio: 248 / 338;
  overflow: hidden;
  filter: drop-shadow(0 8px 14px #030912b3);
  clip-path: polygon(6% 1.1%, 92.5% .6%, 96.9% 2.5%, 97.6% 5.5%, 97.6% 92%, 96.6% 95%, 93.5% 97%, 9% 97%, 4.4% 95%, 3% 92%, 3% 6%, 3.6% 2.8%);
}
.hunt-window.folded {
  aspect-ratio: 248 / 242;
}
.hunt-window.folded::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 7%;
  background: url("./auto-hunt.webp") center bottom / 100% auto;
  pointer-events: none;
}
.hunt-skin {
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 248 / 338;
  container-type: inline-size;
}
.hunt-skin > img {
  width: 100%;
  height: 100%;
  user-select: none;
}
.hunt-overlay, .hunt-check, #hunt-range {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.hunt-overlay {
  background: transparent;
}
.hunt-overlay:hover:enabled, .hunt-overlay:focus-visible,
.hunt-check:has(input:focus-visible), #hunt-range:focus-visible {
  outline: 2px solid #e6ce9c;
  outline-offset: -1px;
  background-color: #ffd78920;
}
.hunt-overlay:disabled, #hunt-range:disabled, .hunt-check:has(:disabled) {
  cursor: default;
}
#hunt-skills {
  position: absolute;
  left: 7.6%;
  width: 84.8%;
  top: 16.6%;
  height: 11.1%;
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  align-items: stretch;
  gap: 1%;
  border-radius: 3px;
}
.hunt-skill-slot {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
}
.hunt-skill-slot img {
  width: 90%;
  height: auto;
  pointer-events: none;
}
.hunt-skill-slot:enabled:hover, .hunt-skill-slot:focus-visible, .hunt-skill-slot[aria-expanded="true"] {
  background: #e6ce9c2a;
  outline: 2px solid #e6ce9c;
  outline-offset: -1px;
}
.hunt-skill-slot:disabled {
  cursor: default;
}
#hunt-skill-picker {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(285px, calc(100vw - 22px));
  max-height: calc(100dvh - 20px);
  padding: 15px;
  border: 1px solid #8c7758;
  border-radius: 5px;
  background: linear-gradient(145deg, #212a34, #111923 75%);
  box-shadow: inset 0 0 0 3px #14212b, 0 15px 44px #03060ad9;
  text-align: start;
}
#hunt-skill-picker::backdrop {
  background: #040a1536;
  backdrop-filter: none;
}
.hunt-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 9px;
}
#hunt-picker-target {
  color: #ebcc93;
  font-size: .82rem;
}
#hunt-skill-title {
  margin: 3px 0 0;
  font: normal 1.34rem/1.18 var(--serif);
  color: #fff7e8;
}
#hunt-close {
  display: grid;
  place-items: center;
  margin: -5px -5px 0 0;
  min-height: 38px;
  min-width: 38px;
  color: #b9c8d5;
}
#hunt-close .icon {width: 17px}
.hunt-candidates {
  display: grid;
  gap: 2px;
}
.hunt-candidates button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 3px;
  text-align: start;
  line-height: 1.15;
}
.hunt-candidates img {
  flex: none;
  border-radius: 3px;
}
.hunt-candidates button:is(:hover, :focus-visible, [aria-pressed="true"]) {
  color: #fff2d2;
  border-color: #9b805e8f;
  background-color: #cfb28315;
}
#hunt-remove {
  display: block;
  min-height: 40px;
  margin: 6px auto -4px;
  padding: 5px 9px;
  color: #edce99;
  font-size: .96rem;
}
#hunt-remove:disabled {
  color: #96a4b1;
  cursor: default;
}
#hunt-reset {
  left: 85.4%;
  width: 10.5%;
  top: 9.3%;
  height: 7%;
}
.hunt-item {
  width: 15%;
  height: 11.2%;
  top: 37.3%;
}
.hunt-item[data-hunt-item="0"] {left: 12.5%}
.hunt-item[data-hunt-item="1"] {left: 32.7%}
.hunt-item[data-hunt-item="2"] {left: 52.8%}
.hunt-item[data-hunt-item="3"] {left: 73%}
.hunt-item-inspect {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 64.2%;
  padding: 1.2% 2%;
  border-radius: 2px;
  background: #101214f2;
  color: #f3d59a;
  font: 600 4.7cqw/1.1 Myriad, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.hunt-item[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  inset: auto 4% 4% auto;
  width: 38%;
  height: 38%;
  background: #14291c;
  color: #bdff93;
  font: bold 4.4cqw/1.2 Arial, sans-serif;
  text-shadow: 0 1px 1px #000;
}
#hunt-options {
  left: 32.5%;
  top: 52%;
  width: 35%;
  height: 8%;
}
#hunt-start, #hunt-stop {
  width: 35%;
  height: 8%;
  top: 60.6%;
}
#hunt-start {left: 10.6%}
#hunt-stop {left: 54.6%}
#hunt-start:disabled {
  outline: 1px solid #c2df90ba;
  outline-offset: -3px;
  background-color: #8cca712c;
}
#hunt-range {
  left: 13.9%;
  width: 71.3%;
  top: 74.9%;
  height: 6.6%;
  appearance: none;
  background: linear-gradient(to bottom, transparent 17%, #251f18 18%, #251f18 84%, transparent 85%);
  touch-action: pan-y;
}
#hunt-range::-webkit-slider-runnable-track {
  height: 1.75cqw;
  border: 1px solid #87734e;
  background: linear-gradient(#352a1e, #0c0a08 60%, #614a2e);
}
#hunt-range::-moz-range-track {
  height: 1.2cqw;
  border: 1px solid #87734e;
  background: #211a12;
}
#hunt-range::-webkit-slider-thumb {
  appearance: none;
  width: 3.5cqw;
  height: 3.5cqw;
  margin-top: -1.3cqw;
  transform: rotate(45deg);
  border: 1px solid #e1cfac;
  border-radius: 1px;
  background: linear-gradient(135deg, #dcc9a6, #675039 55%, #211a14);
  box-shadow: 1px 1px 3px #000;
}
#hunt-range::-moz-range-thumb {
  width: 3.1cqw;
  height: 3.1cqw;
  border: 1px solid #e1cfac;
  border-radius: 1px;
  transform: rotate(45deg);
  background: #b39972;
}
.hunt-check {
  width: 36%;
  height: 6.4%;
}
.hunt-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.hunt-check i {
  position: absolute;
  left: 6.7%;
  top: 50%;
  width: 4.65cqw;
  height: 4.65cqw;
  transform: translateY(-50%);
  background: #120e09;
  border: 1px solid #6d6253;
  pointer-events: none;
}
.hunt-check input:checked + i::after {
  content: "✓";
  position: absolute;
  inset: -38% 0 0;
  color: #eddfcc;
  font: bold 4.85cqw/1.2 Arial, sans-serif;
}
.hunt-check-mob, .hunt-check-login {left: 11.5%}
.hunt-check-stone {left: 51.9%}
.hunt-check-mob, .hunt-check-stone {top: 81.3%}
.hunt-check-login {top: 87.6%}
.hunt-mount[data-guide="skills"] #hunt-skills,
.hunt-mount[data-guide="radius"] #hunt-range,
.hunt-mount[data-guide="controls"] #hunt-start:enabled,
.hunt-mount[data-guide="controls"] #hunt-stop:enabled,
.hunt-mount[data-guide="targets"] .hunt-check-mob,
.hunt-mount[data-guide="targets"] .hunt-check-stone {
  box-shadow: inset 0 0 0 1px #d4b37789, 0 0 10px #e3c28529;
}
.hunt-readout {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: .65em 1.2em;
  flex-wrap: wrap;
  color: #ccd9e6;
  font-size: .94rem;
  margin: 5px 0 0;
  text-shadow: 0 1px 8px #020811;
}
#hunt-state, .hunt-range-readout {
  display: inline-flex;
  gap: .5em;
  align-items: center;
}
#hunt-state i {
  width: 6px;
  height: 6px;
  border: 1px solid #b4bdc7;
  border-radius: 50%;
}
.hunt-range-readout output {
  color: #f4ddb1;
  font-variant-numeric: tabular-nums;
}
.is-running #hunt-state i {
  border-color: #bde3b2;
  background: #a4dcab;
  box-shadow: 0 0 8px #8ddd99ab;
}
.is-running .hunt-aura {
  border-color: #acd6eb85;
  box-shadow: 0 0 20px #91c9e640, inset 0 0 16px #a2dcfd47;
}
@media (max-width: 790px) {
  .hunt-spread {
    width: min(96%, 620px);
    gap: 20px;
    grid-template-columns: minmax(0,1fr) minmax(235px,.9fr);
  }
  .hunt-mount {min-height: 330px}
  .hunt-note > button {min-height: 44px}
}
@media (max-width: 620px) {
  .hunt-spread {
    width: min(98%, 470px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "exhibit" "notes";
    gap: 28px;
  }
  .hunt-journal {
    width: min(90%, 365px);
    margin: auto;
  }
  .hunt-world {
    inset: -5% 0 -4%;
    background-position: 65% 35%;
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 84%, transparent),
                linear-gradient(to bottom, transparent, #000 15%, #000 71%, transparent),
                radial-gradient(ellipse 95% 57% at 58% 35%, #000 6%, #000c 43%, transparent 95%);
  }
  .hunt-window {width: min(292px, 94%)}
  .hunt-mount {min-height: min(380px, 125vw)}
  .hunt-journal h3 {max-width: 21ch}
}
@media (prefers-reduced-motion: reduce) {
  .hunt-aura {transition: none}
}
