/* ============================================================
   紫微親子合盤 - 設計師可編修版樣式
   設計師主要可改：色票、間距、圓角、字級、卡片樣式。
   若改 class 名稱，請同步調整 HTML / script.js。
============================================================ */
:root {
  --page: #fffdf9;
  --warm: #fff7ef;
  --cream: #fff2e3;
  --white: #fff;
  --peach: #f7a38c;
  --peach-light: #ffe1d4;
  --coral: #e97868;
  --coral-dark: #c85f54;
  --honey: #f3be68;
  --honey-light: #ffe7b8;
  --clay: #4e3c34;
  --soft: #7b6960;
  --line: #edddd3;
  --sage: #afcb9a;
  --sage-light: #e6f0df;
  --lavender: #c778d6;
  --lavender-light: #f5e8fa;
  --shadow-soft: 0 16px 44px rgba(201, 112, 83, 0.13);
  --shadow-card: 0 8px 24px rgba(146, 99, 74, 0.08);
  --shadow-btn: 0 10px 22px rgba(233, 120, 104, 0.24);
  --container: 1200px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
body {
  margin: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  color: var(--clay);
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 225, 212, 0.82), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(255, 231, 184, 0.78), transparent 24%),
    linear-gradient(180deg, #fffdf9 0%, #fff7ef 45%, #fffdf9 100%);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
button,
input,
select {
  font-family: inherit;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(233, 120, 104, 0.24);
  outline-offset: 3px;
}
.hidden {
  display: none !important;
}
.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}
.section {
  padding: 88px 0;
}
.section-sm {
  padding: 64px 0;
}
.section[id] {
  scroll-margin-top: 38px;
}
.section-sm[id] {
  scroll-margin-top: 62px;
}
.section-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.glass {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 24px rgba(146, 99, 74, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* Header */
.site-header {
  width: 100%;
  position: fixed;
  left: 0;
  right: 0;
  top: 50px;
  z-index: 50;
  height: 60px;
}
nav.nav {
  max-width:1200px;
  width: 100%;
  
  margin: auto;
  height: 60px;
}

.nav-links {
  width:1200px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  scrollbar-width: none;
  margin: 0 auto;

}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-link {
  width: 25%;
  height: 60px;
  line-height: 60px;
  position: relative;
  flex: 0 0 auto;
  padding: 0px 2px;
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(78, 60, 52, 0.82);
  text-align: center;
}
.nav-link:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  background: var(--coral);
  border-radius: 99px;
  transition: 0.25s;
}
.nav-link:hover {
  color: var(--coral);
}
.nav-link:hover:after {
  width: 100%;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  padding: 10px 18px;
  box-shadow: var(--shadow-btn);
}
/* Common */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #fff;
  padding: 8px 14px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(146, 99, 74, 0.08);
}
.badge i {
  width: 15px;
  height: 15px;
}
.section-title {
  max-width: 780px;
  margin: 0 auto 36px;
  text-align: center;
}
.section-title h2 {
  margin: 14px 0 0;
  font-size: 38px;
  line-height: 1.22;
  font-weight: 900;
  color: var(--clay);
}
.section-title p {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.8;
  color: var(--soft);
}
.card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 30px;
  box-shadow: var(--shadow-card);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 900;
}
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-secondary {
  background: #fff;
  color: var(--clay);
  box-shadow: var(--shadow-card);
}
/* Hero */
.hero {
  position: relative;
  padding: 140px 0 84px;
  overflow: hidden;
}
.hero:before,
.hero:after {
  display: none;
  content: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 36px;
  align-items: center;
}
.hero h1 {
  margin: 18px 0 0;
  font-size: clamp(2rem, 0.7527rem + 2.6019vw, 3.875rem);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0px 0px 5px #fff,0px 0px 5px #fff,0px 0px 5px #fff,0px 0px 5px #fff;
}
.hero-sub {
  margin: 22px 0 0;
  font-size: 21px;
  line-height: 1.65;
  font-weight: 800;
  color: var(--soft);
  text-shadow: 0px 0px 5px #fff,0px 0px 5px #fff,0px 0px 5px #fff,0px 0px 5px #fff;
}
.hero-text {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.85;
  color: var(--soft);
  max-width: 680px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.hero-steps {
  display: none;
}
.hero-note {
  margin-top: 22px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 12px 16px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
}
.hero-note strong {
  color: var(--coral);
}
.hero-visual {
  position: relative;
}
.hero-illustration {
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 38px;
  background: linear-gradient(135deg, #fff7ef, #fff1e4, #ffe1d4);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
  .hero-illustration img{
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 35px;
  }
.floating-tip {
  position: absolute;
  left: 28px;
  bottom: -20px;
  max-width: 280px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.tip-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--honey);
  color: #fff;
  flex: 0 0 48px;
}
.floating-tip p {
  margin: 0;
}
.floating-tip .tip-title {
  font-weight: 900;
  color: var(--clay);
}
.floating-tip .tip-text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--soft);
}
.hero-blob {
  animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
/* Service */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.service-card {
  padding: 24px;
  border-radius: 28px;
  transition: 0.25s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: var(--warm);
  display: grid;
  place-items: center;
  color: var(--coral);
  margin-bottom: 16px;
}
.service-card h3 {
  font-size: 20px;
  margin: 0;
  font-weight: 900;
}
.service-card p {
  margin: 10px 0 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.75;
}
/* Tabs */
.tab-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-row::-webkit-scrollbar {
  display: none;
}
.tab-button {
  border: 1px solid var(--line);
  background: var(--warm);
  color: var(--clay);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  font-size: 1rem;
}
.tab-button.is-active {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
  box-shadow: var(--shadow-btn);
}
.type-box,
.program-box {
  padding: 24px;
  border-radius: 26px;
  background: var(--warm);
  margin-top: 18px;
}
.type-box h3,
.program-box h3 {
  font-size: 30px;
  line-height: 1.35;
  margin: 12px 0 0;
  font-weight: 900;
}
.type-stars {
  margin-top: 12px;
  color: var(--coral-dark);
  font-weight: 900;
}
.type-desc,
.program-desc {
  margin: 16px 0 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.8;
}
.program-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.program-item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}
.check-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff2db;
  color: #f3a335;
  flex: 0 0 30px;
}
/* Trial */
.trial-wrap {
  border: 1px solid var(--line);
  background: #fff8f2;
  border-radius: 40px;
  box-shadow: var(--shadow-soft);
  padding: 32px;
}
.trial-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 24px;
}
.trial-intro {
  border-radius: 32px;
  background: linear-gradient(135deg, #c95e52, var(--coral), var(--peach));
  color: #fff;
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.trial-intro h2 {
  font-size: 38px;
  line-height: 1.25;
  margin: 18px 0 0;
  font-weight: 900;
}
.trial-intro p,
.trial-intro li {
  line-height: 1.8;
}
.trial-intro ul {
  padding-left: 0;
  list-style: none;
  margin: 22px 0 0;
}
.trial-form {
  display: grid;
  gap: 16px;
}
.form-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-card);
}
.form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.form-title h3 {
  margin: 0;
  font-size: 20px;
}
.required {
  border-radius: 999px;
  background: var(--warm);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--coral);
  font-weight: 900;
}
.field-group {
  margin-top: 16px;
}
.field-title {
  font-weight: 900;
  margin-bottom: 8px;
}
.radio-row {
  display: flex;
  gap: 20px;
}
.radio-row label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 800;
}

