/* 店家設計健檢 — Design Scout 設計系統（社群配色）
   數值來源：https://claude.ai/artifact/DRPgiRf3TAXVZZh8FKLUjy 的 tokens.json */

:root {
  --bg: #FAF9F4;
  --card: #FFFFFF;
  --line: #E6E3DA;
  --ink: #1C1D21;
  --ink2: #4A4C52;
  --muted: #6B6D73;
  --accent: #F96A45;
  --accent-ink: #C4462A;
  --accent-soft: #FDE9E2;
  --navy: #274289;
  --navy-soft: #E7EBF6;
  --on-navy: #FFFFFF;
  --dark: #28292E;
  --pass: #274289;
  --fix: #C4462A;
  --line-green: #06C755;
  --wordmark: #1E2D7D;
  --focus: #274289;
  --scrim: rgba(28, 29, 33, 0.45);
  --shadow-card: 0 1px 0 #E6E3DA, 0 12px 28px -18px rgba(28, 29, 33, 0.28);
  --shadow-press: 0 3px 0 rgba(28, 29, 33, 0.18);
  --watermark: 0.06;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --latin: "Space Grotesk", "Noto Sans TC", system-ui, sans-serif;

  --gutter: 20px;
  /* 2026-10-17 Dan 定：固定米白色，不跟系統深色模式；`only` 也擋掉部分 Android 瀏覽器的強制深色 */
  color-scheme: light only;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--navy); }
[hidden] { display: none !important; }
.latin { font-family: var(--latin); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1:focus, h2:focus { outline: none; }

/* ---------- 共用：版面 ---------- */
.screen {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(8px + env(safe-area-inset-top, 0px)) var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 48px; position: relative; }
.topbar__tag { font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.toplogo { display: none; align-items: center; gap: 12px; color: var(--wordmark); }
.toplogo img { width: 34px; height: auto; }
.toplogo b { display: block; font: 700 17px/22px var(--sans); letter-spacing: 4px; }
.toplogo .latin { display: block; font-size: 14px; line-height: 18px; font-weight: 500; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/18px var(--latin); letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink2); }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.count { font: 700 13px/18px var(--latin); letter-spacing: 1px; color: var(--ink2); }
.ul { background: linear-gradient(transparent 80%, var(--accent) 80%, var(--accent) 92%, transparent 92%); }
.watermark { position: absolute; right: -60px; bottom: 90px; width: 230px; opacity: var(--watermark); pointer-events: none; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: var(--r-md);
  font: 700 17px/24px var(--sans); letter-spacing: .5px; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--navy); color: var(--on-navy); box-shadow: var(--shadow-press); }
