/* 「師傅幫手」/ Sifu Helper — stylesheet (Builder owned).
   Mobile-first, single column, zero external assets.
   Breakpoints: mobile default, then max-width 720px (tablet/sheet rules),
   then max-width 400px (compact header), then min-width 560px (wider). */

:root {
  --ink: #0E1B2A;
  --ink-2: #33475B;
  --muted: #61748A;
  --brand: #10466E;
  --brand-700: #0B3A5B;
  --brand-300: #4A7FA5;
  --brand-050: #EDF3F8;
  --accent: #F59E0B;
  --accent-700: #B77405;
  --accent-050: #FEF4E2;
  --ok: #0E9F6E;
  --ok-050: #E6F6EF;
  --danger: #C0392B;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --line: #E5E8EC;
  --line-2: #EEF1F4;

  --r-card: 14px;
  --r-btn: 10px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(14, 27, 42, .06), 0 8px 24px rgba(14, 27, 42, .06);
  --shadow-sm: 0 1px 2px rgba(14, 27, 42, .05);
  --tap: 44px;
  --tabbar-h: 56px;
  --font: system-ui, -apple-system, "PingFang HK", "Microsoft JhengHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: var(--brand); }

.money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; word-break: break-word; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }
.hide { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 70;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.hd-row1 { display: flex; align-items: center; gap: 4px; padding: 6px 8px 0; }
.logo {
  display: inline-flex; align-items: center; gap: 7px;
  min-width: 0; flex: 1 1 auto;
  text-decoration: none; color: var(--ink);
  font-weight: 800; font-size: 17px; letter-spacing: .2px;
  padding: 6px 4px;
}
.logo-mark {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.logo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hd-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.icon-btn {
  width: var(--tap); height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-2);
  border-radius: var(--r-btn); cursor: pointer; position: relative;
  text-decoration: none; padding: 0;
}
.icon-btn:active { background: var(--brand-050); }
.icon-btn.is-on { color: var(--brand); }
.lang-globe { display: none; font-size: 19px; }
.fav-count {
  position: absolute; top: 5px; right: 5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--accent); color: #3A2500;
  font-size: 10px; font-weight: 800; line-height: 17px; text-align: center;
}

.hd-row2 { display: flex; align-items: center; gap: 10px; padding: 0 10px 8px; }
.lang-pills { display: flex; align-items: center; gap: 6px; }
.lang-pill {
  min-width: var(--tap); height: var(--tap);
  padding: 0 12px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: var(--r-pill);
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
  cursor: pointer;
}
.lang-pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.hd-join {
  margin-left: auto;
  font-size: 13px; font-weight: 700; text-decoration: none;
  color: var(--brand); padding: 8px 2px; min-height: var(--tap);
  display: inline-flex; align-items: center;
}

