:root {
  --journey-paper: rgba(255, 252, 242, 0.94);
  --journey-ink: #5b3b13;
  --journey-gold: #b78322;
  --journey-green: #587b5e;
  --journey-line: rgba(183, 131, 34, 0.42);
  --journey-safe-top: env(safe-area-inset-top, 0px);
}

.journey-shell {
  position: fixed;
  top: calc(8px + var(--journey-safe-top));
  left: 50%;
  z-index: 9000;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  width: min(calc(100% - 20px), 780px);
  min-height: 44px;
  padding: 5px;
  border: 1px solid rgba(183, 131, 34, 0.32);
  border-radius: 999px;
  background: rgba(255, 252, 242, 0.84);
  box-shadow: 0 8px 24px rgba(71, 43, 8, 0.16);
  color: var(--journey-ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.journey-shell__link {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--journey-line);
  border-radius: 50%;
  color: #72490d;
  background: rgba(255, 255, 255, 0.64);
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}

.journey-shell__link:active {
  transform: scale(0.92);
  background: rgba(244, 221, 156, 0.65);
}

.journey-shell__link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.journey-shell__status {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-overview {
  margin: 2px 12px 12px;
  padding: 14px 16px;
  border: 1px solid rgba(183, 131, 34, 0.28);
  border-radius: 16px;
  background: rgba(255, 252, 242, 0.82);
  box-shadow: 0 8px 24px rgba(73, 45, 9, 0.09);
  color: var(--journey-ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

.journey-overview__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.journey-overview__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.journey-overview__count {
  min-width: 0;
  margin: 0;
  color: #76551f;
  font-size: 14px;
  font-weight: 700;
}

.journey-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.journey-dot {
  height: 6px;
  border-radius: 999px;
  background: rgba(106, 83, 47, 0.18);
}

.journey-dot.is-visited {
  background: #b98b34;
}

.journey-dot.is-collected {
  background: var(--journey-green);
  box-shadow: 0 0 0 2px rgba(88, 123, 94, 0.14);
}

.journey-overview__hint {
  margin: 9px 0 0;
  color: #78684f;
  font-size: 13px;
  line-height: 1.45;
}

.catalog-app .hotspot-label {
  position: absolute;
  left: 50%;
  bottom: 8px;
  display: flex;
  min-width: 88px;
  min-height: 38px;
  padding: 5px 9px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(166, 112, 25, 0.55);
  border-radius: 999px;
  color: #633e0b;
  background: rgba(255, 251, 236, 0.88);
  box-shadow: 0 6px 16px rgba(72, 45, 10, 0.14);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.05;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(6px);
}

.catalog-app .hotspot-label strong {
  font-size: 13px;
}

.catalog-app .hotspot-label small {
  margin-top: 3px;
  color: #806c4e;
  font-size: 11px;
  font-weight: 700;
}

.catalog-app .hotspot.is-visited .hotspot-label {
  border-color: rgba(183, 131, 34, 0.72);
  background: rgba(255, 245, 209, 0.92);
}

.catalog-app .hotspot.is-collected .hotspot-label {
  border-color: rgba(73, 119, 81, 0.72);
  color: #355d3d;
  background: rgba(237, 248, 235, 0.94);
}

.challenge-guide {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--journey-ink);
  background: rgba(43, 29, 11, 0.48);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  opacity: 0;
  transition: opacity 220ms ease;
  backdrop-filter: blur(5px);
}

.challenge-guide.is-open {
  opacity: 1;
}

.challenge-guide__card {
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid rgba(223, 184, 87, 0.7);
  border-radius: 24px;
  background: #fffaf0;
  box-shadow: 0 24px 70px rgba(35, 22, 6, 0.34);
  transform: translateY(10px) scale(0.98);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.challenge-guide.is-open .challenge-guide__card {
  transform: translateY(0) scale(1);
}

.challenge-guide__eyebrow {
  margin: 0 0 4px;
  color: #987020;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.challenge-guide__title {
  margin: 0 0 16px;
  color: #4e310b;
  font-family: "STKaiti", "KaiTi", "Noto Serif SC", serif;
  font-size: clamp(24px, 7vw, 32px);
  line-height: 1.2;
}

.challenge-guide__rules {
  display: grid;
  gap: 9px;
  margin: 0;
}

.challenge-guide__rule {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(238, 226, 195, 0.52);
  font-size: 16px;
  line-height: 1.45;
}

.challenge-guide__rule dt {
  color: #8c661c;
  font-weight: 800;
}

.challenge-guide__rule dd {
  margin: 0;
}

.challenge-guide__start {
  width: 100%;
  min-height: 50px;
  margin-top: 17px;
  border: 1px solid #a9761d;
  border-radius: 999px;
  color: #fffdf4;
  background: linear-gradient(135deg, #c89a3f, #9d6916);
  box-shadow: 0 5px 0 rgba(92, 59, 13, 0.42), 0 10px 22px rgba(73, 45, 9, 0.2);
  font-size: 17px;
  font-weight: 800;
}

.challenge-guide__start:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(92, 59, 13, 0.42), 0 6px 14px rgba(73, 45, 9, 0.16);
}

.secondary-action.gold-btn,
.secondary-action.hot-btn {
  border-color: rgba(164, 119, 43, 0.58) !important;
  color: #705022 !important;
  background: rgba(255, 252, 242, 0.91) !important;
  box-shadow: 0 3px 0 rgba(94, 72, 37, 0.26), 0 8px 18px rgba(74, 48, 12, 0.11) !important;
}

.story-progress {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: calc(50% - min(50vw, 400px) + 14px);
  z-index: 20;
  min-width: 132px;
  padding: 7px 12px 8px;
  border: 1px solid rgba(183, 155, 95, 0.52);
  border-radius: 16px;
  color: #765a2d;
  background: rgba(255, 253, 247, 0.86);
  box-shadow: 0 8px 20px rgba(64, 45, 18, 0.12);
  font: 700 13px/1.1 "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  backdrop-filter: blur(8px);
}

.story-progress__dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 6px;
}

.story-progress__dot {
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: rgba(118, 90, 45, 0.2);
}

.story-progress__dot.is-done {
  background: #bd8b2e;
}

@media (max-width: 430px) {
  .catalog-app {
    max-width: 100%;
    overflow-x: hidden;
  }

  .journey-shell {
    width: calc(100% - 14px);
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 5px;
    min-height: 42px;
  }

  .journey-shell__link {
    width: 34px;
    height: 34px;
  }

  .journey-shell__status {
    font-size: 12px;
  }

  .journey-overview__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .journey-overview__count {
    font-size: 13px;
  }

  .catalog-app .hotspot-label {
    min-width: 74px;
    min-height: 34px;
    padding: 4px 7px;
  }

  .catalog-app .hotspot-label strong {
    font-size: 12px;
  }

  .catalog-app .hotspot-label small {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journey-shell *,
  .challenge-guide,
  .challenge-guide * {
    transition-duration: 0.001ms !important;
  }
}
