/* DestinyAI — Page 1 Gallery */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b051d;
  --bg2: #12082a;
  --purple: #a855f7;
  --purple-deep: #7c3aed;
  --purple-glow: rgba(168, 85, 247, 0.55);
  --gold: #e9c46a;
  --text: #f5e6ff;
  --muted: rgba(245, 230, 255, 0.62);
  --card-border: rgba(192, 132, 252, 0.45);
  --font-serif: "Playfair Display", Georgia, serif;
  --font-magazine: "Libre Bodoni", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --max-w: 430px;
  --header-h: 48px;
  --bottom-bar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

.hidden { display: none !important; }

/* Language switch */
.lang-switch {
  position: fixed;
  top: calc(10px + var(--safe-top));
  right: 12px;
  z-index: 300;
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(11, 5, 29, 0.72);
  border: 1px solid rgba(192, 132, 252, 0.45);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.lang-switch-btn {
  min-width: 44px;
  min-height: 32px;
  padding: 4px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 230, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
}

.lang-switch-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85), rgba(219, 39, 119, 0.75));
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.lang-switch-btn:focus-visible {
  outline: 2px solid rgba(233, 196, 106, 0.85);
  outline-offset: 2px;
}

/* ── Cosmic background ── */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168, 85, 247, 0.12), transparent 50%),
    linear-gradient(180deg, #0b051d 0%, #12082a 40%, #0a0618 100%);
}

.cosmos-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 45% 8%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 60% 42%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 75% 22%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.5px 1.5px at 88% 55%, rgba(233,196,106,0.5), transparent),
    radial-gradient(1px 1px at 15% 72%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 92% 88%, rgba(255,255,255,0.45), transparent);
  animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.cosmos-nebula {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Ccircle cx='30' cy='40' r='1' fill='%23fff' opacity='.3'/%3E%3Ccircle cx='120' cy='80' r='.8' fill='%23fff' opacity='.2'/%3E%3C/svg%3E") repeat;
}

.cosmos-cloud {
  position: absolute;
  width: 120px;
  height: 80px;
  opacity: 0.08;
  background: radial-gradient(ellipse, #c084fc, transparent 70%);
  filter: blur(20px);
}

.cosmos-cloud--l { left: -20px; top: 55%; }
.cosmos-cloud--r { right: -20px; top: 62%; }

/* ── Page shell ── */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px 16px;
  min-height: 100dvh;
}

.page--home {
  display: block;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.home-main {
  max-width: var(--max-w);
  margin: 0 auto;
  display: block;
  height: auto;
  min-height: auto;
  padding: calc(10px + var(--safe-top)) 16px calc(28px + var(--safe-bottom));
  overflow: visible;
}

.page--home .site-header--home {
  flex-shrink: 0;
  min-height: 34px;
  padding: 4px 0 2px;
  justify-content: center;
}

.page--home .hero {
  flex-shrink: 0;
  padding: 10px 0 8px;
  text-align: center;
}

.hero-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 230, 255, 0.78);
}

.page--home .hero-title {
  display: block;
  text-align: center;
  font-family: var(--font-magazine);
  font-size: clamp(1.65rem, 6.8vw, 2.15rem);
  margin-bottom: 8px;
  color: #fff;
  -webkit-text-stroke: 0.35px #9333ea;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #7c3aed,
    1px -1px 0 #7c3aed,
    -1px 1px 0 #db2777,
    1px 1px 0 #db2777;
}

.hero-title-main {
  display: block;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.12;
}

.hero-title-top {
  display: block;
  font-size: 0.62em;
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin-bottom: 8px;
}

.hero-title-bottom {
  display: block;
  font-size: 1.05em;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.page--home .hero-sub-row {
  max-width: 320px;
  gap: 8px;
}

.hero-gem {
  flex-shrink: 0;
  font-size: 0.5rem;
  color: #f472b6;
  line-height: 1;
  opacity: 0.9;
}

.page--home .hero-sub {
  font-size: 0.72rem;
  max-width: none;
  flex: 1;
  line-height: 1.4;
  color: #fbcfe8;
  font-style: italic;
  -webkit-text-stroke: 0;
  paint-order: normal;
  text-shadow: 0 0 18px rgba(244, 114, 182, 0.35);
}

.home-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin: 0 auto;
}

.home-brand-name {
  font-family: var(--font-magazine);
  font-size: 1.18rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.08em;
  color: #fff;
  -webkit-text-stroke: 0.55px #9333ea;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #7c3aed,
    1px -1px 0 #7c3aed,
    -1px 1px 0 #db2777,
    1px 1px 0 #db2777;
}

.home-brand-pill {
  display: inline-block;
  padding: 0;
  font-family: var(--font-magazine);
  font-size: 0.78rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: none;
  border: none;
  box-shadow: none;
  -webkit-text-stroke: 0.45px #db2777;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #9333ea,
    1px 1px 0 #e11d48;
}

body.lang-zh .home-brand-name {
  font-family: "Noto Serif SC", var(--font-serif);
  letter-spacing: 0.12em;
}

body.lang-zh .home-brand-pill {
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: 0.06em;
  font-size: 0.6rem;
}

.page--home .hero-sub-row {
  max-width: 360px;
  margin: 0 auto;
  gap: 8px;
}

.page--home .gallery {
  flex: none;
  min-height: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto;
  align-content: start;
  gap: 10px;
  margin: 12px 0 16px;
  width: 100%;
}

.page--home .match-card {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 3 / 4;
  justify-self: stretch;
  align-self: stretch;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(192, 132, 252, 0.45),
    0 8px 24px rgba(124, 58, 237, 0.18);
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(11, 5, 29, 0.72);
  border: 1px solid rgba(192, 132, 252, 0.35);
  backdrop-filter: blur(4px);
}

.card-badge-star {
  width: 0.55em;
  height: 0.55em;
}

.card-meta-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(11, 5, 29, 0.94) 0%, rgba(26, 8, 24, 0.55) 55%, transparent 100%);
  text-align: left;
  pointer-events: none;
}

