/* ============================================================
   首頁、彩虹街地圖、結算與證書
   ============================================================ */

/* ------------------------------ 首頁 ------------------------------ */
.hero {
  position: relative;
  min-height: clamp(520px, 72vh, 720px);
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  isolation: isolate;
  background: #e9d6b3;
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  z-index: -2;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(44, 32, 21, .9) 0%, rgba(44, 32, 21, .68) 36%, rgba(44, 32, 21, .12) 70%, rgba(44, 32, 21, .05) 100%),
    linear-gradient(0deg, rgba(44, 32, 21, .55), transparent 36%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  width: min(660px, 62%);
  padding: clamp(1.5rem, 5vw, 3.4rem);
  color: #fffaf0;
  text-shadow: 0 2px 16px rgba(31, 22, 13, .35);
}
.hero-kicker {
  display: inline-block;
  margin-bottom: .7rem;
  padding: .32rem .7rem;
  border: 1px solid rgba(255, 250, 240, .45);
  border-radius: 999px;
  background: rgba(255, 250, 240, .13);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.hero h1 { margin: 0 0 .5rem; font-size: clamp(2.35rem, 6vw, 4.2rem); font-weight: 900; }
.hero h1 span { display: block; }
.hero h1 small { display: block; margin-top: .25rem; font-size: clamp(1rem, 2.3vw, 1.42rem); font-weight: 700; letter-spacing: .04em; color: #ffe6a6; }
.hero-lead { max-width: 34rem; margin-bottom: 1.2rem; font-size: clamp(.98rem, 1.5vw, 1.12rem); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.hero-actions .btn-soft { background: rgba(255, 250, 240, .92); }
.hero-badges { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.hero-badges li {
  padding: .28rem .68rem;
  border-radius: 999px;
  background: rgba(255, 250, 240, .17);
  border: 1px solid rgba(255, 250, 240, .28);
  font-size: .72rem;
  font-weight: 700;
}

.home-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}
.info-card {
  padding: clamp(1rem, 2.4vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.info-card h2 { font-size: 1.12rem; color: var(--orange-dark); }
.info-card p { color: var(--ink-soft); }
.meet-card { display: flex; align-items: center; gap: 1rem; }
.meet-card img { width: 104px; height: 104px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; background: var(--cream); border: 4px solid var(--cream); }
.meet-card h2 { margin-bottom: .25rem; }
.meet-card p { margin: 0; font-size: .88rem; }
.wide-card { grid-column: 1 / -1; }
.shop-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: .8rem 0; }
.shop-strip > div {
  min-width: 0;
  padding: .7rem .65rem;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
}
.shop-strip span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: .3rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  font-size: .8rem;
}
.shop-strip b { display: block; font-size: .88rem; line-height: 1.3; }
.shop-strip small { display: block; color: var(--muted); font-size: .7rem; }

/* ------------------------------ 地圖 ------------------------------ */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .8rem;
  margin: .2rem 0 1rem;
}
.page-head h1 { margin-bottom: .2rem; font-size: clamp(1.55rem, 3.2vw, 2.2rem); }
.page-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.map-zones { display: grid; gap: 1.1rem; }
.zone {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.zone-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .34;
  z-index: 0;
}
.zone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(110deg, rgba(255, 250, 240, .97) 0%, rgba(255, 250, 240, .9) 45%, rgba(255, 250, 240, .62) 100%);
}
.zone-content { position: relative; z-index: 1; padding: clamp(.9rem, 2.4vw, 1.35rem); }
.zone-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; }
.zone-title { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.zone-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 17px;
  background: var(--gold);
  font-size: 1.6rem;
  box-shadow: 0 4px 0 rgba(0,0,0,.08);
}
.zone-title h2 { margin: 0; font-size: 1.22rem; }
.zone-title p { margin: 0; color: var(--muted); font-size: .78rem; }
.zone-stars { color: var(--gold-dark); font-weight: 900; font-size: .82rem; }
.zone-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 148px;
  padding: .75rem .8rem;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, .93);
  text-align: left;
  box-shadow: 0 3px 0 rgba(91, 66, 37, .07);
  transition: transform .13s ease, border-color .13s ease, box-shadow .13s ease;
}
.level-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 8px 20px rgba(91, 66, 37, .14); }
.level-card:active { transform: translateY(1px); }
.level-card .level-day { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.level-card .level-emoji { font-size: 1.55rem; line-height: 1.2; margin: .1rem 0; }
.level-card .level-name { font-size: .96rem; font-weight: 900; line-height: 1.3; }
.level-card .level-concept { margin-top: .2rem; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.level-card .level-meta { display: flex; align-items: center; gap: .45rem; margin-top: auto; padding-top: .45rem; font-size: .68rem; color: var(--muted); }
.level-card .level-stars { color: var(--gold-dark); letter-spacing: .04em; font-size: .82rem; }
.level-card .level-score { font-variant-numeric: tabular-nums; }
.level-card.is-locked { background: rgba(239, 233, 221, .78); color: #8e8475; cursor: not-allowed; border-style: dashed; }
.level-card.is-locked:hover { transform: none; border-color: var(--line); box-shadow: none; }
.level-card.is-current { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(226, 96, 74, .14), 0 3px 0 rgba(91, 66, 37, .07); }
.level-card.is-complete .level-day::after { content: " ✓"; color: var(--green-dark); }
.lock-mark { position: absolute; top: .55rem; right: .6rem; font-size: .95rem; }
.map-footnote { margin-top: 1rem; padding: .8rem 1rem; border-radius: 16px; background: var(--cream); color: var(--ink-soft); font-size: .8rem; }

/* ------------------------------ 結算 ------------------------------ */
.screen-result { display: grid; place-items: center; }
.screen-map { position: relative; }
.screen-map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 28px;
  background: url("../img/bg-map.webp") center / cover no-repeat;
  opacity: .12;
  pointer-events: none;
}
.screen-map > * { position: relative; z-index: 1; }
.result-card {
  position: relative;
  overflow: hidden;
  width: min(780px, 100%);
  padding: clamp(1.2rem, 4vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 0, rgba(247,196,95,.35), transparent 18rem),
    var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}
.result-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .16;
  pointer-events: none;
}
.result-card > *:not(.result-bg) { position: relative; z-index: 1; }
.result-card h1 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
.stars { display: flex; justify-content: center; gap: .35rem; min-height: 72px; margin: .2rem 0 .5rem; }
.star {
  display: inline-block;
  color: #ddd1bc;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.08));
}
.star.is-on { color: var(--gold); }
.result-score { display: flex; align-items: baseline; justify-content: center; gap: .35rem; margin: .4rem 0 1rem; }
.result-score span { color: var(--muted); font-size: .85rem; }
.result-score b { font-size: clamp(2.2rem, 8vw, 3.8rem); line-height: 1; color: var(--orange-dark); font-variant-numeric: tabular-nums; }
.result-score small { color: var(--muted); }
.result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0; }
.result-grid > div { padding: .65rem .4rem; border-radius: 14px; background: var(--cream); }
.result-grid span { display: block; color: var(--muted); font-size: .68rem; }
.result-grid b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.stamp-wrap { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; }
.stamp {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 3px dashed var(--orange);
  border-radius: 50%;
  color: var(--orange-dark);
  transform: rotate(-8deg);
  background: #fff7ec;
  line-height: 1.15;
}
.stamp span { font-weight: 900; font-size: .95rem; }
.stamp small { font-size: .58rem; letter-spacing: .08em; }
.stamp-wrap p { margin: 0; text-align: left; font-weight: 700; color: var(--ink-soft); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1rem; }

