@charset "UTF-8";

/* Home, history, profile, growth */



.shell-app .page-hero,
.shell-app .page-card,
.shell-app .profile-panel,
.shell-app .admin-dashboard-panel,
.shell-app .admin-dashboard-stat,
.shell-app .admin-readings-panel,
.shell-app .admin-ai-shell > .card {
  border-radius: 22px;
}

.shell-app .home-shell .home-layout {
  row-gap: 1rem;
}

.shell-app .home-shell .home-picker-card {
  padding: 0.82rem 0.85rem;
}

.shell-app .home-shell .home-spread-note {
  padding: 0.8rem 0.85rem;
}

.shell-app .home-shell .home-consult-grid {
  grid-template-columns: 1fr;
}

.shell-app .home-shell .home-wechat-qr {
  width: min(100%, 180px);
}

.shell-app .history-shell .history-card-item {
  padding: 0.95rem;
}

.shell-app .history-shell .history-card-item__card-grid {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.shell-app .history-shell .page-card__toolbar > .d-flex {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 0.55rem !important;
}

.shell-app .history-shell .page-card__toolbar > .d-flex .btn {
  flex: 1 1 calc(50% - 0.55rem);
}

.shell-app .profile-shell .profile-facts {
  gap: 0.65rem;
}

.shell-app .profile-shell .profile-fact {
  padding: 0.85rem 0.9rem;
}

.shell-app .profile-shell .profile-fact__value {
  font-size: 0.96rem;
}

.shell-app .profile-shell .profile-panel .card-body {
  padding: 1rem;
}

.shell-app .profile-shell .profile-editor-card .form-control,
.shell-app .profile-shell .profile-editor-card .form-select {
  min-height: 46px;
}

.shell-app .admin-readings-shell .history-card-item__head .d-flex.align-items-start.gap-3 {
  width: 100%;
}

.shell-app .admin-readings-shell .history-card-item__head > .d-flex.gap-2.flex-wrap {
  width: 100%;
}

.shell-app .admin-readings-shell .history-card-item__head > .d-flex.gap-2.flex-wrap .btn {
  flex: 1 1 calc(50% - 0.5rem);
}

.history-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.history-card-link:hover,
.history-card-link:focus-visible {
  color: inherit;
  text-decoration: none;
}

.history-card-item {
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,244,241,0.98) 100%);
  box-shadow: var(--shadow-card);
  padding: 1.05rem 1.1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.history-card-link:hover .history-card-item,
.history-card-link:focus-visible .history-card-item,
.history-card-item:hover {
  transform: translateY(-1px);
  border-color: #d9c8b6;
  box-shadow: 0 16px 34px rgba(61, 43, 29, 0.1);
}

.history-card-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.history-card-item__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-strong);
}

.history-card-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.history-card-item__meta span {
  display: inline-flex;
  align-items: center;
}

.history-card-item__question {
  color: #332a24;
  font-weight: 600;
  line-height: 1.75;
  margin-bottom: 0.7rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.history-card-item__cards {
  border-radius: 16px;
  background: rgba(120, 92, 70, 0.08);
  color: #6b5647;
  line-height: 1.7;
  padding: 0.8rem 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.history-card-item__cards-wrap {
  display: grid;
  gap: 0.55rem;
}

.history-card-item__cards-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a6657;
  font-weight: 700;
}

.history-card-item__card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.6rem;
}

.history-card-pill {
  display: grid;
  gap: 0.16rem;
  border-radius: 16px;
  border: 1px solid #eadfce;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(249,244,238,0.98) 100%);
  padding: 0.72rem 0.78rem;
  min-width: 0;
}

.history-card-pill__position {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b7463;
}

.history-card-pill__name {
  color: #2c2520;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.history-card-pill__ori {
  color: #6f5c4d;
  font-size: 0.84rem;
}

.profile-facts {
  display: grid;
  gap: 0.75rem;
}

.profile-fact {
  border: 1px solid #e7ddd3;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,244,239,0.98) 100%);
  padding: 0.95rem 1rem;
}

.profile-fact__label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a7364;
  font-weight: 700;
}

