/* ===========================================================================
   耀興盛科技有限公司 1stSpark — 一頁式官網樣式
   結構：設計變數 → 基礎 → 元件 → 區塊 → RWD
   設計方針：mobile-first；深藍(信任) + 火花橘(品牌) ；資訊密度高但留白足夠。
   =========================================================================== */

/* ---------- 設計變數 ---------- */
:root {
  --navy-900: #071A2F;
  --navy-800: #0A2540;
  --navy-700: #123C63;
  --navy-100: #E8F0F9;

  --spark-600: #E24E0C;
  --spark-500: #FF6B1A;
  --spark-400: #FFB03A;

  /* 按鈕專用漸層：--spark-400 (#FFB03A) 太亮，配白字對比只有 1.82，字會糊掉。
     這組壓深後對比為 3.4～5.2，同時保留橘色調性。
     --spark-400 仍保留給深色底上的圖示與裝飾使用（該情境對比足夠）。 */
  --spark-grad: linear-gradient(135deg, #F2560A, #E24E0C 55%, #C2410C);

  --cyan-500: #00A9E0;

  --ink-900: #0E1726;
  --ink-700: #33415C;
  --ink-500: #5B6B85;
  --ink-300: #9AA7BC;

  --line: #DFE6EF;
  --bg: #FFFFFF;
  --bg-alt: #F5F8FC;

  --ok: #0E8A4F;
  --warn: #B26A00;
  --err: #C62828;

  --line-green: #06C755;      /* LINE 官方品牌色 */
  --line-green-dark: #05A948;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 3px rgba(10, 37, 64, .07), 0 1px 2px rgba(10, 37, 64, .04);
  --shadow: 0 10px 30px rgba(10, 37, 64, .09);
  --shadow-lg: 0 24px 60px rgba(10, 37, 64, .16);

  --container: 1180px;
  --header-h: 64px;

  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "微軟正黑體",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* 錨點捲動時避開固定頁首 */
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* 手機底部快捷列不遮住內容（實測快捷列約 67px，含 iPhone 安全區） */
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

h1, h2, h3, h4 {
  color: var(--navy-900);
  line-height: 1.35;
  margin: 0 0 .6em;
  font-weight: 800;
  letter-spacing: -.01em;
}

p { margin: 0 0 1.1em; }

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--spark-600); }

img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--spark-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 18px;
}
.container--narrow { max-width: 860px; }

.is-hidden { display: none !important; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* 誘餌欄位：對人隱藏、對機器人可見 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--navy-800);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--navy-700); color: #fff; box-shadow: var(--shadow); }

.btn--spark {
  background: var(--spark-grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 26, .32);
}
.btn--spark:hover { color: #fff; box-shadow: 0 10px 26px rgba(255, 107, 26, .45); }

.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--navy-800);
}
.btn--ghost:hover { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

.btn--line {
  background: var(--line-green);
  color: #fff;
  box-shadow: 0 6px 18px rgba(6, 199, 85, .28);
}
.btn--line:hover { background: var(--line-green-dark); color: #fff; box-shadow: 0 10px 26px rgba(6, 199, 85, .4); }

.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--lg { padding: 15px 30px; font-size: 16.5px; }
.btn--block { display: flex; width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* ---------- 小標 ---------- */
.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--spark-600);
}
.eyebrow--center { text-align: center; }

.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }

.section__title {
  font-size: clamp(26px, 4.4vw, 38px);
  text-align: center;
  margin-bottom: .5em;
}
.section__lead {
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
  font-size: 17px;
  color: var(--ink-500);
}
.section__lead strong { color: var(--navy-800); }

/* ---------- 頁首 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar {
  background: var(--navy-900);
  color: #C8D8EA;
  font-size: 13px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.topbar__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar__badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--spark-400);
  box-shadow: 0 0 0 3px rgba(255, 176, 58, .22);
}
.topbar__links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.topbar__tel, .topbar__line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.topbar__tel:hover { color: var(--spark-400); }
.topbar__line { color: #5BE39B; }
.topbar__line:hover { color: var(--line-green); }

/* 手機版頂列空間有限：只留最短路徑的 LINE，電話另有底部快捷列 */
@media (max-width: 575px) {
  .topbar__badge { font-size: 11.5px; }
  .topbar__tel { display: none; }
}

