/* Pocket Austin — Track 3.10: "Austin Passport" Interactive Scavenger Hunt
 * Warm parchment ligne-claire cartographic styling matching viewer/index.html
 */

/* Dock button inside #pa-explore-dock */
#pa-hunt-btn {
  gap: 5px;
}

#pa-hunt-btn .pa-hunt-trophy {
  font-size: 13px;
  line-height: 1;
}

#pa-hunt-btn .pa-hunt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 17px;
  padding: 0 5.5px;
  border-radius: 999px;
  background: rgba(74, 59, 44, 0.14);
  color: #4a3b2c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

#pa-hunt-btn.has-progress .pa-hunt-badge {
  background: #c45735;
  color: #fbf6ea;
}

#pa-hunt-btn.is-complete {
  border-color: #b78122;
  background: linear-gradient(180deg, rgba(253, 245, 220, 0.97), rgba(246, 232, 194, 0.95));
  color: #2c221a;
}

#pa-hunt-btn.is-complete .pa-hunt-badge {
  background: #b78122;
  color: #fbf6ea;
}

#pa-hunt-btn.is-open {
  background: #c45735;
  color: #fbf6ea;
  border-color: #4a3b2c;
}

#pa-hunt-btn.is-open .pa-hunt-badge {
  background: rgba(251, 246, 234, 0.25);
  color: #fbf6ea;
}

#pa-hunt-btn.just-stamped {
  animation: paHuntBtnPop 0.48s cubic-bezier(0.22, 1.32, 0.36, 1);
}

@keyframes paHuntBtnPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.09); }
  100% { transform: scale(1); }
}

/* Collapsible Parchment "Austin Passport" Drawer */
#pa-hunt-drawer {
  position: fixed;
  top: 148px;
  right: 14px;
  z-index: 36;
  width: 326px;
  max-width: calc(100vw - 24px);
  max-height: 72vh;
  display: none;
  flex-direction: column;
  background: rgba(251, 246, 234, 0.97);
  border: 1.5px solid #4a3b2c;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 15, 10, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #2c221a;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
}

#pa-hunt-drawer.open {
  display: flex;
  animation: paHuntDrawerIn 0.17s ease-out;
}

@keyframes paHuntDrawerIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Passport Header */
.pa-hunt-head {
  position: relative;
  padding: 11px 13px 10px;
  border-bottom: 1.5px solid rgba(74, 59, 44, 0.22);
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(243, 234, 212, 0.72));
}

