/* 碼庫平台每一頁共用的樣式：色彩與字級代號、基本元素、頁首、頁尾、按鈕、連結、標籤、提醒、卡片與載入中。
   照設計定案 marku/products/membership/design/platform/README.md 的「色彩代號」「字級與字型」「版面」：紙色底、墨色的字與按鈕，
   標誌的橘、青只用在標誌、方案的積木圖示、雙色條、頭像底與主視覺；系統字，不載入字型；淺色與深色各一組值，跟系統的淺深色。
   會員的頁另載 app.css（各頁的版面）；條款三頁另載 legal.css（長文的版面）。MarkuUI 元件的外觀只經這裡的 --marku-* 變數調。 */

:root {
  color-scheme: light;
  --bg: #f6f5f2;
  --bg-tint: #efede8;
  --surface: #ffffff;
  --surface-2: #fbfaf8;
  --line: #e3e1db;
  --line-strong: #cbc8c0;
  --ink: #1d1f24;
  --text: #33353b;
  --muted: #5d6068;
  --on-ink: #ffffff;
  --orange: #e8700f;
  --orange-ink: #a84a07;
  --orange-soft: #fcecdd;
  --cyan: #14a8df;
  --cyan-ink: #0b6890;
  --cyan-soft: #e1f3fa;
  --meter: #0e86b8;
  --good: #23784a;
  --good-soft: #e3f3e9;
  --warn: #8a5a00;
  --warn-soft: #fbf0d9;
  --bad: #b3261e;
  --bad-soft: #fbe9e7;
  --on-bad: #ffffff;
  --scrim: rgb(17 18 20 / 45%);
  --shadow-1: 0 1px 2px rgb(29 31 36 / 5%);
  --shadow-2: 0 1px 2px rgb(29 31 36 / 5%), 0 12px 32px -16px rgb(29 31 36 / 24%);
  --shadow-3: 0 2px 6px rgb(29 31 36 / 6%), 0 24px 56px -20px rgb(29 31 36 / 32%);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --fs-display: clamp(2rem, 1.35rem + 2.4vw, 2.75rem);
  --fs-title: 1.75rem;
  --fs-h2: 1.375rem;
  --fs-small: 0.875rem;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 16px;
  --r-xl: 22px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 200ms;
  --brand-bar: linear-gradient(90deg, var(--orange) 0 50%, var(--cyan) 50% 100%);

  /* 條款三頁的長文版面（legal.css）用的代號，接到上面的色票 */
  --accent: var(--ink);
  --on-accent: var(--on-ink);
  --control: var(--line-strong);
  --link: var(--ink);
  --text-strong: var(--ink);
  --surface-sel: var(--bg-tint);
  --font-display: var(--font);
  --fs-small-legal: 0.9375rem;

  /* 三站共用的浮動工具列（common/ 照抄火框的工具列、通知、回報與建議；預設值在 common/css/ff-toolbar.css，這裡照這一站的色覆寫）：
     浮動鈕是墨色的底放標誌，選單與對話框是白底墨字、淡的墨色框與底，圖示用青的深一階，主要按鈕跟這一站一樣是墨色。
     紅點：墨色鈕底上 3.4:1、白底上 4.8:1（白字在紅點上 4.8:1）。代號是 r, g, b（工具列照它加透明度）。 */
  --ff-toolbar-navy: 29, 31, 36;
  --ff-toolbar-indigo: 29, 31, 36;
  --ff-chrome-panel: 255, 255, 255;
  --ff-chrome-ink: 29, 31, 36;
  --ff-chrome-ink-strong: 29, 31, 36;
  --ff-chrome-ink-faint: #5d6068;
  --ff-chrome-accent-soft: 11, 104, 144;
  --ff-chrome-accent-bright: 29, 31, 36;
  --ff-chrome-shadow: 29, 31, 36;
  --ff-marku-btn: 29, 31, 36;
  --ff-marku-btn-ink: 255, 255, 255;
  --ff-notice-dot: 217, 48, 54;
  --ff-feedback-warn: #8a5a00;
  --ff-feedback-error: #b3261e;

  /* MarkuUI：碼庫平台的淺色（設計說明「色彩代號」最後一段的對應） */
  --marku-color-primary: var(--ink);
  --marku-color-font-primary: var(--on-ink);
  --marku-color-default: var(--text);
  --marku-color-font-default: var(--surface);
  --marku-color-secondary: var(--line-strong);
  --marku-color-accent: var(--cyan-ink);
  --marku-color-info: var(--meter);
  --marku-color-success: var(--good);
  --marku-color-warning: var(--warn);
  --marku-color-danger: var(--bad);
  --marku-color-font-warning: #ffffff;
  --marku-color-default-background: var(--bg);
  --marku-color-default-block: var(--bg-tint);
  --marku-color-default-surface: var(--surface);
  --marku-color-default-border: var(--line);
  --marku-color-font-default-title: var(--ink);
  --marku-color-font-default-main: var(--text);
  --marku-color-font-default-support: var(--muted);
  --marku-font-size-medium: 1rem;
  --marku-font-size-small: 0.875rem;
  --marku-font-size-x-small: 0.8125rem;
  --marku-font-weight-semi-bold: 650;
  --marku-border-radius-default: 14px;
  --marku-border-radius-medium: 10px;
  --marku-border-radius-card: 16px;
  --marku-spacing-medium: 0.875rem;
  --marku-spacing-large: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    /* 浮動工具列的深色：鈕底比頁面亮一階、選單與對話框是深色的面，主要按鈕跟這一站一樣是淺色底深字 */
    --ff-toolbar-navy: 44, 46, 52;
    --ff-toolbar-indigo: 244, 245, 247;
    --ff-chrome-panel: 26, 27, 31;
    --ff-chrome-ink: 244, 245, 247;
    --ff-chrome-ink-strong: 255, 255, 255;
    --ff-chrome-ink-faint: #a3a5ac;
    --ff-chrome-accent-soft: 134, 214, 244;
    --ff-chrome-accent-bright: 244, 245, 247;
    --ff-chrome-shadow: 0, 0, 0;
    --ff-marku-btn: 244, 245, 247;
    --ff-marku-btn-ink: 17, 18, 20;
    --ff-notice-dot: 255, 97, 97;
    --ff-feedback-warn: #e6b450;
    --ff-feedback-error: #ff9c94;
    --bg: #111214;
    --bg-tint: #17181b;
    --surface: #1a1b1f;
    --surface-2: #1e1f24;
    --line: #2c2e34;
    --line-strong: #44464e;
    --ink: #f4f5f7;
    --text: #d6d7db;
    --muted: #a3a5ac;
    --on-ink: #111214;
    --orange: #f3841f;
    --orange-ink: #f6a766;
    --orange-soft: #3a2515;
    --cyan: #3fc1f2;
    --cyan-ink: #86d6f4;
    --cyan-soft: #10303d;
    --meter: #4cc3ee;
    --good: #6bcb93;
    --good-soft: #13291d;
    --warn: #e6b450;
    --warn-soft: #2d2410;
    --bad: #f2867e;
    --bad-soft: #331716;
    --on-bad: #1a0b09;
    --scrim: rgb(0 0 0 / 60%);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-2: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -16px rgb(0 0 0 / 70%);
    --shadow-3: 0 2px 6px rgb(0 0 0 / 30%), 0 24px 56px -20px rgb(0 0 0 / 80%);
    --marku-color-font-warning: #111214;
  }
}

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
}
:root[lang="en"] body { line-height: 1.6; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
/* 只給英文：iPhone 的排版引擎照 pretty 會把中文整段每一行斷短、平均長度，段落寬窄不一 */
p:lang(en), li:lang(en), dd:lang(en) {
  text-wrap: pretty;
}
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.125em; height: 1.125em; flex: none; vertical-align: -0.18em; }
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.main { flex: 1 0 auto; min-height: 60vh; }
/* 程式畫內容的頁（登入、付款、會員中心）：內容區至少一個畫面高（減掉最矮的頁首 60px），頁尾在第一個畫面之外；
   骨架換成內容時變高或變矮，頁尾都不會在讀者眼前移動 */