.card-element-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-element-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.card-element-icon--water { background: rgba(59, 130, 246, 0.28); color: #93c5fd; }
.card-element-icon--fire { background: rgba(239, 68, 68, 0.28); color: #fca5a5; }
.card-element-icon--wood { background: rgba(34, 197, 94, 0.28); color: #86efac; }
.card-element-icon--metal { background: rgba(168, 162, 158, 0.28); color: #e7e5e4; }
.card-element-icon--earth { background: rgba(180, 130, 70, 0.28); color: #fcd34d; }

.card-meta-lines {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.card-meta-element {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.card-meta-dir,
.card-meta-region {
  font-size: 0.58rem;
  color: rgba(245, 230, 255, 0.72);
  line-height: 1.35;
}

.home-indicators {
  margin: 4px 0 18px;
  padding: 14px 12px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(192, 132, 252, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-indicators-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #e9d5ff;
  text-align: center;
}

.home-indicators-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.home-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
}

.home-indicator-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #fbbf24;
  margin-bottom: 2px;
}

.home-indicator-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.home-indicator-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: #fbbf24;
  line-height: 1.25;
}

.home-indicator-desc {
  font-size: 0.48rem;
  color: rgba(245, 230, 255, 0.55);
  line-height: 1.3;
}

body.lang-zh .home-indicator-label {
  font-size: 0.62rem;
}

body.lang-zh .home-indicator-desc {
  font-size: 0.52rem;
}

.home-bottom {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  min-height: 0;
  padding-top: 0;
  margin-top: 0;
}

.page--home .wisdom {
  flex-shrink: 0;
  padding: 4px 8px 4px;
}

.page--home .wisdom-yin {
  margin-bottom: 4px;
}

.page--home .wisdom-yin svg {
  width: 44px;
  height: 44px;
}

.page--home .wisdom-title {
  font-size: 0.92rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

.page--home .wisdom-desc {
  font-size: 0.68rem;
  line-height: 1.45;
  max-width: 300px;
}

.page--home .process {
  flex-shrink: 0;
  padding: 4px 0 6px;
}

.page--home .process-icon {
  width: 42px;
  height: 42px;
  font-size: 1.05rem;
}

.page--home .process-step {
  position: relative;
  gap: 4px;
}

.process-step-title {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.25;
}

.process-step-desc {
  font-size: 0.48rem;
  color: rgba(245, 230, 255, 0.55);
  text-align: center;
  line-height: 1.35;
  max-width: 76px;
}

.page--home .process-step span:not(.process-num):not(.process-step-title):not(.process-step-desc) {
  font-size: 0.58rem;
}

.process-num {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(calc(-50% + 15px));
  z-index: 2;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(245, 230, 255, 0.95);
  background: rgba(124, 58, 237, 0.55);
  border: 1px solid rgba(192, 132, 252, 0.45);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.35);
}

.page--home .process-arrow {
  padding-top: 12px;
  font-size: 0.85rem;
}

.page--home .home-cta-wrap {
  flex-shrink: 0;
  padding: 2px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.page--home .cta-glow {
  padding: 13px 18px;
  font-size: 0.82rem;
  width: 100%;
}

.cta-arrow {
  font-size: 1rem;
  opacity: 0.9;
  margin-left: 2px;
}

.home-privacy {
  font-size: 0.58rem;
  color: rgba(245, 230, 255, 0.38);
  text-align: center;
  letter-spacing: 0.02em;
}

.home-privacy-lock {
  opacity: 0.75;
}

.home-footer {
  text-align: center;
  font-size: 0.55rem;
  color: rgba(245, 230, 255, 0.35);
  letter-spacing: 0.06em;
  padding: 10px 8px 4px;
  margin: 0;
}

/* ── Mobile H5 ── */
@media (max-width: 639px) {
  .page--home .gallery {
    gap: 8px;
    margin-bottom: 12px;
  }

  .home-bottom {
    gap: 4px;
  }

  .page--home .wisdom-title {
    font-size: 0.82rem;
  }

  .page--home .wisdom-yin svg {
    width: 40px;
    height: 40px;
  }

  .page--home .process-icon {
    width: 38px;
    height: 38px;
  }

  .page--home .cta-glow {
    padding: 11px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 639px) and (max-height: 740px) {
  .page--home .hero {
    padding: 0 0 4px;
  }

  .page--home .hero-title {
    font-size: 1.15rem;
    margin-bottom: 3px;
  }

  .page--home .hero-sub {
    font-size: 0.58rem;
  }

  .page--home .wisdom-desc {
    display: none;
  }

  body.lang-zh .page--home .wisdom-desc,
  html[lang="zh-CN"] .page--home .wisdom-desc {
    display: block !important;
    font-size: clamp(0.82rem, 3.4vw, 0.98rem);
  }

  body.lang-zh .page--home .wisdom-title,
  html[lang="zh-CN"] .page--home .wisdom-title {
    display: none !important;
  }

  .page--home .wisdom-yin svg {
    width: 28px;
    height: 28px;
  }

  .page--home .wisdom {
    padding: 2px 8px;
  }

  .page--home .wisdom-title {
    font-size: 0.76rem;
    margin-bottom: 2px;
  }

  .page--home .process {
    padding: 2px 0 4px;
  }

  .page--home .process-icon {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
  }

  .page--home .process-step span:not(.process-num) {
    font-size: 0.46rem;
  }

  .page--home .process-arrow {
    padding-top: 8px;
  }

  .home-privacy {
    display: none;
  }

  .page--home .cta-glow {
    padding: 10px 14px;
    font-size: 0.78rem;
  }
}

.page--flow {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100svh;
  padding: 0;
  overflow: hidden;
}

.page--active { display: flex; }
.page--home.page--active {
  display: block;
}

.page--home.page--active .home-main {
  flex: none;
  min-height: auto;
  height: auto;
}
.page:not(.page--active):not(.hidden) { display: none; }

.flow-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 16px 12px;
  padding-top: calc(var(--safe-top) + 4px);
}

/* Fit-to-viewport flow pages: no page scroll on mobile, centered on desktop */
.flow-body--fit {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  padding-top: 2px;
  padding-bottom: calc(6px + var(--safe-bottom));
}

.flow-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.flow-screen-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.flow-body--fit .flow-actions {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 10px;
}

.page--flow-center .flow-body--center {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 16px calc(12px + var(--safe-bottom));
  min-height: 0;
}

.page--flow-center .flow-body--fit {
  overflow: hidden;
  padding: 0 16px calc(6px + var(--safe-bottom));
  padding-top: 2px;
}

.page--flow-center .flow-body--center > section {
  width: 100%;
  margin: auto 0;
  flex-shrink: 0;
}

.flow-bottom-bar {
  flex-shrink: 0;
  padding: 8px 16px calc(8px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(11, 5, 29, 0.92) 24%, var(--bg) 100%);
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
}

.flow-actions {
  margin-top: 18px;
}

.flow-actions .cta-glow--bar {
  max-width: none;
  width: 100%;
}

.page--flow-no-header > .flow-body--fit {
  padding-top: calc(8px + var(--safe-top));
}

.flow-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 0 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.flow-back-btn:hover,
.flow-back-btn:active {
  color: rgba(244, 114, 182, 0.92);
}

.flow-back-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.flow-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.28);
  background: rgba(11, 5, 29, 0.35);
  color: rgba(245, 230, 255, 0.82);
  font-family: var(--font-magazine);
  font-size: 0.88rem;
  font-weight: 600;
  font-style: italic;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.flow-home-btn:hover,
.flow-home-btn:active {
  color: #fff;
  border-color: rgba(192, 132, 252, 0.55);
  background: rgba(76, 29, 149, 0.22);
}

.flow-actions--result {
  flex-direction: column;
  align-items: stretch;
}

/* Result page: scroll from top, never clip hero title */
.flow-body--result.flow-body--fit {
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
}

.flow-body--result .flow-screen {
  flex: 0 1 auto;
  min-height: min-content;
  margin-top: 0;
  margin-bottom: 0;
  max-height: none;
}

.flow-body--result .result-hero {
  padding-top: 6px;
}

.flow-body--result .result-head {
  font-size: clamp(1.28rem, 5.2vw, 1.85rem);
  line-height: 1.22;
  padding: 0 4px;
  overflow: visible;
}

/* Result page: scroll for full portrait on mobile */
.flow-body--result {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.flow-body--result .flow-screen {
  flex: 0 1 auto;
  min-height: min-content;
}

.flow-body--result .flow-screen-main {
  flex: 0 0 auto;
  overflow: visible;
  min-height: 0;
}

.flow-body--result .flow-actions {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 0;
}

.flow-body--result.flow-body--fit .flow-actions--result {
  margin-top: 0;
  padding-top: 0;
}

.flow-body--result .result-download {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.flow-body--result .result-portraits {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.result-vibe,
.tag-list--result {
  display: none !important;
}

.page--flow > .site-header {
  flex-shrink: 0;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: calc(var(--safe-top) + 4px);
}

.page--flow .flow-body--fit {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: calc(6px + var(--safe-bottom));
}

.page--flow .flow-body:not(.flow-body--fit) {
  padding-bottom: calc(12px + var(--safe-bottom));
}

.site-header--home {
  padding: 6px 0 4px;
  min-height: 40px;
  justify-content: center;
}

.site-header--home .home-brand {
  position: static;
  transform: none;
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 4px;
  min-height: var(--header-h);
  position: relative;
  flex-shrink: 0;
}

.site-header--compact {
  padding: 4px 16px;
  min-height: 40px;
}

.site-header--with-mute {
  padding-left: 16px;
  padding-right: 16px;
}

.narration-mute-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.18);
  color: rgba(245, 230, 255, 0.92);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.narration-mute-btn:hover,
.narration-mute-btn:focus-visible {
  background: rgba(124, 58, 237, 0.32);
  border-color: rgba(244, 114, 182, 0.55);
  color: #fff;
}

.narration-mute-btn.is-muted {
  background: rgba(11, 5, 29, 0.55);
  border-color: rgba(192, 132, 252, 0.22);
  color: rgba(196, 181, 253, 0.55);
}

.icon-speaker {
  position: relative;
  display: inline-block;
  width: 1.05em;
  height: 0.82em;
}

.icon-speaker::before {
  content: '';
  position: absolute;
  left: 0;
  top: 28%;
  width: 32%;
  height: 44%;
  border: 2px solid currentColor;
  border-right: none;
  border-radius: 2px 0 0 2px;
  box-sizing: border-box;
}

.icon-speaker::after {
  content: '';
  position: absolute;
  left: 30%;
  top: 8%;
  width: 0;
  height: 0;
  border-top: 0.33em solid transparent;
  border-bottom: 0.33em solid transparent;
  border-left: 0.5em solid currentColor;
}

.icon-speaker-off {
  position: relative;
  display: none;
  width: 1.05em;
  height: 0.82em;
}

.icon-speaker-off::before {
  content: '';
  position: absolute;
  left: 0;
  top: 28%;
  width: 32%;
  height: 44%;
  border: 2px solid currentColor;
  border-right: none;
  border-radius: 2px 0 0 2px;
  box-sizing: border-box;
}

.icon-speaker-off::after {
  content: '';
  position: absolute;
  left: 30%;
  top: 8%;
  width: 0;
  height: 0;
  border-top: 0.33em solid transparent;
  border-bottom: 0.33em solid transparent;
  border-left: 0.5em solid currentColor;
}

.narration-mute-btn.is-muted .icon-speaker--on {
  display: none;
}

.narration-mute-btn.is-muted .icon-speaker--off {
  display: inline-block;
}

.narration-mute-btn:not(.is-muted) .icon-speaker--off {
  display: none;
}

.icon-speaker-off .icon-speaker-slash,
.narration-mute-btn .icon-speaker-slash {
  position: absolute;
  right: -0.05em;
  top: -0.1em;
  width: 0.72em;
  height: 0.72em;
}

.icon-speaker-slash::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-42deg);
  border-radius: 1px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.logo-icon { width: 30px; height: 30px; }

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logo-ai {
  color: var(--purple);
  font-style: italic;
}

.menu-btn {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  z-index: 2;
}

.menu-btn span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 0;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 10px 0 12px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 5.8vw, 1.85rem);
  font-weight: 600;
  line-height: 1.22;
  background: linear-gradient(180deg, #fff 0%, #e9d5ff 45%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.25));
}

.hero-sub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}

.hero-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 132, 252, 0.45), transparent);
  min-width: 24px;
}

.hero-sub {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.4;
  flex-shrink: 0;
  max-width: 200px;
}

/* ── Gallery grid ── */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.match-card {
  position: relative;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(145deg, #3d1535 0%, #1a0f2e 100%);
  box-shadow:
    0 0 0 1px rgba(225, 29, 72, 0.35),
    0 0 0 3px rgba(124, 58, 237, 0.22),
    0 0 24px rgba(168, 85, 247, 0.18),
    inset 0 0 30px rgba(124, 58, 237, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.match-card .portrait.img-fallback {
  opacity: 0.85;
}

.match-card:hover,
.match-card:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(192, 132, 252, 0.7),
    0 8px 32px rgba(168, 85, 247, 0.35);
  outline: none;
}

.match-card:active {
  transform: scale(0.98);
}

.match-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.15), transparent 70%);
}

.match-card:hover::before,
.match-card:focus-visible::before {
  opacity: 1;
}

.match-card img.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
  cursor: zoom-in;
}

.match-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 55%,
    rgba(11, 5, 29, 0.18) 75%,
    rgba(11, 5, 29, 0.62) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  text-align: center;
}

.card-overlay--top {
  top: 0;
  padding: 8px 8px 14px;
  background: linear-gradient(to bottom, rgba(11, 5, 29, 0.92) 0%, rgba(11, 5, 29, 0.55) 48%, transparent 100%);
}

.card-overlay--bottom {
  bottom: 0;
  padding: 14px 10px 8px;
  background: linear-gradient(to top, rgba(26, 8, 24, 0.94) 0%, rgba(74, 16, 56, 0.55) 52%, transparent 100%);
}

.card-wanted-banner {
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 0 8px 10px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.72) 55%, transparent 100%);
  border: none;
  box-shadow: none;
}

.card-wanted-title {
  display: block;
  padding: 8px 8px 4px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.2;
  text-align: center;
  color: #2c3e36;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.card-wanted-sub {
  display: block;
  padding: 0 8px 4px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-align: center;
  color: #5a7268;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

body.lang-zh .card-wanted-title {
  font-family: "Noto Serif SC", var(--font-serif);
  letter-spacing: 0.06em;
  font-size: 0.76rem;
}

.page--home .card-wanted-title {
  font-size: 0.88rem;
}

.page--home .card-wanted-sub {
  font-size: 0.76rem;
}

.card-label,
.card-role {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  font-family: var(--font-magazine);
  font-style: italic;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: none;
  line-height: 1.25;
  -webkit-text-stroke: 0.85px #000;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 0 0 #000,
    -1px 0 0 #000;
  z-index: 2;
}

.card-label {
  display: block;
  color: #ffebc8;
}

.card-role {
  bottom: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 0;
  color: #fff;
}

.card-user-name {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #fff;
  -webkit-text-stroke: 0.45px #000;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  margin-top: 4px;
}

.card-role-icon { color: var(--gold); font-size: 0.52rem; }

.card-nickname {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(11, 5, 29, 0.72);
  border: 1px solid rgba(192, 132, 252, 0.45);
  z-index: 2;
  text-shadow: none;
}

/* ── Wisdom section ── */
.wisdom {
  text-align: center;
  padding: 10px 8px 12px;
  position: relative;
}

.wisdom-yin {
  margin-bottom: 8px;
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.5));
}

.wisdom-yin svg {
  display: block;
  margin: 0 auto;
  transform-origin: center center;
  animation: ritualSpin 8s linear infinite;
}

.wisdom-title {
  font-family: var(--font-magazine);
  font-size: clamp(0.98rem, 3.9vw, 1.15rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 6px;
}

.wisdom-desc {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto;
}

body.lang-zh .wisdom-desc,
.page--home.lang-zh .wisdom-desc {
  max-width: min(92vw, 380px);
}

/* 中文版首页：去掉「东方八字智慧」大标题，出处文案上移放大 */
body.lang-zh .wisdom-title,
html[lang="zh-CN"] .wisdom-title {
  display: none !important;
}

body.lang-zh .wisdom-desc,
html[lang="zh-CN"] .wisdom-desc {
  font-family: var(--font-magazine);
  font-size: clamp(0.88rem, 3.7vw, 1.08rem);
  font-weight: 600;
  font-style: normal;
  line-height: 1.55;
  color: var(--text);
  margin: 0 auto;
}

body.lang-zh .page--home .wisdom-desc,
html[lang="zh-CN"] .page--home .wisdom-desc {
  display: block !important;
  font-size: clamp(0.9rem, 3.9vw, 1.1rem);
  color: rgba(255, 248, 255, 0.95);
  max-width: min(92vw, 400px);
  word-break: keep-all;
  line-break: strict;
}

/* ── Process flow ── */
.process {
  padding: 6px 0 14px;
  overflow: hidden;
}

.process-track {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
  width: 100%;
  max-width: 100%;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.process-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.2);
}

.process-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  color: #e9d5ff;
}

.process-arrow.icon-chevron {
  width: 8px;
  height: 8px;
  margin: 0 2px 18px;
  padding: 0;
  border: none;
  border-right: 2px solid rgba(192, 132, 252, 0.65);
  border-bottom: 2px solid rgba(192, 132, 252, 0.65);
  transform: rotate(-45deg);
  flex-shrink: 0;
  font-size: 0;
  line-height: 0;
  background: transparent;
}

.icon-sparkle {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin: 0 0.12em;
  vertical-align: -0.06em;
  background: linear-gradient(135deg, #f472b6, #c084fc);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.icon-arrow-right {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.25em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-0.06em);
  vertical-align: middle;
}

.icon-lock {
  display: inline-block;
  width: 0.55em;
  height: 0.62em;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  position: relative;
  vertical-align: -0.08em;
  box-sizing: border-box;
}

.icon-lock::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -0.38em;
  transform: translateX(-50%);
  width: 0.42em;
  height: 0.36em;
  border: 1.5px solid currentColor;
  border-bottom: none;
  border-radius: 50% 50% 0 0;
  box-sizing: border-box;
}

.icon-yin-yang {
  display: inline-flex;
  width: 1.35em;
  height: 1.35em;
  align-items: center;
  justify-content: center;
}

