/* 支持網站的樣式：支持頁、選品牌、感謝頁、找不到頁面。
   外觀照設計說明 marku/docs/products/reader-support/design/README.md（色彩代號、字級、間距、狀態、動畫）。
   只用系統字、不從外部載入任何東西。主題跟品牌走：喵谷一律奶油色、火框一律深色（<html data-brand>，
   由 js/early.js 在第一次繪製前設好）；沒有品牌的頁面跟系統的淺深色，主要文字、連結與按鈕用 Marku 色票的墨（深色模式用霧白），
   色票見 marku/docs/brand/marku/README.md「色彩」。 */

/* ---------- 色彩與字級代號 ---------- */

:root {
  color-scheme: light;
  --bg: #f4f3f0;
  --bg-art: none;
  --surface: #ffffff;
  --surface-sel: #efeee9;
  --text: #2a2a2d;
  --text-strong: #1d1f24;
  --muted: #5c5e65;
  --line: #e0dfda;
  --control: #85878e;
  --accent: #1d1f24;
  --accent-hover: #3a3a3e;
  --accent-line: #1d1f24;
  --accent-rgb: 29 31 36;
  --on-accent: #ffffff;
  --link: #1d1f24;
  --focus: #1d1f24;
  --disabled-bg: #dcdbd6;
  --disabled-fg: #5c5e65;
  --shadow-rgb: 0 0 0;
  --mark-ring: rgb(0 0 0 / 8%);

  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-text: var(--font-ui);
  --font-display: var(--font-ui);
  --track-display: -0.015em;

  --fs-display: clamp(1.875rem, 1.3rem + 2.3vw, 2.875rem);
  --fs-title: 1.375rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --lh-tight: 1.12;
  --lh-body: 1.55;

  --r-tile: 16px;
  --r-card: 24px;
  --r-portrait: 28px;
  --r-pill: 999px;

  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 480ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-brand]) {
    color-scheme: dark;
    --bg: #121214;
    --surface: #1b1b1e;
    --surface-sel: #26262a;
    --text: #dcdce0;
    --text-strong: #f4f5f7;
    --muted: #a3a4ab;
    --line: #2c2c31;
    --control: #74757d;
    --accent: #f4f5f7;
    --accent-hover: #ffffff;
    --accent-line: #f4f5f7;
    --accent-rgb: 244 245 247;
    --on-accent: #121214;
    --link: #f4f5f7;
    --focus: #f4f5f7;
    --disabled-bg: #2c2c31;
    --disabled-fg: #a3a4ab;
    --mark-ring: rgb(255 255 255 / 12%);
  }
}

/* 喵谷：奶油色，值取自 MeowGood 網站 css/tokens.css。 */
:root[data-brand="meowgood"],
[data-scope="meowgood"] {
  color-scheme: light;
  --bg: #fbf4e9;
  --bg-art: none;
  --surface: #ffffff;
  --surface-sel: #fff6ea;
  --text: #5a4632;
  --text-strong: #33261a;
  --muted: #7a6552;
  --line: #eadcc6;
  --control: #94826c;
  --accent: #f07800;
  --accent-hover: #ff9426;
  --accent-line: #d96c00;
  --accent-rgb: 240 120 0;
  --on-accent: #33261a;
  --link: #a85200;
  --focus: #a85200;
  --disabled-bg: #efe4d3;
  --disabled-fg: #725e4b;
  --shadow-rgb: 90 70 50;
  --mark-ring: rgb(90 70 50 / 10%);
  --font-text: ui-rounded, "SF Pro Rounded", Nunito, var(--font-ui);
  --font-display: ui-rounded, "SF Pro Rounded", Nunito, var(--font-ui);
  --track-display: -0.01em;
}