.name-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 12px;
}
.input-name {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 0 14px;
  text-align: center;
  color: var(--clay);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(146, 99, 74, 0.04);
  text-align: left;
}
.date-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.input,
select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 0 14px;
  text-align: center;
  color: var(--clay);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(146, 99, 74, 0.04);
}
select {
  text-align: left;
}
.form-error {
  margin: 0;
  text-align: center;
  color: var(--soft);
  font-size: 14px;
}
/* Videos */
.video-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.video-controls {
  display: flex;
  gap: 10px;
}
.round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--clay);
  box-shadow: var(--shadow-card);
  display: grid;
  place-items: center;
}
.round-btn.primary {
  background: var(--coral);
  color: #fff;
}
.video-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 0;
}
.video-track::-webkit-scrollbar {
  display: none;
}
.video-card {
  min-width: 32%;
  scroll-snap-align: start;
  overflow: hidden;
}
.video-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  background: #000;
}
.video-body {
  padding: 20px;
}
.video-body h3 {
  font-size: 20px;
  margin: 12px 0 0;
}
.video-body p {
  color: var(--soft);
  line-height: 1.75;
}
.tag {
  display: inline-flex;
  border-radius: 999px;
  background: var(--warm);
  padding: 7px 12px;
  color: var(--coral-dark);
  font-size: 13px;
  font-weight: 900;
}
/* Result */
.result-hero-card {
  border: 1px solid var(--line);
  border-radius: 40px;
  background: linear-gradient(135deg, #fff, #fff8f1, #fff0e8);
  box-shadow: var(--shadow-soft);
  padding: 40px;
}
.result-hero-card h1 {
  font-size: 35px;
  line-height: 1.24;
  margin: 16px 0 0;
}
.result-card-wrap {
  padding: 24px;
}
.child-result-loading .result-after-load,
.child-result-loading .bottom-cta {
  display: none !important;
}
.result-loading-card {
  width: min(100%, 620px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-card);
  padding: 34px 24px;
  text-align: center;
}
.result-loading-card h2 {
  margin: 18px 0 0;
  color: var(--clay);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.35;
}
.result-loading-card p {
  max-width: 440px;
  margin: 12px auto 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.8;
}
.child-ziwei-loading-dots {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  animation: childZiweiLoadingSpin 1.15s linear infinite;
}
.child-ziwei-loading-dots span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 0 10px rgba(199, 120, 214, 0.26);
}
.child-ziwei-loading-dots span:nth-child(1) { transform: rotate(0deg) translate(28px); opacity: 1; }
.child-ziwei-loading-dots span:nth-child(2) { transform: rotate(45deg) translate(28px); opacity: 0.86; }
.child-ziwei-loading-dots span:nth-child(3) { transform: rotate(90deg) translate(28px); opacity: 0.72; }
.child-ziwei-loading-dots span:nth-child(4) { transform: rotate(135deg) translate(28px); opacity: 0.58; }
.child-ziwei-loading-dots span:nth-child(5) { transform: rotate(180deg) translate(28px); opacity: 0.46; }
.child-ziwei-loading-dots span:nth-child(6) { transform: rotate(225deg) translate(28px); opacity: 0.36; }
.child-ziwei-loading-dots span:nth-child(7) { transform: rotate(270deg) translate(28px); opacity: 0.28; }
.child-ziwei-loading-dots span:nth-child(8) { transform: rotate(315deg) translate(28px); opacity: 0.2; }
@keyframes childZiweiLoadingSpin {
  to {
    transform: rotate(360deg);
  }
}
.result-top-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.person-card {
  border: 1px solid var(--line);
  background: #fff8f2;
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.person-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.person-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--warm);
  color: var(--coral);
  flex: 0 0 54px;
}
.person-icon.child {
  background: var(--lavender-light);
  color: var(--lavender);
}
.person-label {
  color: var(--soft);
  font-weight: 900;
}
.person-stars {
  font-size: 30px;
  font-weight: 900;
  margin-top: 4px;
}
.person-date {
  margin-top: 8px;
  color: var(--soft);
  font-size: 15px;
}
.type-pill {
  display: inline-flex;
  margin-top: 14px;
  border: 1px solid var(--peach);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--coral);
  font-weight: 900;
}
.type-pill.child {
  border-color: #e8b2f1;
  color: var(--lavender);
  background: #fdf5ff;
}
.traits-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  font-weight: 900;
  color: var(--clay);
}
.traits-title:before {
  content: "";
  width: 3px;
  height: 20px;
  background: var(--coral);
  border-radius: 99px;
}
.person-card-child .traits-title:before {
  background: var(--lavender);
}
.person-traits {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.trait-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 900;
}
.trait-pill:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
}
.trait-green {
  background: var(--sage-light);
  color: #557248;
}
.trait-peach {
  background: #fff2e9;
  color: var(--coral-dark);
}
.archetype-section {
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #fff8f2, #fffdf9);
  padding: 22px;
}
.archetype-head {
  display: block;
}
.archetype-head h3 {
  font-size: 28px;
  line-height: 1.35;
  margin: 16px 0 0;
}
.archetype-head p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--soft);
  margin: 12px 0 0;
}
.child-summary-card {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  padding: 18px 10px;
  box-shadow: 0 6px 18px rgba(146, 99, 74, 0.05);
}
.child-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--peach-light);
  color: var(--coral-dark);
  font-size: 13px;
  font-weight: 900;
  padding: 8px 14px;
  margin-bottom: 10px;
}
.child-summary-card p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--clay);
  margin: 0;
}
.archetype-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.archetype-grid-single {
  grid-template-columns: 1fr;
}
  .archetype-grid_PC{
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin-top: 18px;
  }
