/* 首頁與保存指南共用：配色、上方選單、按鈕、區塊標題、指南卡片、頁尾、動態效果。
   配色與元件照 App（src/styles/parts/tokens.css、kit.css）：粉到米白的底、暖褐字、玫瑰粉漸層主鈕、
   白卡加柔和落影不畫邊框、淡色圖示方塊、數字用 Quicksand。 */

/* 數字字型：Quicksand 粗體，只收數字與 $ , /（授權見 fonts/OFL.txt），其他字元交回系統黑體 */
@font-face {
  font-family: "VK Num";
  src: url("fonts/quicksand-700-num.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+24, U+2C, U+2F-39;
}

:root {
  --stage: #fbf8f6; --paper: #ffffff;
  --ink: #2b2420; --heading: #5a4640; --muted: #8a6f68; --line: rgba(40, 34, 33, 0.08);
  /* 主要按鈕：深玫瑰往右下漸層到淺粉，同一個色相、不帶暖黃，起點比 App 的主鈕深一階 */
  --cta-from: #a84a62; --cta-to: #e59aab; --cta-grad: linear-gradient(135deg, #a84a62 0%, #c4677e 50%, #e59aab 100%);
  --cta-glow: rgba(156, 66, 88, 0.34); --cta-ink: #b6556c; --cta-line: rgba(182, 85, 108, 0.32);
  --rose: #c4808c; --rose-ink: #9c4f61;
  --card-shadow: 0 4px 14px rgba(120, 80, 80, 0.07); --card-shadow-hover: 0 12px 28px rgba(120, 80, 80, 0.12);
  --soft-shadow: 0 2px 8px rgba(120, 80, 80, 0.1);
  --tint-pink: #f9e1e8; --tint-pink-ink: #b4566a;
  --tint-mint: #e0eedb; --tint-mint-ink: #5f8a55;
  --tint-butter: #fbf0d2; --tint-butter-ink: #b57a2e;
  --tint-sky: #dde9f5; --tint-sky-ink: #4a6896;
  --tint-lav: #ece3f6; --tint-lav-ink: #82619f;
  --tint-peach: #fbe3d6; --tint-peach-ink: #a06a3c;
  --tint-gray: #f3eeec; --tint-gray-ink: #8c827d;
  --hero-bg: linear-gradient(135deg, #efc7cd 0%, #f5dadd 45%, #fbf4ed 100%);
  --wash-ring: rgba(201, 139, 150, 0.28); --wash-dots: rgba(227, 185, 192, 0.7); --wash-star: #e6bfc6; --wash-star2: #efcdd2;
  --font: "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --font-num: "VK Num", var(--font);
  /* 固定淺色：手機設成深色模式也不換，瀏覽器的自動深色也不套用 */
  color-scheme: only light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 84px; }
body {
  margin: 0; color: var(--ink); font: 16px/1.7 var(--font);
  /* 頁面頂端是 App 圖示那種粉到米白的漸層，往下淡成米白 */
  background:
    radial-gradient(70rem 34rem at 85% -10%, rgba(239, 199, 205, 0.55), transparent 70%),
    radial-gradient(50rem 30rem at -10% 0%, rgba(251, 236, 226, 0.9), transparent 70%),
    var(--stage);
}
a { color: var(--cta-ink); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
/* 以逗號分段換行，詞不會被拆到兩行 */
.c { display: inline-block; }
.num { font-family: var(--font-num); font-weight: 700; }

/* 頁首右上的圓環底圖：實線外環＋點點內環＋兩顆星芒，畫法同 App 頁首 */
.wash { position: absolute; top: 0; right: 0; width: min(760px, 100%); height: auto; pointer-events: none; z-index: 0; }
.wash-ring { stroke: var(--wash-ring); }
.wash-dots { stroke: var(--wash-dots); }
.wash-star { fill: var(--wash-star); }
.wash-star2 { fill: var(--wash-star2); }

/* 小圖示方塊：淡色底配同色相深一階的圖示，跟 App 的區塊標題、設定列同一套 */
.ico { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--tint-gray); color: var(--tint-gray-ink); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-pink { background: var(--tint-pink); color: var(--tint-pink-ink); }
.ico-mint { background: var(--tint-mint); color: var(--tint-mint-ink); }
.ico-butter { background: var(--tint-butter); color: var(--tint-butter-ink); }
.ico-sky { background: var(--tint-sky); color: var(--tint-sky-ink); }
.ico-lav { background: var(--tint-lav); color: var(--tint-lav-ink); }
.ico-peach { background: var(--tint-peach); color: var(--tint-peach-ink); }

/* 白卡：區塊的底，不畫邊框，靠落影浮起來 */
.card { background: var(--paper); border-radius: 20px; box-shadow: var(--card-shadow); }

/* ---------- 上方選單：捲動後加上落影 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 246, 0.8);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow 0.25s ease;
}
.topbar.scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -18px rgba(120, 80, 80, 0.35); }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 700; letter-spacing: 0.04em; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--soft-shadow); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 8px 14px; border-radius: 999px;
  color: var(--heading); font-size: 15px; font-weight: 500; text-decoration: none; letter-spacing: 0.04em;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-link:hover { background: var(--tint-pink); color: var(--rose-ink); }
/* 選中那一項跟 App 底部分頁列選中的那格一樣：粉到米白、深玫瑰字 */
.nav-link[aria-current="page"] { color: var(--rose-ink); background: linear-gradient(135deg, #f4d3db, #fbf0e8); }
.nav-cta { margin-left: 8px; }
/* 中英切換：固定在頁首最右邊，手機不收進選單 */
.lang-link {
  order: 1; position: relative; margin-left: 24px; padding: 4px 8px; border-radius: 999px;
  color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-link:hover { background: var(--tint-pink); color: var(--rose-ink); }
/* 跟左邊的選單隔一條細線，看得出不是選單的一項 */
.lang-link::after { content: ""; position: absolute; left: -21px; top: 50%; width: 1px; height: 18px; background: var(--line); transform: translateY(-50%); }
.menu-btn {
  display: none; margin-left: auto; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 999px;
  background: var(--paper); color: var(--heading); box-shadow: var(--soft-shadow); cursor: pointer;
}
.menu-btn span { display: block; width: 18px; height: 2px; margin: 4px auto; border-radius: 2px; background: currentColor; transition: transform 0.25s ease, opacity 0.2s ease; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 759px) {
  .topbar-inner { height: 58px; }
  .menu-btn { display: block; }
  .lang-link { order: 0; margin-left: auto; }
  .lang-link::after { display: none; }
  .lang-link + .menu-btn { margin-left: -6px; }
  /* 手機：選單收在右上角圓鈕裡，展開成白卡下拉面板 */
  .nav {
    position: absolute; left: 12px; right: 12px; top: calc(100% + 6px);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: var(--paper); border-radius: 20px; box-shadow: 0 18px 40px -12px rgba(120, 80, 80, 0.28);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98); transform-origin: top center;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.2s ease; }
  .nav-link { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border-radius: 14px; font-size: 16px; }
  .nav-link::after { content: "›"; color: var(--muted); font-size: 20px; line-height: 1; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }
}
/* 窄螢幕放不下品牌名＋English＋選單鈕，改顯示縮寫 */
@media (max-width: 374px) {
  .topbar-inner { gap: 10px; }
  .brand { white-space: nowrap; }
  .lang-link[data-short] { font-size: 0; }
  .lang-link[data-short]::before { content: attr(data-short); font-size: 12px; }
}

/* ---------- 按鈕：主要動作是 App 的玫瑰粉漸層、白字 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { color: #fff; background: var(--cta-grad); box-shadow: 0 6px 16px -6px var(--cta-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -6px var(--cta-glow); }
.btn:active, .store:active { transform: translateY(1px) scale(0.98); }
.btn:focus-visible, .store:focus-visible, .nav-link:focus-visible, .lang-link:focus-visible, .menu-btn:focus-visible { outline: 3px solid var(--cta-line); outline-offset: 2px; }

/* 下載鈕：玫瑰粉漸層，圖示放在半透明方塊裡＋兩行字＋箭頭；滑過時浮起、箭頭往右、一道光掃過 */
.store {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px; min-width: 224px;
  padding: 8px 18px 8px 8px; border-radius: 18px; text-decoration: none; color: #fff;
  background: var(--cta-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 22px -8px var(--cta-glow);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.store:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 28px -8px var(--cta-glow); }
.store-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, 0.22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.store-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.store-text { display: grid; flex: 1; text-align: left; line-height: 1.25; }
.store-text small { color: rgba(255, 255, 255, 0.88); font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; }
.store-text strong { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.store-arrow { width: 17px; height: 17px; margin-left: 4px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.store:hover .store-arrow { transform: translateX(3px); }
/* 兩顆商店鈕同寬並排，窄螢幕上下排；手機上 site.js 會把該系統的商店排到前面 */
.store-pair { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- 區塊標題：玫瑰粉小標＋兩側漸淡細線，下面是暖褐大標 ---------- */
.section-head { margin: 0 0 24px; text-align: center; }
.section-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--rose); font-size: 13px; font-weight: 600; letter-spacing: 0.2em; }
.section-kicker::before, .section-kicker::after { content: ""; width: 28px; height: 1px; }
.section-kicker::before { background: linear-gradient(90deg, transparent, var(--rose)); }
.section-kicker::after { background: linear-gradient(90deg, var(--rose), transparent); }
.section-title { margin: 0; color: var(--heading); font-size: clamp(21px, 3vw, 25px); font-weight: 700; letter-spacing: 0.06em; }

/* ---------- 保存指南卡片：白卡、數字字型的編號、標題、說明、箭頭 ---------- */
.guide-cards { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.guide-cards li { counter-increment: guide; }
.guide-cards a {
  display: flex; flex-direction: column; height: 100%;
  padding: 20px 22px 18px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: var(--paper); box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.guide-cards a:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.guide-cards a::before {
  content: counter(guide, decimal-leading-zero); align-self: flex-start; margin-bottom: 10px;
  padding: 1px 10px; border-radius: 999px; background: var(--tint-pink); color: var(--tint-pink-ink);
  font-family: var(--font-num); font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
}
.guide-cards strong { display: block; color: var(--heading); font-size: 16px; font-weight: 700; line-height: 1.5; }
.guide-cards span { display: block; margin-top: 4px; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.guide-cards .more { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 12px; color: var(--cta-ink); font-size: 14px; font-weight: 600; }
.guide-cards .more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.guide-cards a:hover .more svg { transform: translateX(3px); }

/* ---------- 頁尾 ---------- */
footer { margin-top: 24px; border-top: 1px solid var(--line); padding: 32px 0 40px; text-align: center; color: var(--muted); font-size: 14px; }
footer p { margin: 0 0 8px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--heading); font-weight: 700; text-decoration: none; letter-spacing: 0.04em; }
.foot-brand img { width: 26px; height: 26px; border-radius: 8px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.copy { font-size: 12.5px; opacity: 0.8; }

/* ---------- 動態效果：系統設定「減少動態」時全部不播 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn-primary { position: relative; overflow: hidden; }
  .store::after, .btn-primary::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-120%); pointer-events: none;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
  }
  .store:hover::after, .btn-primary:hover::after { transition: transform 0.7s ease; transform: translateX(120%); }
  /* 捲到時才出現（由 site.js 加上 reveal，沒有 script 時內容照常顯示）。
     用 .reveal.reveal 提高權重，蓋過卡片自己的滑過效果；淡入完 site.js 會拿掉 class，滑過效果就回來 */
  .reveal.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
  .reveal.reveal.in { opacity: 1; transform: none; }
  .wash-star, .wash-star2 { transform-box: fill-box; transform-origin: center; animation: twinkle 3.2s ease-in-out infinite; }
  .wash-star2 { animation-delay: 1.4s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.7); } }
