:root {
  --ink: #1f2a44;
  --ink-soft: #42526d;
  --paper: #fffef7;
  --sun: #ffd36b;
  --sea: #3ba6ff;
  --grass: #4dbf72;
  --sand: #f3bf73;
  --accent: #ff7b4a;
  --stroke: #1f2a44;
  --panel-shadow: 0 14px 30px rgba(31, 42, 68, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, #fff1c7 0 14%, transparent 15%),
    radial-gradient(circle at 85% 6%, #d8f5ff 0 12%, transparent 13%),
    linear-gradient(165deg, #f4fbff 0%, #fefbf1 52%, #fff6ea 100%);
  position: relative;
  overflow-x: hidden;
}

.sky-glow {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.4;
  z-index: -1;
}

.sky-glow-a {
  background: #9ed9ff;
  top: -120px;
  right: -80px;
}

.sky-glow-b {
  background: #ffd9a7;
  bottom: -140px;
  left: -100px;
}

.app-shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.view {
  animation: pop-in 0.45s ease;
}

.is-hidden {
  display: none !important;
}

.hero {
  background: linear-gradient(140deg, #f9ffef, #fff4df 65%, #ffe4cd);
  border: 3px solid var(--stroke);
  border-radius: 28px;
  padding: 22px 20px;
  box-shadow: var(--panel-shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -55px;
  top: -38px;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle, #ffd86f 0 58%, #ffb443 59% 100%);
  border-radius: 50%;
  opacity: 0.42;
}

.hero-kicker {
  margin: 0;
  color: #8a5a00;
  font-weight: 700;
  letter-spacing: 0.04em;
}

h1,
h2,
h3 {
  font-family: "YouYuan", "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  margin: 0;
}

#hero-title {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero-subtitle {
  max-width: 700px;
  line-height: 1.7;
  margin: 10px 0 18px;
  font-size: 1rem;
}

.home-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.panel {
  background: var(--paper);
  border: 3px solid var(--stroke);
  border-radius: 24px;
  box-shadow: var(--panel-shadow);
  padding: 16px;
}

.panel h2 {
  margin-bottom: 10px;
}

#goal-list {
  margin: 0;
  padding-left: 22px;
  line-height: 1.9;
}

.stage-preview {
  display: grid;
  gap: 10px;
}

.stage-pill {
  border: 2px solid var(--stroke);
  border-radius: 16px;
  padding: 10px 12px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.stage-pill strong {
  display: block;
}

.btn {
  border: 3px solid var(--stroke);
  border-radius: 14px;
  padding: 10px 16px;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, #ffb15c 0%, #ff9350 100%);
  color: #2d1405;
}

.btn-quiet {
  background: #f3f7ff;
  color: var(--ink);
}

.explorer-view {
  display: grid;
  gap: 12px;
}

.topbar {
  background: #fff;
  border: 3px solid var(--stroke);
  border-radius: 20px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
}

.progress-track {
  width: 100%;
  border: 2px solid var(--stroke);
  background: #ecf2ff;
  border-radius: 999px;
  height: 16px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #52d68a, #2fa4ff);
  transition: width 0.35s ease;
}

.explorer-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.map-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.badge {
  background: #eef7ff;
  border: 2px solid var(--stroke);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.map-board {
  position: relative;
  height: 340px;
  border-radius: 20px;
  border: 3px dashed var(--stroke);
  background: #dff4ff;
  overflow: hidden;
}

.baidu-map {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
}

.BMap_mask,
.BMapGL_mask {
  border-radius: 16px;
}

.detail-panel {
  display: grid;
  gap: 12px;
}

.detail-stage {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.detail-route {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.detail-geo {
  margin: 6px 0 0;
  color: #355274;
  font-weight: 700;
}

.detail-block h3 {
  margin-bottom: 8px;
}

.theme-line {
  margin: 0 0 8px;
  font-weight: 700;
  color: #7d3a0e;
}

.dot-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.question-list {
  display: grid;
  gap: 8px;
}

.question-item {
  border: 2px solid var(--stroke);
  background: #f6f9ff;
  border-radius: 12px;
  padding: 9px 10px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.question-item:hover {
  background: #e9f3ff;
}

.question-item.is-picked {
  background: #fff0ce;
  transform: translateY(-1px);
}

.memory-block {
  background: #fff6de;
  border: 2px solid #9f6500;
  border-radius: 14px;
  padding: 10px;
}

.memory-line {
  margin: 0;
  line-height: 1.65;
  font-weight: 700;
}

.detail-nav {
  display: flex;
  gap: 8px;
}

.detail-nav .btn {
  flex: 1;
}

.summary-panel {
  display: grid;
  gap: 10px;
  background: linear-gradient(135deg, #fef8e4, #e8f8ff);
}

.summary-points {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-tag {
  border: 2px solid var(--stroke);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.85rem;
  background: #fff;
}

.final-path {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.path-chip {
  border: 2px solid var(--stroke);
  background: #fff;
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 780px) {
  .app-shell {
    padding: 24px 22px 40px;
  }

  .home-grid {
    grid-template-columns: 1fr 1fr;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
  }

  .progress-wrap {
    flex: 1;
  }
}

@media (min-width: 1080px) {
  .explorer-layout {
    grid-template-columns: minmax(460px, 1fr) minmax(420px, 1fr);
  }

  .map-board {
    height: 520px;
  }
}