.profile-fact__value {
  color: #2f2823;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}

.profile-danger-card {
  border: 1px solid #f0d0d0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,245,245,0.98) 100%);
}

.profile-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(198, 190, 182, 0.88) 20%, rgba(198, 190, 182, 0.88) 80%, transparent 100%);
  margin: 0.2rem 0;
}

.home-layout .card {
  border-radius: 0.75rem;
}

.home-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.home-picker-card {
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f7f4f1 100%);
  padding: 0.9rem 0.95rem;
  box-shadow: var(--shadow-card);
}

.home-preflight-card {
  border: 1px solid #e8ddd2;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,244,239,0.98) 100%);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.05rem;
}

.home-preflight-list {
  display: grid;
  gap: 0.65rem;
}

.home-preflight-item {
  position: relative;
  padding: 0.8rem 0.9rem 0.8rem 2.4rem;
  border-radius: 14px;
  border: 1px solid #eadfce;
  background: rgba(255,255,255,0.92);
  color: #433831;
  line-height: 1.6;
}

.home-preflight-item::before {
  content: "…";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: -0.52rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ece4db;
  color: #7a6657;
}

.home-preflight-item[data-state="ok"] {
  border-color: #c8dfc7;
  background: rgba(245, 251, 244, 0.96);
}

.home-preflight-item[data-state="ok"]::before {
  content: "✓";
  background: #d9edd8;
  color: #2f6a2a;
}

.home-preflight-item[data-state="warn"] {
  border-color: #f0ddad;
  background: rgba(255, 251, 242, 0.97);
}

.home-preflight-item[data-state="warn"]::before {
  content: "!";
  background: #f8e7bd;
  color: #8a6118;
}

.home-preflight-item[data-state="error"] {
  border-color: #efc8c8;
  background: rgba(255, 246, 246, 0.98);
}

.home-preflight-item[data-state="error"]::before {
  content: "×";
  background: #f6d9d9;
  color: #9b2f2f;
}

.home-guide-details {
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  padding: 14px 16px;
  background: #faf8f4;
}

.home-guide-panel {
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  padding: 14px 16px;
  background: #faf8f4;
}

.home-guide-details > summary {
  cursor: pointer;
  list-style: none;
}

.home-guide-details > summary::-webkit-details-marker {
  display: none;
}

.home-guide-details[open] > summary {
  margin-bottom: 8px;
}

.feature-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.feature-summary-card {
  border: 1px solid #e6ddd4;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,243,238,0.98) 100%);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.05rem;
}

.feature-summary-card__label {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a7364;
  font-weight: 700;
}

.feature-summary-card__value {
  margin-top: 0.4rem;
  color: #211c18;
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
  font-weight: 700;
}

.feature-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.feature-switch-card {
  display: grid;
  gap: 0.8rem;
  border: 1px solid #e8ddd2;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,244,239,0.98) 100%);
  box-shadow: 0 10px 22px rgba(45, 34, 24, 0.05);
  padding: 1rem 1.05rem;
}

.feature-switch-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.feature-switch-card__title {
  color: #2f2823;
  font-size: 1rem;
  font-weight: 700;
}

.feature-switch-card__desc {
  margin-top: 0.35rem;
  color: #64564b;
  line-height: 1.72;
}

.feature-switch-card__surface {
  color: #7b6657;
  font-size: 0.85rem;
  line-height: 1.65;
}

.feature-switch-card__footer {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: end;
}

.feature-switch-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

@media (max-width: 991.98px) {
  .feature-summary-grid,
  .feature-switch-grid {
    grid-template-columns: 1fr;
  }

  .feature-switch-card__footer {
    grid-template-columns: 1fr;
  }

  .feature-switch-card__links {
    justify-content: flex-start;
  }
}

.home-picker-card--accent {
  border-color: #b8c5d4;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f6 100%);
}

.home-picker-card__label {
  display: block;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.2rem;
}

.home-picker-card__hint {
  font-size: 0.84rem;
  color: var(--text-soft);
  margin-bottom: 0.55rem;
}

.home-picker-card__select {
  background-color: #fff;
  font-weight: 600;
}

.home-spread-note {
  border: 1px solid #d8c5a7;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbf3e8 0%, #f4eadb 100%);
  color: #4f4131;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.85rem;
}

.home-consult-card {
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f1ed 100%);
  padding: 1rem;
}

