/* =========================================================
   嵐序 LANXU — 全站共用樣式
   ========================================================= */
:root {
  --ink: #2a335f;          /* 品牌深靛藍（與 logo 同色） */
  --ink-2: #1b2240;        /* 更深的夜空藍，用於頁尾、強調區 */
  --mist: #7fa3c8;         /* 山嵐霧藍 */
  --mist-soft: #e9f0f8;    /* 淡霧藍底色 */
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1c2337;
  --muted: #5c6880;
  --line: #e1e7f0;
  --success: #1f8a5c;
  --warning: #b7791f;
  --danger: #c2413b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27, 34, 64, .04), 0 8px 24px rgba(27, 34, 64, .06);
  --shadow-lg: 0 20px 50px rgba(27, 34, 64, .14);
  --header-h: 68px;
  --container: 1160px;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-serif: "Noto Serif TC", "Songti TC", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.7; font-size: 16px; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--mist); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--ink-2); letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(127, 163, 200, .6); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.eyebrow { display: inline-block; font-size: .82rem; letter-spacing: .2em; color: var(--mist); font-weight: 700; margin-bottom: 10px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 640px; }
.text-center { text-align: center; }
.text-center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: .18s ease; white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--mist-soft); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--mist-soft); color: var(--ink); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f1cfcd; }
.btn-danger:hover { background: #fdf1f0; color: var(--danger); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn-google { background: #fff; border-color: var(--line); color: var(--text); }
.btn-google:hover { border-color: #b9c4d6; color: var(--text); }
.btn-google svg { width: 18px; height: 18px; }

/* ---------- 頂部導覽列 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0 0 0 12px; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .95rem;
}
.nav-links a:hover { color: var(--ink); background: var(--mist-soft); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--mist-soft); font-weight: 700; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent;
  border-radius: 12px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle:hover { background: var(--mist-soft); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

/* 會員頭像下拉選單 */
.user-menu { position: relative; }
.avatar-btn {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 4px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer;
}
.avatar-btn:hover { border-color: #b9c4d6; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--ink), var(--mist));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn .name { font-size: .9rem; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 60;
}
.dropdown.open { display: block; animation: pop .14s ease-out; }
.dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head strong { display: block; }
.dropdown-head span { font-size: .82rem; color: var(--muted); word-break: break-all; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  color: var(--text); font-size: .93rem; border: 0; background: none; cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--mist-soft); color: var(--ink); }
.dropdown .danger { color: var(--danger); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 手機版抽屜選單 */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(15, 20, 40, .45); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); background: #fff; z-index: 100;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
body.drawer-open { overflow: hidden; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); }
.drawer-head img { height: 34px; }
.drawer-close { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink); }
.drawer-close:hover { background: var(--mist-soft); }
.drawer-body { padding: 12px; overflow-y: auto; flex: 1; }
.drawer-body a.drawer-link {
  display: flex; align-items: center; min-height: 52px; padding: 0 16px; border-radius: 12px; font-size: 1.05rem; color: var(--text); font-weight: 500;
}
.drawer-body a.drawer-link:hover, .drawer-body a.drawer-link[aria-current="page"] { background: var(--mist-soft); color: var(--ink); }
.drawer-body a.drawer-link[aria-current="page"] { font-weight: 700; }
.drawer-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.drawer-label { font-size: .78rem; letter-spacing: .12em; color: var(--muted); padding: 4px 16px 8px; }
.drawer-user { display: flex; gap: 12px; align-items: center; padding: 12px 16px; }
.drawer-user .avatar { width: 44px; height: 44px; }
.drawer-foot { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--ink-2); color: #c7cfe2; margin-top: auto; }
.site-footer a { color: #c7cfe2; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer-brand img { height: 46px; margin-bottom: 16px; }
.footer-brand p { color: #9aa5c0; font-size: .92rem; max-width: 300px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: #8d97b3; }
.footer-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- 共用元件 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.icon-badge {
  width: 48px; height: 48px; border-radius: 14px; background: var(--mist-soft); color: var(--ink);
  display: grid; place-items: center; margin-bottom: 16px;
}
.icon-badge svg { width: 24px; height: 24px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--mist-soft); color: var(--ink); }
.tag-success { background: #e5f4ec; color: var(--success); }
.tag-warning { background: #fbf1e1; color: var(--warning); }
.tag-danger { background: #fbe9e8; color: var(--danger); }
.tag-muted { background: #eef1f5; color: var(--muted); }

.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: .92rem; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: var(--mist-soft); border-color: #d3dfee; color: var(--ink); }
.alert-success { background: #ecf7f1; border-color: #cbe8d8; color: #17694a; }
.alert-warning { background: #fdf5e8; border-color: #f1dfbd; color: #8a5a12; }
.alert-danger { background: #fdf0ef; border-color: #f2d0ce; color: #9c2f2a; }
.alert[hidden] { display: none; }

/* 頁首橫幅 */
.page-hero { background: linear-gradient(180deg, var(--mist-soft), var(--bg)); padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

/* 首頁主視覺 */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; background: radial-gradient(1200px 500px at 85% -10%, #dfe9f6 0%, transparent 60%), linear-gradient(180deg, #fff, var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 span { color: var(--mist); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-visual { position: relative; aspect-ratio: 1 / 1; border-radius: 28px; background: linear-gradient(160deg, #233059, #3b5687 60%, #8fb0d3); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-visual .mark { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 46%; filter: drop-shadow(0 10px 30px rgba(0,0,0,.25)); }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 1.6rem; color: var(--ink); }
.hero-stats span { font-size: .85rem; color: var(--muted); }

.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--muted); margin: 0; font-size: .95rem; }
.feature-card a.more { display: inline-flex; margin-top: 14px; font-weight: 600; font-size: .92rem; }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 64px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700;
}

.cta-band { background: linear-gradient(135deg, var(--ink-2), var(--ink) 60%, #4a6a9c); color: #fff; border-radius: 24px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: #c9d4ea; margin: 0; }

/* 常見問題 */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--mist); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* 文章（隱私、條款） */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 2em; }
.prose p, .prose li { color: #3a4560; }

/* ---------- 表單 ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, #1b2240, #2a335f 55%, #6f8fb8); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: 1.9rem; }
.auth-side p { color: #cdd6ea; }
.auth-side ul { padding: 0; list-style: none; display: grid; gap: 12px; color: #dfe6f5; }
.auth-side li::before { content: "✓"; display: inline-block; width: 22px; color: #a9c3e3; font-weight: 700; }
.auth-side .side-logo { height: 52px; width: auto; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.8rem; }
.form { display: grid; gap: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.field .error { font-size: .82rem; color: var(--danger); margin-top: 6px; display: none; }
.field.has-error .error { display: block; }
.field.has-error input { border-color: var(--danger); }
.input {
  width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff;
  font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--mist); box-shadow: 0 0 0 4px rgba(127, 163, 200, .2); }
.input-group { position: relative; }
.input-group .input { padding-right: 48px; }
.input-group .peek { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--muted); }
.input-group .peek:hover { background: var(--mist-soft); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); flex-shrink: 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.strength { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.strength i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }

/* 6 位數驗證碼 */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.otp input {
  height: 58px; text-align: center; font-size: 1.5rem; font-weight: 700; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.otp input:focus { outline: none; border-color: var(--mist); box-shadow: 0 0 0 4px rgba(127, 163, 200, .2); }
.otp.is-error input { border-color: var(--danger); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.verify-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--mist-soft); color: var(--ink); display: grid; place-items: center; margin-bottom: 20px; }
.verify-icon svg { width: 32px; height: 32px; }
.verify-state[hidden] { display: none; }

/* ---------- 會員中心 ---------- */
.dash { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - var(--header-h)); }
.dash-side { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; }
.dash-user { display: flex; gap: 12px; align-items: center; padding: 8px 10px 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.dash-user .avatar { width: 42px; height: 42px; }
.dash-user strong { display: block; font-size: .95rem; }
.dash-user div span { font-size: .8rem; color: var(--muted); word-break: break-all; }
.dash-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dash-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: .95rem; }
.dash-nav a svg { width: 20px; height: 20px; flex-shrink: 0; }
.dash-nav a:hover { background: var(--mist-soft); color: var(--ink); }
.dash-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.dash-nav .count { margin-left: auto; font-size: .75rem; background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 8px; }
.dash-nav-label { font-size: .75rem; letter-spacing: .12em; color: var(--muted); padding: 16px 12px 6px; }
.dash-main { padding: 32px; min-width: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.dash-head h1 { font-size: 1.6rem; margin: 0; }
.dash-head p { margin: 4px 0 0; color: var(--muted); }
.dash-tabbar { display: none; }
.stat-card .label { color: var(--muted); font-size: .88rem; }
.stat-card .value { font-size: 1.9rem; font-weight: 700; color: var(--ink-2); margin: 4px 0; }
.stat-card .delta { font-size: .82rem; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.panel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.panel-title h2 { font-size: 1.1rem; margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .meta { font-size: .82rem; color: var(--muted); }
.list .grow { flex: 1; min-width: 0; }
.list .grow strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mist); flex-shrink: 0; }
.dot.unread { background: var(--danger); }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-chart .bar i { display: block; width: 100%; max-width: 38px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--mist), var(--ink)); }
.bar-chart .bar span { font-size: .75rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 600; font-size: .82rem; background: #fafbfd; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { height: 40px; max-width: 260px; }
.seg { display: inline-flex; background: #eef1f6; border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: .88rem; color: var(--muted); font-weight: 600; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.file-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.dropzone { border: 2px dashed #c9d5e6; border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); background: #fbfcfe; transition: .15s; }
.dropzone.is-over { border-color: var(--mist); background: var(--mist-soft); }
.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--mist), var(--ink)); border-radius: 8px; }
.bind-item { display: flex; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bind-item:last-child { border-bottom: 0; }
.bind-logo { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; background: #fff; flex-shrink: 0; }
.bind-logo svg { width: 24px; height: 24px; }
.bind-item .grow { flex: 1; min-width: 180px; }
.bind-item .grow strong { display: block; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f6f8fb 37%, #eef1f6 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 對話框與提示 */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 20, 40, .5); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 200; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 440px; padding: 28px; box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.modal h3 { margin-bottom: 8px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.toast-stack { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink-2); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .92rem; animation: pop .16s ease-out; }
.toast.success { background: #17694a; }
.toast.error { background: #9c2f2a; }
.demo-banner { background: #fdf5e8; color: #8a5a12; font-size: .85rem; text-align: center; padding: 8px 16px; border-bottom: 1px solid #f1dfbd; }

/* ---------- 響應式 ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; }
}
@media (max-width: 900px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .dash-main { padding: 20px 16px 96px; }
  .dash-tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .dash-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: .72rem; color: var(--muted); border-radius: 10px; }
  .dash-tabbar a svg { width: 22px; height: 22px; }
  .dash-tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; background: var(--mist-soft); }
}
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; padding-top: 44px; }
  .hero { padding: 56px 0; }
  .cta-band { padding: 32px 24px; }
  .brand img { height: 34px; }
  .otp { gap: 6px; }
  .otp input { height: 52px; font-size: 1.3rem; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* 會員中心兩欄區塊在平板／手機改成單欄 */
@media (max-width: 1100px) { [data-two-col] { grid-template-columns: 1fr !important; } }
.btn-google [data-icon] { display: inline-flex; }
.peek svg { display: block; margin: auto; }
a.card.feature-card:hover { border-color: #c9d5e6; }
.auth-side .side-logo { align-self: flex-start; width: auto; max-width: 180px; object-fit: contain; }
[data-two-col] > *, .grid > * { min-width: 0; }
.toolbar .input { max-width: 100%; flex: 1 1 200px; }
