/* 사주 모멘텀 — 남색 밤하늘 + 금색 초승달. 모바일 우선(360px). */
:root {
  --navy: #0b1230;
  --navy2: #141f4a;
  --ink: #0f1838;
  --gold: #f1d27f;
  --gold2: #d9b25a;
  --cream: #efe3bd;
  --text: #e9e4d6;
  --muted: #a9b0c8;
  --card: rgba(255, 255, 255, .055);
  --line: rgba(241, 210, 127, .28);
  --serif: "Gowun Batang", "Nanum Myeongjo", "Noto Serif KR", "AppleMyungjo", "Batang", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: var(--serif);
  font-size: 17px; line-height: 1.7; word-break: keep-all; overflow-wrap: break-word;
  background: radial-gradient(120% 70% at 50% 0%, #1d2a63 0%, var(--navy2) 38%, var(--navy) 100%) fixed;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
/* 별 */
.sky {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .8;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, #fff7 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 46% 12%, #fbe7a8aa 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 38%, #fff6 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 82% 22%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 70%, #fff6 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 8% 84%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 88%, #fbe7a899 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 56%, #fff5 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 36% 36%, #fff5 50%, transparent 51%);
}
.top, main, .foot { position: relative; z-index: 1; }

/* 머리 */
.top {
  max-width: 480px; margin: 0 auto; padding: 12px 14px 4px;
  display: grid; grid-template-columns: 72px 1fr 72px; align-items: center;
}
.back {
  justify-self: start; background: none; border: 0; color: var(--gold); font: inherit; font-size: 16px;
  padding: 8px 6px; min-height: 44px; cursor: pointer;
}
.back.off { visibility: hidden; }
.logo { text-align: center; line-height: 1.15; }
.logo .en { display: block; font-family: "Cinzel", serif; font-weight: 900; letter-spacing: .22em; color: var(--gold); font-size: 15px; }
.logo .kr { display: block; font-size: 11.5px; letter-spacing: .35em; color: var(--cream); opacity: .85; }
.step { justify-self: end; font-size: 13px; color: var(--muted); }

main { max-width: 480px; margin: 0 auto; padding: 6px 18px 20px; }
.screen { animation: rise .35s ease both; }
.screen[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 캐릭터 자리(지금은 초승달) */
.mascot { display: flex; justify-content: center; margin: 14px 0 6px; }
.mascot svg { filter: drop-shadow(0 0 14px rgba(241, 210, 127, .35)); }
[data-screen="intro"] .mascot svg { width: 128px; height: 128px; }
.spin .mascot svg { animation: sway 1.3s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.06); } }

/* 말풍선 */
.bubble {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 18px; margin: 10px 0 18px; text-align: center;
}
.bubble:before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  background: #1a2554; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg);
}
.bubble p { margin: 0; }
.bubble p + p { margin-top: 6px; color: var(--muted); font-size: 15.5px; }
.bubble .big { font-size: 21px; font-weight: 700; color: var(--cream); line-height: 1.5; }
.bubble b { color: var(--gold); font-weight: 700; }

.chips { list-style: none; padding: 0; margin: 0 0 18px; display: flex; justify-content: center; gap: 8px; }
.chips li { font-size: 13.5px; color: var(--gold); border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; }

