/* ============================================================
   首頁、小鎮地圖、關卡介紹、結算
   ============================================================ */

/* 首頁 */
.home-hero {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(18px, 4vw, 38px);
  align-items: center; padding: clamp(18px, 4vw, 38px); margin-bottom: 20px;
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, rgba(17,26,44,0.94), rgba(34,49,76,0.7));
  border: 1px solid rgba(242,163,60,0.34); box-shadow: var(--shadow); overflow: hidden;
}
.home-hero__copy { min-width: 0; }
.home-hero h1 { margin: 4px 0 12px; text-wrap: balance; color: var(--paper-2); text-shadow: 0 4px 24px rgba(0,0,0,0.4); }
.home-hero__lead { color: #d9d3c7; max-width: 52ch; font-size: clamp(0.94rem, 1.6vw, 1.06rem); }
.home-hero__lead strong { color: var(--amber-2); }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 22px 0 12px; }
.home-progress { color: var(--mist); font-size: 0.85rem; }
.home-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.home-badges li { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(242,163,60,0.28); color: var(--amber-2); font-size: 0.74rem; }
.home-hero__art { margin: 0; min-width: 0; }
.home-hero__art img {
  display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 18px; border: 1px solid rgba(246,234,210,0.28);
  box-shadow: 0 16px 36px rgba(0,0,0,0.34);
}
.home-hero__art figcaption { margin-top: 8px; color: var(--mist); font-size: 0.76rem; text-align: center; }

