/* Desktop & tablet — đồng bộ token với design-mobile-flow/css/mobile-shell.css */
:root {
  --tchg-bg: #fdfbf7;
  --tchg-bg-elevated: #fffefb;
  --tchg-primary: #8b1d1d;
  --tchg-primary-hover: #6f1717;
  --tchg-gold: #c5a25d;
  --tchg-gold-soft: rgba(197, 162, 93, 0.22);
  --tchg-text: #2a2420;
  --tchg-muted: #6b635c;
  --tchg-border: rgba(139, 29, 29, 0.14);
  --tchg-shadow: 0 8px 28px rgba(42, 24, 20, 0.08);
  --tchg-shadow-lg: 0 20px 50px rgba(42, 24, 20, 0.12);
  --tchg-radius: 14px;
  --tchg-radius-sm: 12px;
  --tchg-font-serif: "Playfair Display", "Times New Roman", Times, serif;
  --tchg-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ds-step-green: #1a4d3a;
  --ds-footer: #4a1414;
}

.ds-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--tchg-font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tchg-text);
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(197, 162, 93, 0.18), transparent 52%),
    radial-gradient(ellipse 70% 50% at 100% 40%, rgba(139, 29, 29, 0.06), transparent 45%),
    linear-gradient(180deg, #faf7f0 0%, #f2ebe2 100%);
}

.ds-main {
  flex: 1;
}

.ds-font-serif {
  font-family: var(--tchg-font-serif);
}

/* Sticky header */
.ds-header {
  background: rgba(255, 254, 251, 0.92);
  border-bottom: 1px solid var(--tchg-border);
  backdrop-filter: blur(10px);
  z-index: 1030;
}

.ds-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--tchg-bg-elevated);
  border: 1px solid var(--tchg-border);
}

.ds-brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--tchg-primary);
  line-height: 1.2;
}

.ds-brand-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--tchg-muted);
}

.ds-nav .nav-link {
  color: var(--tchg-text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px;
}

.ds-nav .nav-link:hover {
  color: var(--tchg-primary);
  background: rgba(139, 29, 29, 0.06);
}

.ds-nav .nav-link.active {
  color: var(--tchg-primary);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--tchg-gold);
}

.ds-btn-login {
  border-radius: 999px;
  padding: 0.45rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--tchg-primary);
  border: none;
  color: #fff;
}

.ds-btn-login:hover {
  background: var(--tchg-primary-hover);
  color: #fff;
}

.ds-icon-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tchg-primary);
  border: 1px solid var(--tchg-border);
  background: var(--tchg-bg-elevated);
  text-decoration: none;
}

.ds-icon-round:hover {
  border-color: var(--tchg-gold);
  color: var(--tchg-primary-hover);
}

/* Hero */
.ds-hero {
  position: relative;
  padding: 2.5rem 0 3rem;
  overflow: hidden;
}

@media (min-width: 992px) {
  .ds-hero {
    padding: 3rem 0 4rem;
  }
}

.ds-hero-mandala {
  display: block;
  margin: 0 auto 1.5rem;
  width: min(280px, 72vw);
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 12px 28px rgba(197, 162, 93, 0.35));
}

.ds-hero-title {
  font-family: var(--tchg-font-serif);
  font-weight: 700;
  color: var(--tchg-primary);
  font-size: clamp(1.65rem, 4vw, 2.75rem);
  line-height: 1.2;
  text-align: center;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.ds-hero-title em {
  font-style: italic;
  color: var(--tchg-gold);
}

.ds-hero-lead {
  text-align: center;
  color: var(--tchg-muted);
  max-width: 36rem;
  margin: 1rem auto 0;
  font-size: 1.05rem;
}

/* Form card */
.ds-card-elevated {
  background: var(--tchg-bg-elevated);
  border: 1px solid var(--tchg-border);
  border-radius: var(--tchg-radius);
  box-shadow: var(--tchg-shadow-lg);
}

.ds-form-card-title {
  font-family: var(--tchg-font-serif);
  font-weight: 700;
  color: var(--tchg-primary);
  font-size: 1.35rem;
}

.ds-input-gold {
  border: 2px solid rgba(197, 162, 93, 0.55);
  border-radius: var(--tchg-radius-sm);
  background: #fffefb;
}

.ds-input-gold:focus {
  border-color: var(--tchg-gold);
  box-shadow: 0 0 0 0.2rem rgba(197, 162, 93, 0.2);
}

.ds-btn-cta {
  border-radius: var(--tchg-radius-sm);
  background: var(--tchg-primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  border: none;
  width: 100%;
}

.ds-btn-cta:hover {
  background: var(--tchg-primary-hover);
  color: #fff;
}

.ds-store-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--tchg-border);
  background: var(--tchg-bg-elevated);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tchg-text);
  text-decoration: none;
}