.icon-yin-yang svg {
  width: 100%;
  height: 100%;
  display: block;
}

.carousel-btn.icon-chevron-btn {
  font-size: 0;
  line-height: 0;
  position: relative;
}

.carousel-btn.icon-chevron-btn::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  margin: auto;
}

.carousel-prev.icon-chevron-btn::before {
  transform: rotate(135deg);
}

.carousel-next.icon-chevron-btn::before {
  transform: rotate(-45deg);
}

.process-step span {
  font-size: 0.58rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  padding: 0 2px;
}

.process-arrow {
  color: rgba(192, 132, 252, 0.45);
  font-size: 0.95rem;
  padding-top: 14px;
  flex-shrink: 0;
  width: 10px;
  text-align: center;
}

/* ── CTA ── */
.home-cta-wrap {
  padding: 4px 4px 8px;
  display: flex;
  justify-content: center;
}

.cta-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 50%, #6d28d9 100%);
  box-shadow:
    0 0 24px var(--purple-glow),
    0 0 48px rgba(124, 58, 237, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta-glow--bar {
  max-width: none;
  width: 100%;
  padding: 15px 20px;
  font-size: 0.92rem;
}

.cta-glow--sheet {
  margin-top: 4px;
}

.cta-glow:hover {
  transform: scale(1.02);
  box-shadow:
    0 0 40px rgba(168, 85, 247, 0.65),
    0 0 80px rgba(124, 58, 237, 0.35);
}

.cta-glow:active { transform: scale(0.98); }

.cta-glow--full { max-width: none; width: 100%; margin-top: 8px; }

.cta-star {
  font-size: 0.75rem;
  opacity: 0.9;
  color: var(--gold);
}

/* ── Popup (mobile bottom sheet) ── */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  margin: 0;
  z-index: 2500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  transform: none;
  box-sizing: border-box;
}

.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 2, 15, 0.75);
  backdrop-filter: blur(6px);
}

.popup-sheet {
  position: relative;
  width: 100%;
  max-width: min(440px, calc(100vw - 32px));
  max-height: min(92dvh, 92svh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #252530 0%, #1a1a24 100%);
  border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(12px + var(--safe-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.55);
  animation: sheetUp 0.32s ease;
}

@keyframes sheetUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: none; }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 4px auto 8px;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  touch-action: manipulation;
}

.popup-header {
  text-align: center;
  margin-bottom: 10px;
  padding-top: 0;
  padding-right: 32px;
}

.popup-header--compact .popup-title {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.popup-title {
  font-family: var(--font-magazine);
  font-size: 1.32rem;
  font-weight: 700;
  font-style: italic;
  text-align: center;
  margin-bottom: 4px;
  color: #fff;
  text-shadow: 0 0 20px rgba(244, 114, 182, 0.3);
}

.popup-sub {
  font-size: 0.78rem;
  color: #f9a8d4;
  font-style: italic;
  text-align: center;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.popup-carousel--compact {
  margin: 0 0 4px;
}

.popup-carousel--compact.popup-carousel--single .carousel-track {
  justify-content: center;
  overflow-x: hidden;
  padding-left: 0;
  padding-right: 0;
}

.popup-carousel--compact.popup-carousel--single .carousel-slide,
.popup-carousel--compact.popup-carousel--single .carousel-slide.is-center {
  flex: 0 0 auto;
  width: clamp(148px, 44vw, 220px);
  min-width: 0;
}

.popup-carousel--compact.popup-carousel--single .carousel-prev,
.popup-carousel--compact.popup-carousel--single .carousel-next {
  display: none;
}

.popup-carousel--compact.popup-carousel--single + .carousel-dots {
  display: none;
}

.popup-carousel--compact .carousel-slide {
  flex: 0 0 38%;
  min-width: 38%;
  aspect-ratio: 3 / 4;
  max-height: 28vh;
}

.popup-carousel--compact .carousel-slide.is-center {
  flex: 0 0 42%;
  min-width: 42%;
}

.carousel-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
  flex: 0 0 32%;
  min-width: 32%;
  scroll-snap-align: center;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  opacity: 0.75;
  transform: scale(0.92);
  transition: opacity 0.25s, transform 0.25s;
}

.carousel-slide.is-center {
  opacity: 1;
  transform: scale(1);
  flex: 0 0 36%;
  min-width: 36%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  pointer-events: none;
}

.carousel-photo-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: inherit;
  overflow: hidden;
}

.carousel-photo-btn:focus-visible {
  outline: 2px solid rgba(244, 114, 182, 0.85);
  outline-offset: 2px;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
  box-sizing: border-box;
}

.photo-lightbox.hidden {
  display: none !important;
}

.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(4, 2, 12, 0.97);
  cursor: zoom-out;
  pointer-events: auto;
}

.photo-lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: min(100vw, 720px);
  max-height: 100%;
  min-height: 0;
}

.photo-lightbox-close {
  position: absolute;
  top: calc(-6px + var(--safe-top));
  right: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.photo-lightbox-img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72dvh, 72svh, 820px);
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center center;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  animation: photo-lightbox-in 0.22s ease;
}

.photo-lightbox--with-download .photo-lightbox-img {
  max-height: min(62dvh, 62svh, 720px);
}

.photo-lightbox-download {
  flex-shrink: 0;
  width: 100%;
  max-width: 360px;
  margin: 0;
}

@media (min-width: 640px) {
  .photo-lightbox-img {
    max-width: min(92vw, 720px);
    max-height: min(72dvh, 960px);
  }

  .photo-lightbox--with-download .photo-lightbox-img {
    max-height: min(62dvh, 820px);
  }
}

@keyframes photo-lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.popup-body-grid {
  display: block;
  margin-bottom: 10px;
}

.attr-list--compact {
  gap: 8px;
}

.attr-list--compact .attr-row {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.attr-row--personality .attr-value {
  font-size: 0.74rem;
  line-height: 1.55;
  font-weight: 400;
  color: rgba(245, 230, 255, 0.82);
}

.attr-row--personality {
  align-items: flex-start;
}

.attr-row--personality .attr-icon {
  margin-top: 3px;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--purple);
  width: 16px;
  border-radius: 3px;
}

.matched-card--inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 12px;
  text-align: left;
}

.matched-card--inline .matched-card-title {
  margin-bottom: 0;
}

.matched-card--inline .matched-card-name {
  margin-bottom: 0;
}

.matched-card--inline .matched-card-private {
  margin-left: auto;
  font-size: 0.62rem;
}

.attr-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attr-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.attr-icon {
  font-size: 0.85rem;
  opacity: 0.55;
  width: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.attr-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.attr-label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
}

.attr-value {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
}

.matched-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.matched-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 8px;
}

.matched-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.matched-card-private {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.lock-icon { font-size: 0.6rem; }

.popup-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 16px;
}

.info-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
}

.popup-info p {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.45;
}

/* ── Mobile menu ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11, 5, 29, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mobile-menu a {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  text-decoration: none;
}

.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
}

/* ── Stub pages ── */
.stub-page {
  padding: 48px 16px;
  text-align: center;
}

.stub-page h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.stub-note { color: var(--muted); font-size: 0.9rem; }

/* ── Generate form ── */
.form-page {
  padding: 4px 0 0;
}

.form-title {
  font-family: var(--font-magazine);
  font-size: 1.42rem;
  font-weight: 700;
  font-style: italic;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.25;
}

.form-sub {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.4;
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.birth-seg-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  overflow: visible;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  background: rgba(0, 0, 0, 0.25);
}

.birth-seg {
  width: 2.75rem;
  min-height: 44px;
  flex-shrink: 0;
  padding: 8px 4px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.birth-seg::-webkit-outer-spin-button,
.birth-seg::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.birth-seg-year {
  width: 4.2rem;
}

.birth-seg-min {
  width: 2.75rem;
}

.birth-seg::placeholder {
  color: rgba(245, 230, 255, 0.28);
  font-weight: 400;
}

.birth-seg:focus {
  outline: none;
  color: #fff8ef;
  background: rgba(168, 85, 247, 0.12);
}

.birth-seg-wrap:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.birth-seg-sep {
  flex-shrink: 0;
  color: rgba(245, 230, 255, 0.45);
  font-size: 0.85rem;
  user-select: none;
}

.birth-seg-sep--break {
  flex-basis: 100%;
  width: 0;
  height: 0;
  overflow: hidden;
}

.birth-datetime-preview {
  margin: 6px 2px 0;
  min-height: 1.2em;
  font-size: 0.78rem;
  color: rgba(245, 230, 255, 0.55);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.birth-datetime-preview:not(:empty) {
  color: rgba(233, 196, 106, 0.85);
}

@media (min-width: 420px) {
  .birth-seg-sep--break {
    flex-basis: auto;
    width: 6px;
    height: auto;
    overflow: visible;
  }
}

.geo-field-wrap {
  position: relative;
}

.geo-suggest {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: rgba(18, 8, 42, 0.98);
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: 10px;
  z-index: 120;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.geo-suggest.show {
  display: block;
}

.geo-suggest-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.geo-suggest-item:last-child {
  border-bottom: none;
}

.geo-suggest-item:hover,
.geo-suggest-item.active {
  background: rgba(168, 85, 247, 0.18);
}

.geo-suggest-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.field-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(245, 230, 255, 0.55);
  margin-bottom: 5px;
  margin-top: 10px;
}

.field-hint {
  font-size: 0.58rem;
  color: rgba(245, 230, 255, 0.38);
  margin: -2px 0 6px;
  line-height: 1.35;
}

.field-input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
}

.field-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.field-input--invalid {
  border-color: rgba(248, 113, 113, 0.75);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.18);
}

.field-hint--error {
  color: rgba(252, 165, 165, 0.92);
}

.gender-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
  z-index: 12;
  isolation: isolate;
}

.gender-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  position: relative;
  z-index: 1;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(192, 132, 252, 0.25);
  -webkit-user-select: none;
  user-select: none;
  margin: 0;
}

.gender-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.gender-opt-text {
  pointer-events: none;
}

.gender-opt.active,
.gender-opt:has(.gender-radio:checked) {
  border-color: var(--purple);
  background: rgba(124, 58, 237, 0.25);
  color: var(--text);
}

/* ── Prose body (About You + Reading) ── */
.prose-body {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(245, 230, 255, 0.94);
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}

.prose-body--direction {
  color: rgba(233, 196, 106, 0.92);
  margin-bottom: 0;
}

.prose-body--caption {
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
  margin-top: 6px;
}

.direction-map-block {
  width: 100%;
  max-width: min(640px, 100%);
  margin: 0 auto 10px;
}

.direction-map-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(233, 196, 106, 0.9);
}