.mascots, .zones-preview, .how-to { margin-bottom: 20px; }
.mascot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.mascot-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: rgba(246,234,210,0.055); border: 1px solid rgba(246,234,210,0.14); }
.mascot-card h3 { margin: 2px 0 5px; color: var(--amber-2); }
.mascot-card p { color: var(--mist); font-size: 0.88rem; }
.mascot-card__face {
  flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink);
  border: 2px solid rgba(246,234,210,0.5);
}
.mascot-card__face--guang { background: radial-gradient(circle at 35% 30%, #ffe0a3, #e0a24e); }
.mascot-card__face--hui { background: linear-gradient(135deg, #e8edf5, #9aa7bd); }

.zone-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.zone-chip { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 15px; background: linear-gradient(135deg, color-mix(in srgb, var(--zc) 18%, transparent), rgba(246,234,210,0.045)); border: 1px solid color-mix(in srgb, var(--zc) 45%, transparent); }
.zone-chip__emoji { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(8,13,23,0.4); font-size: 1.25rem; }
.zone-chip b { display: block; color: var(--paper); font-size: 0.92rem; }
.zone-chip small { display: block; color: var(--zc2); font-size: 0.72rem; }
.zone-chip p { color: var(--mist); font-size: 0.8rem; margin-top: 3px; }
.how-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 0 0; list-style: none; counter-reset: how; }
.how-list li { padding: 14px; border-radius: 14px; background: rgba(246,234,210,0.045); border-left: 3px solid var(--amber); }
.how-list b { display: block; margin-bottom: 4px; color: var(--amber-2); }
.how-list span { display: block; color: var(--mist); font-size: 0.85rem; }

/* 地圖 */
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.map-zones { display: flex; flex-direction: column; gap: 18px; }
.zone-block { padding: 18px; border-radius: 20px; background: linear-gradient(135deg, rgba(18,28,47,0.92), rgba(26,39,63,0.72)); border: 1px solid color-mix(in srgb, var(--zc) 48%, transparent); box-shadow: 0 10px 28px rgba(0,0,0,0.22); }
.zone-block__head { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid rgba(246,234,210,0.12); }
.zone-block__badge { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--zc) 30%, #101827); border: 1px solid var(--zc2); font-size: 1.4rem; }
.zone-block__no { color: var(--zc2); font-size: 0.74rem; letter-spacing: 0.12em; }
.zone-block h2 { font-size: 1.35rem; margin: 1px 0 2px; }
.zone-block__head p { color: var(--mist); font-size: 0.83rem; }
.zone-nodes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.node {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 12px 8px;
  border-radius: 15px; border: 1px solid rgba(246,234,210,0.16); background: rgba(246,234,210,0.05);
  color: var(--paper); cursor: pointer; transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.node:hover { transform: translateY(-2px); background: rgba(242,163,60,0.12); border-color: var(--amber); }
.node__num { color: var(--amber); font-size: 0.72rem; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.node__icon { font-size: 1.45rem; line-height: 1.3; }
.node__name { font-weight: 700; font-size: 0.8rem; text-align: center; overflow-wrap: anywhere; }
.node__stars { color: var(--amber-2); font-size: 0.72rem; letter-spacing: 0.05em; white-space: nowrap; }
.node.is-next { border-color: rgba(242,163,60,0.65); box-shadow: inset 0 0 0 1px rgba(242,163,60,0.18); }
.node.is-done { background: rgba(79,156,143,0.12); border-color: rgba(79,156,143,0.45); }
.node.is-locked { opacity: 0.52; cursor: not-allowed; }
.node.is-locked:hover { transform: none; background: rgba(246,234,210,0.05); border-color: rgba(246,234,210,0.16); }

/* 關卡介紹 */
.intro-card { max-width: 820px; margin: 0 auto; }
.intro-card h1 { margin: 4px 0 10px; }
.intro-concept { color: var(--paper-2); font-size: 1.05rem; font-weight: 600; padding-left: 12px; border-left: 3px solid var(--amber); }
.intro-story { color: var(--mist); margin: 14px 0; }
.intro-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tips-box { padding: 15px 17px; border-radius: 15px; background: rgba(242,163,60,0.08); border: 1px dashed rgba(242,163,60,0.35); }
.tips-box h2 { font-size: 1rem; color: var(--amber-2); margin-bottom: 6px; }
.tips-box ul { margin: 0; padding-left: 1.2em; color: #ded8cb; font-size: 0.9rem; }
.tips-box li { margin: 4px 0; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.intro-stars { margin-top: 12px; color: var(--amber-2); font-size: 0.86rem; }

/* 結算 */
.result-card { max-width: 780px; margin: 0 auto; text-align: center; }
.result-card h1 { margin: 6px 0 4px; }
.result-sub { color: var(--mist); }
.result-stars { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1; }
.rstar { color: rgba(246,234,210,0.18); transform: scale(0.86); }
.rstar.is-on { color: var(--amber); text-shadow: 0 0 26px rgba(242,163,60,0.45); animation: star-in 0.55s ease both; animation-delay: calc(var(--i) * 0.18s); }
.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 20px 0; padding: 0; border-radius: 15px; overflow: hidden; background: rgba(246,234,210,0.14); }
.result-stats > div { padding: 12px 8px; background: #111a2c; min-width: 0; }
.result-stats dt { color: var(--mist); font-size: 0.72rem; }
.result-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-stats dd.is-big { color: var(--amber); font-size: 1.55rem; }
.result-fact { text-align: left; padding: 15px 17px; border-radius: 14px; background: rgba(79,156,143,0.09); border: 1px solid rgba(79,156,143,0.35); }
.result-fact b { color: #8ad9ca; }
.result-fact p { color: #d6d2c8; font-size: 0.9rem; margin-top: 3px; }
.result-fact .result-final { color: var(--amber-2); font-weight: 700; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }
  .home-hero__art { order: -1; }
  .home-hero__art img { aspect-ratio: 16 / 9; }
  .zone-nodes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .zone-chips, .mascot-grid, .how-list { grid-template-columns: 1fr; }
  .zone-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-hero { padding: 16px; }
  .home-hero__lead { font-size: 0.94rem; }
}
@media (max-width: 380px) {
  .zone-block { padding: 12px; }
  .node { padding: 10px 5px; }
  .node__name { font-size: 0.74rem; }
  .result-stats dd { font-size: 0.92rem; }
}
