:root {
  --bg: #14121c;
  --bg2: #1d1a29;
  --card: #231f33;
  --line: #3a3450;
  --text: #f3eee6;
  --muted: #a59fb6;
  --gold: #d9b56a;
  --gold-soft: #d9b56a22;
  --accent: #e07a5f;
  --radius: 18px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -200px, #2c2545 0%, var(--bg) 60%) no-repeat, var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
/* 일본어·중국어는 글자 단위 줄바꿈 (keep-all이면 문장 전체가 한 줄로 이어져 화면을 넘침) */
html:lang(ja) body, html:lang(zh) body { word-break: normal; line-break: strict; }
.wrap { max-width: 480px; margin: 0 auto; padding: 28px 18px 60px; }
[hidden] { display: none !important; }

/* 입력 */
.hero { text-align: center; margin: 12px 0 24px; }
.eyebrow { color: var(--gold); letter-spacing: .24em; font-size: 12px; font-weight: 600; margin: 0 0 10px; }
.hero h1 { font-size: 30px; line-height: 1.3; margin: 0 0 12px; font-weight: 800; letter-spacing: -0.035em; }
.lead { color: var(--muted); margin: 0; font-size: 15px; }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 16px;
}
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 14px; color: var(--muted); }
input[type=text], input[type=date], input[type=time] {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #17141f; color: var(--text);
  font: inherit; font-size: 16px; color-scheme: dark;
}
input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.row { display: flex; gap: 12px; align-items: center; }
.row input { flex: 1; }
.check { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; font-size: 15px; }
.check.small { font-size: 13px; color: var(--muted); white-space: normal; }
.check input { accent-color: var(--gold); width: 18px; height: 18px; }

