/* ---------- Quest tracker + portrait gallery ---------- */
.hud-controls {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
}
.quest-line {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(176, 53, 121, 0.4);
  font-size: 13px;
  color: #6b2247;
  display: flex;
  align-items: center;
  gap: 6px;
}
.quest-icon {
  font-size: 16px;
  filter: drop-shadow(0 1px 2px rgba(176, 53, 121, 0.5));
}
.quest-line.complete .quest-text {
  color: #2a8a4a;
  font-weight: 700;
}
.challenge-line {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 216, 107, 0.24);
  color: #6b2247;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.challenge-line.complete {
  background: rgba(123, 224, 200, 0.28);
  color: #237c5f;
}
.key-line {
  margin-top: 6px;
  padding: 6px 8px;
  border: 2px solid rgba(112, 91, 219, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(
      circle at 12% 18%,
      rgba(255, 255, 255, 0.82),
      transparent 20%
    ),
    linear-gradient(
      180deg,
      rgba(236, 231, 255, 0.82),
      rgba(255, 239, 170, 0.42)
    );
  color: #4f2c7a;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.5);
}
.key-line.complete {
  border-color: rgba(255, 216, 107, 0.62);
  background:
    radial-gradient(
      circle at 16% 20%,
      rgba(255, 255, 255, 0.95),
      transparent 22%
    ),
    linear-gradient(180deg, #fff7c8, #dff9ff);
  color: #7a3f00;
}
.key-icon {
  color: #755bdb;
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(255, 216, 107, 0.9);
}
.clue-line {
  margin-top: 6px;
  padding: 6px 8px;
  border: 2px solid rgba(35, 124, 95, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(
      circle at 86% 18%,
      rgba(255, 255, 255, 0.82),
      transparent 20%
    ),
    linear-gradient(
      180deg,
      rgba(224, 255, 243, 0.82),
      rgba(255, 239, 170, 0.32)
    );
  color: #235c51;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}
.clue-line.complete {
  border-color: rgba(123, 224, 200, 0.6);
  background: linear-gradient(180deg, #effff7, #fff7c8);
  color: #237c5f;
}
.clue-icon {
  color: #1a9f86;
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(123, 224, 200, 0.8);
}
.challenge-icon {
  color: #b03579;
  font-size: 15px;
  text-shadow: 0 1px 2px rgba(255, 216, 107, 0.8);
}
.helper-quest {
  margin-top: 7px;
  padding: 8px;
  border: 2px solid rgba(176, 53, 121, 0.2);
  border-radius: 10px;
  background:
    radial-gradient(
      circle at 12% 16%,
      rgba(255, 255, 255, 0.92),
      transparent 26%
    ),
    linear-gradient(180deg, rgba(255, 248, 225, 0.9), rgba(226, 255, 245, 0.72));
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.55);
}
.helper-quest.complete {
  border-color: rgba(255, 216, 107, 0.76);
  background:
    radial-gradient(
      circle at 82% 18%,
      rgba(255, 255, 255, 0.95),
      transparent 24%
    ),
    linear-gradient(180deg, #fff7c8, #e2fff5);
}
.helper-quest-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}
.helper-quest-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffd86b, #ff8ac0);
  color: #6b2247;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(176, 53, 121, 0.28);
}
.helper-quest-title {
  color: #7a2a60;
  font:
    900 13px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.helper-quest-subtitle {
  margin-top: 2px;
  color: #5b6f55;
  font:
    800 11px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.helper-quest-count {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #237c5f;
  font:
    900 12px/1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.helper-quest-steps {
  margin-top: 7px;
  display: grid;
  gap: 4px;
}
.helper-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: #6b2247;
}
.helper-step.done {
  background: rgba(123, 224, 200, 0.24);
  color: #237c5f;
}
.helper-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 216, 107, 0.34);
  font-size: 13px;
  font-weight: 900;
}
.helper-step-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.helper-step-copy strong,
.helper-step-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.helper-step-copy strong {
  font:
    900 12px/1.05 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.helper-step-copy small {
  color: inherit;
  font:
    800 10px/1.05 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  opacity: 0.76;
}
.helper-quest-reward {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed rgba(176, 53, 121, 0.22);
  color: #7a3f00;
  font:
    900 11px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  text-align: center;
}
.adventure-line {
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 2px solid rgba(112, 91, 219, 0.18);
  border-radius: 10px;
  background:
    radial-gradient(
      circle at 14% 22%,
      rgba(255, 255, 255, 0.86),
      transparent 23%
    ),
    linear-gradient(180deg, #f4f0ff, #fff7c8);
  color: #4f2c7a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font:
    900 14px/1.15 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  box-shadow: 0 4px 0 rgba(112, 91, 219, 0.12);
}
.adventure-line:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(112, 91, 219, 0.12);
}
.adventure-icon {
  color: #755bdb;
  font-size: 15px;
}
.adventure-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-center-open {
  width: 100%;
  min-height: 48px;
  margin-top: 0;
  padding: 8px 12px;
  border: 2px solid rgba(176, 53, 121, 0.32);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff8ee, #ffe1f0);
  color: #8a2f64;
  font:
    800 15px/1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  box-shadow: 0 4px 0 rgba(176, 53, 121, 0.14);
}
.game-center-open:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(176, 53, 121, 0.14);
}
.portrait-gallery {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.portrait-slot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(176, 53, 121, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: all 0.4s ease;
}
.portrait-slot.collected {
  border-color: #ffd86b;
  background: linear-gradient(135deg, #fff7e0 0%, #ffe0a0 100%);
  box-shadow: 0 0 14px rgba(255, 216, 107, 0.7);
  animation: portrait-pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
@keyframes portrait-pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.portrait-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) brightness(0.4);
  transition: filter 0.4s ease;
}
.portrait-slot.collected img {
  filter: none;
}
.portrait-slot::after {
  content: "?";
  position: absolute;
  font-size: 18px;
  font-weight: bold;
  color: #b03579;
  opacity: 0.6;
}
.portrait-slot.collected::after {
  display: none;
}
.portrait-slot.collected.flash {
  animation: slot-flash 0.8s ease;
}