/* ---------- view shell ---------- */
.view {
  max-width: 720px; margin: 0 auto;
  padding: 14px 12px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom));
}
.view-detail { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
.page-head { margin: 2px 0 14px; }
.page-head h1 { font-size: 24px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.section { margin: 22px 0 0; }
.section-head { margin-bottom: 10px; }
.section-head h2 { font-size: 19px; }
.section-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  margin: -14px -12px 0;
  padding: 26px 16px 28px;
  color: #fff;
  background: linear-gradient(158deg, #16527D 0%, var(--brand) 42%, var(--brand-700) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .16;
  background-image:
    linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 78%);
}
.hero > * { position: relative; }
.hero-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .4px;
  color: #FFD79A; background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 5px 10px; border-radius: var(--r-pill);
}
.hero h1 { font-size: 27px; margin: 12px 0 0; letter-spacing: .2px; }
.hero-sub { margin-top: 8px; font-size: 15px; color: #D7E5F0; max-width: 34em; }
.hero-cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 14px; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.hero-stat { flex: 1 1 0; min-width: 0; }
.hero-stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.hero-stat span { display: block; font-size: 11px; color: #C3D7E6; line-height: 1.35; }

/* ---------- first-screen price cards (P1-15) ---------- */
.price-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm); padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.price-card b { font-size: 14px; line-height: 1.35; }
.price-card .pc-cat { font-size: 11px; color: var(--muted); }
.price-cta {
  margin-top: 4px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; padding: 4px 8px; margin-left: -8px;
  border: 0; background: transparent; cursor: pointer;
  color: var(--accent-700); font-family: inherit; font-size: 14px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.price-cta:active { color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 10px 14px;
  border: 1px solid transparent; border-radius: var(--r-btn);
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.25;
  text-decoration: none; cursor: pointer; text-align: center;
  background: var(--card); color: var(--ink);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-700); }
.btn-accent { background: var(--accent); color: #3A2500; }
.btn-accent:active { background: #E08C05; }
.btn-outline { background: var(--card); color: var(--brand); border-color: var(--line); }
.btn-outline:active { background: var(--brand-050); }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-wa { background: #1FA855; color: #fff; }
.btn-danger { background: var(--card); color: var(--danger); border-color: #F0D3CE; }
.btn-block { width: 100%; }
.btn-lg { min-height: 50px; font-size: 16px; padding: 12px 18px; }
.btn-sm { min-height: 38px; font-size: 13px; padding: 7px 11px; border-radius: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 130px; }

/* ---------- chips / tags / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--brand-050); color: var(--brand);
  font-size: 13px; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.chip-link { border-color: #D6E3EE; }
.chip.active { background: var(--brand); color: #fff; }
.chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip-grid .chip { min-height: var(--tap); justify-content: center; text-align: center; padding: 6px 4px; line-height: 1.25; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: var(--r-pill);
  background: var(--line-2); color: var(--ink-2);
  font-size: 12px; font-weight: 700; line-height: 1.35;
}

/* P1-9 badge hierarchy: max 4, strongest first */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 26px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 26px; padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; line-height: 1.3;
  background: var(--line-2); color: var(--ink-2);
}
.badge-reg { background: var(--ok-050); color: #0A7A55; border: 1px solid #BFE6D5; }
.badge-reg .badge-no { font-variant-numeric: tabular-nums; opacity: .85; }
.badge-soon { background: var(--accent-050); color: var(--accent-700); }
.badge-ok { background: var(--brand-050); color: var(--brand); }
.badge-lang { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.badge-demo { background: transparent; border: 1px dashed var(--line); color: var(--muted); }

/* ---------- SEO blocks (SEO-SPEC §1.2 / §4) ---------- */
.seo-block {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--brand-300);
  border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  padding: 14px; margin-bottom: 12px;
}
.seo-intro { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.seo-areas { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin-top: 8px; }
.seo-areas b { color: var(--ink); }
.seo-jobs .seo-job { color: var(--ink); }
.seo-note { margin: 0 0 10px; line-height: 1.6; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.crumb-sep { color: var(--muted); }
.crumb-cur { color: var(--ink-2); font-weight: 600; }
.seo-h { font-size: 14px; margin: 12px 0 6px; color: var(--brand); }
.seo-list { display: grid; gap: 6px; }
.seo-list li {
  position: relative; padding-left: 18px;
  font-size: 14px; line-height: 1.55; color: var(--ink-2);
}
.seo-list li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.seo-faq { box-shadow: var(--shadow-sm); }
.faq-item + .faq-item { border-top: 1px solid var(--line-2); margin-top: 10px; padding-top: 10px; }
.faq-q { font-size: 15px; margin-bottom: 4px; }
.faq-a { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.seo-link { margin-top: 10px; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 12px;
}
.card-flat { box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: flex-start; gap: 10px; }
.card-head h3 { font-size: 16px; }
.card-sub { color: var(--muted); font-size: 13px; margin-top: 1px; }

.avatar {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px;
  display: block; overflow: hidden;
}
.avatar-lg { width: 68px; height: 68px; border-radius: 18px; }

.tcard-head { display: flex; align-items: flex-start; gap: 11px; }
.tcard-id { flex: 1 1 auto; min-width: 0; }
.tcard-name { font-size: 16px; overflow-wrap: anywhere; }
.tcard-name a { color: var(--ink); text-decoration: none; }
.tcard-name a:active { color: var(--brand); }
.tcard-co { font-size: 13px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.fav-btn {
  width: var(--tap); height: var(--tap); flex: 0 0 auto;
  border: 0; background: transparent; cursor: pointer; padding: 0;
  color: #C4CED8; display: inline-flex; align-items: center; justify-content: center;
}
.fav-btn.on { color: var(--accent); }
.tcard-stats {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 10px; font-size: 13px; color: var(--ink-2);
}
.tcard-stats .rating { color: var(--accent-700); font-weight: 800; }
.tcard-plain { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tcard-areas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tcard-actions { display: flex; gap: 8px; margin-top: 12px; }
.tcard-actions .btn { flex: 1 1 auto; min-width: 0; padding-left: 8px; padding-right: 8px; font-size: 14px; }

/* ---------- category + district grids ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  padding: 12px;
}
.cat-card:active { background: var(--brand-050); }
.cat-card span { display: block; }
.cat-ic { font-size: 22px; line-height: 1; }
.cat-name { font-weight: 700; font-size: 15px; margin-top: 7px; overflow-wrap: anywhere; }
.cat-blurb { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

.region-title {
  font-size: 13px; font-weight: 800; color: var(--muted);
  letter-spacing: .6px; text-transform: uppercase; margin: 14px 0 8px;
}

/* ---------- trust strip ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.trust-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 12px; box-shadow: var(--shadow-sm);
}
.trust-ic { font-size: 18px; }
.trust-item p { font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }

/* ---------- steps ---------- */
.steps { display: grid; gap: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-n {
  width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.step b { display: block; color: var(--ink); font-size: 15px; }
.step p { font-size: 14px; color: var(--ink-2); }

/* ---------- price list ---------- */
.price-list { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--card); }
.price-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-top: 1px solid var(--line-2);
}
.price-row:first-child { border-top: 0; }
.pr-main { flex: 1 1 auto; min-width: 0; }
.pr-name { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pr-price {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 800; color: var(--accent-700);
  font-variant-numeric: tabular-nums;
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font-family: inherit; text-align: left;
}
.pr-unit { font-size: 12px; font-weight: 500; color: var(--muted); }
.pr-note { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.pr-cta { flex: 0 0 auto; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.req-dot { color: var(--danger); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap);
  padding: 10px 12px; font-family: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-btn);
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2361748A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-300);
  box-shadow: 0 0 0 3px rgba(16, 70, 110, .10);
}
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; margin-top: 5px; display: none; }
.field.has-error .err { display: block; }
.fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.fieldset > legend { font-size: 14px; font-weight: 700; padding: 0; margin-bottom: 8px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: var(--tap); padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer;
}
.check-pill input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.check-pill.on { border-color: var(--brand); background: var(--brand-050); color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .field { margin-bottom: 0; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- filters ---------- */
.search-box { position: relative; margin-bottom: 12px; }
.search-box .input { padding-left: 40px; }
.search-ic { position: absolute; left: 12px; top: 12px; color: var(--muted); pointer-events: none; }
.filter-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 12px; box-shadow: var(--shadow-sm); margin-bottom: 12px;
}
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.filter-grid .field { margin-bottom: 0; }
.filter-grid .field > label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.filter-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.filter-open-btn { display: none; }
.results-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; flex-wrap: wrap; }
.results-count { font-size: 14px; font-weight: 700; }
.results-count b { font-size: 17px; color: var(--brand); font-variant-numeric: tabular-nums; }
.results-bar .select { width: auto; min-width: 150px; margin-left: auto; }
.recent-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.recent-chips .chip { min-height: 36px; }

/* ---------- bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 88;
  background: rgba(14, 27, 42, .45);
  opacity: 0; transition: opacity .2s ease;
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  max-height: 56vh;
  display: flex; flex-direction: column;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 32px rgba(14, 27, 42, .18);
  transform: translateY(102%);
  transition: transform .22s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.open { transform: translateY(0); }
.sheet-tall { max-height: 70vh; }
.sheet-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; }
.sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 6px;
}
.sheet-head h3 { font-size: 17px; flex: 1 1 auto; min-width: 0; }
.sheet-body { overflow-y: auto; padding: 4px 12px 16px; -webkit-overflow-scrolling: touch; }
.sheet-sub { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sheet-option {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 52px;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--r-btn);
  background: var(--card); color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; text-align: left;
}
.sheet-option:active { background: var(--brand-050); }
.sheet-option .so-ic { font-size: 19px; width: 26px; text-align: center; flex: 0 0 auto; }
.sheet-option .so-sub { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.sheet-option-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.sheet-option-primary .so-sub { color: #CFE0EE; }
.sheet-option-wa { background: var(--card); border-color: #1FA855; color: #14713B; }
.sheet-option-plain { border-style: dashed; color: var(--brand); }
.sheet-apply {
  position: sticky; bottom: 0; width: 100%;
  margin-top: 10px; padding: 12px; min-height: 50px;
  border: 0; border-radius: var(--r-btn);
  background: var(--brand); color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}
.sheet-apply:disabled { opacity: .45; cursor: default; }

/* ---------- empty state ---------- */
.empty {
  text-align: center; padding: 26px 16px;
  background: var(--card); border: 1px dashed var(--line);
  border-radius: var(--r-card);
}
.empty-ic { font-size: 32px; }
.empty h3 { font-size: 18px; margin-top: 8px; }
.empty p { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.empty-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.empty-actions .btn { width: 100%; }
.empty-prices { text-align: left; margin-top: 6px; }
.empty-prices .price-list { margin-top: 8px; }

/* ---------- board ---------- */
.tabs { display: flex; gap: 6px; background: var(--line-2); padding: 4px; border-radius: var(--r-btn); margin-bottom: 14px; }
.tab-btn {
  flex: 1 1 0; min-width: 0; min-height: 40px;
  border: 0; border-radius: 8px; background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
  padding: 6px 4px;
}
.tab-btn.active { background: var(--card); color: var(--brand); box-shadow: var(--shadow-sm); }
.listing { border-left: 3px solid var(--brand); }
.listing.pinned { border-left-color: var(--accent); background: #FFFCF6; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.listing-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.listing-actions .btn { flex: 0 0 auto; }
.kv { display: flex; gap: 8px; font-size: 13px; padding: 4px 0; }
.kv-k { color: var(--muted); flex: 0 0 40%; }
.kv-v { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.json-box {
  width: 100%; min-height: 130px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.5; padding: 10px;
  border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--card); color: var(--ink);
}
.notice-box {
  background: var(--accent-050); border: 1px solid #F7DFB4; border-radius: var(--r-btn);
  padding: 10px 12px; font-size: 13px; color: #7A5106;
}
.demo-banner {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--accent-050); border: 1px solid #F3D9A6;
  border-radius: var(--r-btn); padding: 10px 12px; margin-bottom: 12px;
  font-size: 13px; color: #7A5106; font-weight: 600;
}

/* ---------- reviews ---------- */
.review-item { padding: 11px 0; border-top: 1px solid var(--line-2); }
.review-item:first-child { border-top: 0; }
.review-text { font-size: 14px; }
.review-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stars { color: var(--accent-700); letter-spacing: 1px; }

/* ---------- success ---------- */
.success { text-align: center; }
.success-ic {
  width: 62px; height: 62px; border-radius: 50%; margin: 4px auto 12px;
  background: var(--ok-050); color: var(--ok); font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.success h1 { font-size: 24px; }
.success .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.summary { text-align: left; margin: 16px 0; }
.summary .kv-k { flex: 0 0 34%; }

/* ---------- detail page ---------- */
.detail-head { display: flex; gap: 13px; align-items: flex-start; }
.detail-name { font-size: 21px; overflow-wrap: anywhere; }
.detail-co { color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-btn);
  padding: 9px 8px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.bio { color: var(--ink-2); font-size: 14px; margin-top: 6px; }

/* P1-10 fixed CTA bar */
.cta-bar {
  position: fixed; left: 0; right: 0; z-index: 75;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  height: 48px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 12px rgba(14, 27, 42, .08);
}
.cta-bar .btn { height: 40px; min-height: 40px; }
.cta-bar .btn-call { flex: 1; }
.cta-bar .btn-quote { flex: 1.4; }

/* ---------- CTA banner ---------- */
.cta-banner {
  margin-top: 22px; padding: 18px 16px;
  border-radius: var(--r-card);
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
}
.cta-banner h2 { font-size: 19px; }
.cta-banner p { color: #D3E2EE; font-size: 14px; margin: 6px 0 14px; }
.join-link { display: inline-block; margin-top: 14px; color: #FFD79A; font-weight: 700; font-size: 14px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; align-items: stretch;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform .18s ease;
}
.tab {
  flex: 1 1 0; min-width: 0;
  min-height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted);
  font-size: 11px; font-weight: 700; position: relative;
  padding: 4px 2px;
}
.tab-ic { font-size: 19px; line-height: 1; position: relative; }
.tab-lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.active { color: var(--brand); }
.tab.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand);
}
.tab-badge {
  position: absolute; top: 4px; right: 50%; margin-right: -22px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}

/* keyboard open (P1-19) */
html.kb-open .tabbar { transform: translateY(100%); }
html.kb-open .cta-bar { bottom: 0; }

/* ---------- max-width: 720px (N-5, P1-13) ---------- */
@media (max-width: 720px) {
  .filter-panel { display: none; }
  .filter-open-btn { display: inline-flex; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-tall { max-height: 70vh; }
}

/* ---------- max-width: 400px (N-5, P0-6) ---------- */
@media (max-width: 400px) {
  .lang-pills { display: none; }
  .hd-row2 { display: none; }
  .lang-globe { display: inline-flex; }
  .fav-head { display: none; }
  .hero h1 { font-size: 24px; }
  .hero-stats { gap: 8px; }
  .hero-stat b { font-size: 18px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .empty-actions { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .tcard-actions { flex-wrap: wrap; }
  .tcard-actions .btn { flex: 1 1 100%; }
  .tcard-actions .btn:first-child { flex: 1 1 100%; }
}

/* ---------- min-width 560px (wider) ---------- */
@media (min-width: 560px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chip-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero h1 { font-size: 32px; }
  .price-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .hero { margin: 0; border-radius: var(--r-card); }
  .view { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ *
 * 法律頁 / footer / 招募頁 FAQ
 * ------------------------------------------------------------------ */
.legal-doc { max-width: 760px; }
.legal-intro { font-size: 15px; line-height: 1.7; margin: 4px 0 4px; }
.legal-sec { margin-top: 20px; }
.legal-sec h2 { font-size: 17px; margin: 0 0 6px; }
.legal-sec p { font-size: 14.5px; line-height: 1.75; margin: 0 0 8px; color: var(--ink); }
.legal-ul { margin: 0 0 8px; padding-left: 20px; }
.legal-ul li { font-size: 14.5px; line-height: 1.7; margin-bottom: 4px; }
.legal-note {
  font-size: 13.5px; line-height: 1.7; color: var(--muted);
  background: var(--bg-soft, #F2F6FA); border-left: 3px solid var(--brand, #10466E);
  padding: 10px 12px; border-radius: 6px; margin: 8px 0 0;
}
.site-footer {
  margin: 28px 0 8px; padding: 14px 0 4px;
  border-top: 1px solid var(--line, #E2E8EE);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.foot-links a { font-size: 13px; font-weight: 600; color: var(--brand, #10466E); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.why-list li {
  background: var(--bg-soft, #F2F6FA); border-radius: 8px; padding: 10px 12px;
  font-size: 14px; line-height: 1.6; position: relative; padding-left: 34px;
}
.why-list li::before {
  content: "✓"; position: absolute; left: 12px; top: 10px;
  color: var(--accent, #F59E0B); font-weight: 700;
}
.faq-list { display: grid; gap: 8px; }
.faq-item { border: 1px solid var(--line, #E2E8EE); border-radius: 8px; padding: 10px 12px; }
.faq-item b { display: block; font-size: 14px; margin-bottom: 4px; }
.faq-item p { font-size: 13.5px; line-height: 1.7; color: var(--muted); margin: 0; }
.join-cta .btn { margin-top: 4px; }
