/* 慧緣堂 /zrg: intake sits in the empty black band under the pedestal.
   The shell grows past the art when birth fields open, so the page can scroll. */

body.zrg-home-intake .landing-viewport {
  align-items: flex-start;
}

.zrg-shell.zrg-home-intake {
  aspect-ratio: auto;
  height: auto;
  background: #000;
  overflow: hidden;
}

.zrg-shell.zrg-home-intake .zrg-art-sizer {
  width: 100%;
  aspect-ratio: var(--zrg-home-bg-w) / var(--zrg-home-bg-h);
  pointer-events: none;
}

.zrg-shell.zrg-home-intake.product-home-art-aligned > .funnel-top-strips {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
}

.zrg-shell.zrg-home-intake.product-home-art-aligned > .zrg-main {
  --zrg-band: calc(0.32 * var(--zrg-home-bg-h) / var(--zrg-home-bg-w) * 100cqw);
  position: relative;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 8px;
  width: auto;
  height: auto;
  margin-top: calc(-1 * var(--zrg-band));
  min-height: var(--zrg-band);
  padding: 0 18px max(14px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  pointer-events: auto;
}

.zrg-shell.zrg-home-intake .zrg-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.zrg-shell.zrg-home-intake.product-home-art-aligned > .zrg-main {
  padding-top: 10px;
}

.zrg-shell.zrg-home-intake .zrg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.zrg-shell.zrg-home-intake .zrg-label {
  margin: 0;
  text-align: center;
  font-size: clamp(0.92rem, 3.5cqw, 1.05rem);
  font-weight: 700;
  line-height: 1.35;
  color: #f6edd6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.zrg-shell.zrg-home-intake .zrg-help-em {
  color: #ffd27a;
  font-weight: 800;
}

.zrg-shell.zrg-home-intake .zrg-form-error {
  margin: 0;
  text-align: center;
  color: #ffb4b4;
  font-size: 0.92rem;
  font-weight: 700;
}

.zrg-shell.zrg-home-intake .zrg-activity-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.zrg-shell.zrg-home-intake .zrg-activity-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.zrg-shell.zrg-home-intake .zrg-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(212, 173, 102, 0.92);
  background: rgba(12, 10, 8, 0.78);
  color: #f6edd6;
  font: inherit;
  font-size: clamp(0.95rem, 3.4cqw, 1.05rem);
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.zrg-shell.zrg-home-intake .zrg-activity-open {
  display: flex;
  align-items: center;
}

.zrg-shell.zrg-home-intake .zrg-activity-open-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.zrg-shell.zrg-home-intake .zrg-activity-open-label strong {
  font-weight: 800;
  color: #fff8e8;
}

.zrg-shell.zrg-home-intake .zrg-activity-placeholder {
  font-weight: 600;
  color: rgba(246, 237, 214, 0.72);
}

/* Next action is a gold button. After a choice, the control becomes the bordered box. */
.zrg-shell.zrg-home-intake .zrg-activity-open:has(.zrg-activity-placeholder) {
  justify-content: center;
  min-height: 48px;
  border: 2px solid #e8d18a;
  background: linear-gradient(90deg, #c38a2d 0%, #f1d890 30%, #c38a2d 60%, #f1d890 100%);
  background-size: 220% 100%;
  color: #5b0f0f;
  -webkit-text-fill-color: #5b0f0f;
  font-weight: 800;
  font-size: clamp(1.02rem, 4cqw, 1.2rem);
  text-align: center;
  box-shadow: 0 4px 14px rgba(128, 34, 18, 0.28);
  animation: product-home-btn-shimmer 4s ease-in-out infinite;
}

.zrg-shell.zrg-home-intake .zrg-activity-open:has(.zrg-activity-placeholder) .zrg-activity-open-label {
  flex: 0 1 auto;
  text-align: center;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.zrg-shell.zrg-home-intake .zrg-activity-open:has(.zrg-activity-placeholder) .zrg-activity-placeholder {
  color: #5b0f0f;
  -webkit-text-fill-color: #5b0f0f;
  font-weight: 800;
}

.zrg-shell.zrg-home-intake .zrg-activity-open:has(.zrg-activity-placeholder):hover {
  background: linear-gradient(90deg, #a66f14 0%, #e8c86a 50%, #a66f14 100%);
  background-size: auto;
  transform: translateY(-1px);
  animation: none;
}

.zrg-shell.zrg-home-intake .zrg-input:focus-visible {
  outline: 2px solid rgba(255, 236, 180, 0.92);
  outline-offset: 2px;
}

.zrg-shell.zrg-home-intake .zrg-dob-slot-row + .zrg-dob-slot-row,
.zrg-shell.zrg-home-intake #zrg-dob2-row {
  margin-top: 8px;
}

.zrg-shell.zrg-home-intake .zrg-actions {
  margin-top: 14px;
}

.zrg-shell.zrg-home-intake .zrg-btn {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 2px solid #e8d18a;
  border-radius: 10px;
  background: linear-gradient(90deg, #c38a2d 0%, #f1d890 30%, #c38a2d 60%, #f1d890 100%);
  background-size: 220% 100%;
  color: #5b0f0f;
  -webkit-text-fill-color: #5b0f0f;
  font: inherit;
  font-size: clamp(1.02rem, 4cqw, 1.2rem);
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(128, 34, 18, 0.28);
  animation: product-home-btn-shimmer 4s ease-in-out infinite;
}

.zrg-shell.zrg-home-intake .zrg-btn:hover {
  background: linear-gradient(90deg, #a66f14 0%, #e8c86a 50%, #a66f14 100%);
  background-size: auto;
  transform: translateY(-1px);
  animation: none;
}

.zrg-shell.zrg-home-intake .zrg-btn.is-loading,
.zrg-shell.zrg-home-intake .zrg-btn:disabled {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
  animation: none;
  transform: none;
}

.zrg-shell.zrg-home-intake.product-home-art-aligned .landing-foot {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  margin-top: auto;
  pointer-events: auto;
  gap: 2px;
}

body.zrg-home-intake .zrg-activity-dropdown {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #1a140c;
  border: 1px solid rgba(212, 173, 102, 0.9);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  color: #f6edd6;
}

body.zrg-home-intake .zrg-activity-dropdown[hidden] {
  display: none !important;
}

body.zrg-home-intake .zrg-activity-option {
  margin: 0;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.98rem;
  line-height: 1.4;
  color: #f6edd6;
  text-align: left;
  white-space: normal;
}

body.zrg-home-intake .zrg-activity-option strong {
  font-weight: 800;
  color: #fff8e8;
}

body.zrg-home-intake .zrg-activity-option:hover,
body.zrg-home-intake .zrg-activity-option[aria-selected="true"] {
  background: rgba(212, 173, 102, 0.18);
}

/* Birth-date dialog. Shared field layout is wgt-dob-modal.css. */
body.zrg-home-intake {
  --zh-inner-col-max: 400px;
  --zh-gold-border: rgba(196, 148, 40, 0.92);
}

body.zrg-home-intake .wgt-dob-modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: grid;
  place-items: center;
  padding: 0;
  box-sizing: border-box;
}

body.zrg-home-intake .wgt-dob-modal[hidden] {
  display: none !important;
}

body.zrg-home-intake .wgt-dob-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

body.zrg-home-intake .wgt-dob-modal-dialog {
  position: fixed;
  top: var(--wgt-dob-top, 50%);
  left: var(--wgt-dob-center-x, 50%);
  transform: translate(-50%, var(--wgt-dob-translate-y, -50%));
  z-index: 1;
  width: min(calc(100vw - 24px), var(--zh-inner-col-max));
  max-width: var(--zh-inner-col-max);
  max-height: min(92dvh, 92vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 3px solid var(--zh-gold-border);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  padding: 14px 12px 12px;
  box-sizing: border-box;
}

body.zrg-home-intake.wgt-dob-modal-open {
  overflow: hidden;
}

body.zrg-home-intake .wgt-dob-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 8px 0 2px;
  background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, 0.92));
}

body.zrg-home-intake .wgt-dob-secondary-btn,
body.zrg-home-intake .wgt-dob-decline-btn {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

body.zrg-home-intake .wgt-dob-secondary-btn {
  min-height: 50px;
  border: 2px solid #d4b46a;
  background: linear-gradient(90deg, #d0aa52 0%, #ffe7a6 50%, #d0aa52 100%);
  color: #5b0f0f;
  -webkit-text-fill-color: #5b0f0f;
  font-size: 1.05rem;
}

body.zrg-home-intake .wgt-dob-decline-btn {
  border: 2px solid #8d8d8d;
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

body.zrg-home-intake.is-nav-pending::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100040;
  background: rgba(12, 6, 4, 0.42);
  pointer-events: none;
}

body.zrg-home-intake .zrg-nav-pending {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

body.zrg-home-intake .zrg-nav-pending[hidden] {
  display: none !important;
}

body.zrg-home-intake .zrg-nav-pending-card {
  min-width: min(72vw, 220px);
  padding: 0.95em 1.25em;
  border-radius: 14px;
  border: 1.5px solid rgba(232, 209, 138, 0.72);
  background: linear-gradient(180deg, rgba(62, 28, 14, 0.96) 0%, rgba(28, 12, 8, 0.98) 100%);
  color: #ffe9a8;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .zrg-shell.zrg-home-intake .zrg-btn,
  .zrg-shell.zrg-home-intake .zrg-activity-open:has(.zrg-activity-placeholder) {
    animation: none;
  }
}
