/* ============================================================
   首頁、工坊地圖、關卡介紹、結算、訂單牆
   ============================================================ */
.screen { display: none; min-height: calc(100vh - var(--footer-h)); }
.screen.is-active { display: block; }

/* ---------- 首頁 ---------- */
.screen--home {
  display: none;
  padding: 96px 4vw 34px;
}
.screen--home.is-active { display: block; }
.home {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: min(700px, calc(100vh - 250px));
}
.home__text { position: relative; z-index: 2; }
.home__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 247, .78);
  border: 1px solid rgba(168, 106, 59, .22);
  color: var(--wood-dark);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: var(--shadow-sm);
}
.kicker-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(233, 139, 63, .17); }
.home__title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(56px, 7.2vw, 104px);
  line-height: .95;
  letter-spacing: .02em;
  color: var(--ink);
}
.home__title-main { display: block; color: var(--orange); text-shadow: 0 3px 0 #fff4d9, 0 7px 0 rgba(168, 106, 59, .18); }
.home__title-sub { display: block; margin-top: 2px; color: var(--nori); }
.home__tagline {
  margin-top: 20px;
  max-width: 34em;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.75;
  color: var(--ink-soft);
}
.home__tagline b { color: var(--wood-dark); background: linear-gradient(transparent 62%, #ffe29a 62%); padding: 0 2px; }
.home__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home__progress { min-height: 28px; margin-top: 16px; font-size: 16px; color: var(--muted); font-weight: 700; }
.home__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 253, 247, .68);
  border: 1px dashed rgba(168, 106, 59, .28);
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

.home__art { position: relative; min-height: 380px; }
.home__sun {
  position: absolute;
  width: min(68%, 430px);
  aspect-ratio: 1;
  right: 1%; top: -2%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff3b0, #f7c95d 58%, #eda13c 100%);
  box-shadow: 0 0 0 18px rgba(255, 246, 210, .32), 0 0 80px rgba(238, 164, 58, .3);
}
.home__hero {
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 36px 36px 30px 30px;
  border: 6px solid rgba(255, 253, 247, .9);
  box-shadow: var(--shadow-lg);
  transform: rotate(1.4deg);
}
.home__sticker {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fffdf7;
  border: 2px solid #f0ddb8;
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.25;
}
.home__sticker b { display: block; font-size: 18px; color: var(--ink); }
.home__sticker small { display: block; color: var(--muted); font-size: 12px; }
.home__sticker-emoji { font-size: 28px; }
.home__sticker--bento { left: -3%; bottom: 14%; transform: rotate(-3deg); }
.home__sticker--star { right: -2%; bottom: 3%; transform: rotate(2.5deg); background: #fff4cf; border-color: #edcf82; }

.home__zones {
  width: min(1280px, 100%);
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.zone-peek {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 253, 247, .72);
  box-shadow: 0 3px 0 rgba(104, 66, 33, .1);
  border-bottom: 4px solid var(--peek-color, var(--orange));
  text-align: left;
  transition: transform .15s, background .15s;
}
.zone-peek:hover { transform: translateY(-2px); background: #fffdf7; }
.zone-peek__emoji { font-size: 26px; }
.zone-peek__name { display: block; font-weight: 800; font-size: 16px; }
.zone-peek__meta { display: block; font-size: 12px; color: var(--muted); }

/* ---------- 地圖 ---------- */
.screen--map, .screen--collection {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 86px 4vw 40px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255, 253, 247, .8);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.topbar__title { flex: 1; min-width: 0; }
.topbar__kicker { display: block; font-size: 13px; color: var(--muted); font-weight: 700; }
.topbar__title h1 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.topbar__stats { display: flex; gap: 8px; }

.map-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 4px 16px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}
.map-intro p { max-width: 780px; }
.map-zones { display: grid; gap: 20px; }
.zone-block {
  border-radius: 26px;
  background: rgba(255, 253, 247, .82);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.zone-block__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, .55), transparent 38%),
    linear-gradient(110deg, color-mix(in srgb, var(--zone-color) 84%, #fff), var(--zone-color2));
  color: var(--zone-ink);
}
.zone-block__badge {
  width: 62px; height: 62px;
  min-width: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 253, 247, .85);
  box-shadow: 0 4px 10px rgba(80, 45, 10, .2);
  background: #fff8e9;
}
.zone-block__name { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; }
.zone-block__kicker { font-size: 14px; font-weight: 700; opacity: .8; }
.zone-block__progress { margin-left: auto; text-align: right; font-size: 14px; font-weight: 800; white-space: nowrap; }
.zone-block__progress b { font-size: 24px; }
.zone-block__levels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 20px;
}
.level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 172px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf0;
  text-align: left;
  box-shadow: 0 4px 0 rgba(104, 66, 33, .12);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.level-card:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 7px 0 rgba(104, 66, 33, .12); background: #fffdf7; }
.level-card:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 2px 0 rgba(104, 66, 33, .1); }
.level-card__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.level-card__num {
  display: inline-grid;
  place-items: center;
  min-width: 34px; height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--zone-color);
  color: #fffdf8;
  font-weight: 900;
  font-size: 16px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.level-card__emoji { font-size: 24px; }