/* 火框：深色，主色取自 FireFrame 網站 css/site-header.css。 */
:root[data-brand="fireframe"],
[data-scope="fireframe"] {
  color-scheme: dark;
  --bg: #0b0c10;
  --bg-art: radial-gradient(900px 520px at 8% -10%, rgb(0 191 255 / 14%), transparent 62%);
  --surface: #14151b;
  --surface-sel: #0d2632;
  --text: #d9dde5;
  --text-strong: #ffffff;
  --muted: #a3a9b6;
  --line: #262831;
  --control: #6b6e78;
  --accent: #00bfff;
  --accent-hover: #33ccff;
  --accent-line: #00bfff;
  --accent-rgb: 0 191 255;
  --on-accent: #00212e;
  --link: #5fd4ff;
  --focus: #00bfff;
  --disabled-bg: #22242c;
  --disabled-fg: #a3a9b6;
  --shadow-rgb: 0 191 255;
  --mark-ring: rgb(255 255 255 / 14%);
  --font-text: Inter, var(--font-ui);
  --font-display: Inter, var(--font-ui);
  --track-display: -0.02em;
}

/* ---------- 基本 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* 同一頁放了各品牌的頁首、頁尾與區塊，依 <html data-brand> 只顯示對的那一份。 */
:root:not([data-brand]) [data-for]:not([data-for~="neutral"]),
:root[data-brand="meowgood"] [data-for]:not([data-for~="meowgood"]),
:root[data-brand="fireframe"] [data-for]:not([data-for~="fireframe"]) {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: var(--bg-art);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.noscript {
  padding-block: 16px;
}

/* ---------- 頁首、頁尾 ---------- */

.site-head {
  padding-block: 10px;
}

.site-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text-strong);
  font-size: var(--fs-body);
  font-weight: 800;
  letter-spacing: -0.005em;
}

/* 沒有品牌的頁面（選品牌、感謝頁、找不到頁面）放 Marku 的標誌（只有圖形，不放公司名稱），用法照 marku/docs/brand/marku/README.md「標誌」 */
.brand__marku {
  width: auto;
  height: 28px;
}

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--mark-ring);
}

.brand__text {
  display: grid;
  line-height: 1.15;
  white-space: nowrap;
}

.brand__sub {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--muted);
}

.head-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding-inline: 4px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  white-space: nowrap;
}

.head-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.head-link .icon {
  width: 15px;
  height: 15px;
}

.site-main {
  flex: 1;
}

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 24px max(32px, env(safe-area-inset-bottom));
  font-size: var(--fs-small);
  color: var(--muted);
}

.site-foot__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
}

.site-foot a {
  color: var(--link);
  font-weight: 600;
  text-underline-offset: 3px;
}

.site-foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.site-foot__mark {
  width: auto;
  height: 18px;
}

/* 頁尾連到問答的連結（退款說明、隱私權政策、聯絡我們），與聯絡資訊。項目照 content.js 的 footLinks、footContact。 */
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.foot-contact {
  display: grid;
  gap: 2px;
  margin: 0;
  scroll-margin-top: 16px;
}

/* 有頁尾連結時，聯絡資訊自己一段、一行一項。 */
.foot-links:not([hidden]) ~ .foot-contact {
  flex-basis: 100%;
}

.foot-contact div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
}

.foot-contact dt {
  color: var(--text);
  font-weight: 600;
}

.site-foot__row:has(.foot-links[hidden]) .foot-contact dt {
  color: inherit;
  font-weight: inherit;
}

.foot-contact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* 語言切換：手機寬放不下同一行時換到第二行靠右，第一行的品牌與網站連結維持原樣。 */
.lang-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
  color: var(--link);
  font-size: var(--fs-small);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ---------- 標題與插圖 ---------- */

.story {
  display: grid;
  gap: 12px;
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: var(--track-display);
  color: var(--text-strong);
  text-wrap: balance;
}

.lede {
  max-width: 34em;
}

/* 方形插圖：載入前用插圖的平均色（--portrait-bg）當底並緩慢起伏，載入後淡入；讀不到時換成品牌圖示。 */
.portrait {
  position: relative;
  width: 136px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--portrait-bg, var(--surface-sel));
  box-shadow: 0 0 0 1px var(--mark-ring), 0 18px 40px -26px rgb(var(--shadow-rgb) / 55%);
}