.nav-wrap {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { display: inline-flex; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { font-size: 18px; color: var(--navy-900); font-weight: 800; }
.brand__text small { font-size: 11px; color: var(--ink-500); letter-spacing: .04em; }

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0 9px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__menu {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav__menu.is-open { display: block; }
.nav__menu ul {
  list-style: none;
  margin: 0;
  padding: 10px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* :not(.btn) 是必要的 —— 少了它，這條 (0,1,1) 的後代選擇器會蓋掉
   .btn--primary (0,1,0) 的白字，讓深藍按鈕變成深藍字印深藍底（對比 1.0，完全隱形），
   直到 :hover (0,2,0) 才把顏色救回來。 */
.nav__menu a:not(.btn) {
  display: block;
  padding: 11px 6px;
  font-weight: 600;
  color: var(--navy-800);
  border-bottom: 1px solid var(--bg-alt);
}
.nav__menu .btn { margin-top: 10px; border-bottom: none; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: #DCE7F3;
  padding: 56px 0 64px;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 82% -8%, rgba(255, 107, 26, .30), transparent 62%),
    radial-gradient(800px 520px at 8% 108%, rgba(0, 169, 224, .26), transparent 60%),
    linear-gradient(165deg, var(--navy-900), var(--navy-800) 60%, #0D2E4F);
}
.hero__inner { position: relative; display: grid; gap: 34px; }

.hero .eyebrow { color: var(--spark-400); }

.hero h1 {
  color: #fff;
  font-size: clamp(29px, 6.4vw, 50px);
  line-height: 1.28;
  margin-bottom: .5em;
}
.hero h1 .hl {
  background: linear-gradient(100deg, var(--spark-400), var(--spark-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: 16.5px;
  color: #B9CBDF;
  max-width: 620px;
}
.hero__lead strong { color: #fff; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.hero__cta .btn--ghost { color: #fff; }
.hero__cta .btn--ghost:hover { background: #fff; color: var(--navy-900); border-color: #fff; }

.hero__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: #9FB6CE;
}
.hero__points li { display: flex; align-items: center; gap: 7px; }
.hero__points li::before {
  content: "";
  width: 16px; height: 16px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 176, 58, .18);
  box-shadow: inset 0 0 0 1.5px var(--spark-400);
}

.hero__card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(6px);
}
.hero__card-title { color: #fff; font-size: 19px; margin-bottom: .4em; }
.hero__card-desc { color: #A8BED4; font-size: 14.5px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero__stats dt { font-size: 11.5px; color: #8AA3BD; letter-spacing: .05em; }
.hero__stats dd {
  margin: 4px 0 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

/* ---------- 信任列 ---------- */
.trustbar {
  background: var(--navy-800);
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 18px 0;
}
.trustbar__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.trustbar__grid div { display: flex; flex-direction: column; }
.trustbar__grid strong { color: #fff; font-size: 14.5px; }
.trustbar__grid span { color: #91A9C2; font-size: 12.5px; }

/* ---------- 關於 ---------- */
.about__grid { display: grid; gap: 30px; }
.about__text p { font-size: 16px; }
.about__text strong { color: var(--navy-800); }

.about__facts {
  list-style: none;
  margin: 0;
  padding: 22px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-self: start;
}
.about__facts li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.about__facts li:last-child { border-bottom: none; padding-bottom: 0; }
.about__facts span { font-size: 12.5px; color: var(--ink-500); letter-spacing: .05em; }
.about__facts strong { font-size: 15px; color: var(--navy-900); }

/* ---------- 服務卡 ---------- */
.cards { display: grid; gap: 20px; }

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #C9D8EA;
}
.card--featured { border-color: var(--spark-500); box-shadow: 0 8px 30px rgba(255, 107, 26, .14); }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px; height: 50px;
  margin-bottom: 16px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #fff;
}
.card--featured .card__icon {
  background: linear-gradient(135deg, var(--spark-400), var(--spark-600));
}
.card h3 { font-size: 20px; }
.card p { font-size: 15px; color: var(--ink-500); }
.card p strong { color: var(--navy-800); }

.card__list { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.card__list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 14.5px;
  color: var(--ink-700);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 11px; height: 6px;
  border-left: 2px solid var(--spark-500);
  border-bottom: 2px solid var(--spark-500);
  transform: rotate(-45deg);
}

/* ---------- 申請流程 ---------- */
.process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  counter-reset: proc;
}

.process__step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.process__step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.process__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--spark-400), var(--spark-600));
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(255, 107, 26, .3);
}

.process__step h3 { font-size: 18px; margin-bottom: .4em; }
.process__step p { margin: 0; font-size: 14.5px; color: var(--ink-500); }
.process__step p strong { color: var(--navy-800); }

.process__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

/* ---------- 提示框 ---------- */
.notice {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 auto 32px;
  max-width: 860px;
  font-size: 14.5px;
  line-height: 1.7;
}
.notice--warn {
  background: #FFF7E8;
  border: 1px solid #F3D9A4;
  color: #7A5200;
}
.notice--warn strong { color: var(--warn); }

/* ---------- 資費方案 ---------- */
.plans { display: grid; gap: 18px; }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.plan--hot {
  border: 2px solid var(--spark-500);
  box-shadow: 0 12px 34px rgba(255, 107, 26, .18);
}
.plan__flag {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: linear-gradient(135deg, var(--spark-400), var(--spark-600));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255, 107, 26, .4);
}

.plan__name {
  font-size: 15px;
  color: var(--ink-500);
  font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: .3em;
}
.plan__speed {
  margin: 0 0 .1em;
  font-size: 36px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.1;
}
.plan__speed span { font-size: 15px; color: var(--ink-300); font-weight: 700; }

.plan__price {
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 30px;
  font-weight: 800;
  color: var(--spark-600);
  line-height: 1.2;
}
.plan__price em { font-size: 14px; font-style: normal; color: var(--ink-300); font-weight: 600; }
.plan__price span { font-size: 14px; color: var(--ink-500); font-weight: 600; }

.plan ul { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; }
.plan ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 14.5px;
}
.plan ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 10px; height: 5px;
  border-left: 2px solid var(--cyan-500);
  border-bottom: 2px solid var(--cyan-500);
  transform: rotate(-45deg);
}

.plans__foot {
  max-width: 780px;
  margin: 30px auto 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-500);
}