.direction-map-wrap {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(192, 132, 252, 0.45);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.direction-map-wrap.direction-map--empty {
  display: none;
}

.direction-map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 240px;
  max-height: 320px;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.direction-map-canvas--dragging {
  cursor: grabbing;
}

.direction-map-svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.direction-map-label text {
  font-family: "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  font-weight: 600;
  fill: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

.direction-map-label--major text {
  font-weight: 500;
  fill: rgba(255, 255, 255, 0.62);
}

.direction-map-label--answer text {
  fill: #f4d06f;
}

.direction-map-label {
  transition: opacity 0.15s ease;
}

.direction-map-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(10, 6, 24, 0.72);
  border: 1px solid rgba(192, 132, 252, 0.35);
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.direction-map-hint--hide {
  opacity: 0;
}

.direction-map-reset {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  background: rgba(10, 6, 24, 0.78);
  color: rgba(233, 196, 106, 0.95);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.direction-map-reset:hover {
  background: rgba(30, 18, 69, 0.9);
  border-color: rgba(244, 208, 111, 0.5);
}

.direction-map-legend {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(192, 132, 252, 0.2);
}

.direction-map-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.direction-map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.direction-map-legend-item--you .direction-map-legend-dot {
  background: #a855f7;
  color: #a855f7;
}

.direction-map-legend-item--match .direction-map-legend-dot {
  background: #f4d06f;
  color: #f4d06f;
}

.direction-map-legend-item--axis .direction-map-legend-dot {
  background: transparent;
  border: 2px dashed rgba(192, 132, 252, 0.8);
  color: rgba(192, 132, 252, 0.8);
}

.direction-map-legend-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.direction-map-legend-text strong {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 230, 255, 0.55);
}

.direction-map-legend-text span {
  color: rgba(245, 230, 255, 0.95);
  font-weight: 500;
}

.direction-map-legend-text em {
  font-style: normal;
  font-size: 0.72rem;
  color: rgba(233, 196, 106, 0.85);
}

@media (max-width: 899px) {
  .flow-body--fit .flow-screen-main {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .result-password-input {
    font-size: 16px;
  }
}

/* Mobile: one-screen flow pages, top-aligned, compact (phones + iPad portrait) */
@media (max-width: 834px) {
  .flow-body--fit .flow-screen-main {
    justify-content: flex-start;
  }

  .flow-body--fit .about-head-name,
  .flow-body--fit .reading-head-name,
  .flow-body--fit .form-title {
    font-size: 1.18rem;
    margin-bottom: 8px;
  }

  .flow-body--fit .about-head-sub,
  .flow-body--fit .reading-head-sub {
    font-size: 1.02rem;
    margin-bottom: 8px;
  }

  .flow-body--fit .result-head {
    font-size: 1.65rem;
    margin-bottom: 2px;
  }

  .flow-body--fit .prose-body {
    font-size: clamp(0.8rem, 3.4vw, 0.92rem);
    line-height: 1.46;
    margin-bottom: 8px;
  }

  .flow-body--fit .about-page .about-report-body.prose-body,
  .flow-body--fit .reading-page .prose-body {
    font-size: clamp(0.8rem, 3.4vw, 0.92rem);
    line-height: 1.46;
    margin-bottom: 8px;
  }

  .flow-body--fit .prose-body--direction {
    font-size: clamp(0.78rem, 3.2vw, 0.88rem);
    line-height: 1.44;
  }

  .flow-body--fit .prose-body--caption {
    display: none;
  }

  .flow-body--fit .direction-map-block {
    margin-bottom: 6px;
  }

  .flow-body--fit .direction-map-canvas {
    min-height: 210px;
    max-height: 260px;
  }

  .flow-body--fit .direction-map-legend {
    padding: 8px 10px 10px;
    gap: 6px;
  }

  .flow-body--fit .direction-map-legend-item {
    font-size: 0.72rem;
  }

  .flow-body--fit .form-sub {
    margin-bottom: 8px;
    font-size: 0.68rem;
  }

  .flow-body--fit .field-label {
    margin-top: 6px;
    margin-bottom: 3px;
    font-size: 0.72rem;
  }

  .flow-body--fit .field-hint {
    margin-bottom: 4px;
    font-size: 0.65rem;
  }

  .flow-body--fit .birth-seg {
    min-height: 38px;
    padding: 6px 4px;
  }

  .flow-body--fit .birth-seg-wrap {
    padding: 6px 8px;
    gap: 4px;
  }

  .flow-body--fit .field-input {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 16px;
  }

  .flow-body--fit .gender-row {
    gap: 8px;
  }

  .flow-body--fit .flow-actions {
    padding-top: 6px;
  }

  .flow-body--fit .flow-actions .cta-glow--bar {
    padding: 12px 14px;
    font-size: 0.82rem;
  }

  .flow-body--fit .result-portraits {
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    gap: 12px;
  }

  .flow-body--fit .result-portrait-box {
    width: 100%;
    max-width: 100%;
    max-height: min(69.6vh, 624px);
    margin-left: auto;
    margin-right: auto;
  }

  .flow-body--fit .result-portraits--duo {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    gap: 10px;
  }

  .flow-body--fit .result-portrait-box--duo {
    width: calc(50% - 8px);
    max-width: min(44vw, 202px);
    --frame-pad: 0;
  }

  .flow-body--fit .result-archetype {
    margin-bottom: 4px;
    font-size: 0.72rem;
  }

  .flow-body--fit .result-lock {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  .flow-body--fit .result-vibe,
  .flow-body--fit .tag-list--result {
    display: none !important;
  }
}

@media (max-height: 680px) and (max-width: 834px) {
  .flow-body--fit .prose-body {
    font-size: 0.76rem;
    line-height: 1.42;
  }

  .flow-body--fit .about-head-name,
  .flow-body--fit .reading-head-name,
  .flow-body--fit .form-title {
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .flow-body--fit .about-head-sub,
  .flow-body--fit .reading-head-sub {
    font-size: 0.92rem;
    margin-bottom: 6px;
  }

  .flow-body--fit .result-portrait-box {
    max-width: 100%;
    max-height: min(64.8vh, 576px);
  }

  .flow-body--fit .result-portrait-box--duo {
    max-width: min(42vw, 187px);
  }
}

/* PC / tablet landscape: vertically center flow wizard in viewport */
@media (min-width: 835px) {
  html {
    height: 100%;
  }

  body {
    min-height: 100dvh;
    min-height: 100svh;
  }

  .page--flow {
    height: 100dvh;
    height: 100svh;
    min-height: 100dvh;
    max-width: var(--max-w);
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    overflow: hidden;
  }

  .page--flow-no-header > .flow-body--fit {
    padding-top: 0;
  }

  .page--flow > .site-header {
    flex-shrink: 0;
  }

  .page--flow .flow-body,
  .page--flow .flow-body--fit {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-top: calc(8px + var(--safe-top));
    padding-bottom: calc(20px + var(--safe-bottom));
    padding-left: 24px;
    padding-right: 24px;
  }

  .page--flow .flow-body--fit > .flow-screen,
  .page--flow-center .flow-body--fit > .flow-screen {
    flex: 0 1 auto;
    max-width: 480px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 48px);
  }

  .page--flow .flow-screen,
  .page--flow .about-page.flow-screen {
    flex: 0 1 auto;
    justify-content: center;
  }

  .page--flow .flow-screen-main,
  .flow-body--fit .flow-screen-main {
    flex: 0 1 auto;
    justify-content: flex-start;
    overflow-y: auto;
    min-height: 0;
  }

  .flow-body--fit .flow-actions {
    margin-top: 12px;
    padding-top: 0;
  }

  .page--flow .about-page .flow-screen-main {
    max-height: calc(100dvh - 52px - var(--safe-top) - var(--safe-bottom) - 88px);
  }

  .flow-body--result.flow-body--fit {
    justify-content: flex-start;
    overflow-y: auto;
  }

  .flow-body--result .flow-screen {
    flex: 0 1 auto;
    margin-top: 0;
    margin-bottom: 0;
    max-height: none;
  }

  .flow-body--result .result-head {
    font-size: clamp(1.22rem, 4.8vw, 1.55rem);
    line-height: 1.2;
  }

  .flow-body--result .flow-screen-main {
    flex: 0 0 auto;
    overflow: visible;
  }

  .flow-body--result .flow-actions {
    margin-top: 12px;
  }
}

/* ── About You page ── */
.about-page {
  padding: 0;
  position: relative;
}

.about-page.flow-screen {
  flex: 1;
  min-height: 0;
  justify-content: center;
}

.about-page.flow-screen .flow-screen-main {
  flex: 0 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 0;
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 118px);
}

.about-page.flow-screen > .flow-actions {
  flex-shrink: 0;
  margin-top: 10px;
  padding-top: 0;
}

.about-page .about-head-block {
  margin-bottom: 8px;
}

.about-insights {
  display: block;
  margin: 0 0 10px;
  flex-shrink: 0;
}

.about-report {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 244, 230, 0.12), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(253, 186, 116, 0.32);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.about-report--pending {
  opacity: 0;
  transform: translateY(12px);
}

.about-report--in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.48s ease, transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-report-body {
  margin: 0;
  padding: 14px 16px;
}

.about-report-body.prose-body {
  letter-spacing: 0.01em;
}

.about-chart-panel {
  flex-shrink: 0;
  margin-bottom: 0;
}

.about-head-block,
.reading-head-block {
  text-align: center;
  margin-bottom: 12px;
}

.about-head-name,
.reading-head-name {
  font-family: var(--font-magazine);
  font-size: clamp(1.48rem, 5.8vw, 1.78rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
  margin: 0 0 6px;
  color: #fff;
}

.about-head-sub,
.reading-head-sub {
  font-family: var(--font-magazine);
  font-size: clamp(1.02rem, 4.1vw, 1.26rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.35;
  margin: 0;
  color: rgba(245, 230, 255, 0.92);
}

.about-bazi-chart {
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
}

.about-bazi-chart .bazi-chart {
  padding: 16px 10px 14px;
  border-radius: 16px;
}

.about-bazi-chart .bazi-chart-title {
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.about-bazi-chart .bazi-chart-row {
  gap: 8px;
}

.about-bazi-chart .bazi-pillar {
  padding: 10px 3px 12px;
  gap: 6px;
  border-radius: 12px;
}

.about-bazi-chart .bazi-pillar-en {
  font-size: 0.58rem;
}

.about-bazi-chart .bazi-pillar-zh {
  font-size: 0.7rem;
}

.about-bazi-chart .bazi-cell-en {
  font-size: 0.52rem;
}

.about-bazi-chart .bazi-cell-en--bottom {
  font-size: 0.56rem;
  min-height: 1.65em;
}

.about-bazi-chart .bazi-char {
  font-size: clamp(1.5rem, 6.5vw, 2rem);
}

.about-bazi-chart .bazi-cell-en--wood,
.about-bazi-chart .bazi-cell-en--fire,
.about-bazi-chart .bazi-cell-en--earth,
.about-bazi-chart .bazi-cell-en--metal,
.about-bazi-chart .bazi-cell-en--water {
  color: rgba(196, 181, 253, 0.75);
}

.about-bazi-chart .bazi-chart-meta {
  margin-top: 12px;
  padding-top: 10px;
  font-size: 0.7rem;
}

.about-bazi-chart--pending .bazi-chart {
  opacity: 0;
  transform: translateY(8px);
}

.about-bazi-chart--revealing .bazi-chart {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.about-bazi-chart--revealing .bazi-chart-title,
.about-bazi-chart--revealing .bazi-chart-meta,
.about-bazi-chart--revealing .bazi-pillar {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
}

.about-bazi-chart--revealing .bazi-chart-title--in,
.about-bazi-chart--revealing .bazi-chart-meta--in,
.about-bazi-chart--revealing .bazi-pillar--in {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-bazi-chart--revealing .bazi-pillar--in.bazi-pillar--day {
  box-shadow:
    inset 0 0 0 1px rgba(244, 114, 182, 0.45),
    0 0 18px rgba(168, 85, 247, 0.22);
}

.about-page--pending .about-insights,
.about-page--pending .about-chart-panel,
.about-page--pending .flow-actions {
  opacity: 0;
  pointer-events: none;
}

.about-page:not(.about-page--pending) .flow-actions {
  transition: opacity 0.35s ease 0.2s;
}

.about-ritual {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
  background: radial-gradient(circle at 50% 35%, rgba(124, 58, 237, 0.18), rgba(11, 5, 29, 0.92) 68%);
  border-radius: 18px;
  min-height: 220px;
}

.about-ritual-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.35), transparent 70%);
  animation: ritualPulse 2.4s ease-in-out infinite;
}

.about-ritual-yin {
  position: relative;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 14px;
  animation: ritualSpin 6s linear infinite;
  filter: drop-shadow(0 0 16px rgba(192, 132, 252, 0.55));
}

.about-ritual-line {
  position: relative;
  font-family: var(--font-magazine);
  font-size: clamp(0.98rem, 4vw, 1.12rem);
  font-style: italic;
  color: rgba(245, 230, 255, 0.94);
  margin: 0 0 12px;
  min-height: 1.4em;
  opacity: 0;
  transform: translateY(6px);
}

.about-ritual-line--in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.about-ritual-dots {
  display: flex;
  gap: 8px;
}

.about-ritual-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(192, 132, 252, 0.85);
  animation: ritualDot 1.1s ease-in-out infinite;
}

.about-ritual-dots span:nth-child(2) { animation-delay: 0.15s; }
.about-ritual-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ritualPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.65; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes ritualSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ritualDot {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.about-panel {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 244, 230, 0.14), rgba(255, 236, 210, 0.08));
  border: 2px solid rgba(253, 186, 116, 0.38);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.about-panel--pending {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
}

.about-panel--in {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.48s ease, transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

.about-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 237, 213, 0.12);
  border-bottom: 1px solid rgba(253, 186, 116, 0.28);
}

.about-panel-head--chart {
  border-bottom: none;
  padding-bottom: 0;
}

.about-panel-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35);
}

.about-panel-head-title {
  font-family: var(--font-magazine);
  font-size: 0.92rem;
  font-weight: 700;
  font-style: italic;
  color: rgba(255, 248, 240, 0.96);
  line-height: 1.25;
}

.about-panel-body {
  padding: 8px 12px 10px;
}

.about-panel-story {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(255, 251, 245, 0.11);
  border: 1px solid rgba(253, 186, 116, 0.32);
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(255, 248, 240, 0.96);
}

.about-panel--geju .about-panel-story {
  background: rgba(237, 233, 254, 0.1);
  border-color: rgba(167, 139, 250, 0.32);
}

.about-panel-title {
  margin: 0 0 2px;
  font-family: var(--font-magazine);
  font-size: 1rem;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  line-height: 1.25;
}

.about-panel-sub {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(255, 236, 210, 0.78);
}
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 244, 230, 0.1), rgba(124, 58, 237, 0.12));
  border: 2px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.about-chart-panel--pending {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

.about-chart-panel--revealing {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.about-chart-panel .about-bazi-chart {
  margin: 0;
  padding: 0 10px 12px;
}

.about-chart-panel .bazi-chart-title {
  display: none;
}

.about-chart-panel .bazi-chart {
  background: rgba(255, 251, 245, 0.06);
  border-color: rgba(253, 186, 116, 0.25);
}

.about-bazi-chart--pending .bazi-chart,
.about-chart-panel--pending .bazi-chart {
  opacity: 0;
}

.flow-actions--locked .cta-glow {
  opacity: 0.45;
  filter: grayscale(0.2);
  pointer-events: none;
}

.flow-actions--locked .cta-glow::after {
  content: none;
}

/* ── Reading page ── */
.reading-page {
  padding: 4px 0 8px;
}

.reading-page.flow-screen {
  flex: 1;
  min-height: 0;
  justify-content: flex-start;
}

.reading-page.flow-screen .flow-screen-main {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
}

.reading-page.flow-screen > .flow-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  flex-shrink: 0;
  pointer-events: auto;
  touch-action: manipulation;
  padding-top: 10px;
  padding-bottom: calc(6px + var(--safe-bottom));
  background: linear-gradient(to top, rgba(11, 5, 29, 0.98) 65%, rgba(11, 5, 29, 0));
}

.reading-page.flow-screen > .flow-actions .cta-glow--bar {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

.bazi-chart {
  padding: 12px 10px 10px;
  border-radius: 14px;
  background: rgba(76, 29, 149, 0.22);
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: inset 0 0 24px rgba(124, 58, 237, 0.08);
}

.bazi-chart-title {
  font-family: var(--font-magazine);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(244, 114, 182, 0.95);
  margin-bottom: 10px;
}

.bazi-chart-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.bazi-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px 8px;
  border-radius: 10px;
  background: rgba(11, 5, 29, 0.35);
}

.bazi-pillar--day {
  background: rgba(157, 23, 77, 0.18);
  box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.35);
}

