:root {
  color-scheme: light;
  --canvas: #fafafa;
  --surface: #fff;
  --brand: #8a011b;
  --brand-pressed: #720015;
  --ink: rgba(0, 0, 0, .8);
  --muted: rgba(0, 0, 0, .45);
  --line: #e7e7e7;
  --lace-composed-opacity: .5;
  --screen-w: 393px;
  --screen-h: 852px;
  --onboarding-safe-top: max(54px, env(safe-area-inset-top));
  --font-small: 14px;
  --font-small-line: 22px;
  --font-report-small: 12px;
  --font-report-small-line: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background: #efedea;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button {
  max-width: 100%;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  width: min(100vw, var(--screen-w));
  height: 100svh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--canvas);
  isolation: isolate;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--canvas);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.is-active { display: block; animation: screen-in .32s ease-out backwards; }
@keyframes screen-in { from { opacity: 0; } }

/* Opening frame: the exact Figma composition, exported at 2x. */
.screen--splash {
  overflow: hidden;
  color: #fff;
  background: #8a011b;
}
.screen--splash.is-active { animation: splash-in .45s ease-out both; }
.screen--splash.is-leaving { opacity: 0; transition: opacity .42s ease-in-out; }
.splash-enter {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: #8a011b;
  cursor: pointer;
}
.splash-enter:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: -8px; }
.splash-frame-art {
  position: absolute;
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.splash-signature {
  position: absolute;
  bottom: max(31px, calc(env(safe-area-inset-bottom) + 17px));
  left: 50%;
  display: block;
  width: 100px;
  height: 66.5px;
  object-fit: contain;
  transform: translateX(-50%);
  pointer-events: none;
}
@keyframes splash-in { from { opacity: 0; transform: scale(1.012); } }

.brand-row {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 13px;
  background: transparent;
}
.wordmark-art { display: block; width: 55px; height: 20px; }
.wordmark {
  color: var(--brand);
  font-family: Didot, "Bodoni 72", Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.08em;
}
.wordmark--small { font-size: 23px; }

/* Login extension: keep the Figma status-bar breathing room inside the 393px canvas. */
.screen--auth-choice, .screen--auth { overflow: hidden; background: var(--canvas); }
.screen--auth-choice .brand-row { top: max(32px, env(safe-area-inset-top)); }
.auth-choice-copy { position: absolute; top: max(154px, calc(env(safe-area-inset-top) + 122px)); right: 32px; left: 32px; text-align: center; }
.auth-choice-copy h1 { position: relative; z-index: 1; margin: 0; font-size: 24px; font-weight: 600; line-height: 32px; }
.auth-choice-tagline { display: block; width: 225px; height: 62.5px; margin: -2px auto 0; object-fit: contain; }
.auth-choice-reveal-title { position: absolute; z-index: 5; top: max(154px, calc(env(safe-area-inset-top) + 122px)); left: 50%; width: min(184px, 48vw); height: auto; transform: translateX(-50%); object-fit: contain; opacity: 0; pointer-events: none; }
.auth-choice-ornament { position: absolute; top: max(337px, calc(env(safe-area-inset-top) + 305px)); left: 50%; width: 215px; height: 195px; transform: translateX(-50%); }
.auth-choice-ornament .ornament-ring { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.auth-choice-ornament .ornament-hub { position: absolute; top: 50%; left: 50%; width: 72px; height: auto; object-fit: contain; transform: translate(-50%, -50%); }
.auth-choice-reveal { position: absolute; z-index: 3; top: 76%; left: 50%; width: min(815px, 144vw); height: auto; object-fit: contain; opacity: 0; transform: translate(-50%, -50%) translateY(120%); pointer-events: none; }
.auth-choice-scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 36%; z-index: 4; pointer-events: none; background: var(--canvas); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); -webkit-mask-image: linear-gradient(to top, #000 42%, rgba(0, 0, 0, 0) 100%); mask-image: linear-gradient(to top, #000 42%, rgba(0, 0, 0, 0) 100%); }
/* opening loop: buttons spin one full turn -> ornament (buttons + logo) fades out -> persona board slides up from bottom, holds ~5s, disappears -> repeat */
.screen--auth-choice.is-active .auth-choice-ornament { animation: ornament-cycle 10s ease-in-out infinite; }
.screen--auth-choice.is-active .ornament-ring { transform-origin: 50% 50%; animation: ornament-spin-cycle 10s cubic-bezier(.4, 0, .2, 1) infinite; }
.screen--auth-choice.is-active .auth-choice-reveal { animation: ornament-reveal 10s cubic-bezier(.4, 0, .2, 1) infinite; }
.screen--auth-choice.is-active .auth-choice-reveal-title { animation: reveal-title-show 10s ease-in-out infinite; }
.screen--auth-choice.is-active .auth-choice-copy { animation: reveal-hide-copy 10s ease-in-out infinite; }
@keyframes reveal-title-show {
  0%, 36% { opacity: 0; }
  43%, 93% { opacity: 1; }
  99%, 100% { opacity: 0; }
}
@keyframes reveal-hide-copy {
  0%, 30% { opacity: 1; }
  36%, 93% { opacity: 0; }
  99%, 100% { opacity: 1; }
}
@keyframes ornament-cycle {
  0% { opacity: 0; transform: translateX(-50%) scale(.94); }
  6% { opacity: 1; transform: translateX(-50%) scale(1); }
  30% { opacity: 1; transform: translateX(-50%) scale(1); }
  36% { opacity: 0; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1); }
}
@keyframes ornament-spin-cycle {
  0%, 5.5% { transform: rotate(0); }
  29.5% { transform: rotate(1turn); }
  100% { transform: rotate(1turn); }
}
@keyframes ornament-reveal {
  0%, 36% { opacity: 0; transform: translate(-50%, -50%) translateY(120%); }
  43% { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
  60% { opacity: .62; transform: translate(-50%, -50%) translateY(0); }
  78% { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
  93% { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
  99%, 100% { opacity: 0; transform: translate(-50%, -50%) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .screen--auth-choice.is-active .auth-choice-ornament,
  .screen--auth-choice.is-active .ornament-ring,
  .screen--auth-choice.is-active .auth-choice-copy,
  .screen--auth-choice.is-active .auth-choice-reveal { animation: none; }
  .auth-choice-reveal { display: none; }
}
.auth-choice-actions { position: absolute; z-index: 5; right: 40px; bottom: max(72px, calc(env(safe-area-inset-bottom) + 56px)); left: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-choice-actions .primary-action, .auth-choice-actions .secondary-action { width: 100%; }
.secondary-action { height: 44px; padding: 0 14px; border: 1px solid rgba(138,1,27,.26); border-radius: 18px; color: var(--brand); background: #fff; font-size: 14px; font-weight: 500; line-height: 20px; cursor: pointer; }
.secondary-action:active { background: #fff7f8; transform: scale(.985); }
.secondary-action:focus-visible { outline: 3px solid rgba(138,1,27,.16); outline-offset: 3px; }
.auth-header { display: grid; height: 88px; grid-template-columns: 44px 1fr 44px; align-items: start; padding: max(42px, calc(env(safe-area-inset-top) + 10px)) 16px 0; }
.auth-header .wordmark-art { justify-self: center; margin-top: 3px; }
.auth-header .icon-button { display: grid; width: 44px; height: 44px; margin: -7px 0 0 -10px; padding: 0; border: 0; place-items: center; color: rgba(0,0,0,.32); background: transparent; font-size: 28px; cursor: pointer; }
.auth-form { position: relative; height: calc(100% - 88px); padding: 69px 32px 0; }
.auth-form h1 { margin: 0 0 32px; font-size: 18px; font-weight: 600; line-height: 26px; }
.handoff-context { margin: -16px 0 24px; padding: 12px 14px; border-radius: 12px; color: rgba(0,0,0,.62); background: #f7efef; font-size: 14px; line-height: 22px; text-wrap: pretty; }
.handoff-context[data-state="error"] { color: #8a011b; background: #f8e9ec; }
.auth-phone-row { display: grid; grid-template-columns: 60px auto minmax(0,1fr); column-gap: 8px; align-items: center; }
.auth-country-code, .auth-phone-dash { color: rgba(0,0,0,.62); font-size: 15px; line-height: 22px; text-align: center; }
.auth-country-code { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border: 0.5px solid rgba(0,0,0,.08); border-radius: 16px; background: #FFFFFF; }
.auth-phone-dash { color: rgba(0,0,0,.36); }
.auth-field { display: flex; height: 54px; min-width: 0; align-items: center; border: 0.5px solid rgba(0,0,0,.08); border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.02); transition: border-color .18s ease, box-shadow .18s ease; }
.auth-field:focus-within { border-color: rgba(138,1,27,.22); box-shadow: 0 4px 14px rgba(0,0,0,.02), 0 0 0 3px rgba(138,1,27,.06); }
.auth-field input { width: 100%; min-width: 0; height: 100%; padding: 0 16px; border: 0; outline: 0; color: rgba(0,0,0,.8); background: transparent; font-size: 15px; line-height: 22px; }
.auth-field input::placeholder { color: rgba(0,0,0,.26); }
.auth-field--phone > button { width: 18px; height: 18px; flex: 0 0 18px; margin-right: 16px; padding: 0; border: 0; font-size: 0; background: url(/static/selfit/assets/clear-input.svg) center / 18px 18px no-repeat; cursor: pointer; }
.auth-code-field { margin-top: 24px; }
.auth-code-field > button { height: 44px; min-width: 94px; margin-right: 16px; padding: 0 14px; border: 0; color: var(--brand); background: transparent; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.auth-code-field > button:disabled { color: rgba(0,0,0,.25); cursor: default; }
.auth-invite-field { width: 100%; }
.auth-message { min-height: 22px; margin: 12px 2px 0; color: rgba(0,0,0,.42); font-size: 14px; line-height: 22px; text-wrap: pretty; }
.auth-message[data-state="error"] { color: #a90020; }
.auth-message[data-state="success"] { color: #58705e; }
.auth-submit { position: absolute; right: 40px; bottom: max(56px, calc(env(safe-area-inset-bottom) + 40px)); left: 40px; width: auto; }
.auth-submit[aria-busy="true"] { cursor: progress; }

/* Onboarding: Figma geometry with simulated OS status chrome removed. */
.screen--intro {
  overflow: hidden;
  background: var(--canvas);
}
.screen--intro .brand-row { top: 62px; }
.intro-copy {
  position: absolute;
  top: 157px;
  left: 32px;
  width: calc(100% - 64px);
  max-width: 329px;
}
.intro-copy h1 {
  margin: 0;
  color: rgba(0, 0, 0, .8);
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: 0;
  text-align: center;
}
.dna-copy { position: absolute; top: 211px; left: 32px; width: calc(100% - 64px); max-width: 329px; color: rgba(0, 0, 0, .8); text-align: center; }
.dna-copy p { margin: 0; font-size: 15px; font-weight: 400; line-height: 26px; }
.dna-copy p:first-child { height: 25px; }
.dna-copy p + p { margin-top: 8px; white-space: nowrap; }

.dna-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 598px;
  overflow: hidden;
}
.dna-card {
  position: absolute;
  width: 102px;
  height: 151px;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition:
    left 600ms cubic-bezier(0, 0, .58, 1),
    top 600ms cubic-bezier(0, 0, .58, 1),
    transform 600ms cubic-bezier(0, 0, .58, 1);
  will-change: left, top, transform;
}
.dna-card .card-art {
  display: block;
  width: 102px;
  height: 151px;
  object-fit: contain;
  opacity: 1;
  image-rendering: auto;
  backface-visibility: hidden;
  transition: opacity 600ms cubic-bezier(0, 0, .58, 1);
}
.dna-card .word-art {
  position: absolute;
  left: 50%;
  display: block;
  opacity: 1;
  image-rendering: auto;
  backface-visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%);
}
.dna-card--suit .word-art { top: 45px; width: 48px; height: 22.5px; }
.dna-card--like .word-art { top: 81px; width: 39px; height: 20.5px; }
.dna-card--vibe .word-art { top: 42.5px; width: 47.5px; height: 25px; }

/* Figma node positions, normalized from the source's -90° asset orientation. */
.dna-card--suit { z-index: 1; left: 30.02px; top: 383px; }
.dna-card--like { z-index: 3; left: 149.34px; top: 381px; }
.dna-card--vibe { z-index: 2; left: 265.06px; top: 383px; }
.screen--intro.is-composed .dna-card--suit { left: 144.42px; top: 338px; transform: rotate(0deg); }
.screen--intro.is-composed .dna-card--like { left: 104px; top: 405px; transform: rotate(7.88deg); }
.screen--intro.is-composed .dna-card--vibe { left: 167px; top: 389px; transform: rotate(-11.01deg); }
.screen--intro.is-composed .card-art { opacity: var(--lace-composed-opacity); }

.primary-action {
  display: grid;
  place-items: center;
  width: min(313px, calc(100% - 48px));
  height: 44px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--brand);
  font-size: var(--font-small);
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}
.primary-action:active { background: var(--brand-pressed); transform: scale(.985); }
.primary-action:focus-visible { outline: 3px solid rgba(138, 1, 27, .2); outline-offset: 3px; }
.primary-action:disabled { cursor: default; opacity: .28; }
.auth-submit:disabled,
.screen[data-screen="suit"] .bottom-action:disabled,
.screen[data-screen="like"] .bottom-action:disabled,
.questionnaire-action:disabled {
  opacity: 1;
  background: #c2c2c2;
}
.intro-action {
  position: absolute;
  left: 50%;
  bottom: max(48px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  transition: background .16s ease, transform .16s ease;
}
.intro-action:active { transform: translateX(-50%) scale(.985); }

/* Shared follow-up screen styling keeps the CTA transition complete. */
.screen-header { height: 76px; padding: max(27px, env(safe-area-inset-top)) 22px 0; display: flex; align-items: flex-start; justify-content: space-between; }
.icon-button { width: 32px; height: 32px; border: 0; padding: 0; color: rgba(0,0,0,.32); background: transparent; font-size: 31px; font-weight: 300; line-height: 26px; }
.header-spacer { width: 32px; }
.stepper {
  position: absolute;
  z-index: 3;
  top: calc(var(--onboarding-safe-top) + 4px);
  left: 64px;
  width: 265px;
  max-width: calc(100% - 80px);
  height: 38px;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 0;
}
.stepper::before {
  position: absolute;
  z-index: 0;
  top: 7px;
  right: 23.5px;
  left: 23.5px;
  height: 1.5px;
  background: rgba(0,0,0,.08);
  content: '';
}
.stepper::after {
  position: absolute;
  z-index: 0;
  top: 7px;
  left: 23.5px;
  width: 0;
  height: 1.5px;
  background: #8a011b;
  content: '';
}
.stepper--like::after { width: 102.5px; }
.stepper--vibe::after { width: 218px; }
.step {
  position: relative;
  z-index: 1;
  flex: 0 0 35px;
  width: 35px;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(0,0,0,.27);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  line-height: 20px;
  transition: color .2s ease .4s;
}
.step i {
  box-sizing: border-box;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  overflow: hidden;
  background: #fafafa;
  border: 1.5px solid rgba(0,0,0,.08);
  border-radius: 99px;
  color: transparent;
  font-size: 0;
  font-style: normal;
  transition: border-color .2s ease .4s;
}
.step b {
  width: 35px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  white-space: nowrap;
}
.step.is-current, .step.is-done { color: #8a011b; }
.step.is-current i, .step.is-done i { border-color: #8a011b; }
.step-line { display: none; }
/* Persistent onboarding nav shell (back + stepper) — stays on screen across
   suit / suit-manual / like / vibe so it never flashes out and back in. */
.onboarding-nav { position: absolute; z-index: 5; top: 0; right: 0; left: 0; height: calc(var(--onboarding-safe-top) + 48px); pointer-events: none; }
.onboarding-nav[hidden] { display: none; }
.onboarding-nav-back { pointer-events: auto; position: absolute; top: calc(var(--onboarding-safe-top) + 1px); left: 20px; width: 44px; height: 44px; color: rgba(0,0,0,.32); font-size: 0; }
.onboarding-nav-back::before { position: absolute; top: 15px; left: 15px; width: 11px; height: 11px; border: solid currentColor; border-width: 0 0 2px 2px; content: ''; transform: rotate(45deg); }
.onboarding-nav .stepper { pointer-events: auto; }
[data-onboarding-stepper]::after { transition: width .42s cubic-bezier(.4, 0, .2, 1); }
[data-onboarding-stepper][data-progress="suit"]::after { width: 0; }
[data-onboarding-stepper][data-progress="like"]::after { width: 102.5px; }
[data-onboarding-stepper][data-progress="vibe"]::after { width: 218px; }
.page-copy { width: calc(100% - 64px); max-width: 329px; margin: 36px 32px 0; }
.page-copy--compact { margin-top: 25px; }
.page-copy h1 { margin: 0; font-size: 22px; line-height: 26px; font-weight: 600; letter-spacing: -.45px; }
.page-copy p { margin: 9px 0 0; color: var(--muted); font-size: var(--font-small); line-height: var(--font-small-line); }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 31px 24px 0; }
.upload-card { min-width: 0; cursor: pointer; }
.upload-card input, .photo-replace input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
}
.upload-preview { position: relative; display: block; aspect-ratio: 166 / 203; overflow: hidden; border-radius: 13px; background: #fff; border: 0; }
.upload-preview > img:not(.upload-guide) { width: 100%; height: 100%; object-fit: cover; }
.upload-guide { position: absolute; z-index: 0; display: block; object-fit: contain; pointer-events: none; }
.upload-guide--face { inset: 1px 0 0; width: 100%; height: calc(100% - 1px); margin: auto; object-position: center bottom; }
.upload-guide--body { top: 1px; bottom: 1px; left: 50%; width: 82%; height: calc(100% - 2px); transform: translateX(-50%); }
.upload-plus { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 33px; height: 33px; margin: -16px; border-radius: 50%; color: white; background: var(--brand); font-size: 0; font-weight: 300; }
.upload-plus::before, .upload-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 3px; border-radius: 2px; background: #fff; transform: translate(-50%, -50%); }
.upload-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.upload-card b { display: block; margin-top: 12px; color: var(--ink); font-size: var(--font-small); }
.inline-message { margin: 20px 32px 0; color: var(--muted); font-size: var(--font-small); line-height: var(--font-small-line); text-align: center; }
.bottom-action { position: absolute; left: 50%; bottom: max(32px, env(safe-area-inset-bottom)); transform: translateX(-50%); }
.bottom-action:active { transform: translateX(-50%) scale(.985); }
.preference-panel { margin: 34px 32px 110px; }
.spectrum { margin-bottom: 31px; }
.spectrum-label { display: flex; justify-content: space-between; font-size: var(--font-small); }
.spectrum input { width: 100%; margin: 15px 0 0; accent-color: var(--brand); }
.palette-field { border: 0; margin: 8px 0 0; padding: 0; }
.palette-field legend { margin-bottom: 16px; font-size: var(--font-small); }
.palette-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.palette { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; padding: 5px; border: 1px solid transparent; border-radius: 8px; background: transparent; }
.palette.is-selected { border-color: var(--brand); }
.palette i { display: block; height: 52px; background: var(--c); }
.palette span { grid-column: 1 / -1; margin-top: 7px; color: var(--ink); font-size: var(--font-small); }
.vibe-choices { display: flex; flex-wrap: wrap; gap: 12px 10px; margin: 45px 32px 0; }
.vibe-choices button { min-width: 86px; padding: 13px 18px; border: 1px solid #ddd; border-radius: 18px; color: var(--ink); background: #fff; }
.vibe-choices button.is-selected { border-color: var(--brand); color: var(--brand); background: rgba(138,1,27,.04); }
.selection-count { margin: 22px 32px; color: var(--muted); font-size: var(--font-small); line-height: var(--font-small-line); }

/* Remaining journey states are intentionally quiet; onboarding remains the visual focus. */
.wordmark--center { position: absolute; top: 42px; left: 50%; transform: translateX(-50%); }
.recognition-lines { position: absolute; top: 375px; left: 0; right: 0; text-align: center; }
.recognition-lines p { margin: 0 0 13px; opacity: .16; transition: opacity .5s; font-size: 15px; }
.recognition-lines p.is-seen { opacity: .8; }
.progress-orbit { position: absolute; left: 50%; bottom: 88px; width: 32px; height: 32px; margin-left: -16px; border: 1px solid #eadcdf; border-radius: 50%; }
.progress-orbit i { display: block; width: 100%; height: 100%; border: 2px solid transparent; border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.progress-number { position: absolute; bottom: 49px; width: 100%; margin: 0; color: var(--brand); font-family: Georgia, serif; font-size: var(--font-small); text-align: center; }
.screen--reveal { color: white; background: var(--brand); }
.wordmark--reveal { position: absolute; top: 36px; left: 50%; color: white; transform: translateX(-50%); }
.lace-hero { position: absolute; top: 158px; left: 60px; width: 273px; height: 390px; border: 1px solid rgba(255,255,255,.5); outline: 1px dotted rgba(255,255,255,.5); outline-offset: 8px; display: grid; place-items: center; }
.mirror-art { width: 150px; height: 220px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.7); border-radius: 50% 50% 44% 44%; }
.mirror-art span { font: italic 42px Georgia, serif; opacity: .8; }
.reveal-copy { position: absolute; top: 585px; left: 32px; right: 32px; text-align: center; }
.reveal-copy p, .reveal-copy span { margin: 0; font-size: var(--font-small); line-height: var(--font-small-line); opacity: .7; }
.reveal-copy h1 { margin: 9px 0 18px; font-size: 20px; }
.reveal-action { position: absolute; left: 40px; top: 736px; width: 313px; height: 44px; border: 1px solid rgba(255,255,255,.7); border-radius: 18px; color: white; background: transparent; }
.feed-header { position: sticky; top: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; height: 66px; padding: 15px 20px; background: rgba(250,250,250,.92); backdrop-filter: blur(12px); }
.feed-header button { border: 0; color: var(--muted); background: none; font-size: var(--font-small); }
.feed-copy { margin: 18px 16px 20px; }
.feed-copy p { margin: 0; color: var(--brand); font-size: var(--font-small); }
.feed-copy h1 { margin: 6px 0 0; font-size: 21px; }
.feed-grid { columns: 2; column-gap: 6px; padding: 0 6px; }
.feed-card { position: relative; margin: 0 0 6px; break-inside: avoid; overflow: hidden; border-radius: 4px; background: #eee; }
.feed-card img { display: block; width: 100%; min-height: 210px; object-fit: cover; }
.feed-card button { position: absolute; right: 8px; bottom: 8px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.7); border-radius: 14px; color: white; background: rgba(0,0,0,.25); backdrop-filter: blur(8px); font-size: var(--font-small); }
.feed-end { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 30px 10px 50px; color: var(--muted); font-size: var(--font-small); }
.feed-end i { width: 32px; height: 1px; background: #ddd; }
.tryon-dialog { width: min(100%, 393px); max-height: 90vh; margin: auto auto 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 24px 24px 0 0; background: #fff; }
.tryon-dialog::backdrop { background: rgba(0,0,0,.42); backdrop-filter: blur(3px); }
.tryon-sheet { position: relative; padding: 18px 24px 32px; }
.sheet-close { position: absolute; z-index: 2; right: 15px; top: 15px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.86); font-size: 20px; }
.tryon-media { height: 220px; overflow: hidden; border-radius: 12px; background: #eee; }
.tryon-media img { width: 100%; height: 100%; object-fit: cover; }
.tryon-media span { position: absolute; top: 202px; left: 36px; padding: 4px 8px; border-radius: 8px; color: white; background: rgba(0,0,0,.35); font-size: var(--font-small); }
.tryon-copy { margin: 20px 0 14px; }
.tryon-copy small { color: var(--brand); }
.tryon-copy h2 { margin: 5px 0 8px; font-size: 19px; }
.tryon-copy p, .tryon-status { color: var(--muted); font-size: var(--font-small); line-height: var(--font-small-line); }
.photo-replace { color: var(--brand); font-size: var(--font-small); text-decoration: underline; }
.tryon-result { margin: 14px 0; overflow: hidden; border-radius: 10px; }
.tryon-result img { display: block; width: 100%; }
.sheet-action { width: 100%; margin-top: 16px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; max-width: 320px; padding: 10px 16px; border-radius: 18px; color: white; background: rgba(20,20,20,.84); font-size: var(--font-small); line-height: var(--font-small-line); opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: .22s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 600px) {
  body { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
  .app-shell { width: var(--screen-w); min-height: var(--screen-h); height: var(--screen-h); border-radius: 40px; box-shadow: 0 24px 80px rgba(48,38,34,.16); }
}
@media (max-height: 820px) and (max-width: 599px) {
  .intro-action { top: auto; bottom: max(56px, calc(env(safe-area-inset-bottom) + 40px)); }
  .screen[data-screen="suit"],
  .screen[data-screen="suit-manual"],
  .screen[data-screen="like"] { padding-bottom: 1px; }
  .bottom-action {
    position: relative;
    left: auto;
    bottom: auto;
    margin: 24px auto max(18px, env(safe-area-inset-bottom));
    transform: none;
  }
  .bottom-action:active { transform: scale(.985); }
}

@media (max-width: 359px) {
  .dna-copy p + p { font-size: var(--font-small); white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .screen--intro .dna-card--suit { left: 144.42px; top: 338px; transform: rotate(0deg); }
  .screen--intro .dna-card--like { left: 104px; top: 405px; transform: rotate(7.88deg); }
  .screen--intro .dna-card--vibe { left: 167px; top: 389px; transform: rotate(-11.01deg); }
  .screen--intro .card-art { opacity: var(--lace-composed-opacity); }
  .screen--intro .word-art { opacity: 1; }
}

/* Figma onboarding matrix — suit / like / vibe / loading / report. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.screen-header--quiet { position: relative; z-index: 3; top: var(--onboarding-safe-top); height: 46px; padding: 0; }
.screen-header--quiet .icon-button { color: rgba(0,0,0,.32); }
.screen-header--quiet .icon-button,
.manual-header .icon-button { position: absolute; top: 1px; left: 20px; width: 44px; height: 44px; font-size: 0; }
.screen-header--quiet .icon-button::before,
.manual-header .icon-button::before {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 11px;
  height: 11px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  content: '';
  transform: rotate(45deg);
}
.screen-header--quiet + .stepper { margin: 0; }
.page-copy--suit, .page-copy--assessment { margin-top: 111px; }
.page-copy--suit h1 { font-size: 18px; line-height: 26px; letter-spacing: 0; }
.page-copy--suit p { margin-top: 16px; }
.page-copy--assessment h1 { font-size: 18px; }

.upload-grid { gap: 32px; margin: 44px 53px 0; }
.upload-card { display: flex; flex-direction: column; align-items: center; }
.upload-card b { order: -1; width: 100%; margin: 0 0 12px; color: rgba(0,0,0,.55); font-size: var(--font-small); font-weight: 400; text-align: center; }
.upload-preview { width: 100%; aspect-ratio: 128 / 160; border-radius: 12px; }
.upload-plus { z-index: 2; width: 40px; height: 40px; margin: -20px; background: #8a1720; font-size: 0; }
.upload-grid .upload-plus::before, .upload-grid .upload-plus::after { width: 20px; height: 3.4px; }
.upload-card.is-checking .upload-preview::after,
.upload-card.is-invalid .upload-preview::after { position: absolute; z-index: 1; inset: 0; content: ""; background: rgba(0,0,0,.42); }
.photo-status-list { display: flex; width: 100%; min-height: 68px; margin: 22px auto 0; padding: 0 12px; flex-direction: column; align-items: center; gap: 8px; }
.photo-status { display: flex; width: max-content; max-width: 100%; min-height: 30px; align-items: center; justify-content: center; color: rgba(0,0,0,.35); font-size: var(--font-small); line-height: 20px; text-align: center; white-space: nowrap; }
.photo-status:empty { visibility: hidden; }
.photo-status::before { display: grid; flex: 0 0 16px; width: 16px; height: 16px; margin-right: 6px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 500; line-height: 1; }
.photo-status[data-state="checking"]::before { content: ""; border-color: rgba(0,0,0,.16); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.photo-status[data-state="valid"] { color: #54c9ac; }
.photo-status[data-state="valid"]::before { content: "✓"; }
.photo-status[data-state="invalid"] { color: #a70020; }
.photo-status[data-state="invalid"]::before { content: "×"; }
.direct-select {
  position: absolute;
  z-index: 3;
  right: auto;
  bottom: calc(max(60px, env(safe-area-inset-bottom)) + 52px);
  left: 50%;
  display: flex;
  width: fit-content;
  min-width: 184px;
  height: 44px;
  margin: 0;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: rgba(0,0,0,.45);
  background: none;
  font-size: var(--font-small);
  line-height: 22px;
  white-space: nowrap;
  transform: translateX(-50%);
}
.direct-select span { margin-left: 3px; font-size: 18px; vertical-align: -1px; }
.direct-select:focus-visible { outline: 2px solid rgba(138,1,27,.28); outline-offset: 1px; border-radius: 12px; }

.manual-header { position: relative; z-index: 3; }
.stepper--manual { position: absolute; z-index: 3; }
.screen[data-screen="suit-manual"].is-active {
  display: block;
  overflow: hidden;
}
.manual-form {
  position: absolute;
  top: max(157px, calc(env(safe-area-inset-top) + 125px));
  right: 20px;
  bottom: max(96px, calc(env(safe-area-inset-bottom) + 76px));
  left: 20px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
}
.manual-form::-webkit-scrollbar { display: none; }
.manual-title { margin: 0 0 24px; color: rgba(0,0,0,.8); font-size: 18px; font-weight: 600; line-height: 26px; }
.manual-group { margin: 0 0 32px; padding: 0; border: 0; }
.manual-group:last-child { margin-bottom: 0; }
.manual-group legend { margin-bottom: 16px; color: rgba(0,0,0,.8); font-size: 16px; font-weight: 400; line-height: 24px; }
.skin-options { display: grid; grid-template-columns: repeat(6,40px); gap: 20px; }
.skin-options button { min-width: 0; padding: 0; border: 0; color: rgba(0,0,0,.45); background: none; font-size: 12px; font-weight: 400; line-height: 18px; }
.skin-options i { display: block; width: 40px; height: 40px; margin: 0 auto 8px; border: 1px solid transparent; border-radius: 50%; background: var(--tone); }
.skin-options button.is-selected i { border-color: #a70020; box-shadow: 0 0 0 1px rgba(167,0,32,.08); }
.skin-options button.is-selected span { color: #a70020; font-weight: 600; }
.manual-visual-options { display: grid; align-items: start; gap: 12px; }
.manual-visual-options button { display: grid; min-width: 0; gap: 6px; padding: 0; border: 0; color: rgba(0,0,0,.45); background: none; }
.manual-visual-options .manual-option-label { display: grid; width: 100%; height: 18px; place-items: center; border: 0; color: inherit; background: transparent; font-size: 12px; font-weight: 400; line-height: 18px; letter-spacing: 0; white-space: nowrap; }
.manual-visual-options .manual-art { position: relative; display: grid; width: 100%; overflow: hidden; place-items: center; border: 0.5px solid transparent; background: #fff; }
.manual-visual-options .manual-art img { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.manual-visual-options--face { width: min(343px, 100%); grid-template-columns: repeat(5, 59px); }
.manual-visual-options--face button { width: 59px; grid-template-rows: 80px 18px; gap: 8px; }
.manual-visual-options--face .manual-art { width: 59px; height: 80px; padding: 10px; align-items: end; border-radius: 12px; background: rgba(48,48,52,.05); }
.manual-visual-options--face .manual-art img { width: 39px; height: 60px; object-fit: contain; }
.manual-visual-options--body { width: min(348px, 100%); grid-template-columns: repeat(5, 60px); }
.manual-visual-options--body button { width: 60px; grid-template-rows: 122px 18px; gap: 8px; }
.manual-visual-options--body .manual-art { width: 60px; height: 122px; padding: 10px 12px; align-items: end; border-radius: 12px; background: rgba(48,48,52,.05); }
.manual-visual-options--body .manual-art { grid-column: 1; grid-row: 1; }
.manual-visual-options--body .manual-option-label { grid-column: 1; grid-row: 2; }
.manual-visual-options--body .manual-art img { width: 36px; height: 102px; padding: 0; object-fit: contain; object-position: center bottom; }
.manual-visual-options button.is-selected .manual-option-label { color: #a70020; font-weight: 600; }
.manual-visual-options button.is-selected .manual-art { border: 0.5px solid #8a011b; background: rgba(138,1,27,.05); }
.manual-visual-options button:focus-visible { outline: 2px solid rgba(167,0,32,.45); outline-offset: 3px; border-radius: 10px; }
.screen[data-screen="suit-manual"] .bottom-action {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(60px, env(safe-area-inset-bottom));
  margin: 0;
  transform: translateX(-50%);
}
.screen[data-screen="suit-manual"] .bottom-action:active { transform: translateX(-50%) scale(.985); }
.screen[data-screen="suit-manual"] .bottom-action:disabled { opacity: 1; background: #b8b8b8; }
.screen[data-screen="suit"] .bottom-action { bottom: max(60px, env(safe-area-inset-bottom)); }
.screen[data-screen="like"] .bottom-action { bottom: max(72px, env(safe-area-inset-bottom)); }

.preference-panel { margin: 48px 32px 105px; }
.spectrum { margin-bottom: 24px; }
.spectrum-label { height: 20px; font-size: var(--font-small); line-height: 20px; }
.spectrum input { appearance: none; display: block; width: 100%; height: 24px; margin: 2px 0 0; background: transparent; }
.spectrum input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: #a8a8a8; }
.spectrum input::-moz-range-track { height: 6px; border-radius: 3px; background: #a8a8a8; }
.spectrum input::-webkit-slider-thumb { appearance: none; width: 31px; height: 24px; margin-top: -9px; border: 0; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.spectrum input::-moz-range-thumb { width: 31px; height: 24px; border: 0; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.palette-grid { grid-template-columns: repeat(2,1fr); gap: 16px 20px; margin-top: 16px; }
.palette { display: flex; align-items: center; justify-content: center; height: 54.3px; padding: 12px 16px; border-radius: 14px; background: #f5f5f5; }
.palette.is-selected { border-color: rgba(167,0,32,.55); background: #fffafa; }
.palette i { flex: 0 0 30.3px; height: 30.3px; margin-left: -4.5px; border: 1px solid rgba(0,0,0,.02); border-radius: 50%; }
.palette span { display: none; }

.screen[data-screen="vibe"] { overflow: hidden; padding-bottom: 0; }
.vibe-scroll {
  position: absolute;
  top: 137px;
  bottom: 0;
  left: 16px;
  width: calc(100% - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 5px 134px 16px;
  border-radius: 22px;
  scrollbar-width: none;
}
.vibe-scroll::-webkit-scrollbar { display: none; }
.page-copy--vibe { width: 340px; max-width: 100%; height: 64px; margin: 0; }
.vibe-questionnaire { width: 340px; max-width: 100%; margin: 0; }
.vibe-questionnaire fieldset { display: grid; gap: 16px; margin: 0 0 32px; padding: 0; border: 0; }
.vibe-questionnaire fieldset:last-child { margin-bottom: 0; }
.vibe-questionnaire legend { margin: 0 0 16px; color: rgba(0,0,0,.8); font-size: 16px; line-height: 24px; }
.vibe-questionnaire button { display: flex; width: fit-content; max-width: 100%; height: 42px; align-items: center; justify-content: center; padding: 0 16px; border: .5px solid transparent; border-radius: 12px; color: rgba(0,0,0,.8); background: rgba(48,48,52,.05); font-size: var(--font-small); line-height: var(--font-small-line); text-align: left; white-space: nowrap; scroll-margin-block: 92px 130px; }
.vibe-questionnaire button.is-selected { border-color: #8a011b; border-radius: 14px; color: rgba(0,0,0,.8); background: rgba(138,1,27,.05); }
.vibe-action-dock { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; display: flex; height: 114px; justify-content: center; align-items: flex-start; padding: 10px 10px 0; background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 100%); backdrop-filter: blur(2px); pointer-events: none; }
.questionnaire-action { position: relative; bottom: auto; margin: 0; pointer-events: auto; }

.screen--loading { color: #fff; background: #8a011b url('/static/selfit/assets/splash-textile@2x.png') center/cover no-repeat; overflow: hidden; }
.loading-story { position: absolute; inset: 0; text-align: center; }
.loading-art-frame { position: absolute; top: 244px; left: 50%; width: 246px; height: 166px; transform: translateX(-50%); }
.loading-story img { --loading-art-top: 2px; --loading-art-width: 240px; --loading-art-height: 162px; position: absolute; top: var(--loading-art-top); left: 50%; display: block; width: var(--loading-art-width); height: var(--loading-art-height); object-fit: contain; opacity: 1; transform: translateX(-50%) translateY(0) scale(1); transition: opacity 300ms ease-out, transform 300ms ease-out; }
.loading-story img[data-stage="50"], .loading-story img[data-stage="100"] { --loading-art-top: 1.9px; --loading-art-height: 162.1px; }
.loading-story img[data-stage="75"] { --loading-art-top: 0px; --loading-art-width: 246px; --loading-art-height: 166px; }
.loading-story img.is-changing { opacity: .12; transform: translateX(-50%) translateY(4px) scale(.985); }
.loading-story p { position: absolute; top: 439px; left: 0; width: 100%; margin: 0; font-size: 16px; line-height: 24px; text-shadow: 0 1px 12px rgba(57,0,10,.28); transition: opacity 300ms ease-out, transform 300ms ease-out; }
.loading-story p.is-changing, .loading-percent.is-changing { opacity: .12; transform: translateY(4px); }
.loading-brandmark { position: absolute; bottom: max(64px, calc(env(safe-area-inset-bottom) + 40px)); left: 50%; display: block; width: 103px; height: 66px; object-fit: contain; transform: translateX(-50%); }
.loading-percent { position: absolute; top: 487px; left: 0; width: 100%; margin: 0; color: rgba(255,255,255,.92); font-size: 14px; line-height: 20px; text-align: center; transition: opacity 300ms ease-out, transform 300ms ease-out; }

.screen--report {
  --report-gutter: 20px;
  background: #fafafa;
  padding-bottom: 0;
  scroll-padding-top: 64px;
}
.report-nav {
  position: sticky;
  z-index: 5;
  top: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 64px;
  padding: max(8px, env(safe-area-inset-top)) 20px 8px;
  background: rgba(250,250,250,.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.report-nav .icon-button { position: relative; width: 44px; height: 44px; margin-left: -8px; font-size: 0; color: rgba(0,0,0,.32); }
.report-nav .icon-button::before { position: absolute; top: 16px; left: 15px; width: 11px; height: 11px; border: solid currentColor; border-width: 0 0 2px 2px; content: ''; transform: rotate(45deg); }
.report-nav h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 26px; text-align: center; }
.report-nav .header-spacer { width: 44px; }
.report-hero {
  position: relative;
  display: grid;
  min-height: 0;
  aspect-ratio: 1484 / 1072;
  width: min(371px, calc(100% - 22px));
  margin: 8px auto 0;
  padding: 20px 20px 12px;
  overflow: visible;
  border-radius: 16px;
  color: #fff;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}
.report-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: transparent;
  content: none;
}
.report-hero-image { position: absolute; z-index: 5; inset: 0; display: block; width: 100%; height: 100%; margin: auto; object-fit: contain; object-position: center; transform: translateX(-8px); }
.report-hero-image[hidden] { display: none; }
.report-hero--full { padding: 0; }
.report-hero--full::after, .report-hero--full .report-hero-reference, .report-hero--full .report-hero-copy, .report-hero--full .report-hero-art { display: none; }
.report-hero-copy { position: relative; z-index: 3; text-align: center; }
.report-hero small { display: block; margin-top: 1px; font: 600 16px/21px "Comic Sans MS", "Bradley Hand", cursive; letter-spacing: .02em; opacity: 1; text-transform: uppercase; }
.report-hero h1 { margin: 0; font: 300 20px/28px "Songti SC", STSong, Georgia, serif; letter-spacing: .04em; }
.report-hero-art { align-self: end; justify-self: center; width: 188px; height: 180px; margin: -2px 0 0; }
.report-hero-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.report-hero-reference { position: absolute; z-index: 2; inset: 0; display: none; pointer-events: none; }
.report-hero--reference .report-hero-reference { display: block; }
.report-reference-crop { position: absolute; display: block; overflow: hidden; }
.report-reference-crop img { position: absolute; display: block; width: 423.64px; max-width: none; height: 368.52px; }
.report-hero--reference::after { display: none; }
.report-reference-crop--pin { top: -12px; left: -12px; width: 110px; height: 76px; }
.report-reference-crop--pin img { top: -67.21px; left: -25.02px; }
.report-reference-crop--art { top: 74px; left: 55px; width: 260px; height: 183px; -webkit-mask-image: radial-gradient(ellipse 58% 56% at 50% 54%, #000 82%, transparent 100%); mask-image: radial-gradient(ellipse 58% 56% at 50% 54%, #000 82%, transparent 100%); }
.report-reference-crop--art img { top: -153.21px; left: -92.02px; }
.report-reference-crop--signature { right: 6px; bottom: 4px; width: 62px; height: 34px; -webkit-mask-image: radial-gradient(ellipse at center, #000 70%, transparent 100%); mask-image: radial-gradient(ellipse at center, #000 70%, transparent 100%); }
.report-reference-crop--signature img { top: -298.21px; left: -327.02px; }
.report-intro { margin: 12px var(--report-gutter) 0; }
.report-traits { display: flex; min-height: 45px; margin-top: 28px; margin-bottom: 8px; align-items: center; justify-content: center; gap: 7px; overflow: hidden; }
.report-trait { position: relative; display: grid; width: 68px; height: 45px; place-items: center; flex: 0 0 68px; color: #8a011b; transform-origin: center; }
.report-trait:nth-child(1) { transform: rotate(4.88deg); }
.report-trait:nth-child(2) { transform: rotate(-4.34deg); }
.report-trait:nth-child(3) { transform: translateY(2.6px); }
.report-trait img { position: absolute; z-index: 0; width: 45px; height: 68px; max-width: none; transform: rotate(90deg); }
.report-trait b { position: relative; z-index: 1; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; font-size: 12px; font-style: normal; font-weight: 400; line-height: 15.88px; letter-spacing: 0; white-space: nowrap; }
.report-summary, .report-outfit-summary { margin: 12px 0 0; color: rgba(0,0,0,.62); font-size: 13px; line-height: 22px; }
.report-summary { text-align: center; }
.report-body { padding: 1px var(--report-gutter) 116px; }
.report-body section { margin-top: 28px; }
.report-body h2, .report-advice h2 { margin: 0 0 16px; font-size: 18px; font-weight: 600; line-height: 26px; }
.report-colors { display: grid; grid-template-columns: repeat(5,1fr); gap: 20px; justify-content: start; }
.report-colors span { color: rgba(0,0,0,.5); font-size: 14px; line-height: 20px; text-align: center; white-space: nowrap; }
.report-colors span::before { display: block; width: 40px; height: 40px; margin: 0 auto 8px; border: 1px solid rgba(0,0,0,.03); border-radius: 12px; background: var(--c); content: ''; }
.report-image-grid, .outfit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.report-image-grid figure, .outfit-list figure { min-width: 0; margin: 0; }
.report-image-grid img, .outfit-list img { display: block; width: 100%; aspect-ratio: 170.5/227.33; border-radius: 10px; background: #f0eeec; object-fit: cover; }
.report-image-grid figcaption, .outfit-list figcaption { margin-top: 12px; color: rgba(0,0,0,.8); font-size: 14px; font-weight: 400; line-height: 20px; text-align: center; }
.report-image-grid figcaption small, .outfit-list figcaption small { display: block; margin-top: 2px; color: rgba(0,0,0,.55); font-size: var(--font-report-small); line-height: var(--font-report-small-line); }
.report-outfit-summary { margin: 0 0 14px; color: rgba(0,0,0,.72); font-size: 13px; line-height: 21px; }
.report-proof { display: flex; min-height: 34px; align-items: center; justify-content: center; gap: 7px; margin: 0 0 18px; padding: 7px 11px; border-radius: 18px; color: rgba(0,0,0,.46); background: #f7f7f7; font-size: var(--font-report-small); line-height: var(--font-report-small-line); text-align: center; }
.report-proof img { display: block; object-fit: contain; }
.report-proof .report-proof-logo { width: 33.5px; height: 16px; flex: 0 0 33.5px; }
.report-proof .report-proof-avatars { width: 40px; height: 16px; flex: 0 0 40px; }
.report-advice { margin-top: 30px; padding: 0; border: 0; background: transparent; }
.report-advice > h2 { margin-bottom: 14px; }
.report-advice-intro { margin: 0; color: rgba(0,0,0,.62); font-size: 13px; line-height: 22px; }
.report-advice-list { margin-top: 14px; padding: 14px 16px 15px; border: 1px solid #f0e2e4; border-radius: 0; background: #fdf7f8; }
.report-advice [data-report-advice-list] p { position: relative; margin: 8px 0 0; padding-left: 14px; color: rgba(0,0,0,.62); font-size: 12px; line-height: 19px; }
.report-advice [data-report-advice-list] p::before { position: absolute; top: 8px; left: 1px; width: 4px; height: 4px; border-radius: 50%; background: #d7d4d4; content: ''; }
.report-markdown p { margin: 0; }
.report-markdown p + p { margin-top: 6px; }
.report-markdown ul, .report-markdown ol { margin: 6px 0; padding-left: 20px; text-align: left; }
.report-markdown li + li { margin-top: 3px; }
.report-markdown a { color: #8a011b; text-decoration-color: rgba(138,1,27,.35); text-underline-offset: 2px; }
.report-markdown code { padding: 1px 4px; border-radius: 4px; background: #f1eceb; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.report-markdown-heading { display: block; margin: 6px 0 3px; color: rgba(0,0,0,.78); font-weight: 600; }
.report-markdown-space { display: block; height: 6px; }
.report-advice-point { position: relative; margin: 0; padding-left: 14px; color: rgba(0,0,0,.62); font-size: 12px; line-height: 19px; }
.report-advice-point + .report-advice-point { margin-top: 8px; }
.report-advice-point::before { position: absolute; top: 8px; left: 1px; width: 4px; height: 4px; border-radius: 50%; background: #d7d4d4; content: ''; }
.report-advice-point p { position: static !important; margin: 0 !important; padding: 0 !important; color: inherit !important; font: inherit !important; }
.report-advice-point p::before { display: none; }
.report-advice-point .advice-lead { color: rgba(0,0,0,.8); }
.report-advice-point ul, .report-advice-point ol { margin: 4px 0; padding-left: 18px; }
.report-signoff { position: relative; width: 78px; height: 54px; margin: 46px auto 26px; }
.report-signoff-lace { position: absolute; top: 50%; left: 50%; width: 54px; height: 78px; max-width: none; transform: translate(-50%, -50%) rotate(90deg); opacity: .8; }
.report-signoff-wordmark { position: absolute; z-index: 1; top: 50%; left: 50%; width: 38px; height: auto; transform: translate(-50%, -50%); }
.report-signoff-dots { position: absolute; z-index: 2; top: 50%; left: 50%; width: 58px; height: 29px; transform: translate(-50%, -50%); }
.report-signoff-dots i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #48c4e7; }
.report-signoff-dots i:nth-child(1) { top: 2px; left: 9px; background: #48c4e7; }
.report-signoff-dots i:nth-child(2) { top: 0; left: 25px; background: #eeaa75; }
.report-signoff-dots i:nth-child(3) { top: 4px; right: 12px; background: #ed8eb3; }
.report-signoff-dots i:nth-child(4) { top: 12px; left: 2px; background: #41c2a8; }
.report-signoff-dots i:nth-child(5) { top: 13px; right: 2px; background: #68c7e8; }
.report-signoff-dots i:nth-child(6) { bottom: 3px; left: 10px; background: #f1a6b5; }
.report-signoff-dots i:nth-child(7) { bottom: 0; left: 23px; background: #ee8f9d; }
.report-signoff-dots i:nth-child(8) { right: 15px; bottom: 2px; background: #f1d99f; }
.report-signoff-dots i:nth-child(9) { top: 7px; left: 18px; background: #75c9ad; }
.report-signoff-dots i:nth-child(10) { top: 7px; right: 20px; background: #efb1c6; }
.report-actions {
  position: fixed;
  z-index: 6;
  bottom: 0;
  left: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(100vw, var(--screen-w));
  padding: 20px 20px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(250,250,250,0), #fafafa 34%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(100% + 8px));
  transition: opacity .2s ease-out, transform .24s ease-out, visibility 0s linear .24s;
}
.report-actions.is-docked {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}
.report-actions button { height: 44px; border: 1px solid #8a011b; border-radius: 18px; color: #8a011b; background: #fff; font-size: var(--font-small); }
.report-actions button:last-child { color: #fff; background: #8a011b; }
#retakeBtn { border-color: rgba(138, 1, 27, .2); }

.share-dialog { width: min(100vw,393px); max-width: none; height: min(100svh,852px); max-height: none; margin: auto; padding: 0; border: 0; border-radius: min(40px, 5svh); color: var(--ink); background: #fafafa; }
.share-dialog::backdrop { background: rgba(0,0,0,.35); }
.share-sheet { display: flex; height: 100%; flex-direction: column; padding: max(8px, env(safe-area-inset-top)) 20px max(12px, env(safe-area-inset-bottom)); overflow: hidden; overscroll-behavior: contain; }
.share-sheet > header { display: grid; min-height: 52px; margin-bottom: 82px; grid-template-columns: 44px 1fr 44px; align-items: center; flex: 0 0 auto; }
.share-sheet header button {
  width: 44px;
  height: 44px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  outline: 0;
  color: #000;
  background: transparent;
  box-shadow: none;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  appearance: none;
}
.share-sheet header button:focus-visible { background: rgba(0,0,0,.05); }
.share-sheet h2 { margin: 0; font-size: 18px; line-height: 28px; text-align: center; }
.share-carousel { min-height: 0; margin: auto -20px 0; overflow: hidden; flex: 0 1 auto; }
.share-track {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  padding: 0 34px;
  scroll-padding-inline: 34px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
}
.share-track::-webkit-scrollbar { display: none; }
.share-track:focus-visible { outline: 2px solid rgba(138,1,27,.4); outline-offset: -2px; }
.share-card { display: flex; flex: 0 0 324px; flex-direction: column; height: min(522px, 100%); max-height: 522px; padding: 14px; overflow: hidden; border-radius: 14px; opacity: .4; color: #fff; background: #8a011b url('/static/selfit/assets/splash-textile@2x.png') center/cover; box-shadow: 0 6px 22px rgba(60,0,12,.12); scroll-snap-align: center; scroll-snap-stop: always; transition: opacity .2s ease; }
.share-card.is-current { opacity: 1; }
.share-card p { margin: 0; font-size: var(--font-report-small); line-height: var(--font-report-small-line); }
.share-card strong { font-size: 25px; line-height: 34px; }
.share-card small { margin-top: 4px; opacity: .78; }
.share-card-meta { display: flex; min-height: 30px; align-items: center; gap: 7px; color: currentColor; font-size: 10px; opacity: .78; }
.share-avatar { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid rgba(255,255,255,.56); border-radius: 50%; background: rgba(255,255,255,.12); font: 500 11px/1 Georgia, serif; }
.share-card-identity { display: flex; min-height: 0; align-items: center; justify-content: center; flex: 1; flex-direction: column; text-align: center; }
.share-card-identity p { max-width: 230px; margin-top: 8px; color: rgba(255,255,255,.72); }
.share-card-identity img { width: 148px; height: 185px; margin-top: 8px; object-fit: contain; }
.share-card-copy { display: flex; min-height: 0; justify-content: center; flex: 1; flex-direction: column; }
.share-card footer { display: flex; height: 32px; align-items: end; justify-content: space-between; margin-top: auto; }
.share-card footer > img:first-child { width: 46px; height: auto; filter: brightness(0) invert(1); }
.share-card .share-qr { width: 28px; height: 28px; padding: 2px; background: #fff; object-fit: cover; }
.share-card--colors { color: var(--ink); background: #fff9f8; }
.share-card--colors .share-avatar { border-color: rgba(138,1,27,.2); color: #8a011b; background: rgba(138,1,27,.06); }
.share-card--colors strong { margin: 8px 0 26px; color: #8a011b; }
.share-card-colors { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.share-card-colors i { aspect-ratio: 1; border: 3px solid rgba(255,255,255,.8); border-radius: 50%; background: var(--c); box-shadow: 0 2px 12px rgba(60,21,25,.12); }
.share-card--colors footer > img:first-child, .share-card--inspiration footer > img:first-child { filter: none; }
.share-card--inspiration { color: var(--ink); background: #f4ede9; }
.share-card--inspiration .share-avatar { border-color: rgba(138,1,27,.2); color: #8a011b; background: rgba(138,1,27,.06); }
.share-card--inspiration strong { margin: 8px 0 18px; color: #8a011b; }
.share-card-images { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.share-card-images img { display: block; width: 100%; aspect-ratio: 1.04; border-radius: 10px; object-fit: cover; }
.share-dots { display: flex; justify-content: center; gap: 4px; margin: 20px 0 12px; flex: 0 0 auto; }
.share-dots button { width: 6px; height: 20px; padding: 0; border: 0; background: transparent; }
.share-dots button::before { display: block; width: 6px; height: 6px; margin: auto; border-radius: 50%; background: rgba(0,0,0,.16); content: ''; transition: background .18s ease, transform .18s ease; }
.share-dots button[aria-current="true"]::before { background: rgba(0,0,0,.8); transform: scale(1.08); }
.share-actions { display: grid; min-height: 78px; margin-bottom: auto; grid-template-columns: 1fr; justify-items: center; align-items: end; flex: 0 0 auto; }
.share-actions button { border: 0; background: none; color: rgba(0,0,0,.6); font-size: var(--font-report-small); line-height: var(--font-report-small-line); }
.share-action-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 50%; color: #8a011b; background: #fff; box-shadow: 0 3px 14px rgba(0,0,0,.06); font-style: normal; }
.share-action-icon::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--share-icon) center / contain no-repeat; mask: var(--share-icon) center / contain no-repeat; }
.share-action-icon.icon-save { --share-icon: url("/static/selfit/assets/iconfont-share/icon-save.svg"); }
.share-action-icon.icon-xiaohongshu { --share-icon: url("/static/selfit/assets/iconfont-share/icon-xiaohongshu.svg"); }
.share-action-icon.icon-wechat { --share-icon: url("/static/selfit/assets/iconfont-share/icon-wechat.svg"); }
.share-action-icon.icon-moments { --share-icon: url("/static/selfit/assets/iconfont-share/icon-moments.svg"); }

@media (max-height: 700px) {
  .share-sheet { padding-block: 12px; }
  .share-sheet > header { margin-bottom: 0; }
  .share-carousel { margin-top: 4px; }
  .share-card { height: min(430px, 100%); }
  .share-dots { margin: 2px 0 4px; }
  .share-actions { min-height: 66px; }
}

@media (max-height: 820px) and (max-width: 599px) {
  .direct-select {
    position: absolute;
    top: auto;
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 52px);
    left: 50%;
    width: fit-content;
    margin: 0;
    transform: translateX(-50%);
  }
  .screen[data-screen="suit"] .bottom-action {
    position: absolute;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    margin: 0;
    transform: translateX(-50%);
  }
  .screen[data-screen="suit"] .bottom-action:active { transform: translateX(-50%) scale(.985); }
  .screen[data-screen="like"] .bottom-action { margin-top: 64px; }
  .manual-form {
    top: max(108px, calc(env(safe-area-inset-top) + 88px));
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 62px));
  }
  .manual-title { margin-bottom: 18px; }
  .manual-group { margin-bottom: 18px; }
  .manual-group legend { margin-bottom: 10px; }
  .skin-options i { width: 38px; height: 38px; margin-bottom: 5px; }
  .manual-visual-options--face button { grid-template-rows: 68px 20px; }
  .manual-visual-options--face .manual-art { height: 68px; }
  .manual-visual-options--body button { grid-template-rows: 118px 20px; }
  .manual-visual-options--body .manual-art { height: 118px; }
  .screen[data-screen="suit-manual"] .bottom-action {
    position: absolute;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    margin: 0;
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .report-actions, .report-hero, .report-hero h1, .report-hero small, .report-traits, .report-hero-art, .share-card { transition: none; }
  .loading-story img, .loading-story p, .loading-percent { transition: none; }
}
