:root {
  --rust: #a73528;
  --rust-dark: #84271e;
  --rust-soft: #f8ece9;
  --ink: #20272e;
  --muted: #5d6871;
  --quiet: #7b858d;
  --line: #e0e4e7;
  --line-dark: #c9d0d5;
  --paper: #fffdfa;
  --white: #fff;
  --wash: #f5f6f5;
  --success: #1f6a46;
  --success-soft: #eaf4ee;
  --warning: #845800;
  --warning-soft: #fbf3dd;
  --danger: #a02d2d;
  --danger-soft: #faeceb;
  --max: 1180px;
  --radius: 8px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.6; }
body.nav-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--rust); }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 8px 12px; color: #fff; background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 40; top: 0; background: rgba(255,253,250,.98); border-bottom: 1px solid var(--line); }
.header-inner { width: min(calc(100% - 48px), var(--max)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; gap: 30px; }
.public-brand { width: 218px; flex: 0 0 218px; line-height: 0; }
.public-brand img { display: block; width: 100%; height: auto; }
.public-nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; }
.public-nav a { padding: 0 12px; display: flex; align-items: center; color: #414b53; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 650; text-decoration: none; }
.public-nav a:hover, .public-nav a.active { color: var(--rust); border-bottom-color: var(--rust); }
.account-nav { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.account-link { color: var(--ink); font-size: 13px; font-weight: 650; text-decoration: none; }
.account-link:hover { color: var(--rust); }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 10px; background: transparent; border: 1px solid var(--line); border-radius: 6px; }
.nav-toggle > span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; background: var(--ink); }
.mode-banner { padding: 6px 18px; color: #684714; background: var(--warning-soft); border-bottom: 1px solid #ead8a5; font-size: 12px; font-weight: 650; text-align: center; }

main { min-height: 64vh; }
.shell { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }
.section { padding: 64px 0; }
.section-compact { padding: 42px 0; }
.section-wash { background: var(--wash); border-block: 1px solid var(--line); }
.eyebrow { margin: 0 0 10px; color: var(--rust); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-family: Georgia, "Times New Roman", "Noto Serif TC", serif; font-size: clamp(38px, 5.2vw, 66px); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin-bottom: 10px; font-family: Georgia, "Times New Roman", "Noto Serif TC", serif; font-size: clamp(28px, 3.5vw, 40px); line-height: 1.16; letter-spacing: -.025em; }
h3 { margin-bottom: 7px; font-size: 18px; line-height: 1.35; }
p { margin-bottom: 16px; }
.lead { max-width: 680px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.text-muted { color: var(--muted); }
.text-small { font-size: 12px; }
.text-link { color: var(--rust); font-size: 13px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.button { min-height: 44px; padding: 10px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #fff; background: var(--rust); border: 1px solid var(--rust); border-radius: 6px; font-size: 14px; font-weight: 750; line-height: 1.2; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--rust-dark); border-color: var(--rust-dark); }
.button:focus-visible, .account-link:focus-visible, .public-nav a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(167,53,40,.25); outline-offset: 2px; }
.button-secondary { color: var(--ink); background: var(--white); border-color: var(--line-dark); }
.button-secondary:hover { color: var(--rust); background: var(--rust-soft); border-color: #d9aaa4; }
.button-quiet { color: var(--rust); background: transparent; border-color: transparent; }
.button-quiet:hover { background: var(--rust-soft); }
.button-small { min-height: 36px; padding: 7px 13px; font-size: 12px; }
.button-wide { width: 100%; }
.button[disabled] { opacity: .52; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }

.public-hero { padding: 76px 0 66px; background: var(--white); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); align-items: end; gap: 70px; }
.hero-copy { max-width: 750px; }
.hero-copy .button-row { margin-top: 28px; }
.hero-note { padding: 24px 0 4px 26px; border-left: 3px solid var(--rust); }
.hero-note strong { display: block; margin-bottom: 8px; font-family: Georgia, "Times New Roman", "Noto Serif TC", serif; font-size: 22px; line-height: 1.3; }
.hero-note p { margin: 0; color: var(--muted); font-size: 13px; }

.section-heading { margin-bottom: 26px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading p { max-width: 580px; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-block: 1px solid var(--line-dark); }
.feature-step { padding: 28px 30px; border-right: 1px solid var(--line); }
.feature-step:first-child { padding-left: 0; }
.feature-step:last-child { padding-right: 0; border-right: 0; }
.feature-step span { color: var(--rust); font-size: 12px; font-weight: 800; }
.feature-step h3 { margin-top: 8px; }
.feature-step p { margin: 0; color: var(--muted); font-size: 13px; }

.stats-line { display: flex; flex-wrap: wrap; border-block: 1px solid var(--line-dark); }
.stat-item { min-width: 170px; padding: 20px 30px; border-right: 1px solid var(--line); }
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: 0; }
.stat-item strong { display: block; font-family: Georgia, "Times New Roman", "Noto Serif TC", serif; font-size: 27px; line-height: 1.2; }
.stat-item span { color: var(--muted); font-size: 12px; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.public-card { min-width: 0; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-accent { height: 7px; background: var(--rust); }
.card-body { height: 100%; padding: 22px; display: flex; flex-direction: column; }
.card-kicker { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.public-card h3 { font-size: 20px; }
.public-card p { color: var(--muted); font-size: 13px; }
.card-meta { margin: 2px 0 16px; display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.card-actions { margin-top: auto; padding-top: 5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.amount { color: var(--ink); font-weight: 750; }
.progress-element { width: 100%; height: 6px; margin: 13px 0 7px; display: block; overflow: hidden; appearance: none; background: #e9ebed; border: 0; border-radius: 999px; }
.progress-element::-webkit-progress-bar { background: #e9ebed; border-radius: 999px; }
.progress-element::-webkit-progress-value { background: var(--rust); border-radius: 999px; }
.progress-element::-moz-progress-bar { background: var(--rust); border-radius: 999px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }

.page-mast { padding: 48px 0 34px; background: var(--white); border-bottom: 1px solid var(--line); }
.page-mast h1 { max-width: 800px; margin-bottom: 10px; font-size: clamp(34px, 4.3vw, 50px); }
.page-mast p { max-width: 690px; margin-bottom: 0; color: var(--muted); }
.toolbar { margin-bottom: 24px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.search-field { width: min(100%, 390px); position: relative; }
.search-field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.result-count { color: var(--muted); font-size: 12px; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 54px; align-items: start; }
.detail-main { min-width: 0; }
.detail-main h2 { margin-top: 38px; font-size: 27px; }
.detail-main .description { color: #3f4951; font-size: 16px; white-space: pre-line; }
.policy-page { max-width: 760px; }
.policy-page h2 { margin-top: 34px; font-size: 24px; }
.policy-page h2:first-child { margin-top: 0; }
.policy-page p { color: #3f4951; font-size: 15px; }
.detail-aside { position: sticky; top: 104px; padding: 24px; background: var(--white); border: 1px solid var(--line-dark); border-radius: var(--radius); }
.detail-aside h2, .detail-aside h3 { font-family: inherit; font-size: 18px; letter-spacing: 0; }
.detail-facts { margin: 0 0 20px; padding: 0; list-style: none; }
.detail-facts li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-facts span { display: block; color: var(--muted); font-size: 11px; }
.detail-facts strong { display: block; margin-top: 2px; font-size: 14px; }
.sticky-mobile-action { display: none; }

.pill { padding: 3px 8px; display: inline-flex; align-items: center; color: #4b555d; background: var(--wash); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.pill-open, .pill-active, .pill-paid { color: var(--success); background: var(--success-soft); border-color: #bddbc9; }
.pill-pending { color: var(--warning); background: var(--warning-soft); border-color: #ead8a5; }
.pill-failed, .pill-cancelled, .pill-closed { color: var(--danger); background: var(--danger-soft); border-color: #e4c1be; }

.empty-state { padding: 54px 24px; color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.empty-state-mark { width: 44px; height: 44px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--rust); background: var(--rust-soft); border-radius: 50%; font-family: Georgia, serif; font-size: 22px; }
.empty-state h2, .empty-state h3 { color: var(--ink); font-family: inherit; font-size: 20px; }
.empty-state p { max-width: 480px; margin: 0 auto; }

.form-shell { width: min(calc(100% - 40px), 600px); margin: 54px auto 70px; }
.form-card { padding: 32px; background: var(--white); border: 1px solid var(--line-dark); border-radius: var(--radius); }
.form-card h1 { margin-bottom: 8px; font-size: 34px; }
.form-card > p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { margin-bottom: 16px; }
.field label, .field-label { display: block; margin-bottom: 6px; color: #3e4850; font-size: 12px; font-weight: 750; }
.field-hint { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
input, textarea, select { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-dark); border-radius: 6px; }
textarea { min-height: 92px; resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: #9da7ae; }
.check-row { display: flex; align-items: flex-start; gap: 9px; color: #465058; font-size: 12px; }
.check-row input { width: 17px; min-height: 17px; margin: 2px 0 0; flex: 0 0 17px; }
.form-error { margin: 0 0 16px; padding: 10px 12px; color: var(--danger); background: var(--danger-soft); border: 1px solid #e4c1be; border-radius: 6px; font-size: 12px; }
.field-error { margin: 4px 0 0; color: var(--danger); font-size: 11px; }
.form-footer { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }

.checkout-shell { width: min(calc(100% - 48px), 1040px); margin: 46px auto 74px; }
.checkout-head { margin-bottom: 26px; }
.checkout-head h1 { margin-bottom: 8px; font-size: 38px; }
.steps { margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); list-style: none; border-bottom: 1px solid var(--line); }
.steps li { padding: 10px 4px 12px; color: var(--quiet); border-bottom: 3px solid transparent; font-size: 12px; font-weight: 750; }
.steps li.active { color: var(--rust); border-bottom-color: var(--rust); }
.steps li.done { color: var(--success); }
.checkout-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 34px; align-items: start; }
.checkout-panel { padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.checkout-panel h2 { font-family: inherit; font-size: 22px; letter-spacing: 0; }
.amount-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.amount-choice { position: relative; }
.amount-choice input { position: absolute; opacity: 0; pointer-events: none; }
.amount-choice label { min-height: 48px; display: grid; place-items: center; color: var(--ink); background: #fff; border: 1px solid var(--line-dark); border-radius: 6px; font-weight: 750; cursor: pointer; }
.amount-choice input:checked + label { color: var(--rust); background: var(--rust-soft); border: 2px solid var(--rust); }
.custom-amount { margin-top: 15px; }
.money-input { position: relative; }
.money-input span { position: absolute; top: 50%; left: 12px; color: var(--muted); transform: translateY(-50%); }
.money-input input { padding-left: 45px; }
.checkout-actions { margin-top: 24px; display: flex; justify-content: space-between; gap: 10px; }
.order-summary { position: sticky; top: 104px; padding: 22px; background: var(--wash); border-top: 3px solid var(--rust); }
.order-summary h2 { font-family: inherit; font-size: 16px; letter-spacing: 0; }
.summary-row { padding: 10px 0; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary-row:last-child { border-bottom: 0; }
.summary-total { font-size: 17px; font-weight: 800; }
.secure-note { margin: 16px 0 0; color: var(--muted); font-size: 11px; }
.review-list { margin: 18px 0; border-block: 1px solid var(--line); }
.review-row { padding: 12px 0; display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 15px; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: 0; }
.review-row span { color: var(--muted); font-size: 12px; }
.review-row strong { font-size: 13px; font-weight: 650; }

.order-card { width: min(calc(100% - 40px), 680px); margin: 62px auto 84px; padding: 34px; background: var(--white); border: 1px solid var(--line-dark); border-radius: var(--radius); text-align: center; }
.order-symbol { width: 58px; height: 58px; margin: 0 auto 17px; display: grid; place-items: center; border-radius: 50%; font-size: 26px; font-weight: 800; }
.order-symbol.success { color: var(--success); background: var(--success-soft); }
.order-symbol.pending { color: var(--warning); background: var(--warning-soft); }
.order-symbol.failed { color: var(--danger); background: var(--danger-soft); }
.order-card h1 { font-size: 36px; }
.reference { margin: 22px 0; padding: 14px; background: var(--wash); font-size: 12px; }
.reference strong { display: block; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; overflow-wrap: anywhere; }
.order-card .button-row { justify-content: center; }

.page-loading { min-height: 58vh; display: grid; place-items: center; align-content: center; gap: 13px; color: var(--muted); }
.page-loading p { margin: 0; }
.loader { width: 27px; height: 27px; border: 2px solid var(--line); border-top-color: var(--rust); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-region { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { max-width: 370px; padding: 12px 15px; color: #fff; background: var(--ink); border-radius: 6px; font-size: 13px; }
.toast.error { background: var(--danger); }

.site-footer { padding: 36px 0; background: #fff; color: var(--ink); border-top: 1px solid var(--line); }
.footer-inner { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.7fr) minmax(0,1fr); gap: 40px; align-items: start; }
.footer-inner img { display: block; width: 210px; max-width: 100%; height: auto; }
.footer-inner p { max-width: 38em; margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.footer-inner nav { display: grid; align-content: start; gap: 2px; }
.footer-inner a { display: flex; align-items: center; min-height: 36px; width: fit-content; color: var(--ink); font-size: 13px; text-decoration: none; }
.footer-inner a:hover { color: var(--rust); text-decoration: underline; }
.footer-inner a:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 2px; }
.footer-note { margin-top: 0 !important; padding-left: 20px; border-left: 1px solid var(--line); }
.noscript { padding: 14px; color: #fff; background: var(--danger); text-align: center; }

@media (max-width: 960px) {
  .header-inner { gap: 18px; }
  .public-brand { width: 190px; flex-basis: 190px; }
  .public-nav a { padding-inline: 8px; font-size: 13px; }
  .hero-grid { gap: 36px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-layout { grid-template-columns: minmax(0,1fr) 290px; gap: 30px; }
}

@media (max-width: 760px) {
  .header-inner { width: calc(100% - 28px); min-height: 66px; }
  .public-brand { width: 176px; flex-basis: 176px; }
  .nav-toggle { margin-left: auto; display: block; }
  .public-nav { position: fixed; z-index: 45; top: 66px; right: 0; bottom: 0; width: min(88vw,340px); padding: 18px; display: none; align-items: stretch; align-self: auto; background: var(--white); border-left: 1px solid var(--line); }
  body.nav-open .public-nav { display: grid; align-content: start; }
  .public-nav a { min-height: 46px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
  .account-nav { display: none; }
  body.nav-open::after { content: ""; position: fixed; z-index: 35; inset: 66px 0 0; background: rgba(32,39,46,.38); }
  .shell { width: calc(100% - 32px); }
  .section { padding: 45px 0; }
  .public-hero { padding: 48px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-note { padding-block: 4px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-step, .feature-step:first-child, .feature-step:last-child { padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-step:last-child { border-bottom: 0; }
  .section-heading, .toolbar { align-items: flex-start; flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  .detail-layout, .checkout-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .sticky-mobile-action { position: fixed; z-index: 32; right: 0; bottom: 0; left: 0; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); display: flex; gap: 9px; background: rgba(255,255,255,.98); border-top: 1px solid var(--line-dark); }
  .sticky-mobile-action .button { flex: 1; }
  .checkout-shell { width: calc(100% - 28px); margin-top: 30px; }
  .order-summary { position: static; order: -1; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .site-footer { padding: 28px 0; }
  .footer-inner { width: calc(100% - 32px); grid-template-columns: 1fr; gap: 20px; }
  .footer-inner nav { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 20px; }
  .footer-inner a { min-height: 44px; }
  .footer-note { padding: 18px 0 0; border: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 460px) {
  body { font-size: 14px; }
  h1 { font-size: 38px; }
  .lead { font-size: 16px; }
  .button-row .button { flex: 1; }
  .stats-line { display: grid; grid-template-columns: 1fr 1fr; }
  .stat-item, .stat-item:first-child { min-width: 0; padding: 14px 12px; border-bottom: 1px solid var(--line); }
  .stat-item:nth-child(odd) { padding-left: 0; }
  .stat-item:nth-child(even) { border-right: 0; }
  .page-mast { padding-block: 34px 28px; }
  .form-shell { width: calc(100% - 24px); margin-block: 28px 54px; }
  .form-card, .checkout-panel, .order-card { padding: 22px 18px; }
  .amount-options { grid-template-columns: repeat(2,1fr); }
  .steps li { font-size: 11px; }
  .checkout-actions { flex-direction: column-reverse; }
  .checkout-actions .button { width: 100%; }
  .review-row { grid-template-columns: 1fr; gap: 2px; }
  .order-card { width: calc(100% - 24px); margin-block: 30px 60px; }
  .toast-region { right: 12px; bottom: 12px; left: 12px; }
  .toast { max-width: none; }
}

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

/* Account actions stay within the mobile disclosure menu. */
.mobile-account-nav { display: none; }
.public-nav { min-width: 0; flex-wrap: wrap; }
.language-nav { display: flex; align-items: center; gap: 4px; }
.language-nav a[aria-current="true"] { text-decoration: underline; text-underline-offset: 5px; }
.gobi-readiness { padding: 26px; background: var(--wash); border: 1px solid var(--line); border-radius: 14px; }
.gobi-readiness .card-grid { margin: 26px 0; }
.package-selected { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); }
.readiness-facts { margin-top: 36px; max-width: 850px; }
.readiness-facts li { margin-block: 12px; }
.share-actions { margin-bottom: 24px; }
@media (max-width: 760px) {
  .mobile-account-nav { display: grid; gap: 10px; margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
  .mobile-account-nav .button { width: 100%; }
  .language-nav { margin-top: 16px; }
  .public-nav { overflow-y: auto; padding-bottom: max(24px,env(safe-area-inset-bottom)); }
  .gobi-readiness { padding: 20px 16px; }
}