.btn--primary:active { transform: translateY(2px); box-shadow: none; }
.btn--secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--secondary:active { background: var(--navy-soft); }
.btn--ghost { background: transparent; color: var(--ink2); min-height: 48px; padding: 0 12px; }
.btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.arrow { font-family: var(--latin); }
.btn--line { justify-content: flex-start; gap: 12px; min-height: 64px; padding: 10px 18px; text-align: left; line-height: 22px; color: var(--on-navy); }
.btn--line small { display: block; font: 500 13px/18px var(--sans); letter-spacing: 0; opacity: .88; }
.line-badge { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: var(--r-sm); background: var(--line-green); color: #FFFFFF; font: 700 9px/1 var(--latin); letter-spacing: .3px; }

/* ---------- 小元件 ---------- */
.dot { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #FFFFFF; font: 700 16px/1 var(--latin); }
.dot--lg { width: 44px; height: 44px; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: 999px; font: 500 13px/1.3 var(--sans); color: var(--ink2); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.privacy { display: block; margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.privacy .nb { display: inline-block; }
.privacy svg { display: inline-block; vertical-align: -2px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- ① 開始頁（手機） ---------- */
.hero { position: relative; margin-top: 22px; }
.hero__kicker, .hero__cta, .hero__text > .privacy, .hero__disc, .hero__ring, .screen--start .brandfoot--start { display: none; }
.hero__title {
  position: relative; z-index: 1;
  font: 900 clamp(34px, 10.4vw, 40px)/1.25 var(--serif);
  letter-spacing: .5px; color: var(--ink); text-wrap: balance;
}
.hero__sub { position: relative; z-index: 1; margin-top: 14px; font-size: 17px; line-height: 29px; color: var(--ink2); }
.hero__art { position: absolute; right: -16px; top: -34px; width: min(150px, 38vw); }
.hero__img { width: 100%; height: auto; }

.route {
  position: relative; margin-top: 24px; padding: 6px 18px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg);
}
.route::before { content: ""; position: absolute; left: 33px; top: 34px; bottom: 34px; border-left: 2px dashed var(--line); }
.route__item { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.route__item + .route__item { border-top: 1px solid var(--line); }
.route__body { flex: 1; min-width: 0; font-size: 17px; line-height: 27px; color: var(--ink2); }
.route__name { color: var(--ink); margin-right: .9em; }
.route__tags { display: block; font-size: 14px; line-height: 20px; color: var(--muted); }
.start__chips { margin-top: 14px; }
.start__bottom { margin-top: auto; padding-top: 24px; }

/* ---------- ② 題目頁 ---------- */
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 2px; }
.progress__step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.progress__bar, .progress--done span { display: block; height: 6px; border-radius: 999px; background: var(--line); }
.progress__label { font: 500 13px/18px var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress__step.is-done .progress__bar, .progress--done span { background: var(--navy); }
.progress__step.is-done .progress__label { color: var(--ink2); }
.progress__step.is-now .progress__bar { background: var(--accent); }
.progress__step.is-now .progress__label { color: var(--ink); font-weight: 700; }
.btn--back { padding: 0; gap: 6px; }

.station-head { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; }
.station-head .dot { margin-top: 2px; }
.station-head__title { font: 900 clamp(22px, 6.4vw, 26px)/1.4 var(--serif); text-wrap: balance; }
.station-head__lead { margin-top: 4px; font-size: 15px; line-height: 24px; color: var(--ink2); }

.questions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.q { margin: 0; min-width: 0; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.q__text { float: left; width: 100%; padding: 0; font: 700 17px/26px var(--sans); color: var(--ink); }
.q__hint { float: left; width: 100%; margin-top: 2px; font: 400 14px/21px var(--sans); color: var(--muted); }
.q__opts { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 12px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px;
  border-radius: var(--r-md); background: var(--bg); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink2); font: 700 17px/24px var(--sans);
  transition: background-color .15s ease, box-shadow .15s ease;
}
.opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.opt--yes input:checked + span { background: var(--navy); color: var(--on-navy); box-shadow: none; }
.opt--no input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.ox { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.mk { display: inline-block; width: 1.05em; height: 1.05em; margin: 0 .1em; vertical-align: -.17em; fill: none; stroke-width: 3.2; stroke-linecap: round; }
.mk--o { stroke: var(--pass); }
.mk--x { stroke: var(--fix); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gate-note { padding: 12px 16px; border-radius: var(--r-md); background: var(--navy-soft); font-size: 15px; line-height: 24px; color: var(--ink); }

.quiz__bottom {
  position: sticky; bottom: 0; z-index: 2;
  margin: auto calc(-1 * var(--gutter)) calc(-22px - env(safe-area-inset-bottom, 0px));
  padding: 26px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, transparent, var(--bg) 22px);
}
.quiz__left { margin-top: 8px; text-align: center; font-size: 13px; line-height: 18px; color: var(--muted); }

/* ---------- ③ 結果頁 ---------- */
.result { margin-top: 22px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.result__head { display: flex; align-items: center; gap: 6px; padding: 18px 16px 14px 8px; }
.result__mascot { width: clamp(76px, 24vw, 104px); height: clamp(76px, 24vw, 104px); flex: none; object-fit: contain; }
.result__headtext { min-width: 0; }
.result__label { font: 700 13px/18px var(--latin); letter-spacing: 1.5px; color: var(--muted); }
.result__verdict { margin-top: 6px; font: 900 clamp(21px, 6.4vw, 26px)/1.4 var(--serif); color: var(--ink); }
.result__verdict em { font-style: normal; color: var(--accent-ink); background: linear-gradient(transparent 82%, var(--accent) 82%, var(--accent) 92%, transparent 92%); }

.stations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 16px 18px; }
.station { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 10px 10px; border-radius: var(--r-md); background: var(--navy-soft); color: var(--pass); }
.station svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.station__name { display: block; font: 700 15px/20px var(--sans); color: var(--ink); }
.station__state { display: block; font: 500 13px/18px var(--sans); color: inherit; white-space: nowrap; }
.station__state .mk { margin: 0 .05em; }
.station__tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--fix); color: var(--card); font: 700 11px/18px var(--sans); vertical-align: 1px; white-space: nowrap; }
.station.is-fix { background: var(--accent-soft); color: var(--fix); }
.station.is-fix .station__state { font-weight: 700; }
.station.is-first { box-shadow: inset 0 0 0 2px var(--accent); }
.station.is-quiet { background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

.result__sec { padding: 16px 20px; border-top: 1px solid var(--line); }
.result__sec h3 { margin-bottom: 8px; font: 700 16px/22px var(--sans); color: var(--ink); }
.result__sec p { font-size: 16px; line-height: 27px; color: var(--ink2); }
.result__sec--soft { background: var(--bg); }
.result__sec--soft .chip { background: var(--card); }
.result__later { margin-top: 10px; font-size: 15px !important; line-height: 24px !important; }
.result__later:empty { display: none; }
.prep { display: flex; flex-direction: column; gap: 10px; counter-reset: prep; }
.prep li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 26px; color: var(--ink2); counter-increment: prep; }
.prep li::before { content: counter(prep); flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: 0; border-radius: 50%; background: var(--accent); color: #FFFFFF; font: 700 14px/1 var(--latin); }

.result__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.addfriend { text-align: center; font-size: 14px; line-height: 22px; color: var(--muted); }
.addfriend a { display: inline-block; padding: 12px 4px; color: var(--navy); font-weight: 700; }
.privacy--center { margin-top: 4px; }
.cta { margin-top: 30px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--dark); color: var(--on-navy); font: 900 20px/30px var(--serif); }
.cta small { display: block; margin-top: 6px; font: 400 15px/24px var(--sans); opacity: .85; }
.btn--restart { align-self: center; margin-top: 10px; text-decoration: underline; text-underline-offset: 4px; }

.brandfoot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.screen--result .brandfoot { margin-top: 28px; }
.brandfoot__mark { display: flex; align-items: center; gap: 10px; color: var(--wordmark); }
.brandfoot__mark img { width: 30px; height: auto; }
.brandfoot__mark b { display: block; font: 700 15px/20px var(--sans); letter-spacing: 3px; }
.brandfoot__mark .latin { display: block; font-size: 13px; line-height: 16px; font-weight: 500; }
.brandfoot__note { text-align: right; font-size: 13px; line-height: 20px; color: var(--muted); }
.brandfoot__note a { color: var(--muted); }

/* ---------- 截圖說明與截圖卡 ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); }
.sheet__panel {
  width: 100%; max-width: 480px; padding: 24px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--card); color: var(--ink);
}
.sheet__panel h2 { font: 900 22px/32px var(--serif); }
.sheet__panel p { margin-top: 8px; font-size: 16px; line-height: 26px; color: var(--ink2); }
.sheet__keys { display: grid; gap: 8px; margin-top: 14px; }
.sheet__keys li { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg); font-size: 16px; line-height: 24px; color: var(--ink2); }
.sheet__keys b { min-width: 64px; font-family: var(--latin); color: var(--ink); }
.sheet__note { font-size: 14px !important; color: var(--muted) !important; }
.sheet__actions { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.sheet__actions .btn--ghost { align-self: center; }

.shot { position: fixed; inset: 0; z-index: 30; display: flex; overflow-y: auto; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--bg); cursor: pointer; }
.shot:focus { outline: none; }
.shot__card { margin: auto; width: 100%; max-width: 380px; padding: 20px 18px 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-card); }
.shot__top { display: flex; justify-content: space-between; align-items: center; }
.shot__kind { font-size: 13px; color: var(--muted); }
.shot__verdict { margin-top: 14px; font: 900 clamp(22px, 6.6vw, 26px)/1.4 var(--serif); }
.shot__verdict em { font-style: normal; color: var(--accent-ink); background: linear-gradient(transparent 82%, var(--accent) 82%, var(--accent) 92%, transparent 92%); }
.stations--shot { padding: 14px 0 0; }
.shot__prep { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.shot__prep-title { margin-bottom: 8px; font: 700 15px/22px var(--sans); }
.shot__prep .prep li { font-size: 15px; line-height: 24px; }
.shot__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.shot__ig { font-size: 13px; color: var(--muted); }

.noscript { max-width: 480px; margin: 40px auto; padding: 0 20px; color: var(--ink2); }

/* ---------- 小螢幕 ---------- */
@media (max-width: 359px) {
  :root { --gutter: 16px; }
}

/* ---------- 桌機 ---------- */
@media (min-width: 960px) {
  .screen--start { max-width: 1280px; padding-inline: clamp(32px, 4vw, 64px); }
  .screen--start .watermark { display: none; }
  .screen--start .topbar { padding: 20px 0; }
  .screen--start .topbar .eyebrow { display: none; }
  .screen--start .toplogo { display: flex; }
  .hero { display: flex; align-items: center; gap: 40px; margin-top: 12px; padding-bottom: 36px; }
  .hero__text { flex: 1 1 520px; min-width: 0; }
  .hero__kicker { display: block; margin-bottom: 18px; font-size: 16px; line-height: 24px; color: var(--ink2); }
  .hero__title { font-size: clamp(48px, 4.6vw, 64px); line-height: 1.22; letter-spacing: 1px; }
  .hero__sub { margin-top: 24px; font-size: 19px; line-height: 32px; }
  .hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 36px; }
  .btn--start { min-width: 240px; min-height: 56px; font-size: 18px; }
  .hero__meta { font-size: 15px; color: var(--muted); }
  .hero__text > .privacy { display: block; text-align: left; margin-top: 18px; font-size: 14px; }
  .hero__art { position: relative; right: auto; top: auto; flex: 1 1 440px; width: auto; min-width: 0; display: flex; justify-content: center; align-items: center; min-height: 460px; }
  .hero__disc, .hero__ring { display: block; position: absolute; border-radius: 50%; aspect-ratio: 1; }
  .hero__disc { width: min(460px, 90%); background: var(--navy-soft); }
  .hero__ring { width: min(560px, 110%); border: 1.5px dashed var(--line); }
  .hero__art picture { position: relative; width: 100%; max-width: 560px; }

  .route { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 0; padding: 0; background: none; border: 0; }
  .route::before { left: 30px; right: 30px; top: 37px; bottom: auto; border-left: 0; border-top: 2px dashed var(--line); }
  .route__item { flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px 22px 20px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); }
  .route__item + .route__item { border-top: 1.5px solid var(--line); }
  .route__name { display: block; margin: 0; font: 900 22px/30px var(--serif); }
  .route__q { display: block; margin-top: 4px; font-size: 16px; line-height: 26px; }
  .route__tags { margin-top: 2px; }
  .start__chips, .start__bottom { display: none; }
  .screen--start .brandfoot--start { display: flex; margin-top: 36px; padding: 24px 0 12px; }
  .brandfoot--start .brandfoot__mark { gap: 14px; }
  .brandfoot--start .brandfoot__mark img { width: 46px; }
  .brandfoot--start .brandfoot__mark b { font-size: 20px; line-height: 28px; letter-spacing: 4px; }
  .brandfoot--start .brandfoot__mark .latin { font-size: 16px; line-height: 20px; }
  .brandfoot--start .brandfoot__note { font-size: 14px; }

  .screen--quiz, .screen--result { max-width: 520px; padding-top: 32px; }
}

@media (prefers-reduced-motion: no-preference) {
  .screen:not([hidden]) { animation: enter .28s ease both; }
  @keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .opt span { transition: none; }
}