/* ---------- 服務區域 ---------- */
.area__grid { display: grid; gap: 16px; }
.area__card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--spark-500);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.area__card h3 { font-size: 18px; margin-bottom: .3em; }
.area__card p { margin: 0; font-size: 14.5px; color: var(--ink-500); }
.area__note {
  max-width: 720px;
  margin: 26px auto 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-500);
}

/* ---------- 申裝表單 ---------- */
.section--apply {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #C9D9EA;
}
.section--apply .section__title { color: #fff; }
.section--apply .section__lead { color: #9FB6CE; }
.section--apply .section__lead strong { color: #fff; }

.apply {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 20px 30px;
  box-shadow: var(--shadow-lg);
  color: var(--ink-700);
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-300);
}
.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1.5px solid var(--line);
  font-size: 12px;
}
.steps li.is-done { color: var(--ok); }
.steps li.is-done::before {
  content: "✓";
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.steps li.is-active { color: var(--spark-600); }
.steps li.is-active::before {
  background: var(--spark-500);
  border-color: var(--spark-500);
  color: #fff;
}

.apply__block {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 4px;
  padding: 22px 0 6px;
}
.apply__block:first-of-type { border-top: none; padding-top: 0; }

.apply__block legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-900);
}
.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--spark-400), var(--spark-600));
  color: #fff;
  font-size: 14px;
}

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: 1fr; }

.field { margin-bottom: 16px; }
.field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
}
.field > label em { color: var(--err); font-style: normal; }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px; /* 16px 以避免 iOS Safari 聚焦時自動放大 */
  color: var(--ink-900);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; line-height: 1.6; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235B6B85'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 22px;
  padding-right: 38px;
}
.field select:disabled {
  background-color: var(--bg-alt);
  color: var(--ink-300);
  cursor: not-allowed;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--spark-500);
  box-shadow: 0 0 0 3px rgba(255, 107, 26, .16);
}

.field__hint { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-500); line-height: 1.6; }

.field__err {
  margin: 6px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--err);
  min-height: 0;
}
.field__err:empty { display: none; }

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--err);
  background: #FFF6F6;
}

/* 地址欄：自動帶入的縣市/行政區前綴 */
.addr {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.addr:focus-within {
  border-color: var(--spark-500);
  box-shadow: 0 0 0 3px rgba(255, 107, 26, .16);
}
.addr__prefix {
  display: flex;
  align-items: center;
  flex: none;
  padding: 0 12px;
  background: var(--bg-alt);
  border-right: 1.5px solid var(--line);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy-800);
  white-space: nowrap;
}
.addr input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}
.field.has-error .addr { border-color: var(--err); }

/* 同意條款 */
.field--check { margin-top: 4px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.65;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--spark-500);
  cursor: pointer;
}
.check em { color: var(--err); font-style: normal; }

/* 方案區（依社區動態產生） */
.plan-area { display: grid; gap: 12px; }