.ds-store-pill:hover {
  border-color: var(--tchg-gold);
  color: var(--tchg-primary);
}

/* Sections */
.ds-section-title {
  font-family: var(--tchg-font-serif);
  font-weight: 700;
  color: var(--tchg-primary);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.ds-section-title em {
  font-style: italic;
  color: var(--tchg-gold);
}

.ds-step-card {
  background: var(--tchg-bg-elevated);
  border: 1px solid var(--tchg-border);
  border-radius: var(--tchg-radius);
  padding: 1.5rem;
  box-shadow: var(--tchg-shadow);
  height: 100%;
}

.ds-step-num {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--ds-step-green);
  color: #f0faf4;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.ds-feature-tile {
  border-radius: var(--tchg-radius-sm);
  border: 1px solid var(--tchg-border);
  background: rgba(255, 254, 251, 0.85);
  padding: 1rem 0.75rem;
  text-align: center;
  height: 100%;
}

.ds-feature-tile i {
  font-size: 1.5rem;
  color: var(--ds-step-green);
}

/* Pricing */
.ds-price-card {
  border-radius: var(--tchg-radius);
  border: 2px solid var(--tchg-border);
  background: var(--tchg-bg-elevated);
  padding: 1.75rem;
  height: 100%;
  box-shadow: var(--tchg-shadow);
}

.ds-price-card--featured {
  border-color: var(--tchg-primary);
  background: linear-gradient(180deg, #5c1414 0%, #4a1212 28%, var(--tchg-bg-elevated) 28%);
  padding-top: 0;
  overflow: hidden;
}

.ds-price-head {
  background: transparent;
  color: var(--tchg-gold);
  text-align: center;
  padding: 1rem 1rem 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.ds-price-body {
  padding: 1.25rem 0.25rem 0.25rem;
}

.ds-price-amount {
  font-family: var(--tchg-font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--tchg-primary);
}

.ds-price-card--featured .ds-price-amount {
  color: var(--tchg-primary);
}

/* FAQ */
.ds-faq-item {
  border: 1px solid var(--tchg-border);
  border-radius: var(--tchg-radius-sm);
  background: rgba(255, 254, 251, 0.9);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.ds-faq-btn {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--tchg-text);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ds-faq-btn:not(.collapsed) {
  color: var(--tchg-primary);
}

.ds-faq-toggle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--tchg-gold-soft);
  color: var(--tchg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
}

/* Testimonials */
.ds-quote-card {
  border: 1px solid var(--tchg-border);
  border-radius: var(--tchg-radius);
  background: var(--tchg-bg-elevated);
  padding: 1.25rem;
  height: 100%;
  box-shadow: var(--tchg-shadow);
}

.ds-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.95rem;
}

/* Footer */
.ds-footer {
  background: var(--ds-footer);
  color: rgba(255, 250, 245, 0.88);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.ds-footer a {
  color: rgba(255, 250, 245, 0.85);
  text-decoration: none;
}

.ds-footer a:hover {
  color: var(--tchg-gold);
}

.ds-footer-brand {
  font-family: var(--tchg-font-serif);
  font-weight: 700;
  color: #fff;
  font-size: 1.25rem;
}

.ds-footer-rule {
  border-color: rgba(255, 255, 255, 0.12);
  margin: 1.5rem 0 1rem;
}

.ds-footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 250, 245, 0.55);
}

.ds-footer--compact {
  padding: 1.5rem 0;
}

.ds-page-card {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Wizard: 12 con giáp → giới tính → họ tên + sinh thời */
.ds-wizard-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--tchg-muted);
  text-transform: uppercase;
}

.ds-wizard-stepbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ds-wizard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd5cc;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--tchg-bg-elevated);
}

.ds-wizard-dot.is-active {
  background: var(--tchg-primary);
  transform: scale(1.2);
}

.ds-wizard-dot.is-done {
  background: var(--tchg-gold);
}

.ds-wizard-panel.d-none {
  display: none !important;
}

.ds-zodiac-cell {
  border: 1px solid var(--tchg-border);
  background: var(--tchg-bg-elevated) !important;
  border-radius: var(--tchg-radius-sm);
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  color: inherit;
}

.ds-zodiac-cell:hover {
  border-color: var(--tchg-gold);
}

.ds-zodiac-cell.is-selected {
  border-color: var(--tchg-primary);
  box-shadow: 0 0 0 2px rgba(139, 29, 29, 0.18);
}

.ds-zodiac-cell img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 4px rgba(139, 29, 29, 0.2));
}