.home-consult-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 248px);
  gap: 1rem;
  align-items: start;
}

.home-consult-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  list-style: none;
  padding-left: 0;
  line-height: 1.55;
}

.home-consult-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
}

.home-consult-list__label {
  min-width: 0;
}

.home-consult-list__price {
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.home-wechat-card {
  border: 1px solid #ded8d1;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #f7f4f1 100%);
  padding: 0.85rem;
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  text-align: center;
}

.home-wechat-qr {
  width: min(100%, 220px);
  border-radius: 18px;
  background: #fff;
  padding: 0.55rem;
  border: 1px solid #d9d2cb;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.06);
}

.home-wechat-qr--placeholder {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #7a736b;
  font-weight: 700;
}

.home-wechat-meta {
  display: grid;
  gap: 0;
}

.home-wechat-meta__title {
  font-weight: 700;
  color: var(--text-strong);
}

.home-sidebar-stack,
.reading-stack {
  display: grid;
  gap: 1rem;
}

.growth-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.growth-stat-card {
  border: 1px solid var(--surface-border);
  border-radius: var(--card-radius-sm);
  background: linear-gradient(180deg, #fff 0%, #f7f4f1 100%);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.05rem;
}

.growth-stat-card__label {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}

.growth-stat-card__value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-strong);
}

.growth-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.growth-topic-list,
.growth-summary-list,
.growth-copy-list,
.notification-list {
  display: grid;
  gap: 0.85rem;
}

.growth-topic-item,
.growth-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid #e3ddd6;
  border-radius: 14px;
  background: #f7f4f1;
  padding: 0.8rem 0.9rem;
}

.growth-summary-item--wide {
  align-items: flex-start;
}

.growth-topic-item strong,
.growth-summary-item strong {
  color: var(--text-strong);
}

.growth-copy-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-strong);
  line-height: 1.75;
}

.notification-card {
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f7f4f1 100%);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

.notification-card.is-unread {
  border-color: #b8c5d4;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f6 100%);
}

.notification-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.notification-card__meta {
  font-size: 0.84rem;
  color: var(--text-soft);
  margin-top: 0.3rem;
}

.notification-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notification-card__body {
  margin-top: 0.8rem;
}