.portrait__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--dur) var(--ease);
}

.portrait.is-loading {
  animation: breathe 1.4s ease-in-out infinite;
}

.portrait.is-loading .portrait__img {
  opacity: 0;
}

.portrait__fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: var(--surface-sel);
}

.portrait__fallback img {
  width: 34%;
  height: auto;
  border-radius: 22%;
  box-shadow: 0 0 0 1px var(--mark-ring);
}

.portrait.is-failed .portrait__img {
  display: none;
}

.portrait.is-failed .portrait__fallback {
  display: grid;
}

/* ---------- 支持頁 ---------- */

.support {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  max-width: 640px;
  padding-block: 8px 48px;
}

/* 支持卡：頁面上唯一的獨立物件，收齊地區、單次或每月、金額、錢的去向與付款鈕。 */
.give {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / 5%), 0 24px 48px -30px rgb(var(--shadow-rgb) / 45%);
}

.give__pay {
  display: grid;
  gap: 16px;
}

.give__label {
  padding: 0;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-strong);
}

/* 地區 */
.give__region {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.select {
  position: relative;
  display: flex;
  flex: 1 1 11rem;
  min-width: 0;
  max-width: 18rem;
}

.select__input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 40px 8px 14px;
  border: 1px solid var(--control);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-strong);
  font: 600 var(--fs-small) / 1.3 var(--font-text);
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
}

.select__chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  translate: 0 -50%;
}

@media (hover: hover) {
  .select__input:hover {
    border-color: var(--text-strong);
  }
}

/* 單次或每月 */
.freq {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.freq__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg);
}

.freq__input,
.amounts__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.freq__option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.freq__input:checked + .freq__option {
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 0 0 1.5px var(--accent-line), 0 1px 2px rgb(var(--shadow-rgb) / 12%);
}

.freq__input:focus-visible + .freq__option {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (hover: hover) {
  .freq__input:not(:checked) + .freq__option:hover {
    color: var(--text-strong);
  }
}

/* 金額：三欄的方磚；自訂金額補滿最後一列 */
.amounts {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.amounts > legend {
  margin-bottom: 10px;
}

.amounts__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 6px;
  border: 1px solid var(--control);
  border-radius: var(--r-tile);
  background: var(--surface);
  color: var(--text-strong);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  container: tile / inline-size;
}

.tile__amount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 1px;
}

/* 字放大或畫面太窄、磚放不下「US$250」一行時，每一格都改成幣別在上、數字在下，不會有的一行有的兩行。
   容器查詢量的是磚的內容寬度；4.4em 約是一行「US$250」的寬度。 */
@container tile (max-width: 4.4em) {
  .tile__amount {
    flex-direction: column;
    align-items: center;
    row-gap: 2px;
  }
}

/* 數字超過三位的一組（台灣到 NT$5,000，support.js 標 data-wide）：門檻放大到 5.5em，約是一行「NT$5,000」的寬度，一樣整組一起換。 */
@container tile (max-width: 5.5em) {
  .amounts__grid[data-wide] .tile__amount {
    flex-direction: column;
    align-items: center;
    row-gap: 2px;
  }
}

.tile__cur {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 700;
}

