body.match-page {
  margin: 0;
  background: #f5f0e6;
  color: #17332d;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang HK", "Noto Sans TC", sans-serif;
  padding-bottom: 84px;
}
body.match-page [hidden] { display: none !important; }

.match-topbar {
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.match-topbar nav { display: flex; gap: 16px; font-size: 14px; }
.match-topbar nav a { color: #1d443c; text-decoration: none; font-weight: 600; }

.match-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 16px 36px;
  display: grid;
  gap: 20px;
}

.match-hero {
  background: linear-gradient(145deg, #132f29, #1d463e);
  color: #f8f2e6;
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 12px 32px rgba(17, 41, 36, 0.16);
}
.match-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  color: #e4c27a;
  font-weight: 700;
  margin-bottom: 8px;
}
.match-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.2;
  font-family: "Noto Serif TC", "Songti TC", serif;
}
.match-hero-sub {
  margin: 0 0 16px;
  color: #dbe5df;
  line-height: 1.7;
  font-size: 15px;
}
.match-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.match-pill-row span {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(248, 242, 230, 0.12);
  border: 1px solid rgba(228, 194, 122, 0.35);
  color: #f3e4c3;
}

.match-card {
  background: #fdfaf3;
  border: 1px solid rgba(23, 51, 45, 0.12);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 6px 20px rgba(23, 51, 45, 0.05);
}

