/* Quest (/quest/), WordPress page 1669, from quest-style.css.
   Breakpoints kept from the original: 390px, 412px, 680px. */

body.page-quest { background: #35221f; }

.quest { position: relative; min-height: 100vh; background: #35221f; color: var(--c-white); }

/* Intro video */
.quest__intro { position: relative; overflow: hidden; display: flex; justify-content: center; transition: opacity 0.5s ease; }
.quest__intro.is-leaving { opacity: 0; }
.quest__intro video { width: 360px; max-width: none; object-fit: cover; }
.quest__skip { position: absolute; right: 16px; bottom: 16px; z-index: 2; }

/* Puzzle stage */
.quest__stage { position: relative; width: 100%; height: 668px; overflow: hidden; animation: fade-in 0.5s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.quest__bg {
  position: absolute;
  top: 50%; left: 50%;
  width: 370px;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
}

.quest__icons {
  position: absolute;
  top: 50%; left: 50%;
  width: 360px; height: 740px;
  transform: translate(-50%, -50%);
}

.quest-icon {
  position: absolute;
  width: 70px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0.1;
  transition: opacity 0.2s ease;
}
.quest-icon img { width: 100%; border-radius: 50%; }
.quest-icon:hover, .quest-icon:focus-visible, .quest-icon[aria-pressed="true"] { opacity: 1; }
.quest-icon:focus-visible { outline: 3px solid var(--c-white); outline-offset: 4px; }
.quest-icon:disabled { cursor: default; }

.quest-icon--gloomburg   { box-shadow: inset 0 0 50px 5px #c52c3f; }
.quest-icon--karmatopia  { box-shadow: inset 0 0 50px 5px #5ac45f; }
.quest-icon--kokatsu     { box-shadow: inset 0 0 50px 5px #9d48d5; }
.quest-icon--frankenheim { box-shadow: inset 0 0 50px 5px #d4692b; }
.quest-icon--terayno     { box-shadow: inset 0 0 50px 5px #ddc85a; }
.quest-icon--vangarden   { box-shadow: inset 0 0 50px 5px #4e80d4; }

/* Six slots on the cave wall; symbols are shuffled into them. */
.quest-icon:nth-child(1) { top: 57.1%; left: 22%; }
.quest-icon:nth-child(2) { top: 45.1%; left: 71.4%; }
.quest-icon:nth-child(3) { top: 45%;   left: 6.6%; }
.quest-icon:nth-child(4) { top: 57.1%; left: 56.5%; }
.quest-icon:nth-child(5) { top: 32.8%; left: 21.4%; }
.quest-icon:nth-child(6) { top: 32.8%; left: 56%; }

.quest__buttons {
  position: absolute;
  left: 50%; top: 75%;
  width: 100%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.quest__buttons .btn { padding: 15px 40px; margin: 10px; }
.quest__buttons .btn:disabled { opacity: 0.1; }

.quest__controls {
  position: absolute;
  top: 16px; right: 16px;
  display: flex; gap: 6px;
}
.quest__control {
  width: 44px; height: 44px;
  padding: 10px;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--c-white);
  cursor: pointer;
}
.quest__control svg { width: 24px; height: 24px; fill: currentColor; }

@media (min-width: 390px) {
  .quest__intro video { width: 390px; }
  .quest__bg { width: 424px; }
  .quest__stage { height: 800px; }
  .quest-icon { width: 80px; }
  .quest-icon:nth-child(1) { top: 58.1%; left: 17.7%; }
  .quest-icon:nth-child(2) { top: 44.4%; left: 74.8%; }
  .quest-icon:nth-child(3) { top: 44.4%; left: 0.2%; }
  .quest-icon:nth-child(4) { top: 58.1%; left: 57.2%; }
  .quest-icon:nth-child(5) { top: 30.4%; left: 17.4%; }
  .quest-icon:nth-child(6) { top: 30.5%; left: 57%; }
}

@media (min-width: 412px) {
  .quest__intro video { width: 412px; }
  .quest__bg { width: 450px; }
  .quest__stage { height: 892px; }
  .quest-icon { width: 85px; }
  .quest-icon:nth-child(1) { top: 58.6%; left: 15.5%; }
  .quest-icon:nth-child(2) { top: 44%;   left: 76%; }
  .quest-icon:nth-child(3) { top: 44%;   left: -3%; }
  .quest-icon:nth-child(4) { top: 58.5%; left: 57.9%; }
  .quest-icon:nth-child(5) { top: 29.2%; left: 15.3%; }
  .quest-icon:nth-child(6) { top: 29.2%; left: 57.6%; }
}

@media (min-width: 680px) {
  .quest__intro video { width: 100%; }
  .quest__bg { width: 1920px; }
  .quest__stage { height: 1080px; }
  .quest__buttons { top: 77%; }
  .quest__controls { top: 110px; right: 30px; }
  .quest__icons { width: 550px; height: 1000px; }
  .quest-icon { width: 110px; }
  .quest-icon:nth-child(1) { top: 59%;   left: 22%; }
  .quest-icon:nth-child(2) { top: 44.4%; left: 75%; }
  .quest-icon:nth-child(3) { top: 44.4%; left: 6%; }
  .quest-icon:nth-child(4) { top: 59%;   left: 59%; }
  .quest-icon:nth-child(5) { top: 29.7%; left: 21.8%; }
  .quest-icon:nth-child(6) { top: 29.8%; left: 58.7%; }
}

@media (max-width: 679px) {
  .quest__controls { top: 90px; }
}

/* Dialogs */
.quest-dialog {
  width: 80%;
  max-width: 700px;
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow-y: auto;
  color: var(--c-white);
  text-align: center;
}
.quest-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }
.quest-dialog[open] { animation: zoom-in 0.6s; }
@media (max-width: 700px) { .quest-dialog { width: calc(100% - 24px); } }

.quest-dialog__close {
  position: absolute;
  top: 6px; right: 10px;
  width: 44px; height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 34px; font-weight: 700; line-height: 1;
  cursor: pointer;
}

.quest-dialog--hint { padding: 50px; background: var(--c-white); color: #000; border-radius: 5px; }
.quest-dialog--hint h2 { color: #000; font-size: 1.75rem; line-height: 1.1; }
.quest-dialog--hint p { font-size: var(--fs-small); }
@media (max-width: 500px) { .quest-dialog--hint { padding: 50px 20px 30px; } }

.quest-dialog--fail {
  min-height: 500px;
  padding: 70px 0;
  background: #000 url("/assets/img/quest/try-again.png") center / contain no-repeat;
}
.quest-dialog--success {
  min-height: 533px;
  padding: 35px 0 30px;
  background: #000 url("/assets/img/quest/success.png") center top / cover no-repeat;
}
.quest-dialog--success h2 { margin-top: 0; font-size: var(--fs-h4); color: var(--c-white); }

.quest-result__box {
  width: 80%;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
}
.quest-dialog--fail .quest-result__box { width: 70%; margin-top: 260px; }
.quest-result__box p:last-child { margin-bottom: 0; }

/* Reward sign-up form (success dialog) */
.quest-signup { margin-top: 16px; text-align: left; }
.quest-signup__label { display: block; margin-bottom: 8px; font-weight: 700; }
.quest-signup__row { display: flex; flex-wrap: wrap; gap: 10px; }
.quest-signup__input {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--c-white);
  border-radius: var(--radius);
  background: var(--c-white);
  color: var(--c-ink-deep);
  font: inherit;
}
.quest-signup__input:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }
.quest-signup__input[aria-invalid="true"] { border-color: var(--c-gold); }
.quest-signup__send { flex: 0 0 auto; }
.quest-signup__privacy { margin: 10px 0 0; font-size: var(--fs-small); }
.quest-signup__status { margin: 10px 0 0; font-weight: 700; }
.quest-signup__status:empty { display: none; }
.quest-signup__status.is-error { color: var(--c-gold); }
.quest-signup__status.is-ok { color: var(--c-accent); }
@media (max-width: 500px) { .quest-signup__send { flex: 1 1 100%; } }

.signup-placeholder {
  margin: 16px auto 0;
  padding: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}
