/* 사주담 랜딩·처리방침 공용 스타일. 색은 lib/ui/theme.dart "밤하늘 한지"에서 가져왔다 */
:root {
  --paper: #f6f3ed;
  --surface: #ffffff;
  --line: #ece6da;
  --ink: #1f2233;
  --muted: #6e6a62;
  --seal: #c4432f;
  --seal-text: #a8361f;
  --gold: #c9a45c;
  --night: #1c1f3a;
  --night-2: #262a4d;
  --night-track: #3a3f68;
  --night-text: #aeb3cf;
  --shadow: 0 24px 48px -24px rgba(31, 34, 51, 0.4);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", Roboto, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--seal-text); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.shell { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* 머리글 */
.site-header { padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 19px; text-decoration: none; }
.brand img { width: 32px; height: 32px; }

/* 첫 화면 */
.hero { display: grid; gap: 40px; padding-top: 24px; padding-bottom: 56px; }
.hero h1 { margin: 0; font-size: clamp(34px, 8vw, 56px); line-height: 1.2; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--seal); }
.lede { margin: 20px 0 32px; color: var(--muted); font-size: 18px; max-width: 26em; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 26px;
  background: var(--night); color: #fff;
  font-size: 17px; font-weight: 700; text-decoration: none;
}
.button svg { width: 20px; height: 20px; fill: currentColor; }