.main--app { min-height: calc(100vh - 60px); min-height: calc(100svh - 60px); }
.main:focus { outline: none; }
.muted { color: var(--muted); font-size: var(--fs-small); }
.noscript { padding-block: 32px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* 跳到內容：用鍵盤時才出現 */
.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* 字級：一個畫面最多四級 */
.eyebrow { color: var(--muted); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.08em; }
.display { font-size: var(--fs-display); font-weight: 800; line-height: 1.22; letter-spacing: 0.01em; }
.display--m { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem); }
:root[lang="en"] .display { letter-spacing: -0.015em; line-height: 1.15; }
.phrase { display: inline-block; }
.title { font-size: var(--fs-title); font-weight: 750; line-height: 1.3; letter-spacing: 0.01em; }
.title--center { text-align: center; }
.h2 { font-size: var(--fs-h2); font-weight: 750; line-height: 1.35; letter-spacing: 0.01em; }
.h3 { font-size: 1rem; font-weight: 700; line-height: 1.5; }
.lede { color: var(--text); font-size: 1.0625rem; max-width: 38em; }

/* ---------- 按鈕、連結、標籤、提醒、卡片 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms, border-color 160ms, transform 160ms var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.btn .ic { width: 1.05em; height: 1.05em; }
.btn--ink { background: var(--ink); color: var(--on-ink); }
.btn--ink:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn--line { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--line:hover:not(:disabled) { border-color: var(--ink); }
.btn--quiet { background: transparent; color: var(--ink); }
.btn--quiet:hover:not(:disabled) { background: var(--bg-tint); }
.btn--danger { background: var(--bad); color: var(--on-bad); }
.btn--danger-quiet { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn--danger-quiet:hover:not(:disabled) { background: var(--bad-soft); }
.btn--l { min-height: 52px; padding: 0 26px; font-size: 1.0625rem; border-radius: 14px; }
.btn--s { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; border-radius: 10px; }
.btn--block { width: 100%; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.link .ic { width: 1em; height: 1em; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.chip--good { background: var(--good-soft); color: var(--good); }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--muted { color: var(--muted); }

.alert {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 2px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.6;
  scroll-margin-top: 84px; /* 捲到看得到時（ui.js 的 Alert reveal）讓開固定在上面的頁首 */
}
.alert > .ic { margin-top: 3px; }
.alert__body { display: grid; gap: 6px; justify-items: start; }
.alert__title { color: var(--ink); font-weight: 700; }
.alert__steps { display: grid; gap: 4px; padding-left: 1.4em; list-style: decimal; }
.alert .link { min-height: 32px; }
.alert--info { background: var(--cyan-soft); color: var(--ink); }
.alert--info > .ic { color: var(--cyan-ink); }
.alert--warn { background: var(--warn-soft); color: var(--ink); }
.alert--warn > .ic { color: var(--warn); }
.alert--bad { background: var(--bad-soft); color: var(--ink); }
.alert--bad > .ic { color: var(--bad); }

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.card--raised { box-shadow: var(--shadow-2); }
.card__label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 10px; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__row .card__label { margin-bottom: 0; }
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.card__hint { color: var(--muted); font-size: var(--fs-small); line-height: 1.6; }

