/* ============================================================
   飛騰伊果 收款系統 — 共用設計（色彩、字體取自 flyingeagle-ai.com）
   ============================================================ */
@font-face {
  font-family: 'FE Num';
  src: url('/static/fonts/saira-condensed-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'FE Num';
  src: url('/static/fonts/saira-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700 900;
  font-display: swap;
}

:root {
  --night: #081330;
  --night-2: #0f2048;
  --night-3: #16295a;
  --night-deep: #050c20;
  --navy: #0a2540;
  --paper: #f6f9fc;
  --white: #ffffff;
  --gold: #d4af37;
  --gold-2: #e8c766;
  --gold-ink: #86670f;
  --gold-soft: #fbf4de;
  --gold-line: #ead9a6;
  --line: #e1e7ef;
  --line-strong: #cbd5e1;
  --slate: #425466;
  --slate-2: #5b6b82;
  --on-night: #eef2fa;
  --on-night-2: #a9b6d3;
  --line-green: #04873a;
  --line-green-2: #036e2f;
  --ok: #11845b;
  --ok-soft: #e7f5ee;
  --danger: #c2362b;
  --danger-soft: #fdeceb;
  --info: #1769c2;
  --info-soft: #e8f1fc;
  --warn: #9a6400;
  --warn-soft: #fff4dc;
  --electric: #1ca8ff;
  --violet: #7b61ff;
  --r-l: 24px;
  --r-m: 16px;
  --r-s: 10px;
  --shadow: 0 1px 2px rgba(10, 37, 64, 0.06), 0 14px 34px -14px rgba(10, 37, 64, 0.22);
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.08);
  --font: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', 'Heiti TC', 'Noto Sans CJK TC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num: 'FE Num', 'Saira Condensed', 'Barlow Condensed', 'Arial Narrow', var(--font);
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--electric);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--info);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  line-height: 1.3;
  margin: 0;
}
p {
  margin: 0;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.muted {
  color: var(--slate-2);
}
.small {
  font-size: 0.875em;
}
.nowrap {
  white-space: nowrap;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  word-break: break-all;
}
.hidden,
[hidden] {
  display: none !important;
}

/* ── 按鈕（膠囊形，與官網一致） ── */
.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--h);
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.btn-gold {
  background: var(--gold);
  color: var(--night);
}
.btn-gold:hover {
  background: var(--gold-2);
}
.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover {
  background: var(--night-3);
}
.btn-line {
  background: var(--line-green);
  color: #fff;
}
.btn-line:hover {
  background: var(--line-green-2);
}
.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline:hover {
  background: rgba(10, 37, 64, 0.05);
}
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--on-night);
}
.btn-light {
  background: var(--white);
  border-color: var(--line-strong);
  color: var(--navy);
}
.btn-light:hover {
  border-color: var(--navy);
}
.btn-danger {
  background: var(--white);
  border-color: #e6b3ae;
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-soft);
}
.btn-block {
  width: 100%;
}
.btn-lg {
  --h: 60px;
  font-size: 1.125rem;
  padding: 0 28px;
}
.btn-sm {
  --h: 40px;
  padding: 0 16px;
  font-size: 0.9375rem;
}
.btn-xs {
  --h: 32px;
  padding: 0 12px;
  font-size: 0.8125rem;
}
.btn[disabled],
.btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── 表單 ── */
.field {
  display: grid;
  gap: 8px;
  align-content: start;
}
.field + .field {
  margin-top: 18px;
}
.label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}
.label .req {
  color: var(--danger);
  margin-left: 2px;
}
.label .opt {
  color: var(--slate-2);
  font-weight: 400;
  font-size: 0.875rem;
  margin-left: 6px;
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--white);
  font-size: 1.0625rem;
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea {
  min-height: 96px;
  padding: 12px 16px;
  resize: vertical;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230a2540' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(28, 168, 255, 0.35);
}
.input::placeholder,
.textarea::placeholder {
  color: #98a4b5;
}
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--danger);
  background: #fffafa;
}
.hint {
  font-size: 0.9375rem;
  color: var(--slate-2);
}
.error-text {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  color: var(--danger);
  font-weight: 700;
}
.field.has-error .error-text {
  display: flex;
}
.ok-text {
  font-size: 0.9375rem;
  color: var(--ok);
  font-weight: 700;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 1rem;
}
.check input {
  width: 26px;
  height: 26px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--navy);
}

/* ── 徽章 ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge.no-dot::before {
  display: none;
}
.tone-ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.tone-bad {
  background: var(--danger-soft);
  color: var(--danger);
}
.tone-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.tone-info {
  background: var(--info-soft);
  color: var(--info);
}
.tone-muted {
  background: #eef1f5;
  color: var(--slate-2);
}
.tone-gold {
  background: var(--gold-soft);
  color: var(--gold-ink);
  border-color: var(--gold-line);
}

/* ── 提示框 ── */
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-s);
  border: 1px solid transparent;
  font-size: 0.9875rem;
}
.alert svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
}
.alert-info {
  background: var(--info-soft);
  border-color: #c6dcf6;
  color: #10467f;
}
.alert-warn {
  background: var(--warn-soft);
  border-color: #f1d79a;
  color: #6e4a00;
}
.alert-bad {
  background: var(--danger-soft);
  border-color: #f2c3be;
  color: #8f241b;
}
.alert-ok {
  background: var(--ok-soft);
  border-color: #b9e2cd;
  color: #0b5e40;
}
.alert-gold {
  background: var(--gold-soft);
  border-color: var(--gold-line);
  color: var(--navy);
}
.alert strong {
  font-weight: 700;
}
.alert ul {
  margin: 4px 0 0;
  padding-left: 1.2em;
}

/* ── QR Code ── */
.qr svg {
  width: 100%;
  height: auto;
}

/* 減少動畫偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