.plan-area__empty,
.plan-area__msg {
  margin: 0;
  padding: 22px;
  background: var(--bg-alt);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-500);
}
.plan-area__msg--plan {
  background: #FFF7E8;
  border-color: #F3D9A4;
  border-style: solid;
  color: #7A5200;
  text-align: left;
}
.plan-area__msg--plan strong { color: var(--warn); }

.plan-opt { position: relative; }
.plan-opt input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.plan-opt__box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.plan-opt__box:hover { border-color: #B9CBDF; background: var(--bg-alt); }

.plan-opt input:checked + .plan-opt__box {
  border-color: var(--spark-500);
  background: #FFF6F0;
  box-shadow: 0 0 0 3px rgba(255, 107, 26, .14);
}
.plan-opt input:focus-visible + .plan-opt__box { outline: 3px solid var(--spark-500); outline-offset: 2px; }

.plan-opt__radio {
  flex: none;
  width: 20px; height: 20px;
  border: 2px solid var(--ink-300);
  border-radius: 50%;
  position: relative;
  transition: border-color .15s ease;
}
.plan-opt input:checked + .plan-opt__box .plan-opt__radio { border-color: var(--spark-500); }
.plan-opt input:checked + .plan-opt__box .plan-opt__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--spark-500);
}

.plan-opt__speed {
  flex: none;
  min-width: 74px;
  font-size: 19px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.2;
}
.plan-opt__speed small { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-300); }

.plan-opt__price { margin-left: auto; text-align: right; line-height: 1.35; }
.plan-opt__price b { font-size: 19px; color: var(--spark-600); }
.plan-opt__price span { font-size: 12.5px; color: var(--ink-500); }
.plan-opt__price small { display: block; font-size: 12px; color: var(--ink-300); }

/* 社區狀態標籤 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.tag--ready { background: #E6F6EE; color: var(--ok); }
.tag--plan { background: #FFF3E0; color: var(--warn); }

/* 申請摘要 */
.summary {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 8px 0 20px;
}
.summary h3 { font-size: 16px; margin-bottom: .7em; }
.summary dl { margin: 0; display: grid; gap: 8px; }
.summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.summary dl > div:last-child { border-bottom: none; padding-bottom: 0; }
.summary dt { color: var(--ink-500); flex: none; }
.summary dd { margin: 0; text-align: right; font-weight: 700; color: var(--navy-900); }

.apply__actions { margin-top: 18px; }
.apply__hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-500);
}

.form-msg {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.7;
  display: none;
}
.form-msg.is-ok { display: block; background: #E6F6EE; border: 1px solid #A9DDC3; color: #0B6B3E; }
.form-msg.is-err { display: block; background: #FFF0F0; border: 1px solid #F3B9B9; color: var(--err); }

/* 送出中 */
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::after {
  content: "";
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq details[open] { border-color: #C9D8EA; }
.faq summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  cursor: pointer;
  list-style: none;
  transition: background-color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--bg-alt); }
.faq summary::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-right: 2.5px solid var(--spark-500);
  border-bottom: 2.5px solid var(--spark-500);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.faq details[open] summary::before { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details > div { padding: 0 20px 18px 42px; }
.faq details p { margin: 0 0 .9em; font-size: 15px; color: var(--ink-500); }
.faq details p:last-child { margin-bottom: 0; }
.faq details strong { color: var(--navy-800); }

/* ---------- 聯絡 ---------- */
.contact__grid { display: grid; gap: 16px; }

/* 四張卡刻意共用同一色系：先前深藍／LINE 綠／白色混雜，視覺重心互相打架。
   一致的白底 + 深藍圖示，讓資訊本身而非底色成為區別；
   點擊親和性改由右上角箭頭與 hover 狀態表達。 */
.contact__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.contact__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--spark-500);
}

/* 右上角箭頭：整張卡皆可點擊的視覺提示。
   預設就用品牌橘（而非淺灰），否則卡片在未 hover 時不像可點擊的按鈕。 */
.contact__card::after {
  content: "";
  position: absolute;
  top: 25px; right: 21px;
  width: 11px; height: 11px;
  border-top: 2.5px solid var(--spark-500);
  border-right: 2.5px solid var(--spark-500);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.contact__card:hover::after { transform: rotate(45deg) translate(3px, -3px); }

/* 底部橘色線條：hover 時展開，強化「這是可以按的」 */
.contact__card::before {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 3px;
  border-radius: 0 0 0 var(--radius);
  background: linear-gradient(90deg, var(--spark-400), var(--spark-600));
  transition: width .25s ease;
}
.contact__card:hover::before { width: 100%; }

.contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--navy-100);
  color: var(--navy-700);
  transition: background-color .2s ease, color .2s ease;
}
.contact__card:hover .contact__icon {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #fff;
}

