/* 官網（業者對外網站）：深色、品牌色由後台設定（--brand） */
:root { --brand: #3b82f6; --bg: #070a0f; --bg2: #0d1219; --card: #111821; --line: #1e2733; --ink: #eef1f6; --muted: #8d97a7; --up: #16c784; --down: #ea3943; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Noto Sans TC", system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 13px 22px; font-weight: 700; background: var(--brand); color: #fff; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.sm { padding: 8px 14px; font-size: 14px; }

/* 導覽列 */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(7,10,15,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 26px; height: 64px; }
.logo { font-weight: 900; font-size: 20px; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.logo i { width: 12px; height: 12px; border-radius: 3px; background: var(--brand); display: inline-block; }
.nav .links { display: flex; gap: 22px; font-size: 15px; color: var(--muted); }
.nav .links a:hover { color: var(--ink); }
.nav .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* 主視覺 */
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 700px; height: 700px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 30%, transparent), transparent 65%); pointer-events: none; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.15; margin: 0 0 18px; max-width: 760px; font-weight: 900; }
.hero p { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 30px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 56px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }

section { padding: 70px 0; }
section h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; font-weight: 900; }
section .lead { color: var(--muted); margin: 0 0 34px; max-width: 640px; }

/* 三步驟 */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.step .n { width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand); display: grid; place-items: center; font-weight: 900; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* 方案 */
.ptabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.ptabs button { background: none; border: 0; color: var(--muted); padding: 9px 18px; border-radius: 9px; font-weight: 600; }
.ptabs button.on { background: var(--brand); color: #fff; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; }
.plan.hot { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan .tag { align-self: flex-start; font-size: 12px; color: var(--brand); border: 1px solid var(--brand); border-radius: 20px; padding: 1px 10px; margin-bottom: 10px; }
.plan .size { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; }
.plan .pname { color: var(--muted); margin-bottom: 16px; }
.plan table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 18px; }
.plan td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.plan .ph { font-weight: 700; padding-top: 14px; color: var(--ink); border-bottom: 0; text-align: left !important; }
.plan .price { display: flex; align-items: baseline; justify-content: space-between; margin: auto 0 14px; padding-top: 6px; }
.plan .price b { font-size: 26px; }
.plan .btn { width: 100%; }

/* 特色 */
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; gap: 16px; }
.feat .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 18%, transparent); display: grid; place-items: center; }
.feat h3 { margin: 0 0 4px; font-size: 17px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; }

/* 平台 */
.platform { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; background: linear-gradient(135deg, var(--bg2), var(--card)); border: 1px solid var(--line); border-radius: 22px; padding: 38px; }
.platform ul { margin: 14px 0 22px; padding-left: 20px; color: var(--muted); }
.platform .server { background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; font-size: 15px; }
.platform .server code { color: var(--ink); font-size: 16px; }
.mock { aspect-ratio: 16/10; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; position: relative; }

/* 常見問題 */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "＋"; color: var(--muted); }
.faq details[open] summary::after { content: "－"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

.cta-band { text-align: center; padding: 60px 20px; border-radius: 22px; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--brand) 28%, transparent), var(--card) 70%); border: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 14px; margin-top: 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* 報名付款頁 */
.co { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; padding: 40px 0 60px; align-items: start; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 16px; }
.box h3 { margin: 0 0 14px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.box h3 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px; }
.box.done h3 .n { background: var(--up); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.field input, .field select { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; }
.field input:focus { outline: none; border-color: var(--brand); }
.seg { display: flex; gap: 8px; margin-bottom: 14px; }
.seg button { flex: 1; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 9px; }
.seg button.on { border-color: var(--brand); color: var(--ink); }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sizes button { background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-radius: 12px; padding: 12px; text-align: left; }
.sizes button b { display: block; font-size: 18px; }
.sizes button span { color: var(--muted); font-size: 13px; }
.sizes button.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.pay { display: flex; flex-direction: column; gap: 8px; }
.pay label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.pay label.on { border-color: var(--brand); }
.pay label.off { opacity: .45; cursor: not-allowed; }
.sum .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; }
.sum .row span:first-child { color: var(--muted); }
.sum .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 20px; font-weight: 900; }
.msg { min-height: 20px; color: var(--down); font-size: 14px; margin-top: 8px; }
.okbox { text-align: center; padding: 40px 24px; }
.okbox .big { font-size: 48px; }
.trialbox { border-style: dashed; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 12px 0; }

@media (max-width: 860px) {
  .nav .links { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .feats { grid-template-columns: 1fr; }
  .platform { grid-template-columns: 1fr; padding: 24px; }
  .co { grid-template-columns: 1fr; }
}
.nav .btn, .logo { white-space: nowrap; }
@media (max-width: 520px) {
  .nav .wrap { gap: 10px; }
  .logo { font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .nav .right { gap: 6px; }
  .nav .btn.sm { padding: 7px 10px; font-size: 13px; }
}

/* 官網 AI 顧問 */
.aichat-btn { position: fixed; right: 20px; bottom: 20px; z-index: 50; border: 0; border-radius: 24px; padding: 12px 18px; background: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.aichat { position: fixed; right: 20px; bottom: 20px; z-index: 51; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 40px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.aichat-h { display: flex; gap: 8px; align-items: baseline; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.aichat-h .muted { font-size: 13px; }
.aichat-h button { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 16px; }
.aichat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.aichat-log .b { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.aichat-log .b.me { align-self: flex-end; background: var(--brand); color: #fff; }
.aichat-log .b.ai { align-self: flex-start; background: var(--bg2); }
.aichat-log .b a { color: var(--brand); font-weight: 700; text-decoration: underline; }
.aichat-f { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.aichat-f input { flex: 1; min-width: 0; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; }