.bazi-pillar-en {
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 230, 255, 0.55);
  line-height: 1.2;
  text-align: center;
}

.bazi-pillar-zh {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(251, 207, 232, 0.9);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.bazi-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.bazi-cell-en {
  font-size: 0.46rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(245, 230, 255, 0.42);
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
  word-break: break-word;
}

.bazi-cell-en--bottom {
  font-size: 0.48rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(196, 181, 253, 0.75);
  min-height: 1.5em;
}

.bazi-char {
  font-family: "Noto Serif SC", "Songti SC", "KaiTi", serif;
  font-size: clamp(1.15rem, 4.6vw, 1.38rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

/* 五行字体色 · 木火土金水 */
.bazi-char--wood {
  color: #4ade80;
  text-shadow: 0 0 14px rgba(74, 222, 128, 0.45);
}

.bazi-char--fire {
  color: #f87171;
  text-shadow: 0 0 14px rgba(248, 113, 113, 0.45);
}

.bazi-char--earth {
  color: #c4956a;
  text-shadow: 0 0 14px rgba(196, 149, 106, 0.45);
}

.bazi-char--metal {
  color: #facc15;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.45);
}

.bazi-char--water {
  color: #38bdf8;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.bazi-chart-meta .bazi-char {
  font-size: 0.92em;
  display: inline;
}

.bazi-pillar--day .bazi-char {
  filter: brightness(1.06);
}

.bazi-cell-en--wood { color: rgba(134, 239, 172, 0.82); }
.bazi-cell-en--fire { color: rgba(252, 165, 165, 0.82); }
.bazi-cell-en--earth { color: rgba(196, 149, 106, 0.88); }
.bazi-cell-en--metal { color: rgba(250, 204, 21, 0.88); }
.bazi-cell-en--water { color: rgba(125, 211, 252, 0.82); }

.bazi-chart-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(192, 132, 252, 0.22);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.62rem;
  line-height: 1.4;
  text-align: center;
  color: rgba(245, 230, 255, 0.72);
}

.bazi-chart-day {
  color: rgba(245, 230, 255, 0.72);
  font-size: inherit;
}

.bazi-chart-day-gz {
  color: rgba(245, 230, 255, 0.72);
  font-size: inherit;
  font-weight: 400;
  text-shadow: none;
}

body.lang-zh .bazi-chart-title {
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: none;
}

body.lang-zh .bazi-pillar-en--top {
  font-size: 0.5rem;
}

.reading-short {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.45;
}

.reading-block {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(192, 132, 252, 0.25);
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
}

.reading-text,
.reading-hint {
  font-size: 0.8rem;
  line-height: 1.5;
}

.reading-direction {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.tag-list--compact {
  margin: 10px 0 8px;
  gap: 6px;
}

.tag-list--compact li {
  padding: 5px 10px;
  font-size: 0.68rem;
}

/* ── Result page ── */
.result-page {
  padding: 4px 0 8px;
  text-align: center;
}

.result-hero {
  margin-bottom: 16px;
}

.result-hero-eyebrow {
  display: none;
}

.result-head {
  font-family: var(--font-serif);
  font-size: clamp(2.13rem, 8.7vw, 2.73rem);
  font-weight: 700;
  font-style: normal;
  line-height: 1.2;
  margin: 0 0 10px;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: none;
  text-shadow: none;
}

.result-hero-sub-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 24rem;
  margin: 0 auto;
}

.result-hero-sub-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 132, 252, 0.45), transparent);
  position: relative;
}

.result-hero-sub-line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  transform: rotate(45deg);
  background: rgba(192, 132, 252, 0.55);
}

.result-hero-sub-row .result-hero-sub-line:first-child::after {
  right: 0;
}

.result-hero-sub-row .result-hero-sub-line:last-child::after {
  left: 0;
}

.result-hero-sub {
  margin: 0;
  flex-shrink: 0;
  max-width: 14rem;
  font-size: clamp(0.72rem, 3vw, 0.84rem);
  line-height: 1.4;
  color: rgba(245, 230, 255, 0.58);
  white-space: nowrap;
}

.result-archetype {
  display: none !important;
}

.result-lock {
  margin-bottom: 12px;
  font-size: 0.72rem;
}

.result-bazi-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 14px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(88, 28, 135, 0.38));
  border: 1px solid rgba(192, 132, 252, 0.38);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.result-bazi-promo:hover,
.result-bazi-promo:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.result-bazi-promo-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(233, 213, 255, 0.92);
  line-height: 1.35;
}

.result-bazi-promo-url {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-detail-card {
  width: min(100%, 504px);
  max-width: 504px;
  margin: 0 auto 14px;
  padding: 18px 14px 14px;
  border-radius: 20px;
  text-align: left;
  background: linear-gradient(165deg, rgba(88, 28, 135, 0.38) 0%, rgba(30, 10, 60, 0.78) 100%);
  border: 1px solid rgba(192, 132, 252, 0.32);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.result-key-info-title {
  margin: 0 0 14px;
  font-size: clamp(0.9rem, 3.6vw, 1rem);
  font-weight: 700;
  text-align: left;
  color: #f5e6ff;
  letter-spacing: 0.04em;
}

.result-detail-card.hidden {
  display: none;
}

.result-detail-card .attr-list {
  margin: 0 0 10px;
  padding: 0;
}

.result-detail-card .attr-row {
  padding: 8px 0;
}

.result-detail-card .attr-label {
  color: rgba(216, 180, 254, 0.82);
}

.result-detail-card .attr-list.result-attr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-detail-card .result-attr-grid .attr-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 10px;
  min-height: 88px;
  border-radius: 14px;
  background: rgba(8, 3, 22, 0.5);
  border: 1px solid rgba(192, 132, 252, 0.18);
}

.result-detail-card .result-attr-grid .attr-icon-wrap {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.28);
  border: 1px solid rgba(192, 132, 252, 0.28);
}

.result-detail-card .result-attr-grid .attr-icon {
  margin-top: 0;
  font-size: 0.82rem;
  opacity: 1;
  width: auto;
}

.result-detail-card .result-attr-grid .attr-text {
  gap: 2px;
}

.result-detail-card .result-attr-grid .attr-label {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #fcd34d;
}

body.lang-zh .result-detail-card .result-attr-grid .attr-label {
  font-size: 0.68rem;
}

.result-detail-card .result-attr-grid .attr-value {
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 700;
  color: #fff;
}

.result-detail-card .result-attr-grid .attr-desc {
  font-size: 0.62rem;
  line-height: 1.35;
  font-weight: 400;
  color: rgba(245, 230, 255, 0.52);
  margin-top: 2px;
}

.result-detail-card .attr-value {
  color: var(--text-primary, #f5e6ff);
}

.result-bazi-promo--nested {
  max-width: none;
  margin: 0;
  padding: 14px 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-top: 1px solid rgba(192, 132, 252, 0.22);
  text-align: center;
  gap: 6px;
}

.result-bazi-promo--nested .result-bazi-promo-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f5e6ff;
}

.result-bazi-promo--nested .result-bazi-promo-sub {
  font-size: 0.68rem;
  line-height: 1.4;
  color: #fb7185;
  font-weight: 500;
}

.result-bazi-promo--nested .result-bazi-promo-url {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: rgba(76, 29, 149, 0.55);
  border: 1px solid rgba(192, 132, 252, 0.35);
}

.result-bazi-promo--nested .result-bazi-promo-globe {
  font-size: 0.9em;
  opacity: 0.9;
}

.result-bazi-promo--nested:hover,
.result-bazi-promo--nested:focus-visible {
  transform: none;
  box-shadow: none;
}

.result-lover-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.result-lover-tabs.hidden {
  display: none;
}

.result-lover-tab {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  background: rgba(124, 58, 237, 0.2);
  color: var(--text-primary, #f5e6ff);
  font-size: 0.72rem;
  cursor: pointer;
}

.result-lover-tab.is-active {
  border-color: rgba(251, 191, 36, 0.75);
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
}

.result-unlock-panel {
  margin: 0 auto 12px;
  max-width: 320px;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.35);
}

#result-password-modal.result-password-modal {
  z-index: 100000;
}

#popup-match.popup:not(.hidden) {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#popup-match.popup:not(.hidden) .popup-sheet {
  border-radius: 20px;
  max-width: min(440px, calc(100vw - 32px));
  max-height: 90dvh;
}

.result-password-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  margin: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
  box-sizing: border-box;
  pointer-events: auto;
}

.result-password-modal:not(.hidden) {
  display: grid !important;
}

.result-password-modal.hidden {
  display: none !important;
}

.result-password-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 2, 16, 0.72);
  backdrop-filter: blur(6px);
}

.result-password-modal-card {
  position: relative;
  z-index: 1;
  width: min(340px, calc(100vw - 32px));
  max-width: 340px;
  margin: 0 auto;
  padding: 22px 18px 18px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(36, 18, 72, 0.96), rgba(14, 8, 32, 0.98));
  border: 1px solid rgba(192, 132, 252, 0.45);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(168, 85, 247, 0.12);
}

.result-password-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 230, 255, 0.75);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.result-password-input--modal {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px 16px;
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: 0.22em;
}

.result-password-modal-card .cta-glow--bar {
  width: 100%;
  margin-top: 4px;
}