.contact__card h3 { font-size: 14px; color: var(--ink-500); font-weight: 700; margin: 0; }
.contact__card strong { font-size: 19px; color: var(--navy-900); line-height: 1.35; }
.contact__sub { font-size: 13px; color: var(--ink-500); }

/* ---------- 頁尾 ---------- */
.site-footer {
  background: var(--navy-900);
  color: #93A9C2;
  padding: 48px 0 0;
  font-size: 14px;
}
.footer__grid { display: grid; gap: 30px; padding-bottom: 34px; }
.site-footer h3 {
  color: #fff;
  font-size: 15px;
  margin-bottom: .9em;
}
/* 同上：必須排除 .btn，否則頁尾的 LINE／申裝按鈕會變成灰藍字印在綠／橘底上（對比 1.07）。 */
.site-footer a:not(.btn) { color: #93A9C2; }
.site-footer a:not(.btn):hover { color: var(--spark-400); }

.footer__brand .brand__text strong { color: #fff; font-size: 17px; }
.footer__brand .brand__text small { color: #6F87A3; }
.footer__desc { margin: 12px 0; font-size: 13.5px; line-height: 1.8; }
.footer__legal { font-size: 12.5px; color: #6F87A3; line-height: 1.9; margin: 0; }

.footer__nav ul { list-style: none; margin: 0; padding: 0; }
.footer__nav li { margin-bottom: 8px; font-size: 13.5px; }

.footer__contact p { margin: 0 0 10px; font-size: 13.5px; }
.footer__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.footer__tel a {
  font-size: 21px;
  font-weight: 800;
  color: var(--spark-400);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 22px;
  padding-bottom: 26px;
}
.footer__privacy {
  font-size: 12px;
  line-height: 1.9;
  color: #6F87A3;
  margin-bottom: 14px;
}
.footer__privacy strong { color: #93A9C2; }
.footer__copy { margin: 0; font-size: 12.5px; color: #6F87A3; }

/* ---------- 手機底部快捷列 ---------- */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: .8fr .8fr 1.6fr;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(10, 37, 64, .08);
}
.dock__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-800);
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.dock__btn--primary {
  background: var(--spark-grad);
  border-color: transparent;
  color: #fff;
}
.dock__btn--line {
  background: var(--line-green);
  border-color: transparent;
  color: #fff;
}

/* ===========================================================================
   RWD
   =========================================================================== */

/* --- ≥576px --- */
@media (min-width: 576px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .apply { padding: 32px 30px 36px; }
  .trustbar__grid { grid-template-columns: repeat(4, 1fr); }
  .plan-opt__speed { min-width: 90px; }
}

/* --- ≥768px --- */
@media (min-width: 768px) {
  .container { padding-inline: 26px; }
  .section { padding: 88px 0; }
  .hero { padding: 76px 0 84px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .area__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer__contact { grid-column: 2 / -1; }
  .hero__inner { grid-template-columns: 1.5fr 1fr; align-items: center; gap: 44px; }
}

/* --- ≥992px：桌機版導覽，收起漢堡選單、隱藏底部快捷列 --- */
@media (min-width: 992px) {
  body { padding-bottom: 0; }
  .dock { display: none; }

  .nav__toggle { display: none; }
  .nav__menu {
    display: block;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
  }
  .nav__menu ul {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
  }
  /* 同樣排除 .btn：否則會蓋掉 .btn--sm 的內距與圓角 */
  .nav__menu a:not(.btn) {
    padding: 8px 12px;
    font-size: 14.5px;
    border-bottom: none;
    border-radius: 8px;
  }
  .nav__menu a:not(.btn):hover { background: var(--bg-alt); color: var(--spark-600); }
  .nav__menu .btn { margin-top: 0; margin-left: 8px; }

  .about__grid { grid-template-columns: 1.7fr 1fr; gap: 46px; }
  .plans { grid-template-columns: repeat(4, 1fr); }
  .process { grid-template-columns: repeat(4, 1fr); }
  .area__grid { grid-template-columns: repeat(4, 1fr); }
  .contact__grid { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; }
  .footer__contact { grid-column: auto; }
}

/* --- ≥1200px --- */
@media (min-width: 1200px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 50px; }
}

/* ---------- 列印 ---------- */
@media print {
  .site-header, .dock, .hero__cta, .apply__actions, .nav { display: none !important; }
  body { padding-bottom: 0; color: #000; }
  .hero, .section--apply, .site-footer { background: #fff !important; color: #000 !important; }
}