.mbti-axes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.axis { display: grid; gap: 6px; }
.axis button {
  padding: 12px 0; letter-spacing: 0; border-radius: 12px; border: 1px solid var(--line);
  background: #17141f; color: var(--muted); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer;
}
.axis button.on { background: var(--gold); color: #1b1726; border-color: var(--gold); }

.btn {
  display: block; width: 100%; padding: 15px; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 700;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.btn.primary { background: var(--gold); color: #1b1726; border-color: var(--gold); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn:active { transform: translateY(1px); }
.error { color: var(--accent); margin: 0; min-height: 1em; font-size: 14px; }
.fine { color: var(--muted); font-size: 12px; margin: 0; } .fine a { color: var(--muted); text-decoration: underline; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; margin: 0 0 12px; }

/* 결과 */
.profile { text-align: center; }
.profile .name { font-size: 15px; color: var(--muted); margin: 0; }
.profile .type { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); border: 1px solid #d9b56a44; }

.tabs { display: flex; gap: 8px; margin: 0 0 12px; }
.tab { flex: 1; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.tab.active { color: var(--text); border-color: var(--gold); background: var(--gold-soft); }

.month .label { color: var(--gold); font-size: 13px; letter-spacing: .1em; margin: 0; }
.month h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.035em; margin: 4px 0 12px; }
.month p { margin: 0 0 12px; }
.month .habit { color: var(--muted); }
.month .advice { background: #17141f; border-left: 3px solid var(--gold); padding: 14px 14px; border-radius: 0 12px 12px 0; font-weight: 600; }
.sub { border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 14px; }
.sub h3 { font-size: 16px; margin: 0 0 6px; }
.sub p { color: var(--muted); font-size: 14px; }
details { margin-top: 14px; color: var(--muted); font-size: 13px; }
summary { cursor: pointer; }
details ul { padding-left: 18px; margin: 8px 0 0; }

.today { text-align: center; }
.today h2, .lucky h2 { font-size: 18px; margin: 0 0 4px; }
.tarot { background: none; border: 0; padding: 0; margin: 10px auto 14px; display: block; width: 150px; height: 240px; perspective: 900px; cursor: pointer; }
.tarot-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .7s; transform-style: preserve-3d; }
.tarot.flipped .tarot-inner { transform: rotateY(180deg); }
.tarot-back, .tarot-front {
  position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: center; border: 1px solid var(--gold);
}
.tarot-back { background: repeating-linear-gradient(45deg, #2a2440 0 10px, #241f36 10px 20px); }
.sigil { font-size: 42px; color: var(--gold); }
.tarot-front { transform: rotateY(180deg); background: linear-gradient(180deg, #f5ecd8, #e6d6b3); color: #2a2238; padding: 12px; }
.tarot-front .num { font-size: 20px; font-weight: 300; letter-spacing: .1em; }
.tarot-front .star { font-size: 46px; margin: 10px 0; color: #9a7a2e; }
.tarot-front .tname { font-weight: 800; font-size: 18px; }
.tarot-front .ten { font-size: 11px; opacity: .7; }
.tarot-msg { font-weight: 600; min-height: 1.6em; margin: 0 0 8px; }
.daily { color: var(--muted); font-size: 14px; margin: 0; }

.lucky .color { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #ffffff33; }
.disclosure { font-size: 12px; color: var(--muted); background: #17141f; padding: 8px 10px; border-radius: 10px; margin: 0 0 10px; }
.items { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.items a { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.items a::after { content: '→'; color: var(--gold); }

.actions { display: grid; gap: 10px; margin: 8px 0 14px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #000c; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; }

/* 간단 성향 테스트 */
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--gold); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.quiz-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }
.quiz { display: grid; gap: 12px; padding: 28px 20px; }
.quiz-q { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.4; margin: 0 0 12px; min-height: 2.8em; }
.btn.choice { text-align: left; font-weight: 600; padding: 18px 16px; background: #17141f; }
.btn.choice:hover { border-color: var(--gold); }
.quiz-result { text-align: center; }
.quiz-result .type { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; }
.bars { display: grid; gap: 10px; margin: 18px 0 20px; text-align: left; }
.bar-row { display: grid; grid-template-columns: 58px 1fr 58px; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.bar { height: 8px; background: #6c5d93; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.bar-row span { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-row .win { color: var(--gold); }
.bar-row .r { text-align: right; }
.quiz-result .btn + .btn { margin-top: 10px; }

/* ---------- 탭 구조 ---------- */
.wrap { padding-bottom: 110px; }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(6, 1fr);
  max-width: 480px; margin: 0 auto;
  background: #17141fef; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; padding: 6px 0; display: grid; gap: 2px; justify-items: center; cursor: pointer; }
.bottom-nav button span { font-size: 18px; line-height: 1; }
.bottom-nav button.on { color: var(--gold); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button { padding: 11px 0; border-radius: 12px; border: 1px solid var(--line); background: #17141f; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--gold); color: #1b1726; border-color: var(--gold); }

.section-title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.card h2 { letter-spacing: -0.02em; }

/* 점수 링 */
.score-head { display: flex; gap: 18px; align-items: center; }
.ring { --v: 50; flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--gold) calc(var(--v) * 1%), #ffffff14 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--card); }
.ring b { position: relative; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.ring small { position: relative; display: block; font-size: 11px; color: var(--muted); text-align: center; margin-top: -4px; }
.score-head .word { color: var(--gold); font-weight: 700; font-size: 13px; margin: 0; }
.score-head h2 { font-size: 22px; margin: 2px 0 4px; }
.score-head p { margin: 0; font-size: 14px; color: var(--muted); }

/* 카테고리 */
.cats { display: grid; gap: 14px; margin-top: 18px; }
.cat-row .top { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.cat-row .top em { font-style: normal; color: var(--gold); font-variant-numeric: tabular-nums; }
.meter { height: 6px; background: #ffffff14; border-radius: 999px; overflow: hidden; margin: 6px 0; }
.meter span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.cat-row p { margin: 0; font-size: 14px; color: var(--muted); }

/* 막대 차트 (시간대, 12개월, 대운) */
.chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; height: 120px; margin: 14px 0 6px; }
.chart .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.chart .bar-v { width: 100%; max-width: 22px; border-radius: 6px 6px 2px 2px; background: #6c5d93; }
.chart .col.hi .bar-v { background: var(--gold); }
.chart .col.now .bar-v { outline: 2px solid var(--text); outline-offset: 1px; }
.chart .lab { font-size: 10px; color: var(--muted); white-space: nowrap; }
.chart-note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* 바이오리듬 */
.bio { display: grid; gap: 10px; margin-top: 10px; }
.bio-row { display: grid; grid-template-columns: 40px 1fr 54px; gap: 8px; align-items: center; font-size: 14px; }
.bio-track { position: relative; height: 8px; background: #ffffff14; border-radius: 999px; }
.bio-track::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.bio-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--gold); }
.bio-fill.neg { background: #6c5d93; }
.bio-row em { font-style: normal; color: var(--muted); text-align: right; font-size: 13px; }

/* 행운 */
.lucky-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.lucky-grid div { background: #17141f; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lucky-grid small { display: block; color: var(--muted); font-size: 12px; }
.lucky-grid b { font-size: 15px; }
.lucky-grid .wide { grid-column: 1 / -1; }

/* 띠별 */
.animals { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.animals li { display: grid; grid-template-columns: 22px 64px 1fr; gap: 6px; font-size: 14px; align-items: start; }
.animals .mk { color: var(--gold); font-weight: 800; text-align: center; }
.animals .mk.bad { color: var(--accent); }
.animals li.me { background: var(--gold-soft); border-radius: 8px; padding: 4px; margin: 0 -4px; }
.animals span:last-child { color: var(--muted); }

/* 원국 표 */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin: 12px 0; }
.pillars .h { font-size: 12px; color: var(--muted); }
.pillars .ch { border-radius: 12px; padding: 10px 0 6px; font-size: 26px; font-weight: 800; line-height: 1.1; color: #1b1726; }
.pillars .ch small { display: block; font-size: 11px; font-weight: 600; margin-top: 2px; }
.pillars .ss { font-size: 12px; color: var(--muted); }
.el-목 { background: #7fc49a; } .el-화 { background: #ef8f80; } .el-토 { background: #e3c48a; } .el-금 { background: #e6e2da; } .el-수 { background: #8fa6d8; }
.pillars .empty { background: #ffffff10; color: var(--muted); }
.elements { display: grid; gap: 8px; margin-top: 8px; }
.el-row { display: grid; grid-template-columns: 52px 1fr 22px; gap: 8px; align-items: center; font-size: 14px; }
.el-row .meter { margin: 0; height: 10px; }
.el-row .meter span.el-목 { background: #7fc49a; } .el-row .meter span.el-화 { background: #ef8f80; } .el-row .meter span.el-토 { background: #e3c48a; } .el-row .meter span.el-금 { background: #e6e2da; } .el-row .meter span.el-수 { background: #8fa6d8; }
.tagline { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); border: 1px solid #d9b56a44; margin: 0 4px 6px 0; }
.list-plain { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.list-plain li { font-size: 14px; color: var(--muted); }
.list-plain li b { color: var(--text); display: block; font-size: 15px; }

/* 궁합·인맥 */
.people { display: grid; gap: 10px; margin-top: 12px; }
.person { background: #17141f; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.person .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.person .top b { font-size: 16px; }
.person .top small { color: var(--muted); font-size: 12px; }
.person .score { color: var(--gold); font-weight: 800; font-size: 20px; }
.person ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.person ul li.bad::marker { color: var(--accent); }
.person .del { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; margin-top: 8px; padding: 0; }
.mini-form { display: grid; gap: 10px; margin-top: 12px; }
.mini-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-form select { width: 100%; padding: 13px 10px; border-radius: 12px; border: 1px solid var(--line); background: #17141f; color: var(--text); font: inherit; font-size: 15px; }

/* AI 종합 분석 */
.ai-card { border-color: #d9b56a55; background: linear-gradient(180deg, #2a2440, var(--bg2)); }
.ai-badge { display: inline-block; margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #1b1726; background: var(--gold); padding: 3px 8px; border-radius: 999px; }
.ai-q { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #17141f; color: var(--text); font: inherit; font-size: 15px; resize: vertical; margin: 4px 0 6px; }
.ai-q:focus { outline: 2px solid var(--gold); }
.ai-out { margin: 6px 0 12px; }
.ai-out h3 { font-size: 16px; margin: 16px 0 6px; color: var(--gold); }
.ai-out p { margin: 0 0 8px; font-size: 15px; }
.ai-out b { color: var(--gold); }
.ai-asked { color: var(--muted); font-size: 14px !important; border-left: 2px solid var(--line); padding-left: 10px; }
.ai-err { color: var(--accent); font-size: 14px !important; }
.ai-loading { display: flex; gap: 6px; justify-content: center; padding: 18px 0; }
.ai-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: aiDot 1s infinite ease-in-out; }
.ai-loading span:nth-child(2) { animation-delay: .15s; } .ai-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-5px); } }
.btn:disabled { opacity: .6; cursor: wait; }

/* 언어 전환 */
.lang-switch { position: fixed; top: 10px; right: max(10px, calc(50% - 230px)); z-index: 20; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: #17141fd9; border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lang-btn { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.lang-btn.on { background: var(--gold); color: #1b1726; }
.wrap { padding-top: 48px; }
.bottom-nav em { font-style: normal; }

.item-plain { display: block; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }

/* 시·분 선택 */
.time-sel { flex: 1; display: flex; align-items: center; gap: 6px; }
.time-sel span { color: var(--muted); font-weight: 700; }
.time-sel select { flex: 1; min-width: 0; padding: 13px 10px; border-radius: 12px; border: 1px solid var(--line); background: #17141f; color: var(--text); font: inherit; font-size: 16px; color-scheme: dark; }
.time-sel select:disabled { opacity: .4; }

/* 인사 + 오늘의 운세 */
.greeting { border-color: #d9b56a66; background: linear-gradient(135deg, #2e2747, #1d1a29); }
.greeting p { margin: 0 0 8px; font-size: 15px; }
.greeting .greet-hello { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.greeting .greet-title { color: var(--muted); }
.greeting .greet-title b { color: var(--gold); }
.greeting .greet-dir { color: var(--gold); font-weight: 600; margin: 0; }
.cat-row p.l1, .cat-row p.l2, .cat-row p.l3 { line-height: 1.6; }
.cat-row p.l2 { margin-top: 4px; }
.cat-row p.l3 { margin-top: 4px; color: var(--text); }
.cat-row a.place { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link-btn { background: none; border: 0; padding: 6px 0 0; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.geo-ask { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.geo-ask p { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

/* 놀이 탭 */
.play-card .section-title.big { font-size: 24px; }
.play-card .section-title small { font-size: 13px; color: var(--gold); font-weight: 700; }
.play-card p { margin: 8px 0; font-size: 14px; line-height: 1.6; }
.play-card .btn { margin-top: 10px; width: 100%; }
.sws { display: flex; gap: 14px; margin: 12px 0; }
.sw { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.sw i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #ffffff33; display: inline-block; }
.look { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.look li { background: #17141f; border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: 15px; }
.look li small { display: block; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .06em; margin-bottom: 2px; }
.stats { display: grid; gap: 8px; margin: 12px 0; }
.stat { display: grid; grid-template-columns: 64px 1fr 30px; align-items: center; gap: 10px; font-size: 13px; }
.stat .bar { height: 8px; background: #2e2940; border-radius: 99px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.stat b { color: var(--gold); text-align: right; }
.crush-prob { display: flex; align-items: baseline; gap: 12px; margin: 12px 0; }
.crush-prob b { font-size: 44px; font-weight: 800; color: var(--gold); line-height: 1; }
.crush-prob span { font-weight: 700; }
.play-card select { width: 100%; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: #17141f; color: var(--text); font: inherit; font-size: 15px; color-scheme: dark; margin-top: 6px; }
.grp-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; }
.roles { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.roles li { background: #17141f; border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.roles li b { font-size: 15px; }
.roles li em { font-style: normal; color: var(--gold); font-weight: 800; text-align: right; }
.roles li small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.person-act { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.person-act .btn { width: auto; padding: 8px 12px; font-size: 13px; }
.person-act .del { margin-top: 0; }
.kname { display: grid; justify-items: center; gap: 2px; margin: 14px 0; text-align: center; }
.kname .hj { font-size: 40px; font-weight: 800; color: var(--gold); letter-spacing: .08em; }
.kname b { font-size: 26px; }
.kname em { font-style: normal; color: var(--muted); font-size: 15px; }
.play-card.season { border-color: var(--gold); }

/* 살풀이 */
.play-card.haunt{background:linear-gradient(160deg,#2a0d12 0%,#15101a 70%);border-color:#6e1d26}
.play-card.haunt .ai-badge{background:#a3242f40;color:#ff8a93}
.sal-today .ai-badge{background:#a3242f40;color:#ff8a93}
.btn.primary.haunt-btn{background:#a3242f;color:#fff;border-color:#a3242f;margin-top:6px}
.sal-list{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:10px}
.sal{background:#0e0a10cc;border:1px solid #4a1820;border-radius:14px;padding:12px 14px;animation:salIn .6s ease both}
.sal.good{border-color:#d9b56a88;background:#1d1726cc}
.sal p{margin:6px 0 0}
.sal-h{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.sal-h b{font-size:1.08em}
.sal-h small{color:#e0505c;letter-spacing:.06em}
.sal.good .sal-h small{color:#d9b56a}
.sal-ic{font-size:1.2em}
.sal-line{font-style:italic;color:#e9a0a6}
.sal.good .sal-line{color:#e8cf95}
.sal-today{margin-top:14px;padding:12px 14px;border-radius:14px;border:1px dashed #a3242f}
.sal-today p{margin:4px 0}
.sal-warn{color:#e9a0a6}
@keyframes salIn{from{opacity:0;transform:translateY(10px);filter:blur(4px)}to{opacity:1;transform:none;filter:none}}

/* 영혼 분석 로딩 */
.soul-load{padding:22px 6px 10px;text-align:center}
.soul-orbs{position:relative;width:118px;height:118px;margin:0 auto 14px;animation:soulSpin 9s linear infinite}
.soul-orbs b{position:absolute;left:50%;top:50%;width:34px;height:34px;margin:-17px;border-radius:50%;display:grid;place-items:center;font-size:15px;color:#1b1626;box-shadow:0 0 14px currentColor}
.soul-orbs b:nth-child(1){background:#6ebe7d;color:#6ebe7d;transform:rotate(0deg) translateY(-46px)}
.soul-orbs b:nth-child(2){background:#ec6852;color:#ec6852;transform:rotate(72deg) translateY(-46px)}
.soul-orbs b:nth-child(3){background:#d6a860;color:#d6a860;transform:rotate(144deg) translateY(-46px)}
.soul-orbs b:nth-child(4){background:#e1e1ec;color:#e1e1ec;transform:rotate(216deg) translateY(-46px)}
.soul-orbs b:nth-child(5){background:#6092ec;color:#6092ec;transform:rotate(288deg) translateY(-46px)}
.soul-orbs b{font-weight:800;-webkit-text-fill-color:#1b1626}
.soul-title{font-size:1.15em;font-weight:800;margin:0 0 12px;background:linear-gradient(90deg,#d9b56a,#fff3d6,#d9b56a);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:soulShine 2.4s linear infinite}
.soul-bar{height:10px;border-radius:99px;background:#2a2340;overflow:hidden;border:1px solid #3d3458}
.soul-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#b8913f,#f1d89a);box-shadow:0 0 12px #d9b56a88;transition:width .25s ease}
.soul-meta{display:flex;justify-content:space-between;gap:10px;margin:8px 2px 0;font-size:.88em;color:var(--muted,#a59fb6)}
.soul-pct{color:#d9b56a;font-weight:700;font-variant-numeric:tabular-nums}
.soul-load.compact{padding:10px 2px 4px}
.soul-load.compact .soul-orbs{width:76px;height:76px;margin-bottom:8px}
.soul-load.compact .soul-orbs b{width:22px;height:22px;margin:-11px;font-size:11px}
.soul-load.compact .soul-orbs b:nth-child(1){transform:rotate(0deg) translateY(-29px)}
.soul-load.compact .soul-orbs b:nth-child(2){transform:rotate(72deg) translateY(-29px)}
.soul-load.compact .soul-orbs b:nth-child(3){transform:rotate(144deg) translateY(-29px)}
.soul-load.compact .soul-orbs b:nth-child(4){transform:rotate(216deg) translateY(-29px)}
.soul-load.compact .soul-orbs b:nth-child(5){transform:rotate(288deg) translateY(-29px)}
.soul-load.compact .soul-title{font-size:1em;margin-bottom:8px}
@keyframes soulSpin{to{transform:rotate(360deg)}}
@keyframes soulShine{to{background-position:-200% 0}}

/* ================= 디자인 v2: Aura × Hangul (밝은 오라 + 한글 타이포) ================= */
:root {
  --bg: #f6f3ef; --bg2: #efe9e2; --card: #ffffff; --line: #e6e0d8; --text: #3f4245; --muted: #6e6a64;
  --gold: #b4532a; --gold-soft: #b4532a14; --accent: #c2410c; --ink: #16141a; --tile: #f6f3ef;
  --aura: #ffe08a; --aura2: #ffb067;
  --head-ko: "Do Hyeon", var(--font); --head-en: "Instrument Serif", Georgia, serif;
}
html { background: var(--bg); }
body { background: transparent; color: var(--text); }
body::before {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  left: 50%; top: -60px; width: 560px; height: 560px; margin-left: -280px; border-radius: 50%;
  background: radial-gradient(circle, var(--aura) 0%, var(--aura2) 30%, #f7a8d6 55%, #c3b4ff 74%, rgba(246,243,239,0) 100%);
  filter: blur(40px); opacity: .55; transition: background .8s;
}
/* 제목: 한국어는 도현체, 영어는 세리프 이탤릭 */
.hero h1, .profile .type, .month h2, .section-title, .card h2, .quiz-q { font-family: var(--head-ko); font-weight: 400; letter-spacing: 0; }
:lang(en) .hero h1, :lang(en) .profile .type, :lang(en) .month h2, :lang(en) .section-title, :lang(en) .card h2, :lang(en) .quiz-q { font-family: var(--head-en); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.hero h1 { font-size: 34px; }
:lang(en) .hero h1 { font-size: 38px; line-height: 1.1; }
.profile .type { font-size: 36px; }
:lang(en) .profile .type { font-size: 40px; }
.section-title { font-size: 21px; }
:lang(en) .section-title { font-size: 24px; }
.eyebrow { color: var(--muted); }

/* 카드: 그라데이션·발광 없이 흰 카드 */
.card, .ai-card, .greeting { background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px #16141a0a, 0 8px 24px #16141a08; }
.greeting { border: 2px solid transparent; border-radius: 22px; background: linear-gradient(#fff,#fff) padding-box, linear-gradient(135deg,#f7a8d6,#c3b4ff,#9fe3f0,#ffd36b) border-box; }
.profile.card { background: transparent; border: 0; box-shadow: none; }

/* 입력·버튼 */
input[type=text], input[type=date], input[type=time], .mini-form select, .time-sel select, .play-card select, .ai-q {
  background: #fff; color: var(--text); border-color: var(--line); color-scheme: light;
}
input:focus { outline-color: var(--ink); }
.btn.primary, .axis button.on, .seg button.on, .lang-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn { border-radius: 999px; }
.btn.choice { border-radius: 16px; background: #fff; }
.axis button, .seg button, .lucky-grid div, .person, .look li, .roles li, .disclosure, .month .advice { background: var(--tile); }
.axis button, .seg button { background: #fff; }
.month .advice { border-left-color: var(--ink); }
.ai-badge { background: var(--ink); color: #fff; }
.chip, .tagline { background: #fff; color: var(--text); border-color: var(--line); }
.check input { accent-color: var(--ink); }
.linkbtn { color: var(--ink); }

/* 그래프·막대 */
.bar, .chart .bar-v, .bio-fill.neg { background: #d9d0e6; }
.meter, .bio-track, .stat .bar, .progress { background: #ece6de; }
.ring { background: conic-gradient(var(--ink) calc(var(--v) * 1%), #ece6de 0); }
.pillars .empty { background: #ece6de; }
.sw i, .swatch { border-color: #16141a1f; }

/* 타로 카드 뒷면 */
.tarot-back { background: repeating-linear-gradient(45deg, #efe6f7 0 10px, #f7eee6 10px 20px); border-color: var(--line); }
.sigil { color: var(--ink); }

/* 상단 언어 전환·하단 메뉴: 아이콘 없이 글자만 */
.lang-switch { background: #ffffffd9; border-color: var(--line); }
.bottom-nav { background: #f6f3efeb; border-top-color: var(--line); }
.bottom-nav button { font-size: 13px; padding: 12px 0; position: relative; }
.bottom-nav button span { display: none; }
.bottom-nav button.on { color: var(--ink); font-weight: 800; }
.bottom-nav button.on::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--ink); }
.bottom-nav button em { font-style: normal; }

/* 영혼 분석 로딩 (밝은 화면용) */
.soul-title { background: none; color: var(--ink); -webkit-text-fill-color: var(--ink); font-family: var(--head-ko); font-weight: 400; font-size: 1.3em; }
:lang(en) .soul-title { font-family: var(--head-en); font-style: italic; }
.soul-bar { background: #ece6de; border-color: var(--line); }
.soul-bar i { background: linear-gradient(90deg,#f7a8d6,#c3b4ff,#ffb067); box-shadow: none; }
.soul-pct { color: var(--ink); }

/* 살풀이 카드는 어두운 톤 유지 */
.play-card.haunt { color: #f5ecee; border-color: #4a1d28; background: linear-gradient(160deg,#2a0d12 0%,#1c0b10 70%); box-shadow: 0 10px 30px #2a0d1233; }
.play-card.haunt .muted, .play-card.haunt .fine, .play-card.haunt .sal p.muted { color: #c9a9b0; }
.play-card.haunt .section-title { color: #f5ecee; }
.play-card.haunt .btn.primary.play-save { background: #f5ecee; color: #1c0b10; border-color: #f5ecee; }
.sal { color: #f5ecee; }

/* 시간대 그래프: 시진 글자 아래 실제 시각 */
.chart { height: 136px; }
.chart .lab2 { font-size: 9px; line-height: 1; color: var(--muted); white-space: nowrap; letter-spacing: -0.02em; margin-top: -2px; }

/* 출생 도시 선택 */
.place-wrap { position: relative; flex: 1; min-width: 0; }
.place-wrap .place-q { width: 100%; }
.place-box.picked .place-q { border-color: var(--gold); }
.place-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
.place-list li button { width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; border-radius: 8px; cursor: pointer; }
.place-list li button:hover, .place-list li button:focus { background: var(--gold-soft); }
.place-list li.none { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.place-help { margin: 6px 0 0; }
.mini-form .place-box { margin: 0; }

/* 고급 설정 (학파 옵션) */
details.adv { margin-top: 10px; font-size: 13px; }
details.adv summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.adv .check.small { display: flex; align-items: flex-start; margin-top: 8px; line-height: 1.45; }
details.adv .check.small input { flex: none; margin-top: 1px; }

/* 기간별 살풀이 탭 */
.sal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.sal-tabs button { flex: 1 1 auto; padding: 8px 10px; font-size: 13px; border-radius: 999px; background: transparent; color: #c9a9b0; border: 1px solid #5a2430; }
.sal-tabs button.on { background: #f5ecee; color: #1c0b10; border-color: #f5ecee; }
.sal-months { list-style: none; margin: 10px 0 4px; padding: 0; }
.sal-months li { margin: 6px 0; font-size: 14px; line-height: 1.55; color: #f5ecee; }
.sal-months li b { display: block; font-size: 12px; color: #ff8a93; letter-spacing: .02em; }
.sal-months li.good b { color: #e6c27a; }

/* 나라·언어 선택 팝업 */
.lang-pop { position: fixed; inset: 0; z-index: 200; background: rgba(22,20,26,.55); display: flex; align-items: center; justify-content: center; padding: 18px; }
.lang-card { position: relative; width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto; background: var(--card); color: var(--text); border-radius: 22px; padding: 26px 20px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.lang-card h2 { margin: 4px 0 6px; font-size: 24px; }
.lang-kicker { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lang-sub { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-c { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--tile); color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.lang-c .flag { font-size: 26px; line-height: 1; }
.lang-c img.flag { width: 32px; height: 24px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.lang-c.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.lang-more { margin-top: 14px; }
.lang-more summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.lang-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lang-l { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.lang-l.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.lang-x { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