.result-password-modal-card .result-password-error {
  text-align: center;
}

.result-unlock-hint {
  font-size: 0.72rem;
  color: rgba(245, 230, 255, 0.82);
  margin-bottom: 10px;
  line-height: 1.4;
}

.result-password-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.result-password-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  background: rgba(11, 5, 29, 0.72);
  color: #fff;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}

.result-password-input:focus {
  outline: none;
  border-color: rgba(233, 196, 106, 0.75);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

.result-password-error {
  margin-top: 8px;
  font-size: 0.68rem;
  color: #ffb4b4;
}

.result-download {
  margin: 0 auto 14px;
  max-width: 420px;
  width: 100%;
  padding: 12px 10px 10px;
  border-radius: 14px;
  background: rgba(143, 184, 168, 0.1);
  border: 1px solid rgba(143, 184, 168, 0.28);
}

.result-poster-brief {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  font-style: normal;
  color: #d8eadf;
  margin-bottom: 6px;
  text-shadow: none;
}

body.lang-zh .result-poster-brief {
  font-family: "Noto Serif SC", var(--font-serif);
}

.result-poster-tagline {
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(232, 245, 238, 0.88);
  margin-bottom: 6px;
}

.result-download-hint {
  font-size: 0.64rem;
  color: rgba(245, 230, 255, 0.55);
  margin-bottom: 10px;
}

.result-download-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cta-glow--compact {
  padding: 11px 14px;
  font-size: 0.76rem;
  width: 100%;
}

.cta-glow--poster {
  background: linear-gradient(135deg, rgba(143, 184, 168, 0.28), rgba(168, 200, 216, 0.32));
  border-color: rgba(143, 184, 168, 0.45);
}

.result-vibe {
  font-size: 0.75rem;
  margin-bottom: 8px;
}

/* ── Loading ── */
#flow-loading.flow-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 5, 29, 0.88);
  backdrop-filter: blur(6px);
  transform: none;
  box-sizing: border-box;
  pointer-events: auto;
}

#flow-loading.flow-loading:not(.hidden) {
  display: flex !important;
}

.flow-loading-inner {
  text-align: center;
  margin: 0 auto;
  width: min(320px, calc(100vw - 48px));
}

.flow-loading-inner--ritual {
  padding: 0 24px;
  max-width: 320px;
}

.flow-loading-yin {
  font-size: 2.6rem;
  line-height: 1;
  margin: 0 auto 16px;
  animation: ritualSpin 6s linear infinite;
  filter: drop-shadow(0 0 16px rgba(192, 132, 252, 0.55));
}

.flow-loading-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.flow-loading-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(192, 132, 252, 0.85);
  animation: ritualDot 1.1s ease-in-out infinite;
}

.flow-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.flow-loading-dots span:nth-child(3) { animation-delay: 0.3s; }

.flow-ritual-line--in,
.about-ritual-line--in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.flow-loading-inner p,
#flow-loading-text {
  font-family: var(--font-magazine);
  font-size: clamp(0.95rem, 4vw, 1.08rem);
  font-style: italic;
  color: rgba(245, 230, 255, 0.92);
  margin: 0;
  min-height: 1.5em;
  opacity: 0;
  transform: translateY(6px);
}

.flow-loading-inner p.flow-ritual-line--in,
#flow-loading-text.flow-ritual-line--in {
  opacity: 1;
  transform: translateY(0);
}

.flow-loading-quote {
  font-family: var(--font-magazine);
  text-align: center;
  max-width: 22em;
  margin: 0 auto;
  padding: 0 12px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
}

.flow-loading-quote--zh {
  margin-top: 14px;
  font-size: clamp(0.88rem, 3.6vw, 1rem);
  font-style: normal;
  color: rgba(245, 230, 255, 0.92);
}

.flow-loading-quote--en {
  margin-top: 8px;
  font-size: clamp(0.72rem, 3vw, 0.82rem);
  font-style: italic;
  color: rgba(245, 230, 255, 0.68);
}

.flow-loading-quote.flow-ritual-line--in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.flow-loading-quote.hidden {
  display: none;
}

/* ── Lead capture (phone OTP) in loading overlay ── */
#flow-loading.flow-loading--lead .flow-loading-inner--ritual {
  width: min(360px, calc(100vw - 32px));
  max-width: 360px;
}

.flow-loading-lead {
  width: 100%;
  margin-top: 0;
}

.flow-loading-lead-card {
  background: rgba(18, 28, 22, 0.92);
  border: 1px solid rgba(120, 160, 130, 0.22);
  border-radius: 20px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.flow-loading-lead-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #f5f5f5;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.flow-loading-lead-sub {
  font-size: 0.82rem;
  color: rgba(220, 230, 225, 0.72);
  margin: 0 0 18px;
  line-height: 1.45;
}

.lead-step {
  margin-bottom: 10px;
}

.lead-phone-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(40, 48, 44, 0.95);
  color: #f0f0f0;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lead-phone-input::placeholder {
  color: rgba(200, 210, 205, 0.45);
}

.lead-phone-input:focus {
  border-color: rgba(140, 120, 200, 0.55);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.lead-phone-error {
  font-size: 0.78rem;
  color: #f87171;
  margin: 0 0 10px;
  min-height: 1.1em;
  text-align: left;
}

.lead-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.lead-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lead-btn--secondary {
  background: rgba(90, 95, 110, 0.85);
  color: #f5f5f5;
}

.lead-btn--primary {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.88), rgba(91, 33, 182, 0.92));
  color: #fff;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
}

.lead-btn:not(:disabled):active {
  transform: scale(0.98);
}

.flow-loading-lead-terms {
  font-size: 0.68rem;
  line-height: 1.5;
  color: rgba(220, 230, 225, 0.55);
  margin: 16px 0 0;
}

body.lang-zh .flow-loading-lead-title {
  font-family: "Noto Serif SC", var(--font-serif);
}

html.ta-auto-portrait #btn-reading-portrait {
  display: none !important;
}

/* Result page: hide scrollbar, keep scroll */
.flow-body--result,
.flow-body--result.flow-body--fit {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.flow-body--result::-webkit-scrollbar,
.flow-body--result.flow-body--fit::-webkit-scrollbar {
  display: none;
}

/* ── Toast ── */
.toast-msg {
  position: fixed;
  bottom: calc(72px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 400;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(30, 15, 45, 0.95);
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: var(--text);
  font-size: 0.82rem;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reading-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.reading-text,
.reading-hint {
  color: rgba(245, 230, 255, 0.88);
}

.reading-direction {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--gold);
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(192, 132, 252, 0.35);
  color: rgba(245, 230, 255, 0.9);
}

.tag-list--result {
  justify-content: center;
}

.result-portraits {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 auto 0;
  width: 100%;
  max-width: 100%;
}

.flow-body--result .result-portraits {
  margin-bottom: 0;
}

.flow-body--result .result-portrait-box {
  margin-bottom: 0;
}

.result-portraits--duo {
  max-width: 100%;
}

.result-portrait-box--duo {
  max-width: 336px;
  margin: 0 auto;
}

.dream-lover-switch {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 0 10px;
}

.dream-lover-switch.hidden {
  display: none !important;
}

.dream-lover-tab {
  flex: 1;
  max-width: 160px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  background: rgba(11, 5, 29, 0.45);
  color: rgba(245, 230, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.dream-lover-tab.active {
  color: #fff;
  border-color: rgba(244, 114, 182, 0.85);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.55), rgba(219, 39, 119, 0.45));
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.28);
}

.result-portrait-box {
  position: relative;
  --frame-pad: 0;
  margin: 0 auto 10px;
  padding: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(192, 132, 252, 0.32),
    0 16px 42px rgba(88, 28, 135, 0.34),
    0 4px 18px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  width: min(100%, 504px);
  max-width: 504px;
  max-height: min(62vh, 560px);
  aspect-ratio: 3 / 4;
  height: auto;
}

.result-portrait-box::before,
.result-portrait-box::after {
  display: none;
}

.result-portrait-inner {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #12081c;
  box-shadow: none;
  z-index: 1;
  height: 100%;
}

.flow-body--result .result-portraits:not(.result-portraits--duo) .result-portrait-box {
  transform: none;
  transform-origin: center top;
}

.result-portrait-ai-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: clamp(0.58rem, 2.4vw, 0.68rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(11, 5, 29, 0.72);
  border: 1px solid rgba(192, 132, 252, 0.38);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.result-portrait-ai-badge-star {
  width: 0.6em;
  height: 0.6em;
}

.result-portrait-vibe {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 4;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: clamp(0.68rem, 2.9vw, 0.78rem);
  line-height: 1.4;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 4px rgba(46, 16, 101, 0.35);
  background: rgba(167, 139, 250, 0.22);
  border: 1px solid rgba(196, 181, 253, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 14px rgba(76, 29, 149, 0.1);
  pointer-events: none;
}

body.lang-zh .result-portrait-vibe {
  font-weight: 600;
}

.result-portrait-box.is-unlocked {
  overflow: hidden;
  max-height: min(69.6vh, 624px);
  aspect-ratio: 3 / 4;
  cursor: zoom-in;
}

.result-portrait-box.is-unlocked:focus-visible {
  outline: 2px solid rgba(244, 114, 182, 0.85);
  outline-offset: 3px;
}

.result-portrait-box.has-baked-banner .result-wanted-banner {
  display: none;
}

.result-wanted-banner {
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 0 10px 12px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 58%, transparent 100%);
  border: none;
  box-shadow: none;
  pointer-events: none;
}

.result-wanted-title {
  display: block;
  padding: 10px 8px 4px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-style: normal;
  font-size: clamp(0.86rem, 3.6vw, 1.02rem);
  letter-spacing: 0.02em;
  text-transform: none;
  text-align: center;
  color: #2c3e36;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.result-wanted-sub {
  display: block;
  padding: 0 8px 6px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(0.68rem, 3vw, 0.82rem);
  line-height: 1.3;
  text-align: center;
  color: #5a7268;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

body.lang-zh .result-wanted-title {
  font-family: "Noto Serif SC", var(--font-serif);
  text-transform: none;
  letter-spacing: 0.06em;
}

.result-portrait-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
  filter: blur(5px) saturate(0.92);
  transform: scale(1.02);
  transition: filter 0.45s ease, transform 0.45s ease;
}

.result-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
  filter: blur(5px) saturate(0.92);
  transform: scale(1.02);
  transition: filter 0.45s ease, transform 0.45s ease;
}

.result-portrait-canvas.is-unlocked,
.result-portrait-box.is-unlocked .result-portrait-canvas,
.result-portrait-img.is-unlocked,
.result-portrait-box.is-unlocked .result-portrait-img {
  filter: none;
  transform: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-portrait-lock.hidden {
  display: none;
}

.result-portrait-lock {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 5, 29, 0.28);
  pointer-events: auto;
  border-radius: 1px;
}

.result-portrait-unlock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 148px;
  max-width: 78%;
  padding: 14px 18px 12px;
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(88, 28, 135, 0.94), rgba(124, 58, 237, 0.9));
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.result-portrait-unlock-btn:hover,
.result-portrait-unlock-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 14px 32px rgba(124, 58, 237, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.result-portrait-unlock-btn:disabled {
  opacity: 0.85;
  cursor: wait;
  transform: none;
}

.result-portrait-unlock-glyphs {
  display: block;
  width: 3.4rem;
  height: 2.35rem;
  margin: 0 auto 4px;
  filter: drop-shadow(0 4px 14px rgba(236, 72, 153, 0.4));
  animation: unlock-glyphs-pulse 2.2s ease-in-out infinite;
}

.result-portrait-unlock-glyphs svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.unlock-glyph-heart {
  fill: #fb9ec8;
}

.unlock-glyph-fish {
  fill: none;
  stroke: #fde68a;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.unlock-glyph-dot {
  fill: #fde68a;
}

@keyframes unlock-glyphs-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.result-portrait-unlock-btn.is-waiting .result-portrait-unlock-glyphs {
  animation: unlock-glyphs-pulse 0.9s ease-in-out infinite;
}

.result-portrait-unlock-label {
  display: block;
  letter-spacing: 0.02em;
}

body.lang-zh .result-portrait-unlock-label {
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 0.88rem;
}

.result-portrait-lock-icon {
  width: clamp(2rem, 10vw, 2.75rem);
  height: clamp(2.25rem, 11vw, 3rem);
  border-width: 2.5px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.55));
  opacity: 0.95;
}

