/* Request 3 additions: quest tracker, district banner, quest arrows, title corner trophy */
#objective, #beaconArrow { display: none !important; }

/* Quest tracker (top-right, under the pause button) */
#quests {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  max-width: 250px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  pointer-events: none;
}
#quests:empty { display: none; }
#quests .qi {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: rgba(22, 40, 52, .62);
  border: 2px solid rgba(255, 217, 138, .55);
  border-radius: 10px;
  padding: 5px 10px 5px 8px;
  font-weight: 900; font-size: 15px; line-height: 1.2; color: #fff4dc;
  text-shadow: 1.5px 0 0 #16202e, -1.5px 0 0 #16202e, 0 1.5px 0 #16202e, 0 -1.5px 0 #16202e, 0 2px 0 rgba(0,0,0,.35);
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
  max-width: 100%;
}
#quests .qi > span, #quests .qi .qm { display: inline-flex; align-items: center; gap: 8px; }
#quests .qi i {
  display: inline-block; flex: 0 0 auto;
  width: 10px; height: 10px; margin: 0 2px;
  background: #5ff2ff; transform: rotate(45deg);
  box-shadow: 0 0 8px #5ff2ff, 0 0 0 2px #16202e;
}
#quests .qi.side { border-color: rgba(255, 210, 90, .55); }
#quests .qi.side i { background: #ffd25a; box-shadow: 0 0 8px #ffd25a, 0 0 0 2px #16202e; }
#quests .qs {
  font-size: 13px; color: #ffd98a; font-weight: 800; padding: 1px 8px; border-radius: 8px;
  background: rgba(22, 40, 52, .5);
  text-shadow: 1px 0 0 #16202e, -1px 0 0 #16202e, 0 1px 0 #16202e, 0 -1px 0 #16202e;
}
#quests.pop .qi { animation: qpop .38s cubic-bezier(.34, 1.56, .64, 1) both; }
#quests.pop .qi:nth-child(2) { animation-delay: .05s; }
#quests.pop .qi:nth-child(3) { animation-delay: .1s; }
@keyframes qpop { from { transform: translateX(30px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* District name banner */
#region {
  position: absolute; left: 50%; top: 12%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center; white-space: nowrap;
  opacity: 0; pointer-events: none;
}
#region.show { animation: regionIn 2.8s ease-out both; }
@keyframes regionIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(14px); }
  14% { opacity: 1; transform: translateX(-50%) translateY(0); }
  78% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}
#region .rgName {
  font-size: clamp(26px, 4.4vw, 48px); font-weight: 900; letter-spacing: .08em; color: #fff4dc;
}
#region .rgName::before, #region .rgName::after {
  content: ""; display: inline-block; width: 1.4em; height: 3px; vertical-align: middle; margin: 0 .5em;
  background: linear-gradient(90deg, rgba(255, 217, 138, 0), #ffd98a); box-shadow: 0 2px 0 #16202e;
}
#region .rgName::after { background: linear-gradient(90deg, #ffd98a, rgba(255, 217, 138, 0)); }
#region .rgSub { font-size: clamp(13px, 1.7vw, 18px); font-weight: 800; color: #ffd98a; letter-spacing: .06em; }

/* Quest arrows: a dart at the screen edge pointing at the place (JS turns .arrowHead) */
#arrows { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.qarrow {
  position: absolute; left: 0; top: 0; width: 0; height: 0; --ac: #5ff2ff;
  filter: drop-shadow(0 0 5px var(--ac)) drop-shadow(0 2px 0 rgba(0, 0, 0, .55));
}
.qarrow.npc { --ac: #ffd25a; }
.qarrow .arrowHead {
  position: absolute; left: -13px; top: -16px; width: 26px; height: 32px;
  border: 0; background: var(--ac);
  clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%);
}
.qarrow .qdist {
  position: absolute; left: -40px; width: 80px; top: 18px; text-align: center;
  font-size: 13px; font-weight: 900; color: var(--ac); white-space: nowrap;
}

/* Title: the leaderboard is a quiet trophy button in the top-right corner */
#lbBtn {
  position: absolute; z-index: 4;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  width: 50px; height: 50px; min-width: 0; min-height: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 217, 138, .65); border-image: none; border-radius: 50%;
  background: rgba(24, 44, 56, .55);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .3);
}
#lbBtn .trophy { width: 24px; height: 24px; filter: drop-shadow(0 2px 0 #16202e); }
#lbBtn .lbLabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#lbBtn:hover, #lbBtn.focus { transform: scale(1.08); filter: brightness(1.15); }

@media (max-height: 460px) {
  #quests { top: calc(env(safe-area-inset-top, 0px) + 58px); max-width: 200px; gap: 4px; }
  #quests .qi { font-size: 13px; padding: 3px 8px 3px 6px; border-radius: 8px; }
  #quests .qs { font-size: 12px; }
  #quests .qi i { width: 8px; height: 8px; }
  #region { top: 13%; }
  #region .rgName { font-size: 24px; }
  #region .rgSub { font-size: 13px; }
  #subtitle { top: 30%; }
  .qarrow .arrowHead { left: -11px; top: -13px; width: 22px; height: 27px; }
  .qarrow .qdist { top: 15px; font-size: 12px; }
  #lbBtn { width: 46px; height: 46px; }
}