.tile__num {
  font-size: var(--fs-title);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.tile--other {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  text-align: left;
}

.amounts__grid[data-other-span="2"] .tile--other {
  grid-column: span 2;
}

.amounts__grid[data-other-span="row"] .tile--other {
  grid-column: 1 / -1;
}

.tile__label {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.25;
}

.tile__hint {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.3;
}

/* 選中的三個線索：底色、加粗的外框、右上角的勾勾，不只靠顏色。 */
.tile__tick {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 3px var(--surface);
  opacity: 0;
  transform: scale(0);
  transition: transform var(--dur) var(--ease-back), opacity var(--dur-fast) linear;
}

.tile__tick .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.amounts__input:checked + .tile {
  border-color: var(--accent-line);
  background: var(--surface-sel);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.amounts__input:checked + .tile .tile__cur {
  color: var(--text);
}

.amounts__input:checked + .tile .tile__tick {
  opacity: 1;
  transform: scale(1);
}

.amounts__input:focus-visible + .tile {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (hover: hover) {
  .tile:hover {
    border-color: var(--text-strong);
  }
}

.tile:active {
  transform: scale(0.98);
}

/* 錢的去向：放在金額與付款鈕之間 */
.money {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--text);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.money__icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--link);
}

/* 付款鈕：同樣大小、同樣顏色，一個一列 */
.methods {
  display: grid;
  gap: 8px;
}

.pay-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 24px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 26px -16px rgb(var(--accent-rgb) / 95%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}

.pay-button__icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

@media (hover: hover) {
  .pay-button[href]:not([aria-disabled="true"]):hover {
    background: var(--accent-hover);
    box-shadow: 0 16px 30px -16px rgb(var(--accent-rgb) / 100%);
  }
}

.pay-button[href]:not([aria-disabled="true"]):active {
  transform: translateY(1px);
}

.pay-button[aria-disabled="true"] {
  background: var(--disabled-bg);
  color: var(--disabled-fg);
  box-shadow: none;
  cursor: not-allowed;
}

.pay-button[aria-disabled="true"] .pay-button__icon {
  display: none;
}

.pay-button.is-pending {
  cursor: progress;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.pay-button.is-pending .spinner {
  display: block;
}

.pay-button.is-pending .pay-button__icon {
  display: none;
}

.note {
  margin-top: -4px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

.note.is-warn {
  color: var(--text-strong);
}

/* 還不能付款（台灣）或每月還沒開放：說明取代金額與付款鈕，不放按不下去的鈕。 */
.notice {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--surface-sel);
}

.notice__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--text-strong);
  font-weight: 700;
}

/* 「開通中」標籤 */
.notice__badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  color: var(--text-strong);
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1;
}

.notice__text {
  color: var(--muted);
  font-size: var(--fs-small);
}

/* 問題 */
.faq {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.faq__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.qa {
  padding-block: 16px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}

/* 從頁尾連過來的那一題標出來。 */
.qa:target {
  background: var(--surface-sel);
}

.qa__q {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--fs-body);
  font-weight: 700;
}

.qa__a {
  max-width: 62ch;
  margin-top: 4px;
}

.nowrap {
  white-space: nowrap;
}

.qa a {
  font-weight: 600;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* ---------- 選品牌（沒有 from，或認不得）---------- */

.chooser {
  display: grid;
  gap: 24px;
  padding-block: 24px 64px;
}

.chooser > * {
  max-width: 760px;
}

.chooser > .faq {
  max-width: 560px;
}

.picks {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background-color: var(--bg);
  background-image: var(--bg-art);
  color: var(--text-strong);
  text-decoration: none;
  box-shadow: 0 18px 40px -30px rgb(var(--shadow-rgb) / 60%);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.pick__mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--mark-ring);
}

.pick__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.pick__desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-small);
}

.pick__go {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}

.pick__go .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

@media (hover: hover) {
  .pick:hover {
    border-color: var(--control);
    box-shadow: 0 26px 50px -30px rgb(var(--shadow-rgb) / 75%);
    transform: translateY(-2px);
  }
}

.pick:active {
  transform: translateY(0);
}

/* ---------- 感謝頁、找不到頁面 ---------- */

.thanks {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 560px;
  padding-block: 32px 64px;
  text-align: center;
}

.portrait--thanks {
  width: min(232px, 62vw);
  border-radius: var(--r-portrait);
  overflow: visible;
}

.portrait--thanks .portrait__img,
.portrait--thanks .portrait__fallback {
  border-radius: var(--r-portrait);
}

.thanks .title {
  margin-top: 12px;
}

.thanks .lede {
  color: var(--muted);
}

.thanks__back {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 12px 26px -16px rgb(var(--accent-rgb) / 95%);
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}

.button--ghost {
  background: transparent;
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--control);
}