.match-mode-banner {
  background: #edf3ee;
  border-left: 4px solid #1e5b4e;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.match-mode-banner strong { display: block; font-size: 15px; color: #13352e; }
.match-mode-banner small { display: block; margin-top: 3px; font-size: 13px; color: #476059; }
.match-mode-banner[data-mode="match-6"] {
  background: #faf1e1;
  border-left-color: #b88234;
}

.match-people-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.match-person-box {
  border: 1px solid rgba(23, 51, 45, 0.15);
  border-radius: 16px;
  padding: 16px;
  margin: 0;
  display: grid;
  gap: 12px;
  background: #fffdf8;
}
.match-person-box legend {
  padding: 0 8px;
  font-weight: 700;
  color: #153c34;
  font-size: 15px;
}
.match-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.match-form-card label,
.match-checkout-panel label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #294640;
}
.match-form-card input:not([type="checkbox"]):not([type="radio"]),
.match-form-card select,
.match-form-card textarea,
.match-checkout-panel input:not([type="checkbox"]) {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(23, 51, 45, 0.22);
  border-radius: 10px;
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "PingFang HK", sans-serif;
  color: #16302b;
  background: #fff;
  font-variant-numeric: lining-nums tabular-nums;
}
.match-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
  align-self: end;
  padding-bottom: 6px;
}
.match-checkbox-label input { width: 18px; height: 18px; flex: none; accent-color: #1c5549; }

.match-question-block {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.match-field-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #17332d;
  margin-bottom: 8px;
}
.match-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.match-topic-chip {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(23, 51, 45, 0.24);
  background: #fff;
  color: #1b3d36;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.match-topic-chip[aria-checked="true"] {
  background: #173d35;
  color: #f9f2e4;
  border-color: #173d35;
  font-weight: 600;
}
.match-char-count { text-align: right; color: #6c7772; font-weight: 400; font-size: 12px; }

.match-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #163d35, #235c50);
  color: #fbf5e8;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.match-primary-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.match-submit-btn { width: 100%; margin-top: 16px; font-size: 16px; }
.match-secondary-btn {
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #1e5247;
  background: #fff;
  color: #163d35;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.match-ghost-btn {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #546660;
  font-size: 14px;
  cursor: pointer;
}
.match-privacy-micro { margin: 10px 0 0; font-size: 12.5px; color: #61706b; text-align: center; }
.match-form-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fcebe7;
  color: #962f1f;
  font-size: 13.5px;
  font-weight: 600;
}

.match-safety-card {
  background: #fff5f2;
  border: 2px solid #c75b44;
  border-radius: 18px;
  padding: 20px;
  color: #4d1c13;
}
.match-safety-card h2 { margin: 0 0 8px; font-size: 20px; }

/* Results */
.match-results { display: grid; gap: 20px; }
.match-score-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.match-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e6f0eb;
  color: #18493f;
  margin-bottom: 6px;
}
.match-score-hero h2 { margin: 4px 0 6px; font-size: clamp(22px, 4.5vw, 28px); font-family: "Noto Serif TC", serif; }
.match-tagline { margin: 0; font-size: 14.5px; line-height: 1.65; color: #3d524c; }
.match-big-score {
  flex: none;
  text-align: center;
  padding: 12px 18px;
  border-radius: 18px;
  background: #163b33;
  color: #f4d993;
  font-variant-numeric: lining-nums tabular-nums;
}
.match-big-score strong { display: block; font-size: 40px; line-height: 1; }
.match-big-score span { font-size: 12px; color: #d3dfd9; }

.match-radar-wrap { max-width: 520px; margin: 12px auto 6px; }
.match-radar-svg { width: 100%; height: auto; display: block; }
.match-disclaimer {
  margin: 6px 0 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #5d6a65;
  text-align: center;
  padding: 8px 12px;
  background: #f4eee2;
  border-radius: 10px;
}

.match-share-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.match-share-status { margin: 8px 0 0; text-align: center; font-size: 13px; color: #1f5a4f; min-height: 18px; }

.match-section-head small { color: #8c6630; font-weight: 700; letter-spacing: 1px; font-size: 12px; }
.match-section-head h3 { margin: 4px 0 12px; font-size: 20px; }

.match-school-list { display: grid; gap: 12px; }
.match-school-row {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(23, 51, 45, 0.1);
}
.match-school-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.match-school-meta { font-size: 12px; color: #6f6658; margin-left: 6px; }
.match-school-score { font-weight: 800; font-size: 16px; color: #16443a; font-variant-numeric: lining-nums tabular-nums; }
.match-bar-track { height: 8px; background: #eae4d8; border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.match-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1f5a4f, #c49345); }
.match-bar-fill.is-dip { background: linear-gradient(90deg, #c2593f, #e28d66); }
.match-school-summary { margin: 0; font-size: 13.5px; line-height: 1.55; color: #364944; }
.match-locked-schools {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #faf3e5;
  border: 1px dashed #c69a55;
  font-size: 13px;
  color: #5b4522;
}

/* Anti-Peek Blur Paywall */
.match-paywall-sub { margin: 0 0 14px; font-size: 14px; color: #52625d; }
.match-blur-chapters { display: grid; gap: 12px; margin-bottom: 20px; }
.match-blur-chapter {
  position: relative;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(23, 51, 45, 0.12);
  overflow: hidden;
}
.match-blur-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.match-blur-part { font-size: 11px; font-weight: 800; color: #8c6630; letter-spacing: 1px; }
.match-blur-words { font-size: 11px; color: #67746f; }
.match-blur-chapter h4 { margin: 0 0 10px; font-size: 15.5px; line-height: 1.45; color: #14362f; }
.match-blur-skeleton {
  display: grid;
  gap: 7px;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.55;
}
.match-blur-skeleton span {
  display: block;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, #cfc8ba, #e4dfd4, #cfc8ba);
}

.match-pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.match-tier-card {
  padding: 18px 16px;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid rgba(23, 51, 45, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match-tier-featured {
  border-color: #b8873c;
  background: linear-gradient(180deg, #fffdf8, #f9f3e4);
}
.match-tier-tag {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #efe6d4;
  color: #6b4b1a;
}
.match-tier-card h4 { margin: 0; font-size: 18px; }
.match-tier-price { margin: 0; font-size: 28px; font-weight: 800; color: #163a32; font-variant-numeric: lining-nums tabular-nums; }
.match-tier-price span { font-size: 13px; font-weight: 500; color: #667570; }
.match-tier-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.65; color: #364a45; flex: 1; }
.match-tier-lock-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fcefe9; color: #8c3d29; font-size: 12.5px; }

.match-checkout-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: #f3ede0;
  border: 1.5px solid #c39a55;
  display: grid;
  gap: 12px;
}
.match-checkout-panel h4 { margin: 0; font-size: 18px; }
.match-checkout-desc { margin: 0; font-size: 13.5px; color: #4a5a55; }
.match-checkout-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Full Paid Report & 4 Lifestyle Action Cards */
.match-report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(23, 51, 45, 0.14);
}
.match-toolbar-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.match-full-content section { margin-bottom: 24px; }
.match-full-content h3 { font-family: "Noto Serif TC", serif; font-size: 21px; margin: 0 0 10px; color: #13362f; }
.match-full-content p { font-size: 15.5px; line-height: 1.85; color: #243b36; margin: 0 0 12px; white-space: pre-line; }
.match-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.match-action-card {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(23, 51, 45, 0.14);
}
.match-action-card h4 { margin: 0 0 8px; font-size: 16px; color: #855e24; }
.match-school-deep-grid { display: grid; gap: 12px; }
.match-school-deep-card {
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border-left: 4px solid #1e574b;
}
.match-school-deep-card h4 { margin: 0 0 8px; font-size: 16px; color: #153c34; }

.match-gentle-fallback { text-align: center; }
.match-fallback-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px; }
.match-fallback-links a { color: #184b40; font-weight: 700; text-decoration: none; padding: 8px 14px; border-radius: 999px; background: #edf3ee; }

.match-footer { text-align: center; font-size: 13px; color: #5b6a65; padding: 14px 16px 24px; }
.match-footer a { color: inherit; }

@media (max-width: 700px) {
  .match-people-grid,
  .match-pricing-grid,
  .match-action-grid,
  .match-row-2 {
    grid-template-columns: 1fr;
  }
  .match-score-top { flex-direction: column; }
  .match-big-score { align-self: flex-start; }
  .match-hero { padding: 22px 18px; }
  .match-card { padding: 18px 14px; }
}

@media print {
  body.match-page { background: #fff; padding: 0; color: #111; }
  .no-print, .match-topbar, #match-form, #match-paywall-card, .match-share-actions { display: none !important; }
  .match-shell { max-width: 100%; padding: 0; }
  .match-card { border: 0; box-shadow: none; background: #fff; padding: 10px 0; break-inside: avoid; }
  .match-full-content section { break-inside: avoid; }
  .match-action-grid { grid-template-columns: 1fr 1fr; }
}

/* Pure reading mode once paid report is unlocked: hide hero, form, paywall and sales fallback */
body.is-reading-match-report .match-hero,
body.is-reading-match-report #match-form,
body.is-reading-match-report #match-paywall-card,
body.is-reading-match-report #match-checkout-panel,
body.is-reading-match-report .match-gentle-fallback,
body.is-reading-match-report #btn-edit-input {
  display: none !important;
}
