:root {
  --bg: #f4f2ee;
  --panel: #fffdf9;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #12395b;
  --brand-2: #1e5a8a;
  --accent: #f26a21;
  --accent-soft: #fff0e4;
  --ok: #15803d;
  --warn: #b45309;
  --border: #e7e2d6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }

header.site {
  background: linear-gradient(110deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  padding: 16px 24px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 2px 12px rgba(15,23,42,.08);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; gap: 16px; flex-wrap: wrap; }
header.site h1 { font-size: 19px; margin: 0; letter-spacing: .3px; font-weight: 800; }
header.site nav { display: flex; flex-wrap: wrap; gap: 2px 4px; }
header.site nav a {
  color: #fff; opacity: .78; padding: 6px 10px; border-radius: 8px;
  font-size: 14px; font-weight: 500; transition: background .15s, opacity .15s;
}
header.site nav a.active { background: rgba(255,255,255,.15); opacity: 1; }
header.site nav a:hover { opacity: 1; text-decoration: none; background: rgba(255,255,255,.1); }

.disclaimer-bar { background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #7c2d12; font-size: 13px; }
.disclaimer-bar .wrap { max-width: 1200px; margin: 0 auto; padding: 8px 24px; line-height: 1.5; }

main.wrap { max-width: 1200px; margin: 0 auto; padding: 20px; }

.hero {
  position: relative;
  padding: 56px 32px 48px;
  margin: 20px 0 8px;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 57, 91, .88) 0%, rgba(30, 90, 138, .82) 45%, rgba(242, 106, 33, .6) 100%),
    url("/images/hero-hk.jpg") center / cover no-repeat;
  color: #fff;
  box-shadow: var(--shadow);
}
.hero h2 { margin: 0 0 10px; font-size: 34px; font-weight: 900; letter-spacing: .3px; color: #fff; line-height: 1.2; }
.hero p { margin: 0; color: rgba(255,255,255,.85); font-size: 16px; }
@media (max-width: 640px) {
  .hero { padding: 40px 22px 32px; }
  .hero h2 { font-size: 26px; }
}

.layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }

.filters, .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.filters {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.filters-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  text-align: left;
}
.filters-toggle::after { content: "▾"; float: right; transition: transform .2s; }
.filters-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
@media (max-width: 820px) {
  .filters-toggle { display: block; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
}
.filters h3 { margin: 0 0 10px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.filter-group { margin-bottom: 18px; }
.filter-group label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 13px; cursor: pointer; user-select: none; background: #fff;
  color: var(--text); font: inherit; line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s;
  min-height: 32px;
}
.chip:hover { border-color: var(--brand); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip small { color: inherit; opacity: .7; margin-left: 4px; font-size: 12px; }

.range-wrap { display: flex; align-items: center; gap: 8px; }
.range-wrap input[type=number] { width: 70px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; }
.range-wrap input[type=range] { flex: 1; }

.results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.results-head .count { color: var(--muted); font-size: 14px; }
.results-head select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
  color: inherit; text-decoration: none;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,23,42,.08); border-color: rgba(18,57,91,.35); text-decoration: none; }
.card .provider-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card .logo { width: 68px; height: 68px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border); padding: 6px; flex-shrink: 0; }
.card .logo img { max-width: 100%; max-height: 100%; display: block; }
.card .title { font-weight: 800; font-size: 17px; line-height: 1.3; color: var(--text); overflow-wrap: break-word; }
.card .rep-badge { display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; font-size: 12px; color: #334155; background: #eef2f6; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.card .summary { color: #475569; font-size: 14px; line-height: 1.55; white-space: pre-line; min-height: 3.1em; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; background: #eef4fb; color: var(--brand);
  padding: 3px 8px; border-radius: 999px;
}
.tag.warn { background: #fff0e6; color: var(--warn); }
.card .price-row { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.price { font-size: 28px; font-weight: 900; color: var(--accent); letter-spacing: -0.5px; line-height: 1; }
.price small { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 4px; }
.card .cta {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; color: var(--brand); padding: 8px 14px;
  border-radius: 10px; font-weight: 700; font-size: 13px;
  border: 1px solid var(--brand);
  transition: background .15s, color .15s;
}
.card:hover .cta { background: var(--brand); color: #fff; }

/* Skeleton card */
.skeleton-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 240px;
}
.skeleton-card .bar { background: linear-gradient(90deg, #eef2f6 0%, #f8fafc 50%, #eef2f6 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
.skeleton-card .bar.h1 { width: 60%; height: 14px; }
.skeleton-card .bar.h2 { width: 80%; height: 18px; }
.skeleton-card .bar.h3 { width: 100%; height: 14px; }
.skeleton-card .bar.h4 { width: 50%; height: 26px; margin-top: auto; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pager button { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.pager button[disabled] { opacity: .4; cursor: not-allowed; }

.breadcrumb { margin: 10px 0 14px; font-size: 13px; }
.breadcrumb a { color: var(--muted); }
.post-detail { display: grid; grid-template-columns: 1fr 320px; gap: 22px; margin-top: 16px; }
@media (max-width: 820px) { .post-detail { grid-template-columns: 1fr; } }
.post-detail .hero-image { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.post-detail .post-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.post-detail .logo-lg { width: 96px; height: 96px; border: 1px solid var(--border); border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 10px; flex-shrink: 0; }
.post-detail .logo-lg img { max-width: 100%; max-height: 100%; }
.post-detail .post-title { font-size: 28px; margin: 4px 0 4px; font-weight: 900; line-height: 1.25; color: var(--text); }
.post-detail .price-hero { display: inline-flex; align-items: baseline; gap: 2px; margin-top: 6px; font-size: 15px; color: var(--muted); }
.post-detail .price-hero strong { font-size: 30px; color: var(--accent); font-weight: 900; margin: 0 4px; letter-spacing: -0.5px; }
.post-detail .price-hero span { font-size: 13px; color: var(--muted); margin-left: 2px; }
.post-detail .summary { color: #334155; line-height: 1.65; white-space: pre-line; margin-bottom: 12px; font-size: 15px; }
.post-detail .body { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; white-space: pre-wrap; line-height: 1.75; box-shadow: var(--shadow); font-size: 15px; }

.trust-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: #f1f5f9; color: #334155; font-weight: 600;
}
.trust-badge.ok { background: #dcfce7; color: #15803d; }
.trust-badge.warn { background: #fef3c7; color: #92400e; }

.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  display: none; gap: 10px; padding: 10px 12px 14px;
  background: rgba(255,253,249,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(15,23,42,.08);
}
.mobile-cta a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px; border-radius: 12px; font-weight: 800; font-size: 16px;
  color: #fff; text-decoration: none; min-height: 52px;
}
.mobile-cta .phone { background: var(--accent); }
.mobile-cta .wa { background: #25d366; }
@media (max-width: 820px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 80px; }
  #floating-cta { display: none; } /* don't double-stack */
}
.rep-card { position: sticky; top: 16px; }
.rep-card h3 { margin: 0 0 8px; }
.rep-card .contact { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rep-card .contact a {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600;
  padding: 10px 12px; border-radius: 8px; background: #eef4fb; color: var(--brand);
}
.rep-card .contact a.wa { background: #e2f5df; color: #1f7a37; }
.rep-card .contact a.tg { background: #e0f1fb; color: #0088cc; }
.rep-card .contact a.phone { background: #fff0e6; color: var(--warn); }

.login-wrap { max-width: 420px; margin: 60px auto; }
form.panel label { display: block; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
form.panel input[type=text], form.panel input[type=password], form.panel input[type=email], form.panel textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; margin-top: 4px;
}
form.panel textarea { min-height: 120px; resize: vertical; }
button.primary { background: var(--brand); color: #fff; border: 0; padding: 10px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; }
button.ghost { background: #fff; border: 1px solid var(--border); padding: 10px 16px; border-radius: 8px; cursor: pointer; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: #c0392b; font-size: 14px; margin: 8px 0; }
.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }

footer.site { text-align: center; padding: 30px 80px 100px; color: var(--muted); font-size: 13px; }

#floating-cta {
  position: fixed; right: 16px; bottom: 16px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
}
#floating-cta .fcta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 18px rgba(17,24,39,.18);
  color: #fff; text-decoration: none;
  min-width: 140px; justify-content: center;
  transition: transform .1s, box-shadow .1s;
}
#floating-cta .fcta-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(17,24,39,.22); text-decoration: none; }
#floating-cta .fcta-phone { background: #e86a33; }
#floating-cta .fcta-wa { background: #25d366; }
#floating-cta .fcta-icon { font-size: 18px; }
@media (max-width: 560px) {
  #floating-cta { right: 12px; bottom: 12px; }
  #floating-cta .fcta-btn { min-width: 0; padding: 12px 14px; }
  #floating-cta .fcta-text { display: none; }
}

.hero-cta {
  margin: 14px 0 4px;
  background: linear-gradient(95deg, #fff7ed, #ffe4d3);
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.hero-cta .msg { color: #7c2d12; font-weight: 600; font-size: 15px; line-height: 1.55; }
.hero-cta .msg small { color: #9a3412; font-weight: 400; display: block; margin-top: 2px; }
.hero-cta .buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; color: #fff; }
.hero-cta .phone { background: #e86a33; }
.hero-cta .wa { background: #25d366; }