@media (hover: hover) {
  .button:hover {
    background: var(--accent-hover);
  }

  .button--ghost:hover {
    background: var(--surface-sel);
    box-shadow: inset 0 0 0 1px var(--text-strong);
  }
}

.button:active {
  transform: translateY(1px);
}

/* 勾勾章：感謝頁的主要動畫，延遲一點放大，再畫出勾勾。 */
.stamp {
  position: absolute;
  right: -12px;
  bottom: -12px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 5px var(--bg), 0 14px 28px -14px rgb(var(--accent-rgb) / 90%);
  animation: pop var(--dur-slow) var(--ease-back) 180ms both;
}

.stamp .icon {
  width: 28px;
  height: 28px;
  stroke-width: 3;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: draw 420ms ease-out 480ms forwards;
}

.stamp--plain {
  position: static;
  margin-bottom: 8px;
}

/* ---------- 動畫 ---------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  50% {
    filter: brightness(0.94);
  }
}

@keyframes pop {
  from {
    transform: scale(0.45);
  }

  to {
    transform: scale(1);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ---------- 中文：同一套版面，只換字型、行高、字重與字距 ----------
   行高較高、不收字距、標題與按鈕字重 700（中文筆畫在 800 顯得太重），中文字型排在前面，
   讓中文句子裡的英文與數字跟中文用同一套字。值照設計說明「中文版」一節。 */
:root[lang|="zh"] {
  --font-ui: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-text: var(--font-ui);
  --font-display: var(--font-ui);
  --fs-display: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);
  --lh-tight: 1.3;
  --lh-body: 1.75;
  --track-display: 0.02em;
}

:root[lang|="zh"][data-brand] {
  --font-text: var(--font-ui);
  --font-display: var(--font-ui);
  --track-display: 0.02em;
}

:root[lang|="zh"] body {
  line-break: strict;
}

:root[lang|="zh"] .title {
  font-weight: 700;
}

:root[lang|="zh"] .lede {
  letter-spacing: 0.02em;
}

:root[lang|="zh"] .money,
:root[lang|="zh"] .notice__text,
:root[lang|="zh"] .note,
:root[lang|="zh"] .tile__hint {
  line-height: 1.65;
}

:root[lang|="zh"] .qa__a {
  letter-spacing: 0.01em;
}

:root[lang|="zh"] .pick__desc {
  line-height: 1.5;
}

:root[lang|="zh"] .pay-button,
:root[lang|="zh"] .pick__name,
:root[lang|="zh"] .faq__title,
:root[lang|="zh"] .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

:root[lang|="zh"] .site-foot__row {
  align-items: center;
}

/* 讀者開了「減少動態效果」：不播動畫與轉場，勾勾章直接顯示完成的樣子。 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .portrait.is-loading,
  .spinner {
    animation: none !important;
  }
}

/* ---------- 較寬的畫面 ---------- */

@media (min-width: 720px) {
  .wrap {
    padding-inline: max(32px, env(safe-area-inset-left)) max(32px, env(safe-area-inset-right));
  }

  .site-head {
    padding-block: 14px;
  }

  .portrait {
    width: 168px;
  }

  .give {
    padding: 24px;
  }

  .picks {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .pick {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: end;
    min-height: 188px;
    padding: 24px;
  }

  .pick__mark {
    grid-column: 1 / -1;
    align-self: start;
    width: 56px;
    height: 56px;
  }
}

@media (min-width: 1024px) {
  .brand__text {
    display: inline;
  }

  .chooser {
    padding-top: 64px;
  }

  .support {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    column-gap: 64px;
    row-gap: 32px;
    max-width: 1120px;
    padding-block: 32px 64px;
  }

  .support > .portrait {
    position: sticky;
    top: 32px;
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 100%;
    max-width: 440px;
    border-radius: var(--r-portrait);
  }

  .support > .story,
  .support > .give,
  .support > .faq {
    grid-column: 2;
  }

  .story {
    gap: 16px;
    padding-top: 8px;
  }

  .give,
  .faq,
  .story .lede {
    max-width: 560px;
  }
}
