/* 兩頁共用的基礎樣式。品牌色可由設定檔的 theme 欄位覆寫（見 applyTheme） */
:root {
  --bg: #0b1424;
  --bg-2: #13213a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #eef2f8;
  --text-dim: #9aa8bf;
  --accent: #d9b46a;          /* 主色：按鈕、重點 */
  --accent-ink: #1a1408;      /* 主色上的文字 */
  --ok: #4cc38a;
  --warn: #f0a24a;
  --bad: #ef6b6b;
  --radius: 14px;
  --page-max: 480px;          /* 與正式站點一致，以 480px 為手機基準 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC", "Microsoft JhengHei",
          "Microsoft YaHei", "Noto Sans TC", "Noto Sans SC", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  position: relative;
}

/* 簡繁切換按鈕（右上角） */
.lang-toggle {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, calc((100vw - var(--page-max)) / 2 + 12px));
  z-index: 20;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(11, 20, 36, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 16px;
  font-weight: 600;
}

/* 主要按鈕 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.12s ease, opacity 0.2s ease, filter 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* 狀態小點 */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex: none;
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.pulse { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.notice {
  font-size: 13px;
  color: var(--warn);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