/* ------------------------------ 證書 ------------------------------ */
.screen-certificate { display: grid; place-items: center; gap: 1rem; }
.certificate {
  position: relative;
  width: min(940px, 100%);
  overflow: hidden;
  border: 10px double var(--gold-dark);
  border-radius: 6px;
  background: #fffbf0;
  box-shadow: var(--shadow);
}
.cert-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .16; }
.cert-inner {
  position: relative;
  z-index: 1;
  padding: clamp(1.2rem, 5vw, 3.4rem);
  text-align: center;
}
.cert-kicker { margin-bottom: .4rem; color: var(--orange-dark); font-weight: 900; letter-spacing: .18em; font-size: .8rem; }
.cert-inner h1 { font-size: clamp(1.7rem, 5vw, 3.3rem); color: #7b4b1e; }
.cert-lead { margin-top: .8rem; color: var(--muted); }
.cert-name {
  display: inline-block;
  margin: .1rem 0 .6rem;
  padding: .05rem 1.4rem .2rem;
  border-bottom: 3px solid var(--gold-dark);
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 900;
  color: var(--orange-dark);
}
.cert-body { max-width: 44rem; margin: .4rem auto 1rem; font-size: clamp(.9rem, 2vw, 1.05rem); line-height: 2; }
.cert-seal {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 4px solid var(--orange);
  border-radius: 50%;
  color: var(--orange-dark);
  font-weight: 900;
  line-height: 1.1;
  transform: rotate(7deg);
  background: rgba(255,255,255,.65);
}
.cert-date { margin: 1rem 0 .1rem; color: var(--ink-soft); }
.cert-sign { color: var(--muted); font-size: .8rem; }
.certificate-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

@media (max-width: 900px) {
  .hero-copy { width: min(560px, 78%); }
  .zone-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .hero { min-height: 600px; border-radius: 24px; }
  .hero-art { object-position: 66% center; }
  .hero-shade { background: linear-gradient(0deg, rgba(44,32,21,.93) 0%, rgba(44,32,21,.65) 48%, rgba(44,32,21,.18) 100%); }
  .hero-copy { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; padding: 1.15rem 1.1rem 1.3rem; }
  .hero h1 small { font-size: .98rem; }
  .hero-lead { margin-bottom: .8rem; font-size: .9rem; line-height: 1.65; }
  .hero-actions { gap: .45rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-badges { margin-top: .8rem; }
  .home-panels { grid-template-columns: 1fr; }
  .shop-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meet-card img { width: 78px; height: 78px; }
  .page-head { align-items: flex-start; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1 1 auto; }
  .zone { border-radius: 22px; }
  .zone-levels { grid-template-columns: 1fr; }
  .level-card { min-height: 118px; }
  .level-card .level-concept { display: block; }
  .zone-icon { width: 46px; height: 46px; font-size: 1.35rem; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stamp-wrap { flex-direction: column; text-align: center; gap: .5rem; }
  .stamp-wrap p { text-align: center; }
  .result-actions .btn { flex: 1 1 auto; }
  .certificate { border-width: 6px; }
}
