/* 跑者手機各畫面版面（骨架期：簡版＋色塊佔位）。座標用設計單位 360×640。
   位置是對照 docs/source/extracted/img-*.jpg（1406×2500 ÷ 3.9）目測，設計原始檔到位後校正。 */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 120px 24px 60px;
  text-align: center;
}
.screen[hidden] { display: none; }
.screen > * { position: relative; z-index: 1; }
.screen .ph--full { position: absolute; z-index: 0; }
.ph--hero::before { position: absolute; left: 6px; bottom: 4px; }

/* 本機才顯示畫面代號（/audit 截圖時辨認用） */
.is-local #stage::after {
  content: attr(data-screen) " · " attr(data-cut);
  position: absolute;
  left: 4px; top: 4px;
  z-index: 50;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .8);
  color: #000;
  font: 10px/1.5 ui-monospace, Menlo, monospace;
  pointer-events: none;
}

.copy { margin: 0; font-size: 12px; line-height: 1.7; letter-spacing: .12em; }
.copy--sm { font-size: 11px; letter-spacing: .06em; }
.copy b { font-weight: 700; }
.copy em { font-style: italic; font-weight: 700; }
.copy mark { background: var(--c-red); color: #fff; padding: 0 6px; border-radius: 999px; font-size: 10px; }
.stack { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spacer { flex: 1; }

/* ───── 01 split ───── */
.screen--split .copy { margin-top: 110px; align-self: flex-end; text-align: right; }
.split__q { margin: 40px 0 6px; font-size: 14px; font-weight: 700; letter-spacing: .2em; }

/* ───── 02 intro ───── */
.screen--intro .ph--hero { width: 360px; height: 190px; margin: -120px -24px 0; align-self: stretch; }
.screen--intro .stack { margin-top: 24px; }
.intro__steps { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; width: 280px; }
.intro__steps li {
  padding: 6px 12px;
  background: var(--c-grey-dark);
  transform: skewX(var(--skew));
  font-size: 11px;
  text-align: left;
}
.intro__steps li > span { display: block; transform: skewX(calc(-1 * var(--skew))); }
.intro__steps b { color: var(--c-red); margin-right: 6px; }
[data-branch="walkin"] .only-booked, [data-branch="booked"] .only-walkin { display: none !important; }

/* ───── 03 register ───── */
.field { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 280px; }
.field label { font-size: 14px; font-weight: 700; letter-spacing: .2em; }
.field small { font-size: 10px; color: var(--c-muted); }
.field input, .field select {
  width: 100%;
  height: 40px;
  margin-top: 4px;
  padding: 0 12px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 14px;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .04em; }
.check input { width: 16px; height: 16px; accent-color: var(--c-red); }
.check a, .check button { color: #fff; text-decoration: underline; text-decoration-color: var(--c-red); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ───── 04 terms（長頁，可捲動） ───── */
.screen--terms { padding: 60px 20px 24px; gap: 8px; }
.terms__body {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 4px;
  text-align: left;
  font-size: 11px;
  line-height: 1.7;
}
.terms__body h2 { font-size: 12px; margin: 12px 0 4px; }
.terms__body ol { padding-left: 20px; margin: 0; }
.terms__body li { white-space: pre-line; margin-bottom: 4px; }

/* ───── 05 quiz ───── */
.screen--quiz { padding-top: 100px; gap: 8px; }
.quiz__progress { display: flex; align-items: baseline; gap: 8px; align-self: flex-start; font-weight: 900; font-style: italic; }
.quiz__progress b { font-size: 42px; color: var(--c-red); line-height: 1; }
.quiz__progress span { font-size: 16px; }
.quiz__dots { display: flex; gap: 4px; align-self: stretch; margin-bottom: 8px; }
.quiz__dots i { flex: 1; height: 3px; background: var(--c-grey-dark); }
.quiz__dots i.is-done { background: var(--c-red); }
.quiz__q { margin: 0 0 6px; align-self: flex-start; text-align: left; font-size: 14px; font-weight: 700; line-height: 1.5; }
.quiz__options { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 6px 12px;
  border: 1.5px solid #fff;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 11.5px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.opt i { font-style: italic; font-weight: 900; font-size: 14px; width: 16px; flex: none; }
.opt.is-selected { background: var(--c-red); border-color: var(--c-red); }
.quiz__nav { margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.btn:disabled.btn--red { background: #5a0010; color: rgba(255,255,255,.5); }

/* ───── 05/06 generating ───── */
.screen--generating { justify-content: center; padding-top: 60px; }
.generating__name { font-size: 22px; font-weight: 900; font-style: italic; margin: 0; }
.screen--generating .ph--shoe { width: 240px; height: 120px; }

/* ───── 06/07 result：白底診斷卡 ───── */
.screen--result { padding-top: 96px; gap: 8px; }
.card {
  width: 300px;
  padding: 14px 16px;
  background: #fff;
  color: #111;
  text-align: left;
  display: flex; flex-direction: column; gap: 6px;
}
.card__name { margin: 0; font-size: 18px; font-weight: 900; font-style: italic; }
.card__lvl-row { display: flex; align-items: center; justify-content: space-between; }
.card__lvl-label { font-size: 11px; letter-spacing: .1em; }
.card__stamp {
  width: 64px; height: 64px;
  border: 3px solid var(--c-red);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--c-red);
  font-size: 22px; font-weight: 900; font-style: italic;
  rotate: -12deg;
}
.card__quote { margin: 0; font-size: 12px; font-weight: 700; }
.card .ph { border-color: rgba(0,0,0,.35); color: rgba(0,0,0,.55); background: repeating-linear-gradient(45deg, rgba(0,0,0,.04) 0 8px, rgba(0,0,0,.08) 8px 16px); }
.card .ph--shoe { width: 100%; height: 90px; }
.card__shoe { margin: 0; font-size: 12px; font-weight: 900; }
.card__points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 10px; }
.card__points b { display: block; }
.card__save { margin: 0; font-size: 10px; color: var(--c-muted); }

/* ───── 07/08 share-photo、redeemed；08 checkin；09；10 ───── */
.screen--share-photo .stack, .screen--checkin .stack, .screen--station .stack, .screen--return-timer .stack { margin-top: 16px; }
.alert {
  width: 280px;
  padding: 8px 12px;
  border: 1.5px solid var(--c-red);
  background: rgba(228, 0, 43, .18);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
}
.alert b { font-variant-numeric: tabular-nums; }
.steps { margin: 0; padding: 0; list-style: none; font-size: 11.5px; line-height: 1.9; letter-spacing: .1em; text-align: left; }
.steps mark { background: var(--c-red); color: #fff; padding: 0 6px; border-radius: 3px; font-size: 10px; }

/* ───── 10 my-qr 彈窗 ───── */
.screen--my-qr { padding: 0; z-index: 10; background: rgba(0, 0, 0, .78); justify-content: center; }
.qr-modal {
  position: relative;
  width: 280px;
  padding: 26px 20px 20px;
  border: 1.5px solid #fff;
  background: #000;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.qr-modal__close {
  position: absolute; right: -14px; top: -14px;
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  background: var(--c-red); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.qr-box { width: 150px; height: 150px; padding: 8px; background: #fff; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr-modal__name { margin: 0; font-size: 18px; font-weight: 900; }
.qr-modal__lvl { margin: 0; font-size: 12px; letter-spacing: .1em; }
.qr-modal__lvl em { color: var(--c-red); font-style: italic; font-weight: 900; }

/* ───── 現場地圖疊層（每頁右上角按鈕；可左右滑） ───── */
.map-overlay {
  position: absolute; inset: 0; z-index: 40;
  background: #000;
  display: flex; flex-direction: column;
}
.map-overlay[hidden] { display: none; }
.map-overlay__bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 13px; letter-spacing: .2em; font-weight: 700; }
.map-overlay__close { border: 0; background: none; color: #fff; font-size: 20px; cursor: pointer; }
.map-overlay__track {
  flex: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.map-overlay__track::-webkit-scrollbar { display: none; }
.map-overlay__track .ph { flex: none; width: 360px; height: 100%; scroll-snap-align: start; border-width: 0 0 0 1.5px; }
.map-overlay__dots { display: flex; justify-content: center; gap: 6px; padding: 10px; }
.map-overlay__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-grey); }
.map-overlay__dots i.is-on { background: #fff; }