.pa-hunt-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pa-hunt-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pa-hunt-crest {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e07652, #c45735 68%, #9b3d20);
  border: 1.5px solid #4a3b2c;
  box-shadow: inset 0 0 0 2px rgba(251, 246, 234, 0.38), 0 2px 5px rgba(44, 34, 26, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.pa-hunt-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #2c221a;
  line-height: 1.15;
}

.pa-hunt-sub {
  margin-top: 2px;
  font-size: 10.8px;
  color: #665848;
  line-height: 1.25;
}

.pa-hunt-close {
  appearance: none;
  border: 1px solid rgba(74, 59, 44, 0.34);
  background: rgba(255, 251, 242, 0.88);
  color: #4a3b2c;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
}

.pa-hunt-close:hover {
  background: #efe4cc;
  color: #2c221a;
}

/* Progress meter bar */
.pa-hunt-progress-row {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #5b4d3e;
}

.pa-hunt-progress-count {
  color: #c45735;
  font-weight: 800;
}

.pa-hunt-progress-track {
  margin-top: 5px;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(74, 59, 44, 0.14);
  border: 1px solid rgba(74, 59, 44, 0.22);
  overflow: hidden;
}

.pa-hunt-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4c8e88, #c45735);
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

#pa-hunt-drawer.is-complete .pa-hunt-progress-fill {
  background: linear-gradient(90deg, #b78122, #e0ac42, #c45735);
}

/* Scrollable Clues Body */
.pa-hunt-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 9px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pa-hunt-body::-webkit-scrollbar {
  width: 6px;
}

.pa-hunt-body::-webkit-scrollbar-thumb {
  background: rgba(74, 59, 44, 0.28);
  border-radius: 999px;
}

/* Certified Pocket Austinite Golden Seal Banner */
.pa-hunt-certified {
  position: relative;
  border: 1.5px solid #b78122;
  border-radius: 10px;
  padding: 12px 12px 11px;
  background: linear-gradient(135deg, rgba(255, 249, 232, 0.98), rgba(248, 232, 189, 0.92));
  box-shadow: inset 0 0 0 2px rgba(217, 164, 65, 0.28), 0 4px 12px rgba(120, 82, 20, 0.14);
  text-align: center;
  animation: paHuntSealPop 0.35s cubic-bezier(0.22, 1.28, 0.36, 1);
}

@keyframes paHuntSealPop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.pa-hunt-cert-seal {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #f4cf6b, #c6922c 68%, #916516);
  border: 2px solid #4a3b2c;
  box-shadow: inset 0 0 0 2.5px rgba(255, 250, 235, 0.55), 0 3px 10px rgba(74, 59, 44, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fbf6ea;
}

.pa-hunt-cert-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #2c221a;
  letter-spacing: 0.02em;
}

.pa-hunt-cert-sub {
  margin-top: 3px;
  font-size: 11px;
  color: #5b4d3e;
  line-height: 1.35;
}

.pa-hunt-cert-actions {
  margin-top: 9px;
  display: flex;
  justify-content: center;
}

/* Individual Clue Card */
.pa-hunt-item {
  border: 1.1px solid rgba(74, 59, 44, 0.24);
  border-radius: 9px;
  background: rgba(255, 252, 245, 0.86);
  padding: 9px 10px;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}

.pa-hunt-item.found {
  border-color: rgba(196, 87, 53, 0.46);
  background: linear-gradient(180deg, rgba(255, 251, 242, 0.96), rgba(249, 239, 222, 0.85));
  cursor: pointer;
}

.pa-hunt-item.found:hover {
  border-color: #c45735;
  background: #f6ebd4;
  transform: translateY(-1px);
}

.pa-hunt-item.just-found {
  animation: paHuntCardGlow 0.9s ease-out;
}

@keyframes paHuntCardGlow {
  0% {
    box-shadow: 0 0 0 3px rgba(196, 87, 53, 0.55);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(196, 87, 53, 0);
  }
}

.pa-hunt-item-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

/* Stamp slot (unfound dashed circle vs found wax seal) */
.pa-hunt-slot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.pa-hunt-slot.empty {
  border: 1.4px dashed rgba(74, 59, 44, 0.36);
  background: rgba(74, 59, 44, 0.045);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 700;
  color: #7b6c5c;
}

.pa-hunt-slot.stamped {
  background: radial-gradient(circle at 32% 28%, #e27856, #c45735 66%, #963b1f);
  border: 1.5px solid #4a3b2c;
  box-shadow: inset 0 0 0 2px rgba(246, 224, 166, 0.58), 0 2px 6px rgba(44, 34, 26, 0.24);
  font-size: 15px;
  line-height: 1;
}

.pa-hunt-item-main {
  flex: 1 1 auto;
  min-width: 0;
}

.pa-hunt-clue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pa-hunt-clue-num {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7a6a58;
}

.pa-hunt-clue-text {
  margin: 2px 0 0;
  font-size: 11.8px;
  line-height: 1.38;
  color: #2c221a;
}

.pa-hunt-item.found .pa-hunt-clue-text {
  color: #6f6152;
  font-size: 10.8px;
  text-decoration: line-through;
  text-decoration-color: rgba(196, 87, 53, 0.42);
}

.pa-hunt-found-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pa-hunt-found-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #2c221a;
  line-height: 1.2;
}

.pa-hunt-wax-tag {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 6px;
  border-radius: 4px;
  border: 1px solid rgba(196, 87, 53, 0.65);
  background: rgba(196, 87, 53, 0.1);
  color: #a93f20;
  font-size: 8.8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-2deg);
  flex-shrink: 0;
}

