/* 保存指南各頁：配色、上方選單、按鈕、卡片與頁尾在 /site.css，這裡只放文章版面。
   元件照 App：白卡加柔和落影、淡色小籤、補充說明用淡紫小框、數字用 Quicksand */
body { position: relative; overflow-x: hidden; }
main, footer { position: relative; z-index: 1; }
.narrow { max-width: 800px; }
code { padding: 1px 8px; border-radius: 8px; background: var(--tint-pink); color: var(--tint-pink-ink); font-family: var(--font-num); font-weight: 700; }

/* ---------- 目前位置 ---------- */
.crumbs { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cta-ink); text-decoration: underline; }

/* ---------- 內文：標題 → 引言 → 內文白卡 → App 介紹 → 延伸閱讀，一路往下 ---------- */
article, .guide-index { padding: 20px 0 8px; }
h1 { margin: 0; color: var(--heading); font-size: clamp(26px, 5vw, 34px); font-weight: 700; line-height: 1.35; letter-spacing: 0.02em; }
.lead { margin: 16px 0 0; color: var(--heading); font-size: 17px; line-height: 1.85; }
.body { margin: 28px 0 0; padding: 8px 32px 28px; line-height: 1.85; background: var(--paper); border-radius: 20px; box-shadow: var(--card-shadow); }
/* 小標前一條玫瑰粉短條，掃讀時好找段落 */
.body h2 { position: relative; margin: 34px 0 10px; padding-left: 14px; color: var(--heading); font-size: 19px; font-weight: 700; line-height: 1.45; letter-spacing: 0.04em; }
.body h2::before { content: ""; position: absolute; left: 0; top: 0.25em; bottom: 0.25em; width: 4px; border-radius: 4px; background: linear-gradient(#a84a62, #e59aab); }
.body h3 { margin: 24px 0 6px; color: var(--heading); font-size: 16.5px; font-weight: 700; line-height: 1.5; }
.body p { margin: 8px 0; }
.body ul, .body ol { margin: 8px 0; padding-left: 1.3em; }
.body li + li { margin-top: 6px; }
.body li::marker { color: var(--rose); }
.body strong { color: var(--heading); }
/* 補充說明：App 的淡紫小框 */
.body .tip {
  display: flex; gap: 10px; margin: 22px 0 4px; padding: 13px 16px; border-radius: 14px;
  background: rgba(139, 111, 168, 0.1); border: 1px solid rgba(139, 111, 168, 0.25); color: #6e5789; font-size: 15px;
}
.body .tip::before { content: "✦"; color: #8b6fa8; }
/* 資料來源：文末的小字清單 */
.body .sources { margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.body .sources-title { margin: 0 0 4px; color: var(--heading); font-weight: 700; }
.body .sources ul { margin: 0; }
.body .sources li + li { margin-top: 4px; }
.body .sources a { color: var(--muted); overflow-wrap: anywhere; }
.body .sources a:hover { color: var(--rose-ink); }
.table-scroll { margin: 14px 0; overflow-x: auto; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--tint-gray); color: var(--tint-gray-ink); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td:last-child { white-space: nowrap; color: var(--heading); font-family: var(--font-num); font-weight: 700; }
/* 第二欄是說明句時要換行 */
.table-text td:last-child { white-space: normal; font-family: inherit; }

/* ---------- App 介紹：跟 App「今天」頁的重點卡同一套，粉到米白漸層、暖褐字 ---------- */
.app-box {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center;
  margin: 28px 0 0; padding: 24px 26px; border-radius: 22px;
  background: var(--hero-bg); box-shadow: 0 10px 24px rgba(196, 128, 140, 0.22);
}
.app-box::after {
  content: ""; position: absolute; right: -50px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  border: 2px solid rgba(196, 128, 140, 0.3); pointer-events: none;
}
.app-box > * { position: relative; z-index: 1; }
.app-box img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 8px 18px -8px rgba(120, 80, 80, 0.4); }
.app-box p { margin: 0; color: #8a6f68; font-size: 15px; line-height: 1.7; }
.app-box .name { color: var(--heading); font-weight: 700; font-size: 17px; }
.app-box .store-pair { justify-content: flex-start; margin-top: 14px; }

/* ---------- 延伸閱讀與目錄 ---------- */
.related { margin: 40px 0 0; }
.related h2 { margin: 0 0 14px; color: var(--heading); font-size: 18px; letter-spacing: 0.04em; }
.guide-index .guide-cards { margin-top: 28px; }
/* 延伸閱讀只列其他篇，編號會跟目錄對不上，所以不顯示 */
.related .guide-cards a::before { display: none; }
@media (min-width: 720px) { .related .guide-cards { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 480px) {
  .body { padding: 4px 20px 22px; }
  .app-box { grid-template-columns: 1fr; padding: 22px 20px; }
}

/* ---------- 開場：系統設定「減少動態」時不播 ---------- */
@media (prefers-reduced-motion: no-preference) {
  article > *, .guide-index > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  article > :nth-child(2), .guide-index > :nth-child(2) { animation-delay: 0.06s; }
  article > :nth-child(3), .guide-index > :nth-child(3) { animation-delay: 0.12s; }
  article > :nth-child(n+4), .guide-index > :nth-child(n+4) { animation-delay: 0.18s; }
  .app-box img { animation: bob 4s 1s ease-in-out infinite; }
}
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