.ds-gender-tile {
  cursor: pointer;
  border: 2px solid var(--tchg-border);
  border-radius: var(--tchg-radius);
  padding: 1.25rem 1rem;
  text-align: center;
  background: var(--tchg-bg-elevated);
  transition: border-color 0.15s, background 0.15s;
}

.ds-gender-tile:hover {
  border-color: var(--tchg-gold);
}

.ds-gender-tile.is-selected {
  border-color: var(--tchg-primary);
  background: rgba(139, 29, 29, 0.04);
}

.ds-gender-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 0.5rem;
  border: 2px solid var(--tchg-border);
  background: #fffefb;
}

.ds-gender-ring--male {
  border-color: var(--tchg-gold);
  color: var(--tchg-gold);
}

.ds-gender-ring--female {
  border-color: #c45c7a;
  color: #c45c7a;
}

.ds-card-elevated .form-check-input:checked {
  background-color: var(--tchg-primary);
  border-color: var(--tchg-primary);
}

/* Tabs drill-down kết quả (PC) */
.ds-result-tabs.nav-pills .nav-link {
  border-radius: 999px;
  color: var(--tchg-text);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.45rem 0.95rem;
  white-space: nowrap;
}

.ds-result-tabs.nav-pills .nav-link:hover {
  background: rgba(139, 29, 29, 0.08);
  color: var(--tchg-primary);
}

.ds-result-tabs.nav-pills .nav-link.active {
  background: var(--tchg-primary);
  color: #fff;
}

.ds-drill-card {
  border: 1px solid var(--tchg-border);
  border-radius: var(--tchg-radius);
  background: var(--tchg-bg-elevated);
  box-shadow: var(--tchg-shadow);
  overflow: hidden;
  max-height: min(70vh, 640px);
  overflow-y: auto;
}

.ds-drill-head {
  display: grid;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tchg-muted);
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--tchg-border);
  padding: 0.55rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Bảng drill theo tháng / ngày / canh (cùng lưới với mobile 11–13) */
.ds-drill-card .tchg-year-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--tchg-border);
  font-size: 0.8rem;
}

.ds-drill-card .tchg-canh-row {
  display: grid;
  grid-template-columns: 1fr 4.5rem 2.25rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--tchg-border);
  font-size: 0.75rem;
}

.ds-drill-card .tchg-hbar {
  height: 10px;
  border-radius: 5px;
  background: #e8e0d8;
  overflow: hidden;
}

.ds-drill-card .tchg-hbar > span {
  display: block;
  height: 100%;
  border-radius: 5px;
}

.ds-drill-card .tchg-hbar-pos > span {
  background: #8b1d1d;
}

.ds-drill-card .tchg-hbar-neg > span {
  background: #2a2420;
}

.ds-drill-card .tchg-year-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ds-drill-card .tchg-year-link:hover .tchg-year-row {
  background: rgba(139, 29, 29, 0.04);
}

/* Customer app: mobile bottom nav + auth gate */
.tchg-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--tchg-surface);
  border-top: 1px solid var(--tchg-border);
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -4px 20px rgba(42, 36, 32, 0.08);
}

.tchg-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  max-width: 480px;
  margin: 0 auto;
}

.tchg-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--tchg-muted);
  text-decoration: none;
  border-radius: 8px;
}

.tchg-bottom-nav a.active,
.tchg-bottom-nav a:hover {
  color: var(--tchg-primary);
}

.tchg-bottom-nav-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.tchg-auth-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(42, 36, 32, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tchg-auth-gate-backdrop.is-open {
  display: flex;
}

.tchg-auth-gate-modal {
  background: var(--tchg-surface);
  border-radius: var(--tchg-radius-lg);
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--tchg-shadow-lg);
}

.tchg-wizard-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tchg-wizard-step {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tchg-muted);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--tchg-border);
}

.tchg-wizard-step.active {
  color: var(--tchg-primary);
  border-bottom-color: var(--tchg-primary);
}

.tchg-wizard-step.done {
  color: var(--tchg-success);
  border-bottom-color: var(--tchg-success);
}

@media (max-width: 991.98px) {
  .tchg-bottom-nav {
    display: block;
  }

  .ds-shell-main {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0));
  }

  .ds-shell-header .ds-nav-desktop {
    display: none !important;
  }
}

.tchg-result-tabs .nav-link {
  color: var(--tchg-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.tchg-result-tabs .nav-link.active {
  color: var(--tchg-primary);
  border-bottom-color: var(--tchg-primary);
}

.tchg-result-tabs .nav-link.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tchg-energy-chart--locked {
  position: relative;
}

.tchg-energy-chart--locked::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(253, 251, 247, 0.92));
  pointer-events: none;
}

.tchg-chart-host {
  min-height: 220px;
}