.result-portrait-lock-icon::before {
  border-width: 2.5px;
  top: -0.42em;
}

.popup-carousel {
  position: relative;
  margin: 0 -4px 6px;
}

@media (min-width: 480px) {
  .popup {
    align-items: center;
    padding: 20px;
  }

  .popup-sheet {
    border-radius: 20px;
    max-width: 440px;
    max-height: 90dvh;
    padding: 20px 22px 24px;
  }

  .sheet-handle { display: none; }

  .popup-title,
  .popup-sub { text-align: center; }

  .popup-header { padding-right: 0; }

  .popup-carousel--compact .carousel-slide {
    max-height: 320px;
  }

  .popup-carousel--compact.popup-carousel--single .carousel-slide,
  .popup-carousel--compact.popup-carousel--single .carousel-slide.is-center {
    width: clamp(180px, 52%, 260px);
  }
}

/* ── Tablet ── */
@media (min-width: 640px) {
  :root {
    --max-w: 620px;
  }

  .home-main,
  .flow-body {
    padding-left: 24px;
    padding-right: 24px;
  }

  .gallery {
    gap: 14px;
  }

  .match-card {
    border-radius: 16px;
  }

  .hero-title {
    font-size: 1.95rem;
  }

  .page--home .hero-title {
    font-size: clamp(1.35rem, 4vw, 1.65rem);
  }

  .hero-sub {
    font-size: 0.75rem;
    max-width: 280px;
  }

  .page--home .hero-sub {
    font-size: 0.65rem;
    max-width: 220px;
  }

  .process-icon {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }

  .page--home .process-icon {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .process-step span {
    font-size: 0.65rem;
  }

  .cta-glow {
    max-width: 420px;
  }
}

/* ── Desktop ── */
@media (min-width: 900px) {
  :root {
    --max-w: 960px;
  }

  .home-main {
    padding: calc(16px + var(--safe-top)) 32px calc(32px + var(--safe-bottom));
  }

  .page--home .home-main {
    height: auto;
    padding: calc(16px + var(--safe-top)) 32px calc(32px + var(--safe-bottom));
    overflow: visible;
  }

  .site-header--home {
    min-height: 52px;
    padding: 8px 0 12px;
  }

  .page--home .site-header--home {
    min-height: 44px;
    padding: 4px 0 6px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 1.35rem;
  }

  .hero {
    padding: 16px 0 20px;
  }

  .page--home .hero {
    padding: 6px 0 10px;
  }

  .hero-title {
    font-size: clamp(2rem, 3.2vw, 2.5rem);
    margin-bottom: 14px;
  }

  .page--home .hero-title {
    font-size: clamp(2rem, 3.2vw, 2.65rem);
    margin-bottom: 12px;
  }

  .page--home .hero-sub {
    font-size: 0.82rem;
    max-width: 420px;
  }

  .page--home .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 12px;
    margin: 16px auto 20px;
    max-width: 920px;
  }

  .page--home .match-card {
    border-radius: 16px;
    max-height: none;
    aspect-ratio: 3 / 4;
  }

  .card-meta-element {
    font-size: 0.82rem;
  }

  .card-meta-dir,
  .card-meta-region {
    font-size: 0.65rem;
  }

  .home-indicators {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    padding: 18px 20px 20px;
  }

  .home-indicators-title {
    font-size: 0.82rem;
    margin-bottom: 18px;
  }

  .home-indicators-grid {
    gap: 16px;
  }

  .home-indicator-icon {
    width: 48px;
    height: 48px;
  }

  .home-indicator-icon svg {
    width: 22px;
    height: 22px;
  }

  .home-indicator-label {
    font-size: 0.72rem;
  }

  .home-indicator-desc {
    font-size: 0.58rem;
  }

  .process-step-title {
    font-size: 0.72rem;
  }

  .process-step-desc {
    font-size: 0.58rem;
    max-width: 120px;
  }

  .home-bottom {
    gap: 6px;
    padding-top: 0;
  }

  .match-card {
    border-radius: 18px;
    max-height: 340px;
    aspect-ratio: 3 / 4;
  }

  .card-label,
  .card-role {
    font-size: 0.72rem;
  }

  .page--home .card-label,
  .page--home .card-role {
    font-size: 0.82rem;
  }

  .page--home .card-user-name {
    font-size: 0.74rem;
  }

  .wisdom {
    padding: 16px 24px 18px;
  }

  .page--home .wisdom {
    padding: 10px 24px 8px;
  }

  .page--home .wisdom-yin {
    margin-bottom: 10px;
  }

  .page--home .wisdom-yin svg {
    width: 56px;
    height: 56px;
  }

  .wisdom-title {
    font-size: 1.25rem;
  }

  .page--home .wisdom-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }

  .wisdom-desc {
    font-size: 0.82rem;
    max-width: 520px;
  }

  .page--home .wisdom-desc {
    font-size: 0.78rem;
    max-width: 480px;
  }

  .process {
    padding: 12px 0 24px;
  }

  .page--home .process {
    padding: 8px 0 10px;
  }

  .process-track {
    max-width: 720px;
    margin: 0 auto;
    gap: 8px;
  }

  .process-icon {
    width: 58px;
    height: 58px;
    font-size: 1.4rem;
  }

  .page--home .process-icon {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }

  .process-step span {
    font-size: 0.72rem;
  }

  .page--home .process-step span:not(.process-num) {
    font-size: 0.68rem;
  }

  .home-cta-wrap {
    padding: 8px 0 16px;
  }

  .page--home .home-cta-wrap {
    padding: 8px 0 0;
  }

  .cta-glow {
    max-width: 480px;
    padding: 16px 32px;
    font-size: 1rem;
  }

  .page--home .cta-glow {
    max-width: 520px;
    padding: 15px 36px;
    font-size: 0.95rem;
  }

  /* Flow pages: vertically centered on desktop, fixed viewport */
  .page--flow {
    height: 100dvh;
    height: 100svh;
    max-width: var(--max-w);
    margin: 0 auto;
    overflow: hidden;
  }

  .page--flow .flow-body,
  .page--flow .flow-body--fit {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-bottom: calc(20px + var(--safe-bottom));
  }

  .flow-body--fit .flow-actions {
    margin-top: 12px;
    padding-top: 0;
  }

  .page--flow .about-page.flow-screen {
    flex: 1 1 auto;
    max-height: none;
    justify-content: center;
  }

  .page--flow .about-page .flow-screen-main {
    flex: 0 1 auto;
    overflow-y: auto;
    max-height: calc(100dvh - 52px - var(--safe-top) - var(--safe-bottom) - 88px);
  }

  .page--flow .about-page.flow-screen > .flow-actions {
    margin-top: 12px;
    padding-top: 0;
  }

  .page--flow .flow-body--result.flow-body--fit {
    justify-content: flex-start;
    overflow-y: auto;
  }

  .page--flow .flow-body--result .flow-screen {
    max-height: none;
    margin-top: 0;
    margin-bottom: 0;
  }

  .page--flow .flow-screen {
    flex: 0 1 auto;
    max-height: calc(100dvh - 52px - var(--safe-top) - var(--safe-bottom));
    justify-content: center;
  }

  .page--flow .flow-screen-main {
    flex: 0 1 auto;
    overflow: visible;
  }

  .page--flow-center .flow-body--fit > .flow-screen,
  .page--flow .flow-body--fit > .flow-screen {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  .page--flow-center .flow-body--center > section {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-head-name,
  .reading-head-name {
    font-size: 1.65rem;
    margin-bottom: 8px;
  }

  .about-head-sub,
  .reading-head-sub {
    font-size: 1.22rem;
  }

  .about-bazi-chart .bazi-char {
    font-size: 2.05rem;
  }

  .about-bazi-chart .bazi-chart {
    padding: 18px 14px 16px;
  }

  .prose-body {
    font-size: 1.12rem;
    line-height: 1.72;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .prose-body--direction {
    font-size: 1.08rem;
  }

  .prose-body--caption {
    font-size: 0.92rem;
  }

  .direction-map-canvas {
    min-height: 320px;
    max-height: 420px;
  }

  .direction-map-legend-item {
    font-size: 0.88rem;
  }

  .result-portrait-box {
    max-width: min(100%, 504px);
    max-height: min(69.6vh, 624px);
    margin-left: auto;
    margin-right: auto;
  }

  .flow-body--result .result-portraits {
    align-items: center;
  }

  .cosmos-cloud--l {
    left: 8%;
    top: 45%;
    width: 200px;
    height: 140px;
    opacity: 0.12;
  }

  .cosmos-cloud--r {
    right: 8%;
    top: 50%;
    width: 200px;
    height: 140px;
    opacity: 0.12;
  }
}

/* ── Short viewport: keep CTA visible (desktop/tablet) ── */
@media (max-height: 820px) and (min-width: 640px) {
  .page--home .hero {
    padding: 2px 0 4px;
  }

  .page--home .hero-title {
    font-size: 1.25rem;
    margin-bottom: 4px;
  }

  .page--home .wisdom-desc {
    display: none;
  }

  body.lang-zh .page--home .wisdom-desc,
  html[lang="zh-CN"] .page--home .wisdom-desc {
    display: block !important;
    font-size: clamp(0.82rem, 3.4vw, 0.98rem);
  }

  body.lang-zh .page--home .wisdom-title,
  html[lang="zh-CN"] .page--home .wisdom-title {
    display: none !important;
  }

  .page--home .wisdom-yin svg {
    width: 32px;
    height: 32px;
  }

  .page--home .wisdom-title {
    font-size: 0.82rem;
  }

  .page--home .process-icon {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .page--home .process-step span:not(.process-num) {
    font-size: 0.52rem;
  }

  .home-privacy {
    display: none;
  }
}

/* ── Large desktop ── */
@media (min-width: 1200px) {
  :root {
    --max-w: 1080px;
  }

  .page--home .gallery {
    gap: 6px;
  }

  .gallery {
    gap: 20px;
  }

  .match-card {
    max-height: 360px;
  }
}

/* ══════════════════════════════════════════════════════════════
   Home · mockup layout (mobile scroll + desktop/iPad 4-col)
   ══════════════════════════════════════════════════════════════ */

.page--home {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page--home.page--active .home-main {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow: visible;
  padding: calc(8px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  gap: 0;
}

.hero-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--font-magazine);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(245, 230, 255, 0.92);
}

.hero-title-main,
.page--home .hero-title-main {
  display: block;
  font-family: var(--font-magazine);
  font-size: clamp(1.65rem, 7vw, 2.15rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-align: center;
  color: #fff;
  -webkit-text-stroke: 0.35px #9333ea;
  text-shadow:
    0 0 28px rgba(168, 85, 247, 0.45),
    -1px -1px 0 #7c3aed,
    1px 1px 0 #db2777;
}

.page--home .hero {
  padding: 10px 0 14px;
}

.page--home .hero-title {
  display: block;
  margin-bottom: 8px;
  font-size: inherit;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.page--home .hero-sub-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto;
}

.page--home .hero-sub {
  font-size: 0.72rem;
  font-style: italic;
  color: #e9d5ff;
  text-shadow: none;
  flex: 1;
  text-align: center;
}

.page--home .gallery {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 10px;
  margin: 0 0 18px;
  min-height: 0;
}

.page--home .match-card {
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
  max-height: none;
  border-radius: 14px;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f5e6ff;
  background: rgba(11, 5, 29, 0.72);
  border: 1px solid rgba(192, 132, 252, 0.45);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.card-badge-star {
  width: 10px;
  height: 10px;
}

.card-meta-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(11, 5, 29, 0.92) 0%, rgba(11, 5, 29, 0.55) 55%, transparent 100%);
  pointer-events: none;
  text-align: left;
}

.card-element-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-element-icon svg {
  width: 22px;
  height: 22px;
}

.card-element-icon--water { color: #38bdf8; }
.card-element-icon--fire { color: #f87171; }
.card-element-icon--wood { color: #4ade80; }
.card-element-icon--metal { color: #fbbf24; }

.card-meta-lines {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.card-meta-element {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.card-meta-dir {
  font-size: 0.6rem;
  font-weight: 600;
  color: #c4b5fd;
  line-height: 1.2;
}

.card-meta-region {
  font-size: 0.56rem;
  font-weight: 500;
  color: rgba(233, 213, 255, 0.88);
  line-height: 1.25;
}

.home-indicators {
  margin-bottom: 20px;
  text-align: center;
}

.home-indicators-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-magazine);
  font-size: clamp(0.82rem, 3.2vw, 1rem);
  font-weight: 600;
  font-style: italic;
  color: #f5e6ff;
}

.home-indicators-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.home-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.home-indicator-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(192, 132, 252, 0.4);
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.25);
  color: #e9d5ff;
}

.home-indicator-icon svg {
  width: 20px;
  height: 20px;
}

.home-indicator-icon--yin svg {
  width: 24px;
  height: 24px;
}

.home-indicator-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.home-indicator-desc {
  font-size: 0.5rem;
  color: rgba(196, 181, 253, 0.85);
  line-height: 1.25;
}

.home-bottom {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
}

.page--home .home-cta-wrap {
  padding: 0;
}

.page--home .cta-glow {
  max-width: 100%;
  width: 100%;
  padding: 14px 20px;
  font-size: 0.92rem;
  border-radius: 999px;
}

.home-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.62rem;
  color: rgba(196, 181, 253, 0.75);
}

.home-privacy-lock {
  flex-shrink: 0;
}

.page--home .wisdom {
  padding: 8px 12px 12px;
}

.page--home .wisdom-yin svg {
  width: 64px;
  height: 64px;
}

.page--home .wisdom-title {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  margin-bottom: 8px;
}

.page--home .wisdom-desc {
  display: block;
  font-size: 0.72rem;
  max-width: 420px;
  margin: 0 auto;
  color: rgba(233, 213, 255, 0.82);
}

.page--home .process {
  padding: 8px 0 12px;
}

.page--home .process-num {
  display: none;
}

.page--home .process-step {
  gap: 4px;
}

.process-step-title {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.2;
}

.process-step-desc {
  display: block;
  font-size: 0.48rem;
  font-weight: 400;
  color: rgba(196, 181, 253, 0.8);
  text-align: center;
  line-height: 1.25;
  max-width: 88px;
  margin: 0 auto;
}

.page--home .process-icon {
  width: 40px;
  height: 40px;
}

.page--home .process-icon svg {
  width: 18px;
  height: 18px;
}

.page--home .process-arrow.icon-chevron {
  margin-bottom: 28px;
}

.home-footer {
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(196, 181, 253, 0.65);
  padding: 8px 0 4px;
  margin: 0;
}

/* Tablet / iPad */
@media (min-width: 640px) {
  .page--home.page--active .home-main {
    padding-left: 28px;
    padding-right: 28px;
    max-width: 920px;
  }

  .page--home .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 14px;
    margin-bottom: 24px;
  }

  .page--home .match-card {
    aspect-ratio: 3 / 4;
    max-height: 280px;
  }

  .home-indicators-grid {
    gap: 16px;
  }

  .home-indicator-icon {
    width: 52px;
    height: 52px;
  }

  .home-indicator-label {
    font-size: 0.68rem;
  }

  .home-indicator-desc {
    font-size: 0.58rem;
  }

  .process-step-title {
    font-size: 0.68rem;
  }

  .process-step-desc {
    font-size: 0.56rem;
    max-width: 120px;
  }

  .page--home .process-icon {
    width: 48px;
    height: 48px;
  }
}

/* Desktop */
@media (min-width: 900px) {
  .page--home.page--active .home-main {
    max-width: 1040px;
    padding-left: 40px;
    padding-right: 40px;
  }

  .hero-title-main {
    font-size: clamp(2rem, 3.5vw, 2.65rem);
  }

  .page--home .gallery {
    gap: 18px;
  }

  .page--home .match-card {
    max-height: 320px;
    border-radius: 18px;
  }

  .card-meta-element {
    font-size: 0.76rem;
  }

  .card-meta-dir {
    font-size: 0.68rem;
  }

  .card-meta-region {
    font-size: 0.62rem;
  }

  .page--home .cta-glow {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── Result poster (magazine layout) ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.result-poster {
  text-align: left;
  padding: 0 0 20px;
}

.result-poster__kicker {
  display: inline;
  margin: 0;
  font-size: clamp(1.15rem, 5.5vw, 1.85rem);
  color: #f87171;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  vertical-align: baseline;
}

body.lang-en .result-poster__kicker {
  letter-spacing: 0.04em;
  text-transform: none;
}

.result-poster__title {
  display: inline;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  width: auto;
  vertical-align: baseline;
}

body.lang-zh .result-poster__title {
  font-family: "Noto Serif SC", var(--font-serif);
}

.result-poster__name {
  display: inline;
  font-size: clamp(1.5rem, 7.5vw, 2.6rem);
  letter-spacing: -0.03em;
  text-transform: none;
  line-height: 1.05;
}

.result-poster__title-rest {
  display: block;
  font-size: clamp(1.05rem, 4.8vw, 1.65rem);
  margin-top: 2px;
  margin-left: 0;
  line-height: 1.1;
}

.result-poster__accent {
  color: #f87171;
}

.result-poster__sub {
  margin: clamp(8px, 2.5vw, 14px) 0 0;
  margin-left: clamp(2px, 1.5vw, 8px);
  font-size: clamp(0.72rem, 2.8vw, 0.92rem);
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.12em;
  font-weight: 500;
}

.result-poster__ideal {
  margin: 6px 0 0;
  align-self: flex-end;
  font-size: clamp(0.68rem, 2.6vw, 0.84rem);
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.1em;
  font-style: italic;
}

.result-poster__stage {
  position: relative;
  min-height: min(82vh, 720px);
  margin: 0 0 14px;
  overflow: hidden;
}

.result-poster__photo-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.result-poster__shade {
  display: none !important;
}

.result-poster .result-portraits--poster {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
  max-width: none;
  width: 100%;
  height: 100%;
}

.result-poster.result-page .result-portraits--poster .result-portrait-box,
.result-poster .result-portraits--poster .result-portrait-box {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.result-poster .result-portrait-inner {
  height: 100%;
  min-height: 100%;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.result-poster__sub,
.result-poster__ideal {
  display: none;
}

.result-poster .result-portrait-canvas,
.result-poster .result-portrait-img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
  display: block;
}

.result-poster__head {
  position: absolute;
  top: clamp(24px, 3.5vh, 36px);
  left: clamp(10px, 3vw, 16px);
  right: auto;
  width: min(52%, 280px);
  max-width: 52%;
  z-index: 4;
  display: block;
  padding: 0;
  pointer-events: none;
}

.result-poster__attrs-wrap {
  position: absolute;
  left: 0;
  right: auto;
  bottom: clamp(6px, 1.5vw, 10px);
  top: auto;
  transform: none;
  z-index: 4;
  width: min(48%, 290px);
  max-height: min(30vh, 220px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 0 max(4px, env(safe-area-inset-left, 0px));
  pointer-events: none;
}

.result-poster__attrs-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
}

.result-poster__attrs-panel.hidden {
  display: none;
}

.result-poster__attrs-panel .result-key-info-title {
  margin: 0 0 6px;
  padding-left: 0;
  font-size: clamp(0.72rem, 2.8vw, 0.86rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  transform: none;
}

.result-poster-attrs {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1.6vw, 8px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-poster-attrs .attr-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 0;
  min-height: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.result-poster-attrs .attr-row--0 { margin-left: 0; }
.result-poster-attrs .attr-row--1 { margin-left: 0; }
.result-poster-attrs .attr-row--2 { margin-left: 0; }
.result-poster-attrs .attr-row--3 { margin-left: 0; }

.result-poster-attrs .attr-icon-wrap {
  flex-shrink: 0;
  width: auto;
  height: auto;
  min-width: 1.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
  border-radius: 0;
  background: transparent;
  border: none;
}

.result-poster-attrs .attr-icon {
  margin: 0;
  font-size: clamp(0.9rem, 3.2vw, 1.05rem);
  line-height: 1;
  opacity: 0.95;
}

.result-poster-attrs .attr-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.result-poster-attrs .attr-label {
  font-size: clamp(0.62rem, 2.3vw, 0.74rem);
  font-weight: 600;
  color: #fcd34d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.lang-zh .result-poster-attrs .attr-label {
  font-size: clamp(0.64rem, 2.4vw, 0.76rem);
  text-transform: none;
  letter-spacing: 0.04em;
}

.result-poster-attrs .attr-value {
  font-size: clamp(0.78rem, 3vw, 0.94rem);
  font-weight: 700;
  line-height: 1.28;
  color: #fff;
}

.result-poster-attrs .attr-row--1 .attr-value {
  font-size: clamp(0.92rem, 3.6vw, 1.12rem);
}

.result-poster-attrs .attr-row--3 .attr-value {
  font-size: clamp(0.84rem, 3.2vw, 1.02rem);
}

.result-poster-attrs .attr-desc {
  font-size: clamp(0.58rem, 2.1vw, 0.7rem);
  line-height: 1.32;
  color: rgba(255, 255, 255, 0.88);
}

.result-poster__quote {
  position: absolute;
  right: clamp(2px, 0.8vw, 6px);
  top: clamp(24px, 3.5vh, 36px);
  bottom: auto;
  transform: none;
  z-index: 3;
  margin: 0;
  padding: 0;
  border: none;
  width: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
}

.result-poster__quote.hidden {
  display: none !important;
}

.result-poster__quote-mark {
  color: #f87171;
  font-size: clamp(1.85rem, 6vw, 2.4rem);
  line-height: 0.85;
  font-family: Georgia, "Times New Roman", serif;
}

.result-poster__quote-text {
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: clamp(0.72rem, 2.8vw, 0.92rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: 0.12em;
  max-height: min(38vh, 320px);
  overflow: hidden;
  font-weight: 500;
}

body.lang-en .result-poster__quote-text {
  letter-spacing: 0.06em;
  font-size: clamp(0.68rem, 2.6vw, 0.86rem);
}

.result-poster__foot {
  position: relative;
  z-index: 4;
  padding: 0 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.result-bazi-promo--poster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 14px 12px;
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  background: rgba(8, 3, 22, 0.72);
  border: 1px solid rgba(192, 132, 252, 0.22);
}

.result-bazi-promo--poster .result-bazi-promo-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f5e6ff;
}

.result-bazi-promo--poster .result-bazi-promo-sub {
  font-size: 0.68rem;
  line-height: 1.4;
  color: #fb7185;
  font-weight: 500;
}

.result-bazi-promo--poster .result-bazi-promo-url {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: rgba(76, 29, 149, 0.55);
  border: 1px solid rgba(192, 132, 252, 0.35);
}

.flow-home-btn--poster {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

@media (min-width: 520px) {
  .result-poster__stage {
    min-height: min(76vh, 760px);
    border-radius: 18px;
    margin-left: 8px;
    margin-right: 8px;
  }

  .result-poster__head {
    top: clamp(28px, 4vh, 40px);
    left: 20px;
    width: min(44%, 300px);
    max-width: 44%;
  }

  .result-poster__quote {
    top: clamp(28px, 4vh, 40px);
    right: 6px;
  }

  .result-poster__name {
    font-size: clamp(1.65rem, 4.5vw, 2.4rem);
  }

  .result-poster__title-rest {
    margin-left: 0;
    font-size: clamp(1.1rem, 2.6vw, 1.55rem);
  }

  .result-poster__attrs-wrap {
    left: 0;
    bottom: 12px;
    width: min(40%, 300px);
    max-height: min(28vh, 240px);
    padding-left: max(6px, env(safe-area-inset-left, 0px));
  }

  .result-poster-attrs .attr-value {
    font-size: clamp(0.96rem, 2.2vw, 1.14rem);
  }

  .result-poster .result-portrait-canvas,
  .result-poster .result-portrait-img {
    object-position: 50% 12%;
  }
}

.flow-body--result .result-poster .result-portrait-box,
.flow-body--fit .result-poster .result-portrait-box {
  max-height: none !important;
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
  cursor: default;
  pointer-events: none;
}

.result-poster .result-portrait-box.is-unlocked {
  cursor: default;
  pointer-events: none;
}

.result-poster .result-portrait-box.is-unlocked:focus-visible {
  outline: none;
}