.level-card__name { margin-top: 10px; font-size: 19px; font-weight: 900; line-height: 1.3; color: var(--ink); }
.level-card__tag { margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.level-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 10px; font-size: 12px; color: var(--muted); }
.level-card__stars { font-size: 17px; letter-spacing: 1px; color: #dfa41f; }
.level-card__stars .is-off { color: #ddd0bc; }
.level-card__best { white-space: nowrap; }
.level-card--locked { background: #f5ead6; border-style: dashed; color: #96836d; box-shadow: none; cursor: not-allowed; }
.level-card--locked .level-card__num { background: #cab99f; }
.level-card__lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; background: rgba(255, 249, 236, .4); border-radius: 18px; }
.level-card--done { border-color: #e4c884; background: linear-gradient(180deg, #fffdf3, #fff4cf); }
.zone-block--next { outline: 3px solid rgba(233, 139, 63, .4); outline-offset: 3px; }
.map-progress { margin: 22px 4px 0; text-align: center; color: var(--muted); font-weight: 700; }

/* ---------- 關卡介紹 ---------- */
.screen--intro {
  width: min(1140px, 100%);
  margin: 0 auto;
  padding: 92px 4vw 40px;
}
.intro {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}
.intro__art { position: relative; display: grid; place-items: center; min-height: 340px; }
.intro__art::before {
  content: "";
  position: absolute;
  width: min(78%, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #fff1bd, var(--zone-color2));
  opacity: .78;
  box-shadow: 0 0 0 18px rgba(255, 253, 247, .3);
}
.intro__art img { position: relative; z-index: 1; width: min(78%, 340px); max-height: 360px; object-fit: contain; filter: drop-shadow(0 18px 20px rgba(90, 50, 15, .2)); animation: bob 4s ease-in-out infinite; }
.intro__bubble {
  position: absolute;
  z-index: 2;
  right: -4%; bottom: 4%;
  max-width: 220px;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  background: #fffdf7;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}
.intro__card {
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--cream);
  border: 2px solid #f1ddba;
  box-shadow: var(--shadow-lg);
}
.intro__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 12px;
  border-radius: 9px;
  background: var(--zone-color);
  color: #fffdf7;
  font-weight: 900;
  font-size: 14px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14);
}
.intro__head .stars-line { margin-left: auto; }
.intro__card h1 { margin-top: 12px; font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); line-height: 1.15; }
.intro__concept { margin-top: 8px; font-size: 18px; color: var(--ink-soft); line-height: 1.7; }
.intro__story {
  position: relative;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff6df;
  border-left: 6px solid var(--zone-color);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}
.intro__who { font-weight: 900; color: var(--wood-dark); }
.intro__story .icon-btn { vertical-align: middle; margin-left: 6px; }
.intro__tips { margin-top: 16px; display: grid; gap: 8px; list-style: none; }
.intro__tips li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.6; }
.intro__tips li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 1px;
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #e8f3e4;
  color: var(--nori);
  font-size: 13px;
  font-weight: 900;
}
.intro__fact { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: #eef7f3; color: #2c5c49; font-size: 14.5px; line-height: 1.6; }
.intro__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.intro__meta span { padding: 5px 10px; border-radius: 8px; background: #f8eedb; border: 1px solid #ecd9b8; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.intro__actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 24px; }

/* ---------- 結算 ---------- */
.screen--result { padding: 92px 4vw 40px; }
.result { display: grid; place-items: center; min-height: calc(100vh - 200px); }
.result__card {
  width: min(780px, 100%);
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--cream);
  border: 2px solid #f1ddba;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: pop-in .45s cubic-bezier(.2, 1.2, .4, 1);
}
.result__kicker { font-size: 15px; letter-spacing: .14em; font-weight: 800; color: var(--wood); }
.result__stars { margin: 8px 0 2px; font-size: clamp(42px, 7vw, 64px); letter-spacing: 6px; color: #dfa41f; line-height: 1.2; }
.result__stars .is-off { color: #e4d8c4; }
.result__card h1 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 48px); line-height: 1.2; }
.result__sub { margin-top: 6px; color: var(--muted); font-size: 17px; }
.result__img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 20px; margin: 18px 0; border: 3px solid #f2e0bf; }
.result__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: center; }
.result__stats div { padding: 12px 8px; border-radius: 14px; background: #fff6e2; border: 1px solid #efdcb8; }
.result__stats dt { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.result__stats dd { margin: 2px 0 0; font-size: 22px; font-weight: 900; color: var(--ink); }
.result__stamp {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 18px;
  border: 3px solid #c9585b;
  border-radius: 10px;
  color: #b84447;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .08em;
  transform: rotate(-4deg);
  background: rgba(255, 246, 235, .7);
}
.result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }

/* ---------- 訂單牆 ---------- */
.collection-intro { margin: 18px 4px; color: var(--muted); font-size: 16px; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.order-ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 100% 0, rgba(233, 139, 63, .14), transparent 44%),
    #fffaf0;
  text-align: left;
  box-shadow: 0 4px 0 rgba(104, 66, 33, .1);
  transition: transform .15s, background .15s;
}
.order-ticket:hover:not(:disabled) { transform: translateY(-2px); background: #fffdf7; }
.order-ticket:disabled { filter: grayscale(.55); opacity: .62; cursor: not-allowed; }
.order-ticket__head { display: flex; align-items: center; justify-content: space-between; }
.order-ticket__no { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .08em; }
.order-ticket__emoji { font-size: 26px; }
.order-ticket__name { margin-top: 8px; font-size: 18px; font-weight: 900; line-height: 1.3; }
.order-ticket__tag { margin-top: 2px; font-size: 12px; color: var(--muted); font-weight: 700; }
.order-ticket__foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.order-ticket__stars { color: #dfa41f; letter-spacing: 1px; font-size: 16px; }
.order-ticket__stars .is-off { color: #ddd0bc; }
.order-ticket--locked { background: #f5ead6; border-style: dashed; }
.order-ticket__badge { position: absolute; right: 10px; top: 46px; font-size: 20px; }

@media (max-width: 980px) {
  .home { grid-template-columns: 1fr; min-height: auto; padding-top: 16px; }
  .home__art { order: -1; min-height: 300px; max-width: 640px; margin: 0 auto; }
  .home__hero { max-height: 380px; }
  .home__title { font-size: clamp(52px, 13vw, 82px); }
  .home__zones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zone-block__levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro { grid-template-columns: 1fr; }
  .intro__art { min-height: 230px; order: 2; }
  .intro__art img { max-height: 230px; }
  .intro__bubble { right: 2%; bottom: 0; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .screen--home { padding: 76px 14px 24px; }
  .home { gap: 18px; }
  .home__art { min-height: 240px; }
  .home__hero { max-height: 260px; border-width: 4px; border-radius: 24px; }
  .home__sticker { padding: 7px 10px; font-size: 12px; }
  .home__sticker b { font-size: 15px; }
  .home__sticker-emoji { font-size: 22px; }
  .home__sticker--bento { left: -2%; bottom: 8%; }
  .home__sticker--star { right: 0; bottom: -2%; }
  .home__tagline { margin-top: 14px; font-size: 17px; }
  .home__cta .btn { flex: 1 1 46%; padding-inline: 12px; }
  .home__zones { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
  .zone-peek { min-height: 62px; padding: 9px 10px; }
  .zone-peek__name { font-size: 14px; }
  .zone-peek__meta { font-size: 11px; }
  .screen--map, .screen--collection, .screen--intro, .screen--result { padding: 74px 12px 28px; }
  .topbar { gap: 8px; padding: 9px 10px; }
  .topbar__title h1 { font-size: 23px; }
  .topbar__kicker { font-size: 11px; }
  .topbar__stats .pill { padding: 3px 8px; font-size: 13px; }
  .topbar__stats .pill b { font-size: 15px; }
  .map-intro { flex-direction: column; align-items: flex-start; margin: 12px 2px; font-size: 15px; }
  .zone-block__head { padding: 12px 14px; gap: 10px; }
  .zone-block__badge { width: 50px; height: 50px; min-width: 50px; }
  .zone-block__name { font-size: 21px; }
  .zone-block__progress b { font-size: 20px; }
  .zone-block__levels { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
  .level-card { min-height: 154px; padding: 11px; }
  .level-card__name { font-size: 17px; }
  .level-card__tag { font-size: 11.5px; }
  .level-card__best { display: none; }
  .intro__card { padding: 20px 16px; }
  .intro__art { min-height: 200px; }
  .intro__art img { max-height: 200px; }
  .intro__bubble { display: none; }
  .intro__actions { flex-direction: column-reverse; }
  .intro__actions .btn { width: 100%; }
  .result__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .result__stats dd { font-size: 19px; }
  .result__actions .btn { flex: 1 1 44%; }
  .collection-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .order-ticket { min-height: 148px; padding: 11px; }
  .order-ticket__name { font-size: 16px; }
}