@media (max-width: 991.98px) {
  .growth-stats-grid,
  .growth-section-grid,
  .home-consult-grid {
    grid-template-columns: 1fr;
  }

  .page-shell > .row {
    --bs-gutter-x: 1rem;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-shell__sidebar {
    position: static;
  }

  .admin-sidebar-card {
    padding: 0.95rem;
  }

  .site-navbar__grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .site-navbar__center {
    justify-content: flex-start;
  }

  .site-navbar__right {
    justify-content: flex-start;
  }

  .reading-toolbar {
    align-items: stretch !important;
  }

  .reading-toolbar > div {
    width: 100%;
  }

  .reading-toolbar > .d-flex {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.5rem !important;
  }

  .reading-toolbar > .d-flex .btn {
    width: 100%;
  }

  .card .row.g-2 > [class*="col-"],
  .card .row.g-3 > [class*="col-"] {
    margin-bottom: 0.25rem;
  }

  .admin-readings-search,
  .admin-messages-search {
    width: 100%;
  }

  .quickqa-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quickqa-decision-bar {
    flex-direction: column;
  }

  .ai-history-detail__meta {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .home-layout > .col-md-7 {
    flex: 0 0 auto;
    width: 58.33333333%;
    max-width: 58.33333333%;
  }

  .home-layout > .col-md-5 {
    flex: 0 0 auto;
    width: 41.66666667%;
    max-width: 41.66666667%;
  }
}

@media (max-width: 767.98px) {
  .home-layout > [class*="col-"] {
    width: 100%;
  }

  .home-picker-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .card-body {
    padding: 0.9rem;
  }

  .admin-sidebar-card__head {
    display: block;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
  }

  .admin-sidebar-card__eyebrow {
    font-size: 0.64rem;
    letter-spacing: 0.14em;
  }

  .admin-sidebar-card__title {
    font-size: 1rem;
  }

  .admin-sidebar-nav__section {
    padding: 0.72rem 0.75rem;
    border-radius: 16px;
  }

  .admin-sidebar-nav__label {
    font-size: 0.64rem;
    letter-spacing: 0.14em;
  }

  .admin-sidebar-link {
    min-height: 46px;
    padding: 0.72rem 0.78rem;
    font-size: 0.9rem;
    align-items: flex-start;
  }

  .admin-sidebar-link-row {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .admin-sidebar-subnav {
    padding: 0.72rem;
    border-radius: 16px;
  }

  .app-shell-header__inner {
    min-height: 66px;
  }

  .app-shell-tabbar__grid {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .admin-jump-form {
    width: 100%;
  }

  .admin-jump-form__field {
    min-width: 0;
    flex: 1 1 100%;
  }

  .ai-history-summary {
    grid-template-columns: 1fr;
  }

  .ai-history-entry__actions {
    width: 100%;
    justify-content: stretch;
  }

  .ai-history-entry__actions .btn {
    width: 100%;
  }

  .home-shell .btn:not([href*="my_history"]) {
    white-space: normal;
  }

  .btn-sm {
    font-size: 0.8rem;
  }

  .form-control,
  .form-select,
  textarea {
    font-size: 16px;
  }

  .table {
    font-size: 0.86rem;
  }

  .table td,
  .table th {
    vertical-align: middle;
  }

  .home-layout .card-title {
    font-size: 1.05rem;
  }

  .markdown-output h1 { font-size: 1.3rem; }
  .markdown-output h2 { font-size: 1.18rem; }
  .markdown-output h3 { font-size: 1.08rem; }
  .markdown-output h4,
  .markdown-output h5,
  .markdown-output h6 { font-size: 1rem; }

  .markdown-output ul,
  .markdown-output ol {
    margin-left: 0.95rem;
    padding-left: 0.7rem;
  }

  .deepseek-output {
    font-size: 0.95rem;
    line-height: 1.72;
  }

  .deepseek-output.is-collapsed {
    max-height: 56vh;
  }

  .alert {
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.8rem;
  }

  .reading-toolbar > .d-flex {
    grid-template-columns: 1fr !important;
  }

  .reading-toolbar .btn {
    font-size: 0.9rem;
  }

  details > summary {
    padding: 0.2rem 0;
  }

  .table-responsive {
    margin-left: -2px;
    margin-right: -2px;
  }

  .admin-readings-search,
  .admin-messages-search,
  .admin-record-card__grid,
  .admin-message-card__grid,
  .admin-message-card__forms,
  .admin-message-card__formgrid {
    grid-template-columns: 1fr;
  }

  .admin-task-card__head,
  .admin-record-card__head,
  .admin-message-card__head,
  .notification-card__head {
    grid-template-columns: 1fr;
  }

  .admin-section-head__actions,
  .admin-bulk-toolbar__actions,
  .admin-readings-actions,
  .admin-task-card__actions,
  .admin-message-card__meta {
    width: 100%;
  }

  .admin-bulk-toolbar,
  .page-hero__row,
  .page-card__head,
  .page-card__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-hero__row > :first-child,
  .page-card__head > :first-child,
  .page-card__toolbar > :first-child {
    flex: 0 1 auto;
  }

  .quickqa-top-actions,
  .quickqa-primary-actions,
  .quickqa-secondary-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
  }

  .quickqa-top-actions .btn,
  .quickqa-primary-actions .btn,
  .quickqa-secondary-actions .btn {
    width: 100%;
  }

  .quickqa-inline-note {
    grid-column: 1 / -1;
  }

  .page-hero__actions {
    justify-content: stretch;
  }

  .history-card-item {
    padding: 0.95rem;
  }

  .history-card-item__head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-bulk-toolbar__actions,
  .admin-section-head__actions .btn,
  .admin-task-card__actions .btn,
  .admin-readings-actions .btn,
  .admin-readings-inline-form,
  .admin-messages-search .form-control-sm,
  .admin-messages-search .form-select-sm {
    width: 100%;
  }

  .admin-bulk-toolbar__actions {
    flex-wrap: wrap;
  }

  .page-hero__actions .btn,
  .page-card__toolbar .btn,
  .admin-readings-actions .btn,
  .admin-readings-inline-form .btn,
  .admin-message-card__meta .btn,
  .admin-message-card__footer .btn {
    width: 100%;
    min-width: 0;
  }

  .admin-info-block--wide {
    grid-column: span 1;
  }

  .notification-card__actions {
    width: 100%;
  }

  .quickqa-summary-grid {
    grid-template-columns: 1fr;
  }

  .quickqa-process-step,
  .quickqa-filter-chip {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 575.98px) {
  .history-card-item__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.55rem;
  }

  .history-card-item__card-grid {
    grid-template-columns: 1fr;
  }

  .history-card-pill {
    padding: 0.68rem 0.72rem;
  }
}

.question-help-trigger {
  white-space: nowrap;
}

.question-help-modal__dialog {
  max-width: 880px;
}

.question-help-modal .modal-header {
  padding-top: 0.9rem;
  padding-bottom: 0.75rem;
}

.question-help-modal .modal-title {
  font-size: 1.05rem;
  line-height: 1.35;
}

.question-help-modal__intro {
  display: grid;
  gap: 0.7rem;
}

.question-help-modal__progress {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  margin-bottom: 0.55rem;
  padding: 0.05rem 0.05rem 0.2rem;
}

.question-help-modal__progress-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  min-height: 0;
  min-width: 2rem;
  padding: 0.34rem;
  border: 1px solid #eadfce;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: #7a6657;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.question-help-modal__progress-step.is-active {
  border-color: #caa77f;
  background: linear-gradient(180deg, rgba(248, 241, 232, 0.98) 0%, rgba(244, 233, 219, 0.98) 100%);
  color: #2f2823;
  gap: 0.42rem;
  padding: 0.38rem 0.72rem;
}

.question-help-modal__progress-step.is-complete {
  border-color: #d6e5d4;
  background: linear-gradient(180deg, rgba(246, 252, 245, 0.98) 0%, rgba(238, 247, 236, 0.98) 100%);
  color: #355c31;
}

.question-help-modal__progress-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: #ece4db;
  color: #7a6657;
  font-size: 0.74rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.question-help-modal__progress-step.is-active .question-help-modal__progress-index {
  background: #caa77f;
  color: #fff;
}

.question-help-modal__progress-step.is-complete .question-help-modal__progress-index {
  background: #6ea26a;
  color: #fff;
}

.question-help-modal__progress-label {
  display: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.question-help-modal__progress-step.is-active .question-help-modal__progress-label {
  display: inline;
}

.question-help-modal__actions,
.question-help-modal__choices {
  display: grid;
  gap: 0.75rem;
}

.question-help-modal__step {
  display: grid;
  gap: 0.9rem;
  position: relative;
  z-index: 1;
}

.question-help-modal__topic {
  display: grid;
  gap: 0.75rem;
}

.question-help-modal__helper-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.question-help-modal__helper-point {
  border-radius: 14px;
  background: rgba(120, 92, 70, 0.06);
  color: #5d4c3f;
  font-size: 0.86rem;
  line-height: 1.58;
  padding: 0.58rem 0.72rem;
}

.question-help-modal__step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(202, 167, 127, 0.15);
  color: #79583d;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.question-help-modal__scene-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #e3d4c3;
  background: rgba(255,255,255,0.92);
  color: #5a4637;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
}

.question-help-modal__topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.question-help-modal__topic-grid--lenormand {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.question-help-topic-chip {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  width: 100%;
  border: 1px solid #e8ddd2;
  border-radius: 999px;
  background: #fff;
  color: #3a2f27;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.72rem 0.9rem;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.question-help-topic-chip.is-active,
.question-help-topic-chip:hover,
.question-help-topic-chip:focus-visible {
  border-color: #caa77f;
  background: linear-gradient(180deg, rgba(248, 241, 232, 0.98) 0%, rgba(244, 233, 219, 0.98) 100%);
  box-shadow: 0 10px 24px rgba(99, 74, 48, 0.12);
  color: #2f2823;
}

.question-help-topic-chip--wide {
  grid-column: 1 / -1;
}

.question-help-modal__topic-note {
  border-radius: 14px;
  background: rgba(120, 92, 70, 0.08);
  color: #5d4c3f;
  font-size: 0.88rem;
  line-height: 1.7;
  padding: 0.78rem 0.86rem;
}

.question-help-modal__summary {
  border-radius: 14px;
  border: 1px solid #eadfce;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(249,244,238,0.98) 100%);
  color: #5a4637;
  font-size: 0.88rem;
  line-height: 1.7;
  padding: 0.72rem 0.86rem;
}

.question-help-modal__choices {
  margin-top: 1rem;
}

.question-help-modal__actions .btn,
.question-help-modal__choices .question-help-choice {
  min-height: 52px;
  white-space: normal;
}

.question-help-choice {
  width: 100%;
  border: 1px solid #e8ddd2;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,244,239,0.98) 100%);
  box-shadow: var(--shadow-card);
  color: #2f2823;
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  text-align: left;
}

.question-help-choice strong {
  font-size: 0.96rem;
}

.question-help-choice span {
  color: #6a5a4d;
  font-size: 0.9rem;
  line-height: 1.65;
}

.question-help-back {
  align-self: flex-start;
  color: #7a5a42;
  text-decoration: none;
}

.question-help-back:hover,
.question-help-back:focus-visible {
  color: #5f432f;
  text-decoration: underline;
}

.question-help-modal__footer {
  align-items: center;
}

.question-help-modal__footer-note {
  line-height: 1.5;
}

.question-help-modal__step.is-submitting {
  opacity: 0.86;
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .question-help-trigger {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .question-help-modal .modal-header {
    padding-top: 0.85rem;
    padding-bottom: 0.65rem;
  }

  .question-help-modal .modal-title {
    font-size: 1rem;
  }

  .question-help-modal__progress {
    gap: 0.32rem;
    margin-bottom: 0.5rem;
    padding-inline: 0.05rem 0.15rem;
  }

  .question-help-modal__progress-step {
    min-width: 1.9rem;
    padding: 0.3rem;
  }

  .question-help-modal__progress-step.is-active {
    padding: 0.34rem 0.6rem;
  }

  .question-help-modal__helper-point {
    font-size: 0.84rem;
    padding: 0.55rem 0.68rem;
  }

  .question-help-modal__topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-help-modal__topic-grid--lenormand {
    grid-template-columns: 1fr;
  }

  .question-help-modal__actions {
    grid-template-columns: 1fr;
  }

  .question-help-modal__footer {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
  }

  .question-help-modal__footer .btn {
    width: 100%;
  }

  .question-help-modal__step-badge,
  .question-help-modal__scene-pill {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 399.98px) {
  .question-help-modal__progress {
    gap: 0.35rem;
  }

  .question-help-modal__progress-step {
    min-width: 1.8rem;
    padding: 0.28rem;
  }

  .question-help-modal__topic-grid {
    grid-template-columns: 1fr;
  }

  .question-help-topic-chip {
    font-size: 0.9rem;
    padding: 0.78rem 0.82rem;
  }

  .question-help-modal__progress-step.is-active {
    padding: 0.32rem 0.52rem;
  }

  .question-help-modal__progress-label {
    font-size: 0.76rem;
  }

  .question-help-modal__helper-points {
    grid-template-columns: 1fr;
  }
}

/* Homepage premium polish (keeps existing layout skeleton) */
.home-shell > .page-hero {
  position: relative;
  overflow: hidden;
  border-color: rgba(206, 181, 153, 0.52);
  background:
    radial-gradient(circle at 16% 20%, rgba(229, 191, 156, 0.2), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 246, 234, 0.11), transparent 34%),
    linear-gradient(135deg, rgba(23, 32, 44, 0.96) 0%, rgba(50, 34, 26, 0.95) 56%, rgba(130, 75, 55, 0.93) 100%);
  box-shadow: 0 24px 44px rgba(22, 16, 13, 0.22);
}

.home-shell > .page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 246, 233, 0.06) 0%, rgba(255, 246, 233, 0) 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 44%);
}

.home-shell > .page-hero .page-hero__row {
  align-items: center;
  gap: 1.25rem;
}

.home-shell > .page-hero .page-hero__title {
  font-size: clamp(1.85rem, 1.42rem + 1.65vw, 2.95rem);
  line-height: 1.12;
  color: #fff8f0;
  letter-spacing: -0.012em;
}

.home-shell > .page-hero .page-hero__desc {
  color: rgba(251, 239, 226, 0.86);
  max-width: 64ch;
  letter-spacing: 0.01em;
}

.home-shell > .page-hero .page-hero__actions {
  justify-content: flex-start;
  gap: 0.7rem;
}

.home-shell > .page-hero .page-hero__actions .btn {
  min-height: 48px;
  padding-inline: 1.16rem;
  box-shadow: 0 12px 24px rgba(28, 18, 13, 0.22);
}

.home-shell .home-form-card > .card-body,
.home-shell .home-sidebar-stack .page-card > .card-body {
  padding: clamp(1.02rem, 0.92rem + 0.35vw, 1.3rem);
}

.home-shell .home-form-card,
.home-shell .home-sidebar-stack .page-card,
.home-shell .home-picker-card,
.home-shell .home-preflight-card {
  border-color: rgba(204, 178, 149, 0.58);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.99) 0%, rgba(246, 236, 224, 0.97) 100%);
  box-shadow: 0 16px 32px rgba(64, 46, 31, 0.08);
}

