:root {
  --ink: #161c30;
  --ink-soft: #343a4c;
  --paper: #f3f0e9;
  --surface: #fff;
  --line: #e8e9ed;
  --muted: #99a1af;
  --violet: #5b57ee;
  --violet-dark: #4440c9;
  --violet-soft: #efefff;
  --night: #12182b;
  --night-2: #1d2740;
  --gold: #e0bd6b;
  --characters: url("./assets/business-characters-v1.png");
  --form-text-size: 16px;
  --form-text-weight: 400;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #d8d5ce;
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
body.funnel-locked { height: 100dvh; overflow: hidden; }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
button, input, select { -webkit-tap-highlight-color: transparent; }
svg { display: block; }

.mobile-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 72px rgba(20, 24, 35, .13);
}
.mobile-shell:not(.has-results) { height: 100dvh; min-height: 0; }
.mobile-shell:not(.has-results) > main { height: 100%; overflow: hidden; }
.mobile-shell:not(.has-results) footer { display: none; }

.topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 62px;
  padding: env(safe-area-inset-top) 20px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--ink);
}
.topbar::after { content: ""; width: 74px; justify-self: end; }
.brand { width: 74px; height: 32px; display: block; justify-self: start; overflow: hidden; background: url("./assets/dasoni-wordmark-white.png") center / 82px 82px no-repeat; filter: brightness(0) saturate(100%) invert(9%) sepia(17%) saturate(2140%) hue-rotate(190deg) brightness(88%) contrast(97%); text-decoration: none; }
.brand img { width: 1px; height: 1px; display: block; opacity: 0; }
.topbar > span { color: #626579; font-size: 11px; font-weight: 750; }
.hero {
  position: relative;
  height: 100dvh;
  min-height: 0;
  padding: 104px 20px 34px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 43%, rgba(160,157,255,.2), transparent 38%),
    linear-gradient(180deg, #fbfaf7 0%, #f1ede4 100%);
}
.hero::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px; background: #d8d1c4; }
.hero-orbit { position: absolute; border: 1px solid rgba(93,90,234,.13); border-radius: 50%; }
.orbit-one { left: -90px; top: 210px; width: 610px; height: 390px; transform: rotate(-9deg); }
.orbit-two { left: -33px; top: 244px; width: 490px; height: 300px; transform: rotate(13deg); border-style: dashed; }
.hero-copy { position: relative; z-index: 3; text-align: center; }
.hero-copy > p { width: min(100%,306px); margin: 0 auto 12px; display: flex; align-items: center; justify-content: space-between; color: var(--violet); font-size: 14px; font-weight: 800; letter-spacing: -.015em; white-space: nowrap; }
.hero-copy h1 { margin: 0; font-size: clamp(2.7rem, 11.5vw, 3.35rem); line-height: 1.05; letter-spacing: -.065em; }
.hero-copy > span { display: block; margin-top: 14px; color: #77766f; font-size: 12px; line-height: 1.7; letter-spacing: -.02em; }

.hero-characters { position: relative; z-index: 2; flex: 1; min-height: 300px; margin: 2px -20px -12px; }
.character { display: block; background-image: var(--characters); background-repeat: no-repeat; background-size: 200% 200%; }
.character-curious-man { background-position: 0 0; }
.character-curious-woman { background-position: 100% 0; }
.character-confident-man { background-position: 0 100%; }
.character-confident-woman { background-position: 100% 100%; }
.hero-characters .character { position: absolute; bottom: -4px; width: 207px; height: 310px; filter: drop-shadow(0 25px 24px rgba(22,28,48,.15)); }
.hero-characters .character-curious-man { left: 4px; transform: rotate(-1.5deg); }
.hero-characters .character-curious-woman { right: 0; transform: rotate(1.5deg); }
.question-mark { position: absolute; left: 50%; top: 43px; width: 52px; height: 70px; transform: translateX(-50%); }
.question-mark::before { content: "?"; position: absolute; inset: 0; color: var(--violet); font-size: 56px; font-weight: 800; line-height: 1; text-align: center; }
.question-mark span { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #b4b0ee; }
.question-mark span:nth-child(1) { left: -18px; top: 21px; }
.question-mark span:nth-child(2) { right: -18px; top: 14px; }
.question-mark span:nth-child(3) { right: -12px; bottom: 3px; width: 3px; height: 3px; }
.hero-cta { position: relative; z-index: 4; width: 100%; height: 58px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 18px; color: #fff; background: var(--night); box-shadow: 0 14px 30px rgba(18,24,43,.19); font-size: 13px; font-weight: 850; transition: transform .55s cubic-bezier(.2,.8,.2,1), background .25s ease; }
.hero-cta i { width: 8px; height: 8px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.hero-cta:active { transform: scale(.985); background: #27304a; }
.hero-note { position: relative; z-index: 3; margin: 10px 0 0; color: #969086; font-size: 8px; font-weight: 650; text-align: center; }

.entry-section { display: none; height: 100dvh; min-height: 0; padding: 62px 20px 18px; overflow: hidden; background: var(--paper); }
.mobile-shell.flow-started .hero { display: none; }
.mobile-shell.flow-started .entry-section { display: block; animation: flow-card-in .48s cubic-bezier(.2,.8,.2,1) both; }
.mobile-shell.has-results .entry-section { display: none; }
.mobile-shell:not(.has-results) .result-section,
.mobile-shell:not(.has-results) .pair-section,
.mobile-shell:not(.has-results) .closing-section { display: none; }
.chapter-heading { display: block; }
.chapter-heading h2 { margin: 0; font-size: 31px; line-height: 1.12; letter-spacing: -.058em; }
.chapter-heading p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

.flow-progress { margin-top: 24px; }
.flow-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #667083; font-size: 11px; font-weight: 650; }
.flow-progress b { color: var(--violet); font-size: 12px; }
.flow-progress > i { height: 4px; margin-top: 9px; display: block; overflow: hidden; border-radius: 99px; background: #dfe1e7; }
.flow-progress em { width: 33%; height: 100%; display: block; border-radius: inherit; background: var(--violet); transition: width .42s cubic-bezier(.2,.8,.2,1); }
.team-review-copy { margin: 26px 0 16px; }
.team-review-copy span { color: var(--violet); font-size: 10px; font-weight: 800; }
.team-review-copy h3 { margin: 5px 0 0; font-size: 22px; line-height: 1.3; letter-spacing: -.04em; }
.team-review-copy p { margin: 7px 0 0; color: #667083; font-size: 11px; line-height: 1.55; }

.people-roster { margin: 18px 0 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; border: 0; background: transparent; }
.person-chip { position: relative; min-width: 0; height: 72px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; }
.person-chip-main { width: 100%; height: 100%; padding: 4px 30px 4px 7px; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 5px; color: inherit; background: transparent; text-align: left; }
.person-chip.is-active { color: var(--violet); border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 0 0 2px rgba(91,87,238,.08); }
.person-chip-main > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person-chip b { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.person-chip small { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.person-chip.is-active small { color: #8e8bd6; }
.person-remove { position: absolute; z-index: 2; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 50%; color: #8c93a1; background: #f2f3f5; font-size: 15px; line-height: 1; }
.person-chip-add { padding: 0 13px; display: flex; align-items: center; gap: 10px; color: var(--violet); border-style: dashed; background: #fbfbff; text-align: left; }
.person-chip-add .portrait-add { flex: none; width: 42px; height: 50px; }
.person-chip-add > span { display: flex; flex-direction: column; gap: 2px; }
.person-chip-add b { font-size: 12px; }
.person-chip-add small { font-size: 9px; }
.portrait { display: block; width: 46px; height: 50px; background-image: var(--characters); background-repeat: no-repeat; background-size: 470% auto; background-color: transparent; filter: drop-shadow(0 3px 5px rgba(18,24,43,.08)); }
.portrait-man { background-position: 18% 0; }
.portrait-woman { background-position: 82% 4%; }
.portrait-add { position: relative; width: 46px; height: 50px; display: grid; place-items: center; }
.portrait-add::before { content: ""; position: absolute; inset: 5px 1px 0; border: 1px dashed #c9c8dc; border-radius: 15px 15px 10px 10px; }
.portrait-add span::before, .portrait-add span::after { content: ""; position: absolute; left: 50%; top: 48%; width: 16px; height: 1.5px; border-radius: 3px; background: var(--gold); transform: translate(-50%,-50%); }
.portrait-add span::after { transform: translate(-50%,-50%) rotate(90deg); }
.portrait-add.is-filled::before { display: none; }

.person-form { margin-top: 22px; padding: 20px; border: 1px solid rgba(27,31,41,.05); border-radius: 26px; background: var(--surface); box-shadow: 0 14px 36px rgba(31,35,48,.07); }
.person-form.is-entering { animation: flow-card-in .38s cubic-bezier(.2,.8,.2,1) both; }
.form-heading { margin-bottom: 16px; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.form-heading span { color: var(--violet); font-size: 10px; font-weight: 850; letter-spacing: .02em; }
.form-heading h3 { margin: 5px 0 0; font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -.04em; }
.form-heading > b { width: 42px; height: 25px; display: grid; place-items: center; border-radius: 99px; color: var(--muted); background: #f2f3f5; font-size: 10px; font-weight: 600; }
.identity-row { margin-bottom: 8px; display: grid; grid-template-columns: minmax(0,1fr) 104px; gap: 8px; }
.identity-name { min-width: 0; height: 54px; padding: 0 14px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 15px; background: #f8f8fa; transition: border-color .25s ease, box-shadow .25s ease; }
.identity-name:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91,87,238,.12); }
.identity-name input { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: var(--form-text-size); font-weight: var(--form-text-weight); }
.identity-name input::placeholder { color: #97989e; font-weight: 400; }
.field-row { display: grid; grid-template-columns: minmax(0,1fr) 92px; gap: 8px; }
.field { min-width: 0; min-height: 54px; margin-bottom: 8px; padding: 0 14px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 15px; background: #f8f8fa; transition: border-color .25s ease, box-shadow .25s ease; }
.field:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91,87,238,.12); }
.identity-name.has-error, .field.has-error, .time-input.has-error { border-color: #df6969; box-shadow: 0 0 0 3px rgba(223,105,105,.11); }
.field input, .field select { min-width: 0; width: 100%; height: 52px; padding: 0; border: 0; outline: 0; color: #171b24; background: transparent; font-size: var(--form-text-size); font-weight: var(--form-text-weight); }
.field input::placeholder { color: #97989e; font-weight: 400; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8b857a 50%), linear-gradient(135deg, #8b857a 50%, transparent 50%); background-position: calc(100% - 7px) 21px, calc(100% - 3px) 21px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.custom-select-field { padding: 0; }
.custom-select-field:has(.custom-select-trigger[aria-expanded="true"]) { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91,87,238,.12); }
.custom-select-trigger { width: 100%; height: 52px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #171b24; background: transparent; font-size: var(--form-text-size); font-weight: var(--form-text-weight); text-align: left; }
.custom-select-trigger.is-placeholder { color: #565a63; }
.custom-select-trigger i { flex: none; width: 8px; height: 8px; margin-right: 3px; border-right: 1.5px solid #8b8e96; border-bottom: 1.5px solid #8b8e96; transform: translateY(-2px) rotate(45deg); transition: transform .25s ease; }
.custom-select-trigger[aria-expanded="true"] i { transform: translateY(2px) rotate(225deg); }
.gender-field { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gender-button { height: 54px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: #f8f8fa; font-size: var(--form-text-size); font-weight: var(--form-text-weight); }
.gender-button.is-selected { border-color: var(--violet); color: #fff; background: var(--violet); box-shadow: none; font-weight: 600; }
.birth-time { margin: 0; padding: 0; border: 0; }
.birth-time legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.time-toggle { width: 100%; height: 54px; min-height: 54px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border: 1px dashed #d7d8df; border-radius: 15px; color: var(--violet); background: #fbfbfc; text-align: left; }
.time-toggle span { min-width: 0; display: flex; flex-direction: row; align-items: baseline; gap: 8px; white-space: nowrap; }
.time-toggle b { font-size: var(--form-text-size); font-weight: 600; }
.time-toggle small { color: var(--muted); font-size: 11px; font-weight: 400; }
.time-toggle i { position: relative; width: 18px; height: 18px; }
.time-toggle i::before, .time-toggle i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; border-radius: 2px; background: var(--violet); transform: translate(-50%,-50%); }
.time-toggle i::after { transform: translate(-50%,-50%) rotate(90deg); transition: transform .25s ease; }
.time-toggle[aria-expanded="true"] i::after { transform: translate(-50%,-50%); }
.time-toggle[aria-expanded="true"] { display: none; }
.time-input { width: 100%; height: 54px; margin-top: 0; padding: 0 13px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #f8f8fa; outline: 0; font-size: 16px; }
.time-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91,87,238,.12); }
.time-input::placeholder { color: #97989e; }
.primary-button { width: 100%; min-height: 52px; border-radius: 16px; color: #fff; background: var(--violet); box-shadow: none; font-size: var(--form-text-size); font-weight: 700; transition: transform .5s cubic-bezier(.2,.8,.2,1), background .25s ease; }
.primary-button:active { transform: scale(.985); background: var(--violet-dark); }
.wizard-actions, .review-actions { margin-top: 14px; display: grid; grid-template-columns: minmax(0,4fr) minmax(0,6fr); gap: 8px; }
.secondary-button { min-height: 52px; border: 1px solid var(--line); border-radius: 16px; color: #667083; background: #fff; font-size: 14px; font-weight: 600; }
.analysis-button { width: 100%; min-height: 52px; padding: 0 8px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #5a56ee, #6d68f4); text-align: center; box-shadow: 0 12px 27px rgba(76,70,208,.22); }
.analysis-button b { font-size: 17px; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }

@keyframes flow-card-in { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

.result-section { padding: 70px 20px 24px; color: #fff; background: radial-gradient(circle at 50% 22%, #293453 0, transparent 35%), var(--night); }
.chapter-heading.light h2 { color: #fff; }
.chapter-heading.light p { color: rgba(255,255,255,.5); }
.result-stage { position: relative; height: 335px; margin: 25px 0 0; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 26px 26px 0 0; background: radial-gradient(circle at 50% 40%, rgba(93,90,234,.22), transparent 38%), rgba(255,255,255,.02); }
.result-lines { position: absolute; inset: 0; }
.result-lines svg { width: 100%; height: 100%; }
.result-lines .line { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 5 7; }
.line-one { stroke: #d9bb71; }
.line-two { stroke: #847fec; }
.line-three { stroke: rgba(255,255,255,.24); }
.result-score { position: absolute; z-index: 3; left: 50%; top: 22px; width: 88px; height: 88px; display: grid; place-content: center; transform: translateX(-50%); border: 1px solid rgba(224,189,107,.5); border-radius: 50%; text-align: center; background: #18213a; box-shadow: 0 0 0 8px rgba(224,189,107,.055), 0 0 38px rgba(224,189,107,.1); }
.result-score span { color: rgba(255,255,255,.5); font-size: 7px; }
.result-score b { color: var(--gold); font-size: 32px; line-height: 1.05; }
.result-score small { color: rgba(255,255,255,.46); font-size: 6px; }
.confident-characters { position: absolute; inset: 90px 0 0; }
.result-person { position: absolute; bottom: 10px; width: 185px; height: 225px; text-align: center; }
.result-person .character { position: absolute; left: 0; top: 0; width: 185px; height: 190px; background-size: 340% auto; filter: drop-shadow(0 18px 20px rgba(0,0,0,.24)); }
.result-man .character { background-position: 21% 63%; }
.result-woman .character { background-position: 79% 66%; }
.result-person span, .result-person b { position: relative; z-index: 3; display: block; }
.result-person span { margin-top: 190px; font-size: 12px; font-weight: 700; }
.result-person b { margin-top: 2px; color: rgba(255,255,255,.48); font-size: 9px; font-weight: 500; }
.result-man { left: 3px; }
.result-woman { right: 3px; }

.axis-bento { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(210px,auto)); grid-auto-flow: dense; border: 1px solid rgba(255,255,255,.1); border-radius: 0 0 26px 26px; overflow: hidden; }
.axis-bento article { min-width: 0; padding: 18px 15px 20px; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); }
.axis-bento article:nth-child(2n) { border-right: 0; }
.axis-bento article:nth-last-child(-n+2) { border-bottom: 0; }
.axis-bento span { color: rgba(255,255,255,.52); font-size: 10px; font-weight: 600; }
.axis-bento strong { margin-top: 8px; color: var(--gold); font-size: 25px; letter-spacing: -.035em; }
.axis-bento p { margin: 14px 0 0; color: rgba(255,255,255,.7); font-size: 13px; font-weight: 400; line-height: 1.62; }

.share-callout { margin: 22px 0 42px; padding: 22px; display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; border: 1px solid rgba(255,255,255,.11); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); }
.share-callout span { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.share-callout h3 { margin: 7px 0 0; font-size: 25px; line-height: 1.2; letter-spacing: -.045em; }
.share-callout p { margin: 9px 0 0; color: rgba(255,255,255,.56); font-size: 11px; line-height: 1.6; }
.share-callout button { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 16px; color: var(--violet-dark); background: #fff; font-size: 14px; font-weight: 700; }
.share-callout button i { position: relative; width: 17px; height: 17px; border: 1.5px solid currentColor; border-radius: 5px; }
.share-callout button i::before { content: ""; position: absolute; left: 6px; top: -6px; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(-45deg); }
.share-callout button i::after { content: ""; position: absolute; left: 7px; top: -5px; width: 1.5px; height: 10px; background: currentColor; }

.pair-section { padding: 70px 20px; background: #e9e3d9; }
.pair-accordion { margin-top: 28px; min-height: 740px; }
.pair-card { display: none; overflow: hidden; border: 0; border-radius: 22px; color: #fff; background: var(--night-2); box-shadow: 0 18px 42px rgba(18,24,43,.13); }
.pair-card.is-current { display: block; }
.pair-summary { width: 100%; height: 72px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; color: inherit; background: transparent; }
.pair-summary > span { display: flex; align-items: center; gap: 10px; }
.pair-summary strong { font-size: 14px; font-weight: 650; }
.pair-summary em { color: var(--gold); font-size: 24px; font-style: normal; font-weight: 800; }
.portrait-stack { position: relative; width: 92px; height: 54px; display: block; flex: none; }
.portrait-stack b { position: absolute; top: 2px; width: 42px; height: 50px; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.24); background-image: var(--characters); background-repeat: no-repeat; background-size: 470% auto; background-color: rgba(255,255,255,.08); filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.portrait-stack b:first-child { left: 0; top: 6px; background-position: 18% 0; }
.portrait-stack b:last-child { right: 0; top: 0; background-position: 82% 4%; }
.pair-two b:last-child { background-position: 18% 0; filter: hue-rotate(18deg) drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.pair-three b:first-child { background-position: 82% 4%; }
.pair-three b:last-child { background-position: 18% 0; filter: hue-rotate(18deg) drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.pair-detail { padding: 7px 18px 24px; }
.pair-detail > span { color: var(--gold); font-size: 11px; font-weight: 650; }
.pair-detail h3 { margin: 8px 0 0; font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -.04em; }
.pair-reading { margin-top: 19px; display: grid; gap: 16px; }
.pair-reading p { margin: 0; color: rgba(255,255,255,.74); font-size: 13px; font-weight: 400; line-height: 1.82; }
.pair-reading b { color: #fff; font-weight: 700; }
.pair-pager { margin-top: 14px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.pair-pager button { min-height: 48px; padding: 0 15px; border: 1px solid #d5cec2; border-radius: 14px; color: var(--ink); background: rgba(255,255,255,.72); font-size: 13px; font-weight: 650; }
.pair-pager button:last-child { justify-self: stretch; color: #fff; border-color: var(--violet); background: var(--violet); }
.pair-pager button:disabled { color: #aaa49a; background: rgba(255,255,255,.34); opacity: .7; cursor: default; }
.pair-pager span { min-width: 42px; color: #888176; font-size: 11px; text-align: center; }
.pair-pager span b { color: var(--violet); font-size: 14px; }
.pair-pager span i { font-style: normal; }

.closing-section { position: relative; min-height: 520px; padding: 42px 21px 35px; overflow: hidden; color: #fff; background: var(--violet-dark); }
.closing-section::before { content: ""; position: absolute; left: -50px; top: -90px; width: 540px; height: 360px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; transform: rotate(-7deg); }
.closing-characters { position: relative; height: 220px; margin: -18px -18px 0; }
.closing-characters .character { position: absolute; bottom: -8px; width: 178px; height: 190px; background-size: 340% auto; filter: drop-shadow(0 18px 20px rgba(31,19,110,.22)); }
.closing-characters .character:first-child { background-position: 21% 63%; }
.closing-characters .character:last-child { background-position: 79% 66%; }
.closing-characters .character:first-child { left: 18px; }
.closing-characters .character:last-child { right: 16px; }
.closing-copy { position: relative; z-index: 2; }
.closing-copy > span { color: #dcd9ff; font-size: 8px; font-weight: 850; letter-spacing: .07em; }
.closing-copy h2 { margin: 9px 0 12px; font-size: 28px; line-height: 1.16; letter-spacing: -.055em; }
.closing-copy p { margin: 0; color: rgba(255,255,255,.62); font-size: 10px; line-height: 1.75; }
.light-button { width: 100%; height: 54px; margin-top: 22px; border-radius: 15px; color: var(--violet-dark); background: #fff; box-shadow: 0 12px 26px rgba(24,16,86,.2); font-size: 11px; font-weight: 850; }
footer { padding: 35px 21px 42px; color: #928c81; background: #ddd7cc; }
.footer-logo { width: 86px; height: 32px; margin: -2px 0 0; display: block; object-fit: cover; object-position: center; filter: brightness(0) saturate(100%) invert(39%) sepia(5%) saturate(646%) hue-rotate(3deg) brightness(86%) contrast(86%); }
footer p { margin: 8px 0 0; font-size: 7px; line-height: 1.65; }
.footer-privacy { margin-top: 14px; color: #79736a; font-size: 8px; font-weight: 600; }

.select-sheet { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: grid; align-items: end; visibility: hidden; opacity: 0; transition: opacity .24s ease, visibility .24s ease; }
.select-sheet.is-open { visibility: visible; opacity: 1; }
.select-backdrop { position: absolute; inset: 0; background: rgba(14,18,34,.46); backdrop-filter: blur(4px); }
.select-panel { position: relative; z-index: 2; width: min(100%,430px); max-height: 92dvh; margin: 0 auto; padding: 9px 20px max(20px,env(safe-area-inset-bottom)); overflow-y: auto; border: 1px solid rgba(255,255,255,.72); border-radius: 28px 28px 0 0; background: #f8f8fb; box-shadow: 0 -24px 70px rgba(18,24,43,.24); transform: translateY(28px); transition: transform .34s cubic-bezier(.2,.8,.2,1); }
.select-sheet.is-open .select-panel { transform: translateY(0); }
.select-handle { width: 38px; height: 4px; margin: 0 auto 14px; border-radius: 99px; background: #d4d5dc; }
.select-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.select-heading span { color: var(--violet); font-size: 10px; font-weight: 800; }
.select-heading h2 { margin: 4px 0 0; color: #171b24; font-size: 22px; line-height: 1.3; letter-spacing: -.04em; }
.select-heading > button { min-width: 48px; min-height: 38px; border: 1px solid var(--line); border-radius: 12px; color: #667083; background: #fff; font-size: 12px; font-weight: 600; }
.select-options { margin-top: 16px; display: grid; gap: 8px; }
.select-options > [data-select-group] { display: none; gap: 8px; }
.select-options > [data-select-group].is-active { display: grid; }
.select-option { position: relative; min-height: 62px; padding: 10px 48px 10px 14px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 17px; color: #1c2130; background: #fff; text-align: left; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.select-option:active { transform: scale(.985); }
.select-option > span { display: flex; flex-direction: column; gap: 3px; }
.select-option b { font-size: 16px; font-weight: 650; }
.select-option small { color: #8d94a1; font-size: 11px; font-weight: 400; }
.select-option i { position: absolute; right: 17px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); border: 1px solid #d8dae2; border-radius: 50%; background: #fafafe; }
.select-option.is-selected { border-color: var(--violet); color: var(--violet-dark); background: var(--violet-soft); box-shadow: 0 5px 18px rgba(91,87,238,.1); }
.select-option.is-selected i { border-color: var(--violet); background: var(--violet); }
.select-option.is-selected i::after { content: ""; position: absolute; left: 6px; top: 4px; width: 5px; height: 8px; border-right: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(45deg); }
body.select-open { overflow: hidden; }

.share-sheet { position: fixed; z-index: 100; inset: 0; display: grid; align-items: end; visibility: hidden; opacity: 0; transition: opacity .25s ease, visibility .25s ease; }
.share-sheet.is-open { visibility: visible; opacity: 1; }
.share-backdrop { position: absolute; inset: 0; background: rgba(8,12,25,.7); backdrop-filter: blur(5px); }
.share-panel { position: relative; z-index: 2; width: min(100%,430px); max-height: 94dvh; margin: 0 auto; padding: 9px 20px max(20px,env(safe-area-inset-bottom)); overflow-y: auto; border-radius: 26px 26px 0 0; background: #f8f8fa; box-shadow: 0 -22px 60px rgba(10,14,30,.24); transform: translateY(28px); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.share-sheet.is-open .share-panel { transform: translateY(0); }
.share-handle { width: 36px; height: 4px; margin: 0 auto 13px; border-radius: 99px; background: #d3d4da; }
.share-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.share-heading span { color: var(--violet); font-size: 10px; font-weight: 800; }
.share-heading h2 { margin: 3px 0 0; color: #171b24; font-size: 21px; letter-spacing: -.04em; }
.share-heading button { min-width: 46px; min-height: 38px; border-radius: 12px; color: #667083; background: #fff; font-size: 12px; }
.share-canvas { width: min(100%,310px); height: auto; aspect-ratio: 4/5; margin: 16px auto 0; display: block; border-radius: 19px; background: var(--night); box-shadow: 0 15px 36px rgba(18,24,43,.18); }
.share-help { margin: 12px 2px 0; color: #8c93a1; font-size: 10px; line-height: 1.55; text-align: center; }
.share-actions { margin-top: 14px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; }
.share-actions button { min-height: 52px; border: 1px solid var(--line); border-radius: 16px; color: #667083; background: #fff; font-size: 14px; font-weight: 650; }
.share-actions button:last-child { border-color: var(--violet); color: #fff; background: var(--violet); }
body.share-open { overflow: hidden; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: max(22px,env(safe-area-inset-bottom)); width: min(calc(100% - 40px),390px); padding: 13px 16px; transform: translate(-50%,16px); border-radius: 14px; color: #fff; background: rgba(18,24,43,.95); box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: 9px; line-height: 1.5; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 360px) {
  .hero-copy > p { width: min(100%,280px); font-size: 13px; }
  .hero-copy h1 { font-size: 40px; }
  .hero-characters .character { width: 185px; height: 278px; }
  .chapter-heading h2 { font-size: 28px; }
  .field-row { grid-template-columns: minmax(0,1fr) 82px; }
  .time-toggle span { gap: 5px; }
  .time-toggle b { font-size: 14px; }
  .time-toggle small { font-size: 9px; }
  .result-person { width: 165px; }
  .result-person .character { width: 165px; height: 180px; }
  .result-person span { margin-top: 181px; }
}

@media (max-height: 760px) {
  .hero { padding-top: 82px; padding-bottom: 18px; }
  .hero-copy > p { margin-bottom: 7px; }
  .hero-copy h1 { font-size: 40px; }
  .hero-copy > span { margin-top: 9px; }
  .hero-characters { min-height: 250px; }
  .hero-characters .character { width: 185px; height: 278px; }
  .entry-section { padding-top: 54px; padding-bottom: 10px; }
  .chapter-heading h2 { font-size: 25px; }
  .chapter-heading p { display: none; }
  .flow-progress { margin-top: 13px; }
  .person-form { margin-top: 13px; padding: 14px; border-radius: 22px; }
  .form-heading { margin-bottom: 10px; }
  .form-heading h3 { font-size: 17px; }
  .identity-name, .gender-button, .field, .time-input { height: 48px; min-height: 48px; }
  .field input, .field select { height: 46px; }
  .custom-select-trigger { height: 46px; }
  .time-toggle { height: 48px; min-height: 48px; padding-block: 6px; }
  .select-option { min-height: 54px; }
  .wizard-actions, .review-actions { margin-top: 10px; }
  .primary-button, .secondary-button, .analysis-button { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
