/* 貝貝鑫科技官網 — 風格 A 溫暖專業 */
:root {
  --bg: #FAF7F2;
  --bg-2: #F3EEE5;
  --surface: #FFFFFF;
  --ink: #10302A;
  --ink-2: #3F524C;
  --muted: #5C6B65;
  --line: #E7E0D3;
  --line-2: #D9D0BF;
  --brand: #0F6E56;
  --brand-600: #0B5D49;
  --brand-700: #085041;
  --brand-50: #E7F4EF;
  --brand-100: #CDEBDF;
  --gold: #EF9F27;
  --gold-50: #FDF1DC;
  --gold-700: #8A5208;
  --coral: #F0997B;
  --mint: #5DCAA5;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 48, 42, .04), 0 10px 30px rgba(16, 48, 42, .07);
  --font: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --maxw: 1120px;
  --gutter: 24px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 84px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(16, 48, 42, .05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; }
.brand-sub { font-size: .68rem; color: var(--muted); letter-spacing: .08em; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a.nav-cta { background: var(--brand); color: #fff; margin-left: 6px; }
.nav a.nav-cta:hover { background: var(--brand-700); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Buttons / badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink-2); }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; letter-spacing: .04em; white-space: nowrap; }
.badge-teal { background: var(--brand-50); color: var(--brand-700); }
.badge-gold { background: var(--gold-50); color: var(--gold-700); }
.badge-gray { background: var(--bg-2); color: var(--ink-2); }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.eyebrow { display: inline-block; color: var(--brand); font-weight: 700; font-size: .85rem; letter-spacing: .16em; margin-bottom: 12px; }
.lead { font-size: 1.12rem; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.section-alt .card { background: var(--bg); }
.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 20px; }
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.gold { background: var(--gold-50); color: var(--gold-700); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding: 0; list-style: none; }
.tags li { font-size: .78rem; color: var(--ink-2); background: var(--bg-2); border-radius: 999px; padding: 2px 10px; }
.section-alt .tags li { background: var(--surface); border: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 88px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--brand); }
.hero .lead { max-width: 34em; margin-bottom: 32px; }
.hero-pillars { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 36px; padding: 0; list-style: none; color: var(--ink-2); font-size: .92rem; }
.hero-pillars li { display: flex; align-items: center; gap: 8px; }
.hero-pillars svg { width: 18px; height: 18px; color: var(--brand); }
.hero-art { position: relative; width: 100%; max-width: 540px; justify-self: end; }
.hero-art svg { width: 100%; height: auto; overflow: visible; }
.float-a { animation: floatY 7s ease-in-out infinite; }
.float-b { animation: floatY 8s ease-in-out -2s infinite; }
.float-c { animation: floatY 6s ease-in-out -4s infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 56px; counter-reset: step; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.process li { list-style: none; padding: 24px; border-left: 1px solid var(--line); }
.process li:first-child { border-left: 0; }
.process .num { font-size: .8rem; font-weight: 700; color: var(--gold-700); letter-spacing: .1em; }
.process h3 { font-size: 1.05rem; margin: 6px 0 4px; }
.process p { font-size: .9rem; color: var(--muted); margin: 0; }
.process-wrap h3.process-title { font-size: 1.1rem; margin-top: 64px; }

/* ---------- Works ---------- */
.work-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-visual { position: relative; aspect-ratio: 16 / 10; background: var(--brand-50); display: grid; place-items: center; overflow: hidden; }
.work-visual.game { background: radial-gradient(circle at 50% 40%, #EAF6F0 0%, #D3EDE2 60%, #C3E5D7 100%); }
.work-visual.game img { width: 92%; height: auto; margin-top: 4%; }
.work-visual.clinic { background: var(--bg-2); padding: 24px; }
.work-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.work-body .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.work-body h3 { font-size: 1.35rem; margin-bottom: 8px; }
.work-body p { color: var(--ink-2); }
.work-body .more { margin-top: auto; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.work-body .more svg { width: 18px; height: 18px; transition: transform .2s; }
.work-card:hover .more svg { transform: translateX(4px); }
.check-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: .95rem; line-height: 1.6; }
.check-list li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--brand-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.6' fill='none' stroke='%230F6E56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }

/* Clinic mock UI (示意畫面) */
.mock { width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; font-size: 12px; line-height: 1.4; box-shadow: var(--shadow); text-align: left; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.mock-bar span:nth-child(1) { background: var(--coral); }
.mock-bar span:nth-child(2) { background: var(--gold); }
.mock-bar span:nth-child(3) { background: var(--mint); }
.mock-bar em { font-style: normal; color: var(--muted); margin-left: 8px; font-size: 11px; }
.mock-body { display: grid; grid-template-columns: 30% 1fr; }
.mock-side { padding: 10px 8px; border-right: 1px solid var(--line); background: #FCFBF8; display: grid; gap: 3px; align-content: start; }
.mock-side div { padding: 6px 8px; border-radius: 7px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-side div.on { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.mock-main { padding: 12px; min-width: 0; }
.mock-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.mock-title b { font-weight: 700; font-size: 10px; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 8px; }
.mock-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 6px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.mock-row .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.mock-row .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row .who small { color: var(--muted); margin-left: 4px; font-size: 10px; }
.chip { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.chip.ok { background: var(--brand-50); color: var(--brand-700); }
.chip.wait { background: var(--bg-2); color: var(--ink-2); }
.chip.paid { background: var(--gold-50); color: var(--gold-700); }
.mock-caption { font-size: .78rem; color: var(--muted); text-align: center; margin-top: 10px; }

/* ---------- R&D ---------- */
.rd-feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 40px; }
.section-alt .rd-feature { background: var(--bg); }
.rd-visual { background: var(--brand-50); border-radius: 18px; aspect-ratio: 5 / 4; display: grid; place-items: center; padding: 24px; }
.rd-visual svg { width: 100%; max-width: 360px; height: auto; }
.rd-feature h3 { font-size: 1.6rem; margin-bottom: 4px; }
.rd-feature .sub { color: var(--brand); font-weight: 700; margin-bottom: 16px; }
.note { font-size: .85rem; color: var(--muted); background: var(--bg-2); border-radius: 12px; padding: 12px 16px; margin: 20px 0 24px; line-height: 1.7; }
.section-alt .note { background: var(--surface); border: 1px solid var(--line); }
.rd-more { margin-top: 24px; }
.cap-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.cap { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.section-alt .cap { background: var(--bg); }
.cap .icon-tile { width: 42px; height: 42px; margin: 0; flex: none; border-radius: 12px; }
.cap .icon-tile svg { width: 22px; height: 22px; }
.cap h4 { margin: 0 0 2px; font-size: 1rem; }
.cap p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.65; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.about-story p { color: var(--ink-2); font-size: 1.05rem; }
.name-note { display: flex; gap: 16px; align-items: flex-start; background: var(--gold-50); border-radius: 16px; padding: 20px 22px; margin-top: 28px; }
.name-note img { width: 44px; height: 44px; flex: none; }
.name-note p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.name-note strong { color: var(--ink); }
.values { display: grid; gap: 14px; margin-top: 28px; }
.value { display: flex; gap: 14px; }
.value .icon-tile { width: 40px; height: 40px; margin: 0; flex: none; border-radius: 12px; }
.value .icon-tile svg { width: 20px; height: 20px; }
.value h4 { margin: 0; font-size: 1rem; }
.value p { margin: 0; font-size: .9rem; color: var(--muted); }
.info-card h3 { font-size: 1.05rem; margin-bottom: 16px; }
.info-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.info-table th, .info-table td { text-align: left; padding: 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.info-table tr:first-child th, .info-table tr:first-child td { border-top: 0; }
.info-table th { width: 7.5em; color: var(--muted); font-weight: 500; }
.info-table td { font-weight: 500; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; align-items: start; }
.contact-side p { color: var(--ink-2); }
.contact-ways { display: grid; gap: 12px; margin-top: 28px; }
.contact-way { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; color: var(--ink); }
a.contact-way:hover { border-color: var(--brand); color: var(--ink); }
.contact-way .icon-tile { width: 42px; height: 42px; margin: 0; border-radius: 12px; flex: none; }
.contact-way .icon-tile svg { width: 22px; height: 22px; }
.contact-way .label { font-size: .8rem; color: var(--muted); display: block; line-height: 1.4; }
.contact-way .value { font-weight: 700; display: block; line-height: 1.5; word-break: break-all; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .92rem; }
.field label .req { color: #B4472A; margin-left: 2px; }
.field label .opt { color: var(--muted); font-weight: 400; font-size: .82rem; margin-left: 4px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; width: 100%;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%233F524C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(15, 110, 86, .12); }
.field .err { color: #B4472A; font-size: .82rem; min-height: 0; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #C8553D; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.consent input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--brand); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.form-status { font-size: .95rem; border-radius: 12px; padding: 12px 16px; margin-top: 18px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: var(--brand-50); color: var(--brand-700); }
.form-status.fail { background: #FBEBE6; color: #8E3A22; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Page (sub pages) ---------- */
.page-hero { padding: 48px 0 56px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--muted); margin-bottom: 24px; padding: 0; list-style: none; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.page-hero .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.page-hero .lead { max-width: 40em; }
.page-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.page-visual { border-radius: 24px; background: var(--brand-50); padding: 28px; display: grid; place-items: center; }
.page-visual.game { background: radial-gradient(circle at 50% 40%, #EAF6F0 0%, #D3EDE2 60%, #C3E5D7 100%); padding: 16px; }
.page-visual.clinic { background: var(--bg-2); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 24px 0 0; padding: 0; list-style: none; }
.facts li { font-size: .92rem; color: var(--ink-2); }
.facts strong { display: block; color: var(--ink); font-size: 1rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.section-alt .feature { background: var(--bg); }
.feature h3 { font-size: 1.08rem; margin-bottom: 6px; }
.feature p { font-size: .93rem; color: var(--ink-2); margin: 0; }
.feature .icon-tile { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px; }
.feature .icon-tile svg { width: 22px; height: 22px; }
.pain-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pain { display: flex; gap: 14px; padding: 20px; border-radius: 16px; background: var(--bg-2); }
.pain .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--gold-700); font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.pain h3 { font-size: 1rem; margin: 2px 0 2px; }
.pain p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { position: relative; padding: 28px 24px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.section-alt .steps li { background: var(--bg); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: -16px; left: 24px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps h3 { font-size: 1.05rem; margin: 4px 0 6px; }
.steps p { margin: 0; font-size: .93rem; color: var(--ink-2); }
.tech-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.tech-list li { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .92rem; font-weight: 500; color: var(--ink-2); }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px 14px; text-align: center; }
.gallery img { height: 150px; width: auto; max-width: 100%; margin: 0 auto 12px; object-fit: contain; }
.gallery figcaption { font-weight: 700; font-size: .95rem; }
.gallery figcaption span { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 40px; border-radius: 24px; background: var(--brand); color: #fff; }
.callout h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 6px; }
.callout p { margin: 0; color: #D7EFE6; }
.callout .btn-primary { background: #fff; color: var(--brand-700); }
.callout .btn-primary:hover { background: var(--gold-50); color: var(--brand-700); }
.warn-box { display: flex; gap: 16px; padding: 24px; border-radius: 18px; background: var(--gold-50); }
.warn-box .icon-tile { flex: none; margin: 0; background: var(--surface); color: var(--gold-700); width: 44px; height: 44px; border-radius: 12px; }
.warn-box h3 { font-size: 1.05rem; margin-bottom: 4px; }
.warn-box p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* Long-form text (privacy, support) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.08rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose .updated { color: var(--muted); font-size: .9rem; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 0 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9D6D1; padding: 56px 0 32px; margin-top: 0; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand .mark { width: 44px; height: 44px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; }
.footer-brand .mark img { width: 32px; height: 32px; }
.footer-brand strong { color: #fff; display: block; letter-spacing: .06em; }
.footer-brand span { font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: #C9D6D1; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; font-size: .85rem; color: #93A8A1; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .code { font-size: 5rem; font-weight: 700; color: var(--brand); line-height: 1; letter-spacing: .05em; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float-a, .float-b, .float-c { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .work-card, .work-card:hover { transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process li:nth-child(3) { border-left: 0; }
  .process li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cap-list { grid-template-columns: 1fr; }
  .rd-feature { grid-template-columns: 1fr; padding: 28px; }
  .about, .contact { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(16, 48, 42, .08); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px var(--gutter) 20px; }
  .nav a { padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
  .nav a.nav-cta { margin: 8px 0 0; text-align: center; }
  .hero-inner, .page-split { grid-template-columns: 1fr; }
  .hero-art { justify-self: center; max-width: 420px; margin-top: 8px; }
  .hero { padding-top: 40px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 15.5px; }
  .section { padding: 72px 0; }
  .grid-3, .grid-2, .feature-grid, .pain-list { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .process li { border-left: 0; border-top: 1px solid var(--line); }
  .process li:first-child { border-top: 0; }
  .form { padding: 24px 20px; border-radius: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .card, .work-body { padding: 22px; }
  .rd-feature { padding: 20px; border-radius: 20px; }
  .callout { padding: 28px 24px; }
  .brand-sub { display: none; }
  .hero-art { max-width: 320px; }
  .work-visual.clinic { padding: 16px; }
  .form-foot .btn { width: 100%; }
}

/* ---------- 需求評估精靈 (/start/) ---------- */
.wizard { max-width: 860px; margin: 0 auto; }
.wz-draft { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; background: var(--gold-50); color: var(--gold-700); border-radius: 14px; padding: 12px 18px; margin-bottom: 16px; font-size: .92rem; }
.wz-draft button { font: inherit; font-weight: 700; color: var(--gold-700); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0; }
.wz-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: .9rem; color: var(--muted); }
.wz-bar { flex: 1; height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.wz-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .35s ease; }
.wz-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 40px; box-shadow: var(--shadow); }
.wz-card h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 6px; outline: none; }
.wz-lead { color: var(--ink-2); margin: 0; }
.q { border: 0; padding: 0; margin: 32px 0 0; min-width: 0; }
.q[hidden] { display: none; }
.q legend { float: left; width: 100%; font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.q legend + * { clear: both; }
.q legend.sr-only { float: none; width: 1px; margin: -1px; }
.q .hint { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 8px; }
.q.sub { margin-top: 24px; padding: 18px 20px 20px; border-left: 3px solid var(--brand-100); background: var(--bg); border-radius: 0 14px 14px 0; }
.q.sub .sub-tag { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--brand); background: var(--brand-50); border-radius: 999px; padding: 1px 10px; margin-bottom: 8px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.opts.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-box { display: flex; gap: 12px; align-items: flex-start; height: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
.q.sub .opt-box { background: var(--surface); }
.opt-box::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border: 2px solid var(--line-2); border-radius: 50%; background: #fff; transition: all .15s; }
.choice.multi .opt-box::before { border-radius: 6px; }
.choice:hover .opt-box { border-color: var(--line-2); }
.choice input:focus-visible + .opt-box { outline: 3px solid var(--gold); outline-offset: 2px; }
.choice input:checked + .opt-box { border-color: var(--brand); background: var(--brand-50); }
.choice input:checked + .opt-box::before { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3L14.5 7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.opt-text { display: block; min-width: 0; }
.opt-label { display: block; font-weight: 700; line-height: 1.5; }
.opt-desc { display: block; font-size: .86rem; color: var(--ink-2); margin-top: 2px; line-height: 1.6; }
.opt-meta { display: grid; gap: 3px; margin-top: 10px; font-size: .82rem; line-height: 1.55; }
.opt-meta span { color: var(--ink-2); }
.opt-meta b { display: inline-block; font-size: .72rem; border-radius: 6px; padding: 0 6px; margin-right: 6px; }
.opt-meta .m-fit b { background: var(--brand-50); color: var(--brand-700); }
.opt-meta .m-note b { background: var(--gold-50); color: var(--gold-700); }
.choice input:checked + .opt-box .opt-meta .m-fit b { background: #fff; }
.other-wrap { margin-top: 12px; }
.other-wrap[hidden] { display: none; }
.other-wrap label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: 6px; }
.wz-input, .wz-textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; width: 100%; }
.wz-textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.wz-input:focus, .wz-textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(15, 110, 86, .12); }
.wz-err { color: #B4472A; font-size: .85rem; margin-top: 8px; min-height: 0; }
.wz-err:empty { display: none; }
.wz-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.wz-nav .spacer { flex: 1; }
.sum-group { padding: 18px 0; border-top: 1px solid var(--line); }
.sum-group:first-of-type { border-top: 0; padding-top: 4px; }
.sum-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sum-head h3 { font-size: 1rem; margin: 0; }
.sum-edit { font: inherit; font-size: .85rem; font-weight: 700; color: var(--brand); background: none; border: 0; cursor: pointer; padding: 0; white-space: nowrap; }
.sum-edit:hover { text-decoration: underline; }
.sum-list { display: grid; grid-template-columns: 8em 1fr; gap: 6px 16px; margin: 0; font-size: .95rem; }
.sum-list dt { color: var(--muted); }
.sum-list dd { margin: 0; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.reco { display: flex; gap: 14px; background: var(--gold-50); border-radius: 16px; padding: 20px 22px; margin: 8px 0 8px; }
.reco .icon-tile { flex: none; margin: 0; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--gold-700); }
.reco .icon-tile svg { width: 20px; height: 20px; }
.reco h3 { font-size: 1rem; margin: 0 0 4px; }
.reco p { margin: 0 0 4px; color: var(--ink-2); font-size: .93rem; }
.reco ul { margin: 6px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: .9rem; }
.reco small { display: block; color: var(--muted); margin-top: 8px; }
.wz-section-title { font-size: 1.15rem; margin: 36px 0 4px; }
.wz-done { text-align: center; padding: 8px 0 24px; }
.wz-done .icon-tile { margin: 0 auto 16px; width: 64px; height: 64px; border-radius: 50%; }
.wz-done .icon-tile svg { width: 32px; height: 32px; }
.wz-done .btn-row { justify-content: center; margin-top: 20px; }
.print-only { display: none; }
.wizard-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 22px; border-radius: 16px; background: var(--brand-50); margin-top: 24px; }
.wizard-entry p { margin: 0; color: var(--brand-700); font-weight: 500; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 700; text-decoration: none; }
.card-link svg { width: 18px; height: 18px; }

@media (max-width: 640px) {
  .wz-card { padding: 24px 18px; border-radius: 20px; }
  .opts, .opts.wide { grid-template-columns: 1fr; }
  .q.sub { padding: 16px 14px 2px; }
  .sum-list { grid-template-columns: 1fr; gap: 0; }
  .sum-list dd { margin-bottom: 8px; }
  .wz-nav .btn { padding: 12px 18px; }
}

@media print {
  .site-header, .site-footer, .skip-link, .no-print, .wz-nav, .wz-progress, .wz-draft, .page-hero .btn-row { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .page-hero { padding: 0 0 12px; }
  .section { padding: 0; }
  .wz-card { border: 0; box-shadow: none; padding: 0; }
  .print-only { display: block; }
  .reco { border: 1px solid #ddd; }
  a { color: inherit; text-decoration: none; }
}
