/* ============================================================
   FGXpress｜共用基礎樣式與元件
   （reset + 按鈕 / 卡片 / 晶片 / 徽章 / 品牌字標 / toast）
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--s-4); }

/* --- 按鈕 --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-size: var(--f-md); font-weight: 700; letter-spacing: .02em;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-pill);
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover { background: var(--c-primary-600); }
.btn-primary:disabled { background: #D7DADF; color: #9AA0A8; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); }
.btn-ghost:hover { border-color: var(--c-ink-soft); }
.btn-block { width: 100%; }
.btn-lg { padding: var(--s-4) var(--s-6); font-size: var(--f-md); }

/* --- 卡片 --- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: var(--s-5);
}

/* --- 晶片（分類切換） --- */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  color: var(--c-ink-2);
  font-size: var(--f-sm); font-weight: 600; white-space: nowrap;
  transition: all .12s ease;
}
.chip:hover { border-color: var(--c-ink-soft); }
.chip[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* --- 徽章（狀態） --- */
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 2px var(--s-2); border-radius: var(--r-pill); line-height: 1.5;
}
.badge-hot { background: #FBE9E7; color: var(--c-danger); }
.badge-few { background: #F6EEDD; color: var(--c-warn); }
.badge-rec { background: #E4F1EB; color: var(--c-success); }

/* --- 品牌字標：金屬銀漸層文字 --- */
.brand-wordmark {
  font-weight: 800; letter-spacing: .06em;
  background: var(--c-metal); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* --- Toast --- */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%) translateY(20px);
  background: var(--c-ink); color: #fff; padding: var(--s-3) var(--s-5);
  border-radius: var(--r-pill); font-weight: 600; font-size: var(--f-sm);
  box-shadow: var(--sh-3); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 80; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