/* HTML로 그린 휴대폰 화면 */
.phone {
  width: 100%; max-width: 340px; margin: 0 auto; overflow: hidden;
  background: var(--paper); border: 8px solid var(--ink); border-radius: 40px;
  box-shadow: var(--shadow); font-size: 14px; line-height: 1.45;
}
.night { position: relative; padding: 20px 20px 26px; border-radius: 0 0 28px 28px; background: var(--night); color: #fff; text-align: center; }
.moon { position: absolute; top: 12px; right: -40px; width: 180px; height: 200px; opacity: 0.8; }
.night-title { position: relative; margin: 0 0 16px; text-align: left; font-size: 18px; font-weight: 700; }
.ring {
  position: relative; display: grid; place-content: center; width: 140px; height: 140px; margin: 0 auto;
  border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--score) * 1%), var(--night-track) 0);
}
.ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--night); }
.ring b, .ring span { position: relative; }
.ring b { font-size: 44px; font-weight: 900; line-height: 1; }
.ring span { margin-top: 4px; color: var(--night-text); font-size: 12px; }
.grade { display: inline-block; margin-top: 14px; padding: 2px 14px; border: 2px solid var(--gold); border-radius: 8px; color: var(--gold); font-size: 16px; font-weight: 900; }
.card { margin: 14px 12px 16px; padding: 16px 12px; border-radius: 22px; background: var(--surface); }
.card-title { margin: 0 4px 10px; font-weight: 700; font-size: 16px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.pillars > div { display: grid; justify-items: center; gap: 6px; }
.pillars b { font-size: 12px; }
.pillars i {
  display: grid; place-content: center; width: 100%; max-width: 56px; aspect-ratio: 1; border-radius: 14px;
  color: #fff; font-style: normal; font-size: 26px; font-weight: 900; line-height: 1.1;
}
.pillars i small { color: rgba(255, 255, 255, 0.85); font-size: 10px; font-weight: 400; }
.pillars .unknown { border: 1.5px solid var(--line); color: #9a958b; font-size: 22px; font-weight: 400; }
.pillars > div > small { color: var(--muted); font-size: 11px; }
.water { background: #2e4a7a; }
.earth { background: #b3862b; }
.fire { background: #d0503c; }

/* 기능 카드 */
.features { display: grid; gap: 16px; padding-bottom: 56px; }
.feature { padding: 24px; border-radius: 22px; background: var(--surface); }
.feature h2 { margin: 14px 0 6px; font-size: 20px; line-height: 1.35; }
.feature p { margin: 0; color: var(--muted); }
.seal { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 24px; font-weight: 900; }
.seal.today { background: #fcebd9; color: #c0662a; }
.seal.saju { background: #e3e8f3; color: #2e4a7a; }
.seal.yearly { background: #fbe3df; color: #b8402c; }
.seal.compat { background: #f8e1e6; color: #b03a55; }

/* 다른 점 — 본문에서 유일한 밤 카드 */
.diff { margin-bottom: 56px; padding: 32px 24px; border-radius: 28px; background: var(--night); color: #fff; }
.diff h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.35; }
.diff ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.diff li { padding: 16px 0; border-top: 1px solid var(--night-track); }
.diff li:first-child { border-top: 0; }
.diff h3 { margin: 0 0 4px; color: var(--gold); font-size: 18px; }
.diff p { margin: 0; color: var(--night-text); }

/* 바닥글 */
/* 궁금한 점 */
.faq { padding-bottom: 64px; }
.faq > h2 { margin: 0 0 16px; font-size: 24px; }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 4px; font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--seal); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 0; padding: 0 4px 18px; color: var(--muted); }
summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

footer { padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
footer a { color: inherit; }

/* 처리방침 */
.policy { max-width: 760px; padding-bottom: 56px; }
.policy h1 { margin: 16px 0 4px; font-size: 30px; line-height: 1.3; }
.policy .meta { margin: 0 0 32px; color: var(--muted); font-size: 15px; }
.policy h2 { margin: 36px 0 10px; font-size: 21px; }
.policy ul, .policy ol { padding-left: 1.2em; }
.policy li { margin: 4px 0; }
.policy .table { overflow-x: auto; }
.policy table { width: 100%; border-collapse: collapse; font-size: 15px; }
.policy th, .policy td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.policy th { background: var(--surface); }

/* 공유 링크 보기(worker.js) */
.share { max-width: 480px; display: grid; gap: 20px; padding-top: 8px; padding-bottom: 48px; }
.share .shared { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); }
.share .lede { margin: 24px 0 0; }
.button[aria-disabled="true"] { background: var(--line); color: var(--muted); }

/* 공유 결과 문서 — 밤하늘 머리(.night) + 흰 카드(.card) */
.doc { overflow: hidden; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); padding-bottom: 4px; }
.doc .night { display: grid; gap: 14px; padding: 24px 20px 28px; }
.doc h1 { margin: 0; font-size: 24px; line-height: 1.3; }
.doc h1 em { font-style: normal; color: var(--gold); }
.doc .date { margin: -8px 0 0; color: var(--gold); font-size: 13px; }
.doc .night .body, .doc .night .summary { margin: 0; color: rgba(255, 255, 255, 0.88); }
.doc .night .chips li { background: var(--night-2); color: #fff; }
.doc .night .stats li { background: var(--night-2); }
.doc .night .stats b { color: #fff; }
/* 행운 칸은 밤 영역에서도 앱처럼 한지색 칸 — 오행 글자색이 어두운 바탕에 묻히지 않게. */
.doc .night .stats.lucky li { background: var(--paper); }
.doc .night .stats.lucky b { color: var(--ink); }
.doc .night .stats.lucky small { color: var(--muted); }
.doc .card { margin: 12px; padding: 18px 16px; }
.doc h2 { margin: 0 0 10px; font-size: 16px; }
.doc p { margin: 0 0 8px; }
.doc .summary { font-weight: 700; }
.doc .body { white-space: pre-line; }
.doc .action { padding: 10px 12px; border-radius: 12px; background: var(--paper); font-weight: 700; }
.doc .note, .doc .ai-note, .doc .locked { color: var(--muted); font-size: 13px; }
.doc .ai-note { margin: 8px 0 0; }
.doc .night .ai-note { margin: 0; color: var(--night-text); }
.doc td:empty { background: none; }
.doc .body:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 4px 12px; border-radius: 999px; background: var(--paper); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.stats.lucky { grid-template-columns: 1fr 1fr; }
.stats li { display: grid; gap: 2px; padding: 12px; border-radius: 16px; background: var(--paper); text-align: center; }
.stats small { color: var(--muted); font-size: 12px; }
.doc .night .stats small { color: var(--night-text); }
.stats b { font-size: 18px; }
.bars { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: 4.5em 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.bars i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) calc(var(--v) * 1%), var(--line) 0); }
.bars b { min-width: 2.5em; text-align: right; }
.doc table { width: 100%; border-collapse: separate; border-spacing: 4px; text-align: center; table-layout: fixed; }
.doc th { color: var(--muted); font-size: 12px; font-weight: 400; }
.doc td { padding: 8px 2px; border-radius: 12px; background: var(--paper); font-size: 15px; font-weight: 700; white-space: pre-line; }
.doc td.el0, .doc td.el1, .doc td.el2, .doc td.el3, .doc td.el4 { color: #fff; font-size: 20px; }
.doc td.el0 { background: #3f8a5f; }
.doc td.el1 { background: #d0503c; }
.doc td.el2 { background: #b3862b; }
.doc td.el3 { background: #8a919e; }
.doc td.el4 { background: #2e4a7a; }
.lines { margin: 0; padding-left: 1.3em; }
.lines li + li { margin-top: 6px; }

/* 2027 띠별 운세(/2027/*, tool/build_zodiac_pages.py가 만듦) — 랜딩 .night·.card와 겹치지 않게 z- 이름 */
.zodiac { max-width: 720px; padding-bottom: 8px; }
.z-crumb { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.z-crumb a { color: inherit; }
.z-hero { position: relative; overflow: hidden; padding: 28px 22px; border-radius: 28px; background: var(--night); color: #fff; }
.z-hero .moon { top: -20px; right: -30px; width: 150px; height: 150px; opacity: 0.75; }
.z-hero > *:not(.moon) { position: relative; }
.z-kicker { margin: 0 0 6px; color: var(--gold); font-size: 14px; font-weight: 700; }
.z-hero h1 { margin: 0; font-size: 30px; line-height: 1.3; letter-spacing: -0.01em; }
.z-hero h1 em { font-style: normal; color: var(--gold); }
.z-lead { margin: 14px 0 0; color: rgba(255, 255, 255, 0.9); }
.z-pair { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.z-pair li { padding: 4px 12px; border-radius: 999px; background: var(--night-2); font-size: 14px; }
.z-pair b { color: var(--gold); }
.z-card { margin-top: 14px; padding: 20px 18px; border-radius: 22px; background: var(--surface); }
.z-card h2, .z-card h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.4; }
.z-card p { margin: 0 0 8px; }
.z-card p:last-child { margin-bottom: 0; }
.z-muted { color: var(--muted); font-size: 15px; }
.z-month { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.z-tag + .z-month { border-top: 0; }
.z-month span { font-weight: 700; }
.z-month small { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.z-month .z-jan { font-size: 13px; }
.z-tag { display: inline-block; margin-bottom: 4px; padding: 2px 10px; border-radius: 8px; font-size: 13px; font-weight: 800; }
.z-tag.up { background: #f6ecd6; color: #8a6a24; }
.z-tag.down { background: #e9e8f1; color: #4a4f72; }
.z-honest { border: 1.5px dashed var(--gold); background: #fffaf0; }
.z-cta { margin-top: 14px; padding: 24px 20px; border-radius: 24px; background: var(--night); color: #fff; text-align: center; }
.z-cta h2 { margin: 0 0 6px; font-size: 20px; }
.z-cta p { margin: 0 0 16px; color: var(--night-text); font-size: 15px; }
.z-cta .button { background: var(--gold); color: var(--night); font-weight: 800; }
.z-cta small { display: block; margin-top: 12px; color: var(--night-text); font-size: 13px; }
.z-qa-title { margin: 32px 0 0; font-size: 21px; }
.z-qa h3 { display: flex; gap: 8px; font-size: 17px; }
.z-qa h3::before { content: "Q"; color: var(--seal); font-weight: 900; }
.z-others { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.z-others a { display: grid; place-items: center; min-height: 48px; border-radius: 14px; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.z-others a[aria-current] { background: var(--night); color: var(--gold); }
.z-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.z-list a { display: grid; gap: 2px; padding: 16px; border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; }
.z-list b { font-size: 18px; }
.z-list span { color: var(--seal-text); font-size: 15px; font-weight: 700; }
.z-list small { color: var(--muted); font-size: 14px; }
.feature .more { display: inline-block; margin-top: 10px; font-weight: 700; text-decoration: none; }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; padding-top: 48px; padding-bottom: 88px; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .diff { padding: 44px 48px; }
  .diff ul { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .diff li { border-top: 0; }
}

/* 계정 삭제(account.html) 웹 삭제 버튼. .button이 display를 정하므로 hidden을 다시 살린다 */
[hidden] { display: none !important; }
.login-buttons { display: grid; gap: 12px; max-width: 280px; margin: 16px 0; }
.login-buttons .button { width: 100%; border: 0; font-family: inherit; cursor: pointer; }
.login-buttons .button.google, .login-buttons .button.kakao, .login-buttons .button.naver { min-height: 48px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 500; gap: 10px; justify-content: flex-start; }
.login-buttons .button.google { justify-content: center; }
.login-buttons .button span { flex: 1; text-align: center; }
.login-buttons .button.kakao span, .login-buttons .button.naver span { margin-right: 30px; } /* 심볼 20+간격 10 — 글자를 버튼 정중앙으로 */
.button.kakao { background: #fee500; color: rgba(0, 0, 0, 0.85); }
.button.naver { background: #03c75a; color: #fff; }
.button.google { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.button.danger { background: var(--seal-text); }
.button.quiet { background: var(--line); color: var(--ink); }
#web-delete .buttons .button { border: 0; font-family: inherit; cursor: pointer; }
.button:disabled { opacity: 0.6; cursor: default; }
#result { font-weight: 700; }