/* 버튼 */
.btn {
  display: block; width: 100%; min-height: 58px; border-radius: 14px; border: 1px solid var(--line);
  font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none;
  padding: 14px 16px; line-height: 1.4; -webkit-tap-highlight-color: transparent;
}
.btn.primary {
  color: var(--ink); border: 0;
  background: linear-gradient(180deg, #fbe7a8 0%, #e6c26a 55%, #c99a3d 100%);
  box-shadow: 0 6px 18px rgba(201, 154, 61, .28);
}
.btn.primary:active { transform: translateY(1px); }
.btn.primary.soon { background: #3a4470; color: var(--muted); box-shadow: none; cursor: default; }
.btn.choice { background: var(--card); color: var(--cream); }
.btn.choice:active, .btn.choice:focus-visible { border-color: var(--gold); color: var(--gold); }
.btn.ghost { background: transparent; color: var(--muted); border-color: rgba(169, 176, 200, .3); font-weight: 400; font-size: 16px; }
.pick2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick2 .btn { min-height: 76px; font-size: 20px; }
.pick-list { display: grid; gap: 10px; }

/* 입력 */
.field { display: block; margin-bottom: 12px; }
.field .cap { display: block; font-size: 13px; color: var(--muted); margin: 0 0 4px 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
input[type=text], select {
  width: 100%; min-height: 56px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(8, 13, 36, .7); color: var(--cream); font: inherit; font-size: 19px; padding: 10px 14px;
  appearance: none; -webkit-appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
  padding-right: 28px;
}
select option { background: var(--navy); color: var(--cream); }
select:disabled { opacity: .4; }
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
input::placeholder { color: #6f7898; }
.row3 { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 8px; }
.row2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: rgba(8, 13, 36, .7); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg button { font: inherit; font-size: 17px; min-height: 46px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--gold); color: var(--ink); font-weight: 700; }
.check { display: flex; align-items: center; gap: 10px; font-size: 16.5px; color: var(--cream); margin: 4px 2px 16px; min-height: 44px; cursor: pointer; }
.check[hidden] { display: none; }
.check input { width: 24px; height: 24px; accent-color: var(--gold2); }
.err { min-height: 1.2em; margin: 0 0 10px; color: #ffb3a1; font-size: 14.5px; text-align: center; }
.privacy { text-align: center; color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }

/* 결과 */
.r-title { text-align: center; font-size: 23px; color: var(--cream); margin: 10px 0 14px; line-height: 1.4; }
.r-title small { display: block; font-family: "Cinzel", serif; font-weight: 700; font-size: 12px; letter-spacing: .3em; color: var(--gold); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pillars .col { text-align: center; }
.pillars .cap { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pillars .ch {
  border-radius: 10px; margin-bottom: 6px; padding: 6px 0 4px; border: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
}
.pillars .hz { font-size: 30px; font-family: "Noto Serif KR", "Noto Serif CJK KR", "Batang", "AppleMyungjo", serif; font-weight: 700; }
.pillars .ko { font-size: 12.5px; opacity: .85; }
.pillars .me .ch:nth-child(2) { outline: 2px solid var(--gold); outline-offset: -2px; }
.ch.wood { background: rgba(84, 160, 110, .22); color: #bfe6c9; }
.ch.fire { background: rgba(214, 92, 80, .22); color: #ffc9bf; }
.ch.earth { background: rgba(201, 154, 61, .22); color: #f6dca0; }
.ch.metal { background: rgba(220, 220, 230, .14); color: #eceef6; }
.ch.water { background: rgba(70, 110, 200, .26); color: #c4d4ff; }
.ch.none { background: rgba(255, 255, 255, .04); color: var(--muted); }
.meta { font-size: 13px; color: var(--muted); text-align: center; margin: 6px 0 4px; line-height: 1.55; }
.note { font-size: 13px; color: #d9c79a; text-align: center; margin: 0 0 6px; }
.note[hidden], .box[hidden], .hook[hidden], .life[hidden] { display: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; margin: 16px 0; }
.card h2 { font-size: 19.5px; color: var(--gold); margin: 0 0 10px; line-height: 1.45; }
.card h3 { font-size: 17px; color: var(--cream); margin: 0 0 8px; }
.card p { margin: 0; }
.box { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(241, 210, 127, .1); border-left: 3px solid var(--gold); font-size: 14.5px; }
.box b { color: var(--gold); }
.lock { position: relative; margin-top: 12px; }
.lock .blur { filter: blur(4px); opacity: .7; user-select: none; -webkit-user-select: none; margin: 0; }
.lock .seal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.lock .seal span { background: var(--ink); color: var(--gold); border: 1px solid var(--line); padding: 8px 18px; border-radius: 99px; font-size: 14.5px; }

.hook { text-align: center; background: linear-gradient(180deg, rgba(241, 210, 127, .14), rgba(241, 210, 127, .04)); border-color: var(--gold2); }
.hook .wait { color: var(--muted); font-size: 15.5px; }
.hook .hook-head { font-size: 25px; font-weight: 700; color: var(--gold); margin: 4px 0 8px; line-height: 1.35; }
.hook p:last-child { font-size: 15.5px; }

.toc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; font-size: 14.5px; }
.toc li { padding: 7px 0 7px 16px; border-bottom: 1px dotted rgba(241, 210, 127, .25); position: relative; line-height: 1.4; }
.toc li:before { content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }

.cta { background: var(--ink); border: 1px solid var(--gold2); border-radius: 16px; padding: 20px 18px; text-align: center; margin: 18px 0 14px; }
.cta b { display: block; color: var(--gold); font-size: 19px; margin-bottom: 6px; line-height: 1.45; }
.cta p { margin: 0 0 10px; color: var(--cream); font-size: 15.5px; }
.cta .life { color: #d9c79a; font-size: 14.5px; }
.cta .product { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }

.foot { max-width: 480px; margin: 0 auto; padding: 8px 18px 28px; text-align: center; color: #7f88a8; font-size: 12.5px; line-height: 1.6; }
.foot p { margin: 2px 0; }

@media (min-width: 520px) { body { font-size: 17.5px; } }