.pa-hunt-revisit {
  margin-top: 4px;
  font-size: 10.4px;
  font-weight: 700;
  color: #4c8e88;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Clue action controls (Hint + Reveal) */
.pa-hunt-actions {
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pa-hunt-hint-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3.5px 8.5px;
  border-radius: 999px;
  border: 1.1px solid rgba(76, 142, 136, 0.55);
  background: rgba(76, 142, 136, 0.1);
  color: #265954;
  font-family: inherit;
  font-size: 10.8px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.pa-hunt-hint-btn:hover {
  background: #4c8e88;
  border-color: #366964;
  color: #fbf6ea;
}

.pa-hunt-reveal-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 10.6px;
  font-weight: 600;
  color: #7d6d5c;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.14s ease, background 0.14s ease;
}

.pa-hunt-reveal-btn:hover {
  color: #c45735;
  background: rgba(196, 87, 53, 0.08);
}

/* Live Compass Hint Box */
.pa-hunt-hint-box {
  margin-top: 6px;
  padding: 5.5px 8px;
  border-radius: 6px;
  border-left: 3px solid #4c8e88;
  background: rgba(76, 142, 136, 0.1);
  font-size: 11px;
  font-weight: 600;
  color: #244b47;
  line-height: 1.32;
  animation: paHuntHintFade 0.18s ease-out;
}

@keyframes paHuntHintFade {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Out-of-bounds bonus footnote */
.pa-hunt-bonus-note {
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px dashed rgba(74, 59, 44, 0.24);
  background: rgba(74, 59, 44, 0.04);
  font-size: 10.5px;
  color: #6c5e4e;
  text-align: center;
  line-height: 1.3;
}

/* Passport Footer */
.pa-hunt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(74, 59, 44, 0.18);
  background: rgba(244, 236, 218, 0.65);
  font-size: 10.4px;
  color: #665848;
}

.pa-hunt-reset-btn {
  appearance: none;
  border: 1.1px solid rgba(74, 59, 44, 0.36);
  background: rgba(255, 251, 242, 0.92);
  color: #4a3b2c;
  font-family: inherit;
  font-size: 10.6px;
  font-weight: 700;
  padding: 3.5px 9px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.pa-hunt-reset-btn:hover {
  background: #f0e3c7;
  color: #2c221a;
  border-color: #4a3b2c;
}

.pa-hunt-reset-btn.confirming {
  background: #c45735;
  border-color: #4a3b2c;
  color: #fbf6ea;
}

.pa-hunt-reset-btn.hidden {
  display: none;
}

/* Joyful Wax Seal Toast / Banner */
#pa-hunt-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-18px) scale(0.96);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(390px, calc(100vw - 24px));
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  background: rgba(251, 246, 234, 0.98);
  border: 1.8px solid #4a3b2c;
  box-shadow: 0 10px 28px rgba(20, 14, 10, 0.34), inset 0 0 0 2px rgba(217, 164, 65, 0.35);
  color: #2c221a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.24s ease, transform 0.3s cubic-bezier(0.22, 1.25, 0.36, 1);
}

#pa-hunt-toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

#pa-hunt-toast.is-complete {
  border-color: #b78122;
  background: linear-gradient(180deg, #fffaf0, #f7e6bf);
}

.pa-hunt-toast-seal {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #e27856, #c45735 66%, #963b1f);
  border: 1.6px solid #4a3b2c;
  box-shadow: inset 0 0 0 2px rgba(246, 224, 166, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

#pa-hunt-toast.is-complete .pa-hunt-toast-seal {
  background: radial-gradient(circle at 32% 28%, #f4cf6b, #c6922c 68%, #916516);
}

.pa-hunt-toast-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pa-hunt-toast-headline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13.2px;
  font-weight: 700;
  color: #2c221a;
  line-height: 1.2;
}

.pa-hunt-toast-sub {
  margin-top: 1px;
  font-size: 10.8px;
  font-weight: 600;
  color: #665848;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile-safe responsive rules */
@media (max-width: 760px) {
  #pa-hunt-drawer {
    right: 10px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: 68vh;
  }

  #pa-hunt-toast {
    top: 58px;
    max-width: calc(100vw - 20px);
    padding: 8px 12px 8px 9px;
  }
}