.home-shell .home-picker-card:hover,
.home-shell .home-preflight-card:hover,
.home-shell .home-form-card:hover,
.home-shell .home-sidebar-stack .page-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(64, 46, 31, 0.1);
}

.home-shell .home-picker-card__label,
.home-shell .home-preflight-card .fw-semibold,
.home-shell .home-sidebar-stack .card-title {
  letter-spacing: 0.01em;
  color: #2f251f;
}

.home-shell .home-consult-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 242, 228, 0.1);
  background: linear-gradient(155deg, rgba(31, 40, 53, 0.98) 0%, rgba(58, 37, 27, 0.97) 100%);
  box-shadow: 0 24px 44px rgba(24, 17, 13, 0.22), 0 0 36px rgba(184, 120, 89, 0.12);
}

.home-shell .home-consult-card .fw-semibold,
.home-shell .home-consult-card .home-wechat-meta__title {
  color: #fff8ef;
}

.home-shell .home-reminder-card {
  border-color: rgba(208, 183, 154, 0.58);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.99) 0%, rgba(246, 238, 228, 0.97) 100%);
}

.home-shell .home-reminder-card .card-body {
  display: grid;
  gap: 0.35rem;
}

.home-shell .home-reminder-card .fw-semibold {
  letter-spacing: 0.01em;
  color: #2f251f;
}

