:root {
  --bg: #ffffff;
  --bg-soft: #f5f6fb;
  --bg-dark: #0f1024;
  --bg-dark-2: #17183a;
  --text: #1b1d33;
  --text-2: #4d5170;
  --text-3: #8489a8;
  --line: #e6e8f2;
  --primary: #5b4cf0;
  --primary-2: #4a3bd9;
  --accent: #22c3e6;
  --ok: #12a26a;
  --warn: #d98a0b;
  --err: #d64545;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 60, .05), 0 8px 24px rgba(20, 22, 60, .06);
  --grad: linear-gradient(135deg, #6d5dfc 0%, #22c3e6 100%);
  --font: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.75; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; letter-spacing: .01em; }
p { margin: 0 0 1em; }
code { background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--text-3); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none !important; transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(91, 76, 240, .28); }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-light { background: #fff; color: var(--bg-dark); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-outline-light:hover { background: rgba(255,255,255,.08); }
.btn-danger { background: #fff; color: var(--err); border-color: #f1c9c9; }
.btn-danger:hover { background: #fdf2f2; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; color: var(--text); letter-spacing: -.01em; text-decoration: none !important; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); position: relative; box-shadow: 0 4px 12px rgba(91,76,240,.35); }
.brand-mark::after { content: ""; position: absolute; inset: 8px; border: 2.5px solid #fff; border-radius: 4px; border-top-color: transparent; transform: rotate(45deg); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.nav-link { color: var(--text-2); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 15px; }
.nav-link:hover, .nav-link.is-active { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 20px; gap: 4px; box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .nav-sep { display: none; }
  .site-nav .btn { margin-top: 6px; }
}

/* ---------- Flash ---------- */
.flash-wrap { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 15px; border: 1px solid; }
.flash-success { background: #ecf9f2; border-color: #bfe8d3; color: #0b6b45; }
.flash-error { background: #fdf0f0; border-color: #f3cccc; color: #9b2c2c; }
.flash-info { background: #eef1fe; border-color: #d3daf9; color: #3b3fa8; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: #e6e7f5; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 900; }
.section-head p { color: var(--text-2); font-size: 17px; }
.section-dark .section-head p { color: #a9abcf; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--primary); text-transform: uppercase; margin-bottom: 10px; }
.section-dark .eyebrow { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 80% -10%, rgba(34,195,230,.22), transparent 60%), radial-gradient(900px 500px at 0% 10%, rgba(109,93,252,.35), transparent 60%), var(--bg-dark); color: #fff; padding: 96px 0 104px; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000 30%, transparent 90%); -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: 14px; color: #cfd1f3; margin-bottom: 22px; }
.hero-badge b { color: #fff; }
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 900; line-height: 1.2; margin-bottom: 20px; letter-spacing: -.01em; }
.hero-lead { font-size: clamp(16px, 2vw, 19px); color: #c4c6e6; max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 14px; color: #9a9cc4; }

.hero-visual { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.flow-node { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.flow-node .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; flex: none; background: rgba(255,255,255,.08); }
.flow-node b { display: block; color: #fff; font-size: 15px; }
.flow-node span { font-size: 13px; color: #a7a9cf; }
.flow-arrow { text-align: center; color: #6e70a8; font-size: 13px; padding: 6px 0; }
.flow-node.is-you { background: linear-gradient(135deg, rgba(109,93,252,.25), rgba(34,195,230,.18)); border-color: rgba(140,130,255,.35); }

@media (max-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px 24px; box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 22px; width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 15px; box-shadow: 0 6px 16px rgba(91,76,240,.35); }
.step .ic { font-size: 28px; margin: 6px 0 10px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 15px; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; gap: 28px 16px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--bg-dark-2); border: 1px solid rgba(255,255,255,.08); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(255,255,255,.07); margin-bottom: 14px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: #a9abcf; font-size: 15px; margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- Cards / tools ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h2 { font-size: 20px; }
.card + .card { margin-top: 20px; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.tool-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: var(--bg-soft); margin-bottom: 14px; overflow: hidden; }
.tool-icon img { width: 100%; height: 100%; object-fit: cover; }
.tool h3 { font-size: 19px; margin-bottom: 4px; }
.tool p { color: var(--text-2); font-size: 15px; flex: 1; }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--line); }
.tag-coming { background: #fff7e6; color: #9a6200; border-color: #f6dfae; }
.tag-ok { background: #ecf9f2; color: #0b6b45; border-color: #bfe8d3; }
.tag-warn { background: #fff7e6; color: #9a6200; border-color: #f6dfae; }
.tag-err { background: #fdf0f0; color: #9b2c2c; border-color: #f3cccc; }
.tag-muted { background: #f1f2f6; color: #6b6f8a; }
.empty { text-align: center; padding: 56px 24px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--text-2); background: #fff; }
.empty .ic { font-size: 40px; margin-bottom: 8px; }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tools-grid { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.price-card { max-width: 460px; margin: 0 auto; background: #fff; border-radius: 20px; padding: 36px; border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(20,22,60,.12); position: relative; overflow: hidden; }
.price-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--grad); }
.price-card h3 { font-size: 20px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 4px; }
.price b { font-size: 56px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.price span { color: var(--text-2); font-size: 17px; }
.checklist { list-style: none; padding: 0; margin: 22px 0 26px; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--text-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: #ecf9f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%2312a26a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.cost-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.cost-table th, .cost-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.cost-table th { width: 32%; color: var(--text); }
.cost-table td { color: var(--text-2); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 22px; color: var(--text-3); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); padding-bottom: 18px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad); color: #fff; border-radius: 24px; padding: 56px 40px; text-align: center; box-shadow: 0 30px 60px rgba(91,76,240,.3); }
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; }
.cta-band p { color: rgba(255,255,255,.88); font-size: 17px; margin-bottom: 26px; }

/* ---------- Page header ---------- */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 56px 0 44px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; margin-bottom: 8px; }
.page-head p { color: var(--text-2); font-size: 17px; margin: 0; max-width: 720px; }
.page-body { padding: 48px 0 88px; }

/* ---------- Guide (how) ---------- */
.guide-step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.guide-step:last-child { border-bottom: 0; }
.guide-num { width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 900; font-size: 20px; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(91,76,240,.3); }
.guide-step h2 { font-size: 22px; margin-bottom: 8px; }
.guide-step p, .guide-step li { color: var(--text-2); }
.guide-step ul { padding-left: 20px; margin: 0 0 1em; }
.callout { border-radius: var(--radius-sm); padding: 16px 18px; background: #eef1fe; border: 1px solid #d3daf9; color: #33378f; font-size: 15px; margin: 12px 0; }
.callout-warn { background: #fff8eb; border-color: #f6dfae; color: #7a5200; }
.callout b { color: inherit; }
.req-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 8px; }
.req { padding: 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.req b { display: block; margin-bottom: 4px; }
.req span { color: var(--text-2); font-size: 14px; }
@media (max-width: 760px) { .req-grid { grid-template-columns: 1fr; } .guide-step { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- Prose (legal) ---------- */
.prose h2 { font-size: 20px; margin-top: 36px; }
.prose p, .prose li { color: var(--text-2); }
.prose ol, .prose ul { padding-left: 22px; }

/* ---------- Forms ---------- */
.auth-wrap { min-height: calc(100vh - 64px - 260px); display: grid; place-items: center; padding: 56px 20px 88px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 36px 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.auth-card .sub { color: var(--text-2); margin-bottom: 24px; }
.auth-foot { margin-top: 20px; text-align: center; color: var(--text-2); font-size: 15px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.input, select.input, textarea.input { width: 100%; padding: 12px 14px; border: 1px solid #d6d9e8; border-radius: var(--radius-sm); font: inherit; font-size: 16px; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,76,240,.15); }
textarea.input { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin-bottom: 12px; line-height: 1.6; }
.check input { margin-top: 4px; width: 16px; height: 16px; flex: none; accent-color: var(--primary); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
.cf-turnstile { margin-bottom: 16px; }
.code-input { font-size: 28px; letter-spacing: 12px; text-align: center; font-weight: 700; padding: 14px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Account ---------- */
.account { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 40px 20px 88px; }
.account-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 88px; align-self: start; }
.account-nav a { padding: 10px 14px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.account-nav a:hover, .account-nav a.is-active { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.account-nav form { margin-top: 8px; }
.account-nav button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 14px; font: inherit; color: var(--text-3); cursor: pointer; border-radius: var(--radius-sm); }
.account-nav button:hover { background: var(--bg-soft); color: var(--err); }
.account h1 { font-size: 26px; font-weight: 900; margin-bottom: 20px; }
@media (max-width: 860px) {
  .account { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; }
  .account-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .account-nav a { white-space: nowrap; }
  .account-nav form { margin: 0; }
  .account-nav button { white-space: nowrap; }
}
.status-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.status-big { font-size: 24px; font-weight: 900; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 12px 0 0; }
.kv dt { color: var(--text-3); font-size: 14px; }
.kv dd { margin: 0; font-weight: 500; }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); background: #fff8eb; border: 1px solid #f6dfae; color: #7a5200; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.notice form { margin: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { background: var(--bg-soft); font-weight: 700; color: var(--text-2); font-size: 13px; }
.table tr:last-child td { border-bottom: 0; }
.table td.wrap { white-space: normal; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #a9abcf; padding: 56px 0 28px; }
.site-footer .brand { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand p { margin-top: 12px; font-size: 14px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-cols h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-cols a { display: block; color: #a9abcf; font-size: 14px; margin-bottom: 8px; }
.footer-cols a:hover { color: #fff; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: 13px; color: #7c7ea6; }
.footer-meta a { color: #a9abcf; }

/* ---------- Error ---------- */
.error-page { text-align: center; padding: 120px 20px; }
.error-page .code { font-size: 72px; font-weight: 900; line-height: 1; }

/* ---------- Pay redirect ---------- */
.bare { min-height: 100vh; display: grid; place-items: center; background: var(--bg-soft); text-align: center; padding: 20px; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--primary); animation: spin 1s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
