:root {
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: #17231d;
  background: #f5f7f5;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
body[data-theme="ocean"] { background: #f3f7fb; color: #172431; }
body[data-theme="ocean"] .brand span, body[data-theme="ocean"] .advisor-avatar,
body[data-theme="ocean"] .primary, body[data-theme="ocean"] .bubble.customer { background: #1769aa; }
body[data-theme="ocean"] .eyebrow, body[data-theme="ocean"] .text-button,
body[data-theme="ocean"] .header-actions a { color: #1769aa; }
body[data-theme="warm"] { background: #fff8f2; color: #2d2119; }
body[data-theme="warm"] .brand span, body[data-theme="warm"] .advisor-avatar,
body[data-theme="warm"] .primary, body[data-theme="warm"] .bubble.customer { background: #bd5b20; }
body[data-theme="warm"] .eyebrow, body[data-theme="warm"] .text-button,
body[data-theme="warm"] .header-actions a { color: #a94d18; }
body[data-theme="graphite"] { background: #f4f5f6; color: #20252a; }
body[data-theme="graphite"] .brand span, body[data-theme="graphite"] .advisor-avatar,
body[data-theme="graphite"] .primary, body[data-theme="graphite"] .bubble.customer { background: #343b42; }
body[data-theme="graphite"] .eyebrow, body[data-theme="graphite"] .text-button,
body[data-theme="graphite"] .header-actions a { color: #343b42; }
body[data-layout="compact"] .page-shell { padding-top: 28px; }
body[data-layout="compact"] .hero { margin-bottom: 18px; }
body[data-layout="compact"] .hero h1 { font-size: clamp(30px, 4vw, 44px); }
body[data-layout="compact"] .response-panel { padding: 17px 20px 20px; }
body[data-layout="editorial"] .hero { max-width: 980px; margin-bottom: 42px; }
body[data-layout="editorial"] .hero h1 { font-family: Georgia, "Noto Serif TC", serif; max-width: 850px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.site-header {
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1240px) / 2)); background: rgba(255,255,255,.94);
  border-bottom: 1px solid #e2e8e4; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; color: #16241d; text-decoration: none; font-size: 20px; }
.brand span, .advisor-avatar { display: grid; place-items: center; color: #fff; background: #147747; font-weight: 900; }
.brand img { width: 120px; max-height: 42px; object-fit: contain; background: #fff; }
.advisor-avatar img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.brand span { width: 35px; height: 35px; border-radius: 10px; }
.header-actions { display: flex; gap: 22px; align-items: center; font-size: 13px; }
.header-actions a { color: #146a42; text-decoration: none; font-weight: 800; }
.safe-note { color: #66756d; }
.page-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 80px; }
.hero { max-width: 760px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: #14804f; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.035em; }
.hero > p:not(.eyebrow) { color: #64736b; font-size: 17px; line-height: 1.7; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.trust-row span { padding: 7px 11px; border-radius: 999px; color: #176a43; background: #e7f4ec; font-size: 12px; font-weight: 800; }
.consult-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); gap: 22px; align-items: start; }
.conversation-card, .estimate-card { border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 12px 45px rgba(25,45,35,.06); }
.conversation-card { overflow: hidden; }
.conversation-header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid #e8eeea; }
.advisor-avatar { width: 42px; height: 42px; border-radius: 13px; }
.conversation-header h2 { margin: 0; font-size: 16px; }
.conversation-header p { margin: 4px 0 0; color: #748179; font-size: 12px; }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #25a868; }
.text-button { margin-left: auto; border: 0; background: none; color: #147747; font-size: 12px; font-weight: 800; }
.thread { min-height: 180px; max-height: 440px; overflow: auto; padding: 24px; background: linear-gradient(180deg,#fbfcfb,#f7faf8); }
.bubble { width: fit-content; max-width: 78%; margin: 0 0 13px; padding: 12px 15px; border-radius: 15px; line-height: 1.55; font-size: 14px; }
.bubble p { margin: 0; }
.bubble.advisor { border: 1px solid #e0e9e3; border-bottom-left-radius: 4px; background: #fff; }
.bubble.customer { margin-left: auto; border-bottom-right-radius: 4px; color: #fff; background: #177849; }
.response-panel { padding: 22px 24px 26px; border-top: 1px solid #e8eeea; }
.response-panel > label, .step-label { display: block; margin: 0 0 12px; color: #34453c; font-size: 14px; font-weight: 800; }
textarea, input, select { width: 100%; border: 1px solid #cbd7d0; border-radius: 10px; padding: 11px 12px; color: #17231d; background: #fff; }
textarea:focus, input:focus, select:focus { outline: 3px solid rgba(20,128,79,.14); border-color: #14804f; }
.response-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 13px; }
.primary, .secondary { border-radius: 10px; padding: 11px 17px; font-weight: 900; }
.primary { border: 1px solid #147747; color: #fff; background: #147747; }
.primary:hover { background: #0f5f38; }
.primary:disabled { opacity: .5; cursor: wait; }
.secondary { border: 1px solid #ced9d3; color: #44534b; background: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.product-option { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid #dce5df; border-radius: 12px; text-align: left; background: #fff; }
.product-option:hover { border-color: #2b9562; background: #f1f9f5; }
.product-icon { display: grid; place-items: center; min-width: 42px; height: 42px; border-radius: 12px; color: #147747; background: #e5f4eb; font-weight: 900; }
.product-option strong { display: block; font-size: 14px; }
.product-option small { display: block; margin-top: 4px; color: #7a867f; }
.candidate-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.candidate-summary span { padding: 7px 10px; border-radius: 8px; background: #eef6f2; color: #285c43; font-size: 12px; font-weight: 800; }
.progress-track { height: 5px; margin-bottom: 19px; border-radius: 9px; background: #e7ece9; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: #20a263; transition: width .25s ease; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.choice-button { border: 1px solid #d3ded8; border-radius: 10px; padding: 12px; color: #33443b; background: #fff; font-weight: 800; }
.choice-button:hover { border-color: #168453; color: #11683f; background: #edf8f2; }
.number-answer { display: grid; grid-template-columns: 1fr auto auto; gap: 9px; align-items: center; }
.number-answer span { color: #64736b; font-weight: 800; }
.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 7px; color: #3e4d45; font-size: 13px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.consent { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 600 !important; line-height: 1.5; }
.consent input { width: auto; margin-top: 3px; }
.upload-field { padding: 14px; border: 1px dashed #9db9a9; border-radius: 10px; background: #f3f9f6; }
.form-message { min-height: 20px; margin: 0; color: #a03b34; font-size: 13px; }
.wide { width: 100%; }
.estimate-card { position: sticky; top: 92px; padding: 22px; }
.estimate-heading { display: flex; justify-content: space-between; align-items: start; padding-bottom: 18px; border-bottom: 1px solid #e4ebe7; }
.estimate-heading h2 { margin: 0; font-size: 21px; }
.estimate-status { padding: 5px 8px; border-radius: 999px; color: #6d7a73; background: #edf1ef; font-size: 10px; font-weight: 900; }
.estimate-status.ready { color: #11693f; background: #e4f5eb; }
.selected-product { display: flex; gap: 12px; align-items: center; padding: 18px 0; }
.selected-product .placeholder-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #14804f; background: #e6f4ec; font-weight: 900; }
.selected-product strong { font-size: 14px; }
.selected-product p { margin: 4px 0 0; color: #77847c; font-size: 12px; }
.answer-summary { display: grid; gap: 7px; margin: 0; }
.answer-summary div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.answer-summary dt { color: #78847d; }
.answer-summary dd { margin: 0; font-weight: 800; text-align: right; }
.price-block { margin: 20px 0 14px; padding: 18px; border-radius: 14px; color: #fff; background: #172a21; }
.price-block span, .price-block small { display: block; color: #c8d9cf; font-size: 11px; }
.price-block strong { display: block; margin: 6px 0; font-size: 30px; }
.estimate-breakdown { display: grid; gap: 8px; font-size: 12px; }
.estimate-breakdown div { display: flex; justify-content: space-between; }
.estimate-notice { margin-top: 18px; padding: 13px; border-radius: 10px; background: #fff7df; color: #765d13; font-size: 11px; line-height: 1.55; }
.estimate-notice p { margin: 5px 0 0; }
.success-card { padding: 20px; border-radius: 14px; text-align: center; color: #176640; background: #e8f7ee; }
.status-link { display: inline-flex; margin-top: 12px; text-decoration: none; }
.status-shell { max-width: 760px; }
.status-card { border: 1px solid #dfe7e2; border-radius: 20px; padding: 28px; background: #fff; box-shadow: 0 12px 45px rgba(25,45,35,.06); }
.status-card h1 { margin: 0 0 14px; font-size: clamp(28px, 5vw, 42px); }
.status-pill { display: inline-flex; margin-bottom: 18px; border-radius: 999px; padding: 7px 11px; color: #176640; background: #e4f5eb; font-size: 12px; font-weight: 900; }
.status-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.status-summary div { padding: 13px; border-radius: 10px; background: #f4f7f5; }
.status-summary small { display: block; margin-bottom: 6px; color: #708078; font-weight: 800; }
.status-summary strong { display: block; overflow-wrap: anywhere; }
.status-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e4ebe7; }
.status-section h2 { margin: 0 0 8px; font-size: 18px; }
.preflight-checks { display: grid; gap: 8px; margin-top: 12px; }
.preflight-check { margin: 0; padding: 10px 12px; border-radius: 9px; background: #f7faf8; color: #394a41; }
.preflight-check.passed { border-left: 4px solid #25a668; }
.preflight-check.warning { border-left: 4px solid #d48a10; }
.preflight-check.failed { border-left: 4px solid #bd3d35; }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.lookup-form { display: grid; gap: 14px; margin-top: 18px; }
.lookup-form label { display: grid; gap: 7px; color: #3e4d45; font-size: 13px; font-weight: 800; }
.lookup-list { display: grid; gap: 10px; margin-top: 12px; }
.lookup-item {
  display: grid; gap: 7px; width: 100%; padding: 14px; border: 1px solid #dce5df;
  border-radius: 10px; text-align: left; color: #17231d; background: #fff;
}
.lookup-item:hover { border-color: #2b9562; background: #f5fbf8; }
.lookup-item .status-pill { width: fit-content; margin: 0; }
.lookup-item small { color: #6e7d75; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .consult-layout { grid-template-columns: 1fr; }
  .estimate-card { position: static; order: -1; }
  .safe-note { display: none; }
}
@media (max-width: 600px) {
  .page-shell { width: min(100% - 24px, 1240px); padding-top: 30px; }
  .site-header { height: 62px; padding: 0 14px; }
  .brand { min-width: 0; font-size: 16px; }
  .brand img { width: 96px; max-height: 34px; }
  .header-actions { gap: 12px; min-width: 0; justify-content: flex-end; }
  .header-actions a { font-size: 11px; }
  .product-grid, .choice-grid, .form-grid { grid-template-columns: 1fr; }
  .bubble { max-width: 92%; }
  .hero h1 { font-size: 36px; }
  .status-summary { grid-template-columns: 1fr; }
  .status-actions { display: grid; }
}