.spin { display: inline-grid; place-items: center; }
.spin .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loading { display: flex; align-items: center; gap: 10px; padding-block: 48px; color: var(--muted); }

/* 骨架：資料還沒回來的地方先放一樣大的灰塊，不先放猜的內容（回來後在原地換上，版面不跳）；顏色與閃動照設計定案的「載入中」 */
/* 方案卡的鈕（css/app.css）也用同一個骨架：要看登入狀態與 ShopPlans，有程式的瀏覽器先放骨架 */
.skel, html[data-who] .plan__cta--static { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--bg-tint) 0%, var(--surface-2) 50%, var(--bg-tint) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel, html[data-who] .plan__cta--static { animation: none; } }
/* 一區還沒讀到（會員中心、管理頁）：三塊高低不同的灰塊 */
.skel-stack { display: grid; gap: 14px; }
.skel-stack > .skel { height: 120px; border-radius: var(--r-l); }
.skel-stack > .skel:nth-child(2) { height: 88px; }
.skel-stack > .skel:nth-child(3) { height: 160px; }
/* 一行字的位置：放在那一行原本的元素裡，高度跟字一樣（行高撐的） */
.skel--text { display: inline-block; width: min(12em, 100%); height: 0.9em; vertical-align: middle; border-radius: 6px; }
/* 程式畫的頁載入中（產頁時照那一頁最後的版面寫，gen-pages.mjs 的 appMain）：標題、一段內容 */
.page-loading--skel { display: grid; align-items: stretch; gap: 14px; }
.skel--title { width: min(320px, 70%); height: 34px; }
.skel--block { height: 148px; border-radius: var(--r-l); }

/* 頭像：名字的第一個字（不存 Google 的大頭貼網址） */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--cyan-soft); color: var(--cyan-ink); font-weight: 750; }
.avatar--s { width: 30px; height: 30px; font-size: 0.875rem; }
.avatar--m { width: 40px; height: 40px; font-size: 1rem; }
.avatar--l { width: 52px; height: 52px; font-size: 1.25rem; }

/* 方案的積木圖示 */
.glyph { flex: none; overflow: visible; }
.glyph__o { fill: var(--orange); }
.glyph__c { fill: var(--cyan); }
.glyph__n { fill: var(--muted); fill-opacity: 0.45; }