.home-shell .home-reminder-card .text-secondary {
  line-height: 1.65;
}

.home-shell .home-consult-list {
  list-style: none;
  padding-left: 0;
  gap: 0.4rem;
}

.home-shell .home-consult-list li {
  border: 1px solid rgba(255, 242, 228, 0.12);
  border-radius: 13px;
  background: rgba(255, 249, 242, 0.05);
  color: rgba(255, 246, 236, 0.9);
  padding: 0.55rem 0.68rem;
  line-height: 1.52;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
}

.home-shell .home-consult-list__label {
  color: rgba(255, 246, 236, 0.9);
}

.home-shell .home-consult-list__price {
  color: #f6dfc6;
  white-space: nowrap;
  word-break: keep-all;
}

.lenormand-home-shell .home-consult-list li {
  white-space: nowrap;
}

.question-template-scroll-frame {
  max-height: 18rem;
}

.home-shell .home-wechat-card {
  border-color: rgba(236, 220, 198, 0.3);
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.97) 0%, rgba(248, 240, 230, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 24px rgba(18, 13, 10, 0.12);
}

.home-shell .home-wechat-qr {
  width: min(100%, 156px);
  border-radius: 16px;
  border-color: rgba(215, 197, 173, 0.8);
  box-shadow: 0 10px 22px rgba(20, 15, 12, 0.12);
}

.home-shell .home-wechat-meta .text-secondary,
.home-shell .home-consult-card .small.text-secondary {
  color: rgba(255, 241, 224, 0.97) !important;
}

.home-shell .home-sidebar-stack .alert.alert-light {
  border-color: rgba(202, 180, 154, 0.54);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.96) 0%, rgba(246, 238, 228, 0.95) 100%);
}

.home-preflight-origin:empty,
.home-preflight-slot:empty {
  display: none;
}

.home-preflight-slot:not(:empty) {
  margin: 0;
}

@media (max-width: 991.98px) {
  .home-shell > .page-hero .page-hero__actions {
    justify-content: flex-start;
  }
}