.archetype-card {
  display: grid;
  grid-template-columns: auto 1fr 180px;
  gap: 16px;
  align-items: start;
  background: #fff;
  border-radius: 24px;
  padding: 10px;
  box-shadow: var(--shadow-card);
}
  .archetype-card_PC{
    display: grid;
    grid-template-columns: auto 1fr 180px;
    gap: 16px;
    align-items: start;
    background: #fff;
    border-radius: 24px;
    padding: 10px;
    box-shadow: var(--shadow-card);
  }
.archetype-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--warm);
  color: var(--coral);
}
.archetype-image {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
}
.archetype-title {
  font-size: 26px;
  font-weight: 900;
}
.archetype-role {
  color: var(--coral-dark);
  margin-left: 8px;
  font-size: 20px;
}
.archetype-type {
  display: inline-flex;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--peach-light);
  padding: 7px 12px;
  color: var(--coral-dark);
  font-weight: 900;
  font-size: 13px;
}
.archetype-desc {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.8;
  margin-top: 10px;
}
  .archetype-card_PC > .archetype-desc {
    margin-top: 10px;
  }
.archetype-image img {
  width: 100%;
  border-radius: 18px;
  background: var(--warm);
  box-shadow: 0 10px 22px rgba(146, 99, 74, 0.08);
}
.harmony-card {
  margin-top: 20px;
  border: 1px solid var(--line);
  background: #fff9f4;
  border-radius: 24px;
  padding: 22px;
}
.harmony-card h3 {
  margin: 0;
  font-size: 20px;
}
.harmony-card p {
  color: var(--soft);
  line-height: 1.8;
}
.score-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  color: var(--soft);
  font-weight: 900;
}
.score-badge {
  background: #fff;
  color: var(--coral);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(146, 99, 74, 0.06);
}
.score-bar {
  height: 12px;
  background: #f3e2d3;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 12px;
}
.score-fill {
  height: 100%;
  background: linear-gradient(90deg, #f39a34, var(--coral));
  width: 0;
}
.result-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.info-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  padding: 22px;
}
.info-card h3 {
  margin: 0 ;
  font-size: 20px;
}
.info-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.85;
}
.info-card p + p {
  margin-top: 12px;
}
/* Plans / About / Feedback */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.plan-card {
  position: relative;
  border: 2px solid #f6a235;
  background: #fff;
  border-radius: 30px;
  padding: 30px 24px 24px;
  box-shadow: var(--shadow-card);
}
.plan-card.purple {
  border-color: #dca5eb;
}
.plan-ribbon {
  position: absolute;
  top: -17px;
  left: 26px;
  border-radius: 999px;
  background: #ffa11a;
  color: #fff;
  font-weight: 900;
  padding: 8px 18px;
}
.purple .plan-ribbon {
  background: #b64ed0;
}
.plan-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.plan-title {
  font-size: 30px;
  color: #f28e12;
  font-weight: 900;
}
.purple .plan-title {
  color: #b33bcf;
}
.price-box {
  flex: 0 0 auto;
  border-radius: 18px;
  background: #fff2db;
  text-align: center;
  padding: 14px 18px;
}
.purple .price-box {
  background: #f5e8fa;
}
.price-label {
  font-size: 12px;
  font-weight: 900;
  color: #c47813;
}
.purple .price-label {
  color: #8a35b1;
}
.price {
  font-size: 25px;
  font-weight: 900;
  color: #f28e12;
}
.purple .price {
  color: #b33bcf;
}
.plan-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}
.plan-note {
  margin-top: 20px;
  border-radius: 18px;
  background: #fff7e8;
  padding: 16px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.8;
}
.purple .plan-note {
  background: #fbf7fd;
}
.plan-btn {
  margin-top: 22px;
  display: flex;
  width: 100%;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(90deg, #ff9700, #f5a83a);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  padding: 16px;
  border: 0;
  cursor: pointer;
}
.detail-post-form {
  margin: 0;
}
.purple .plan-btn {
  background: linear-gradient(90deg, #a92cc6, #c76cdb);
}
.about-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 20px;
}
.teacher-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: start;
  padding: 28px;
  background: linear-gradient(135deg, #fff, var(--warm));
}
.teacher-card img {
  height: 260px;
  object-fit: contain;
  margin: auto;
}
.teacher-card h2{
  font-size: 20px;
}
.teacher-card p {
  color: var(--soft);
  line-height: 1.85;
}
.text-card {
  padding: 28px;
}
.text-card p {
  color: var(--soft);
  line-height: 1.85;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.stat {
  border: 1px solid var(--line);
  background: var(--warm);
  border-radius: 22px;
  padding: 18px;
  text-align: center;
  font-weight: 800;
  color: var(--soft);
}
.stat strong {
  display: block;
  color: var(--coral);
  font-size: 28px;
}
.feedback-box {
  padding: 30px;
  text-align: center;
}
.feedback-content {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.6;
}
.feedback-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.feedback-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.feedback-dots button {
  border: 0;
  height: 10px;
  border-radius: 99px;
  background: #e3d6cf;
}
.feedback-dots button.is-active {
  width: 28px;
  background: var(--coral);
}
.final-cta {
  border-radius: 34px;
  background: linear-gradient(135deg, var(--peach), var(--coral), var(--honey));
  padding: 40px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.final-cta h2 {
  font-size: 38px;
  margin: 0;
}
.final-cta p {
  line-height: 1.8;
  max-width: 700px;
  margin: 14px auto 0;
}
.footer {
  padding: 0 0 40px;
}
.footer-inner {
  width: min(100% - 32px, var(--container));
  margin: auto;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  color: var(--soft);
  font-size: 14px;
}
.footer img {
  height: 28px;
  width: auto;
}
.bottom-cta {
  display: none;
}
.bottom-cta.is-hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}
.mobile-video-actions {
  display: none;
}
@media (max-width: 1023px) {
  .hero-grid,
  .trial-grid,
  .result-top-grid,
  .plans-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .program-items {
    grid-template-columns: repeat(2, 1fr);
  }
  .video-card {
    min-width: 48%;
  }
  .archetype-card {
    display: block;
  }
  .archetype-card .archetype-image{
    width: 80%;
    margin: 12px auto;
  }
}
@media (max-width: 767px) {
  .mobile-safe-bottom {
    width: 100%;
    margin: 0 auto;
    padding-left: 2.5%;
    padding-right: 2.5%;
    padding-bottom: 86px;
  }
  .container {
    width: min(100% - 28px, var(--container));
  }
  .section {
    padding: 30px 0;
  }
  .section-sm {
    padding: 42px 0;
  }
  .section[id] {
    scroll-margin-top: 82px;
  }
  .section-sm[id] {
    scroll-margin-top: 70px;
  }
  .site-header {
    padding:0 0;
    box-sizing: border-box;
    height: 50px;
    
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    overflow: hidden;
    padding:0 0;
    box-sizing: border-box;
    height: 50px;
  }
  .nav-links {
    justify-content: flex-start;
    height: 50px;
    
  }
  .nav-link {
    font-size: 1rem;
    height: 50px;
    line-height: 50px;
  }
  .nav-cta {
    display: none;
  }

  .mobile_bg{
    width: 100%;
    height: auto;
    background-image: url(../images/mb_bg.jpg);
    background-size: 100% auto;
    background-position: top 20px center;
    background-repeat: no-repeat;
  }

  .plan-card.purple {
    margin-top: 20px;
  }
  .hero {
    padding: 98px 0 52px;
  }
  .hero-grid {
    gap: 22px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero-sub {
    font-size: 16px;
  }
  .hero-text {
    display: none;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
    padding: 14px 18px;
  }
  .hero-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    background: transparent;
    border-radius: 0;
    padding: 8px 0;
  }
  .hero-step {
    flex: 1;
    text-align: center;
    color: var(--soft);
    font-size: 16px;
    text-align: left;
    padding: 0 2px;
  }
  .hero-step i {
    display: inline-block;
    color: var(--coral);
    display: block;
    margin: 0 auto;
  }
  .step-icon {
    float: left;
    width: 19px;
    height: 19px;
    margin-right: 2px;
    
  }

  .step-icon img{
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
  
  .hero-line {
    width: 24px;
    height: 1px;
    background: var(--line);
  }
  .hero-note {
    display: none;
  }
  .floating-tip {
    display: none;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .section-title h2 {
    font-size: 28px;
  }
  .section-title p {
    font-size: 16px;
  }
  .trial-wrap {
    padding: 16px;
    border-radius: 28px;
  }
  .trial-intro {
    padding: 24px;
    border-radius: 24px;
  }
  .trial-intro h2 {
    font-size: 28px;
  }
  .date-grid {
    gap: 8px;
  }
  .video-head {
    display: block;
  }
  .video-controls {
    display: none;
  }
  .video-card {
    min-width: 88%;
  }
  .mobile-video-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
  }
  .mobile-video-actions .round-btn {
    flex: 0 0 44px;
  }
  .result-hero-card {
    padding: 24px;
    border-radius: 28px;
  }
  .result-hero-card h1 {
    font-size: 28px;
  }
  .result-card-wrap {
    padding: 14px;
    border-radius: 24px;
  }
  .person-card {
    padding: 20px 18px;
    border-radius: 24px;
  }
  .person-head {
    gap: 10px;
  }
  .person-icon {
    margin-left: -12px;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 14px;
  }
  .person-stars {
    font-size: 28px;
  }
  .person-date {
    font-size: 14px;
    line-height: 1.45;
  }
  .type-pill {
    padding: 9px 16px;
  }
  .traits-title {
    margin-left: 0;
  }
  .person-traits {
    justify-content: flex-start;
  }
  .archetype-section {
    padding: 16px;
    border-radius: 24px;
  }
  .archetype-head h3 {
    font-size: 24px;
  }
  .child-summary-card {
    padding: 16px;
    border-radius: 22px;
    margin-top: 14px;
  }
  .child-summary-card p {
    font-size: 16px;
    line-height: 1.9;
  }
  .archetype-grid {
    grid-template-columns: 1fr;
  }
    .archetype-grid_PC{
      grid-template-columns: 1fr;
    }
    .archetype-card_PC{
      grid-template-columns: auto 1fr;
    }
  .archetype-card {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 16px;
  }
  .archetype-card .archetype-image{
    width: 100%;
    margin: 12px auto;
  }
  .archetype-image {
    grid-column: 1 / -1;
  }
  .archetype-desc {
    grid-column: 1 / -1;
  }
  .result-info-grid {
    grid-template-columns: 1fr;
  }
  .plan-head {
    display: block;
  }
  .price-box {
    display: inline-block;
    margin-top: 12px;
  }
  .about-grid,
  .teacher-card {
    grid-template-columns: 1fr;
  }
  .teacher-card img {
    height: 220px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .feedback-content {
    font-size: 18px;
  }
  .final-cta {
    padding: 28px 20px;
  }
  .final-cta h2 {
    font-size: 28px;
  }
  .footer-inner {
    display: block;
    text-align: center;
  }
  .footer img {
    margin: 0 auto 14px;
  }
  .bottom-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    z-index: 40;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(146, 99, 74, 0.1);
    backdrop-filter: blur(12px);
    height: 70px;
    box-sizing: border-box;
    transform: translateY(0);
    opacity: 1;
    transition: transform .25s ease, opacity .25s ease;
  }
  .bottom-cta form {
    margin: 0;
  }
  .bottom-cta a,
  .bottom-cta button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    background: var(--coral);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    box-shadow: var(--shadow-btn);
    height: 48px;
    box-sizing: border-box;
    border: 0;
    cursor: pointer;
  }
}

/* 結果頁：現代命格原型小字，例如 宗教家（助人型） */
.archetype-type-inline {
  margin-left: 4px;
  font-size: 0.72em;
  font-weight: 900;
  color: var(--coral-dark);
  white-space: nowrap;
}

/* ============================================================
   橫向滑動修正：保留原本暖色背景，只移除 Hero 偽元素光暈
   - body 的 radial-gradient 背景保留
   - .hero::before / .hero::after 不再產生超出 viewport 的光暈
   - 影片區仍可在自己的區塊內橫向滑動，不影響整頁
============================================================ */
html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.mobile-safe-bottom,
main,
.site-header,
.container {
  max-width: 100%;
  margin: 0 auto;
}

section{
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
}

.mobile-safe-bottom{
  margin-top: 50px;
}

.hero {
  overflow: hidden;
}

.hero::before,
.hero::after {
  display: none !important;
  content: none !important;
}

.nav,
.nav-links,
.hero-grid,
.hero-actions,
.hero-steps,
.trial-wrap,
.result-card-wrap,
.card {
  max-width: 100%;
}

.nav-links {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

@media (max-width: 767px) {

  
  .container {
    width: calc(100% - 28px);
  }

  .nav {
    max-width: calc(100vw - 16px);
  }

  .hero-actions .btn {
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .video-track {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }

  .video-card {
    min-width: 88%;
    max-width: 88%;
    flex: 0 0 88%;
  }
}
@media (max-width: 767px) {
  .program-items {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .program-item {
    justify-content: flex-start;
  }
}
.result-main-cta {
  margin: 28px auto 0;
  max-width: 720px;
}

.result-main-cta__button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(90deg, #e97868, #f3a335);
  color: #fff;
  padding: 17px 24px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 12px 24px rgba(233, 120, 104, 0.22);
  border: 0;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.result-main-cta__button:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

@media (max-width: 767px) {
  .result-main-cta {
    margin-top: 22px;
  }

  .result-main-cta__button {
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 15px;
  }
}
.btn,
.result-main-cta__button,
.mobile-video-actions .btn,
.video-controls .round-btn {
  border: 0;
  appearance: none;
  -webkit-appearance: none;
}

.hero-arrow {
  flex: 0 0 auto;
  color: var(--coral);
  opacity: 0.55;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.trial-submit-btn {
  width: 100%;
  font-size: 20px;
  line-height: 1.25;
  padding: 18px 24px;
}

@media (max-width: 767px) {
  .trial-submit-btn {
    font-size: 18px;
    padding: 15px 18px;
  }
}