/* ---------- 頁首 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; border-radius: 6px; }
.brand__logo { height: 30px; width: auto; }
.nav { display: none; gap: 4px; margin-left: 20px; }
.nav__link { position: relative; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.nav__link:hover { color: var(--ink); background: var(--bg-tint); }
.nav__link.is-on { color: var(--ink); }
.nav__link.is-on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-bar); }
.top__end { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top__plans { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.lang { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.lang:hover { color: var(--ink); background: var(--bg-tint); }
.lang__long { display: none; }
.who { position: relative; margin-left: 4px; display: flex; align-items: center; }
.who__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.who__btn:hover { border-color: var(--line-strong); }
.who__plan { font-size: 0.875rem; font-weight: 700; color: var(--ink); }
.who__chev { color: var(--muted); width: 16px; height: 16px; }
/* 登入狀態先畫（js/who-early.js 標的 <html data-who>）：記得樣子的直接畫頭像鈕（跟 header.js 換上的同一個 .who__btn）、
   還沒記到的放一樣大的骨架，都不先放「登入」；「會員中心」直接出現。header.js 問過 API 後換成真的鈕或換回「登入」 */
.who__btn.who__early, .who__skel { display: none; }
html[data-who="in"] .who__btn.who__early { display: inline-flex; cursor: default; }
.who__early .avatar::before { content: var(--who-initial, ""); }
.who__early .who__plan::before { content: var(--who-plan, ""); }
html[data-who="pending"] .who__skel { display: block; width: 104px; height: 44px; border-radius: 999px; }
html[data-who="in"] [data-account-slot] > [data-needs-account],
html[data-who="pending"] [data-account-slot] > [data-needs-account] { display: none; }

/* 會員的頁沒登入：在原地請他登入。沒登入過的瀏覽器畫面出現前就顯示（不放那一頁的骨架 .member-wait）；問過 API 才知道沒登入的，ui.js 換上同一塊 */
/* 位置與對齊跟方案頁的標題一樣（.page-head，css/app.css），換頁籤時字在同一個地方 */
/* .page-head 在 css/app.css（後載入）寫了 display: grid，這裡要更明確才藏得住 */
.signin-ask.page-head { display: none; }
html[data-who="out"] #app > .signin-ask { display: grid; }
html[data-who="out"] #app > .member-wait { display: none; }
.signin-ask .btn { margin-top: 4px; }
/* 窄的手機（320～360）：帳號鈕只放頭像（方案寫在打開的選單裡），「方案」與語言的左右留白收一點，頁首一行放得下 */
@media (max-width: 360px) {
  .top__row { gap: 8px; }
  .top__plans, .lang { padding: 0 6px; }
  .who__plan { display: none; }
  html[data-who="pending"] .who__skel { width: 62px; }
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(320px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-3);
  animation: pop 160ms var(--ease);
  transform-origin: top right;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu__who { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; min-width: 0; }
.menu__who > div { min-width: 0; }
.menu__name { font-weight: 700; color: var(--ink); }
.menu__mail { color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .planline { margin: 0 8px 8px; }
.menu__list { display: grid; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.menu__item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: 0.9375rem; font-weight: 550; text-align: left; text-decoration: none; cursor: pointer; }
.menu__item:hover { background: var(--bg-tint); }
.menu__item .ic { color: var(--muted); }
.menu__item--quiet { margin-top: 6px; color: var(--muted); }

.planline { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 0.9375rem; line-height: 1.5; }
.planline b { color: var(--ink); font-size: 1.0625rem; margin-right: 0.5em; }
.planline--compact { gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.8125rem; }
.planline--compact b { font-size: 0.9375rem; }
.planline--warn { color: var(--warn); }

/* ---------- 頁尾 ---------- */
.site-foot {
  flex: none;
  padding-block: 40px calc(56px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--bg-tint);
  color: var(--muted);
  font-size: var(--fs-small);
}
.foot__grid { display: grid; gap: 22px; }
.foot__co { display: grid; gap: 2px; }
.foot__name { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; color: var(--ink); font-weight: 700; font-size: 0.9375rem; }
.foot__id { margin-top: 2px; }
.foot__contact { display: grid; gap: 6px; }
.foot__contact p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.foot__contact a, .foot__links a { color: var(--text); }
.foot__links { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; }
.foot__links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.foot__links a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.foot__lang { font-weight: 600; text-decoration: none; }

/* ---------- 不分語言的頁（根網址、轉址、404）---------- */
.choose { display: grid; gap: 20px; justify-items: start; padding-block: 56px; }
.choose__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 提示（取消、退款、登入完成）---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-3);
  transform: translateX(-50%);
  animation: toast 260ms var(--ease);
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- 寬一點的螢幕 ---------- */
@media (min-width: 640px) {
  .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .lang__long { display: inline; }
  .lang__short { display: none; }
}
@media (min-width: 900px) {
  .top__row { min-height: 64px; }
  .nav { display: flex; }
  .top__plans { display: none; }
  .foot__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
  .foot__links { justify-content: flex-end; }
}
@media (min-width: 1180px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
