/* ===== 운세옹 공통 스타일 ===== */
:root {
  --bg: #0c0a1a;
  --bg2: #131028;
  --card: #1a1633;
  --card-hi: #221c42;
  --line: #2e2752;
  --gold: #e6c15c;
  --gold-soft: #f2dc9b;
  --purple: #a78bfa;
  --text: #efeaff;
  --muted: #9a92b8;
  --ok: #7dd8a0;
  --el-mok: #5fb97a;
  --el-hwa: #f07064;
  --el-to: #d9a441;
  --el-geum: #c9ccd6;
  --el-su: #6aa8f0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
/* 밤하늘 별 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 8%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 28%, #ffedb88a 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 62%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 45%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 82%, #cfc2ff7d 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 78%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 42% 92%, #fff4 50%, transparent 51%),
    radial-gradient(2px 2px at 92% 88%, #ffedb87d 50%, transparent 51%),
    radial-gradient(1px 1px at 25% 38%, #fff6 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
main, nav, footer { position: relative; z-index: 1; }

h1, h2, h3, .serif { font-family: "Gowun Batang", "Noto Sans KR", serif; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 내비게이션 ===== */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 20px 6px;
}
nav .brand {
  font-family: "Gowun Batang", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: .04em;
}
nav .brand:hover { text-decoration: none; }
nav .links { display: flex; gap: 16px; font-size: .92rem; }
nav .links a { color: var(--muted); }
nav .links a.on, nav .links a:hover { color: var(--gold-soft); text-decoration: none; }

main { max-width: 720px; margin: 0 auto; padding: 24px 20px 60px; }

/* ===== 히어로 ===== */
.hero { text-align: center; padding: 44px 0 30px; }
.hero .moon { font-size: 3rem; display: block; margin-bottom: 12px; }
.hero h1 {
  font-size: 2.6rem;
  color: var(--gold-soft);
  letter-spacing: .08em;
  margin-bottom: 10px;
  text-shadow: 0 0 30px #e6c15c33;
}
.hero p.tag { color: var(--muted); font-size: 1.02rem; }
.hero .hero-cta {
  display: inline-block;
  width: auto;
  padding: 13px 40px;
  margin-top: 24px;
  font-size: 1.02rem;
  box-shadow: 0 6px 28px #e6c15c2e;
}
.hero .hero-sub { color: var(--muted); font-size: .82rem; margin-top: 10px; }
.menu a.card.consult-card {
  border-color: #5a4c22;
  background: linear-gradient(160deg, #2e2648, #1c1736);
}
@media (max-width: 559px) { .menu a.card.wide { grid-column: auto; } }

.page-head { text-align: center; padding: 26px 0 8px; }
.page-head h1 { font-size: 1.9rem; color: var(--gold-soft); letter-spacing: .06em; }
.page-head p { color: var(--muted); margin-top: 8px; font-size: .95rem; }

/* ===== 메뉴 카드 ===== */
.menu { display: grid; gap: 14px; margin-top: 26px; }
@media (min-width: 560px) { .menu { grid-template-columns: repeat(2, 1fr); } }
.menu a.card {
  display: block;
  background: linear-gradient(160deg, var(--card-hi), var(--card));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  color: var(--text);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.menu a.card:hover {
  transform: translateY(-3px);
  border-color: #4a3f85;
  box-shadow: 0 8px 30px #00000055;
  text-decoration: none;
}
.menu .icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.menu h3 { color: var(--gold-soft); font-size: 1.15rem; margin-bottom: 6px; }
.menu p { color: var(--muted); font-size: .86rem; line-height: 1.55; }

/* ===== 신뢰 배지 ===== */
.trust { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 30px; }
.trust span {
  font-size: .8rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  background: #14112799;
}

/* ===== 공통 패널/폼 ===== */
.panel {
  background: linear-gradient(170deg, var(--card-hi), var(--card));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 20px;
  margin-top: 20px;
}
.panel h2 { color: var(--gold-soft); font-size: 1.2rem; margin-bottom: 14px; }
label.f { display: block; font-size: .88rem; color: var(--muted); margin: 14px 0 6px; }
input[type="date"], input[type="time"], input[type="email"], textarea, select {
  width: 100%;
  background: #0e0b20;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
}
input:focus, textarea:focus, select:focus { border-color: var(--purple); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .9rem; color: var(--muted); }
.check input { width: 17px; height: 17px; accent-color: var(--gold); }
.btn {
  display: inline-block;
  width: 100%;
  margin-top: 20px;
  background: linear-gradient(135deg, #d9b34a, var(--gold));
  color: #221a04;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.985); }
.btn.ghost {
  background: transparent;
  color: var(--gold-soft);
  border: 1px solid var(--line);
  font-weight: 500;
}
.note { font-size: .8rem; color: var(--muted); margin-top: 14px; line-height: 1.6; }

/* 세그먼트 토글 (양력/음력, 성별) */
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block;
  text-align: center;
  padding: 11px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0e0b20;
  color: var(--muted);
  font-size: .95rem;
  transition: all .15s ease;
}
.seg input:checked + span { border-color: var(--gold); color: var(--gold-soft); background: #e6c15c14; }

.lunar-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.note.err { color: var(--el-hwa); }

/* 대운 */
.daeun-row { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; }
.daeun-row .du {
  flex: 0 0 62px;
  text-align: center;
  background: #0e0b20;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 2px 10px;
}
.daeun-row .du.cur { border-color: var(--gold); background: #e6c15c14; box-shadow: 0 0 14px #e6c15c22; }
.daeun-row .age { font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.daeun-row .gz { font-family: "Gowun Batang", serif; font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.daeun-row .gz span { display: block; }
.daeun-row .han { font-size: .72rem; color: var(--muted); margin-top: 3px; }

/* ===== 사주 결과 ===== */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 6px; }
.pillar {
  background: #0e0b20;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 4px 14px;
  text-align: center;
}
.pillar .lbl { font-size: .74rem; color: var(--muted); margin-bottom: 8px; }
.pillar .hanja { font-family: "Gowun Batang", serif; font-size: 1.7rem; line-height: 1.3; font-weight: 700; }
.pillar .han { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.pillar .hanja span { display: block; }
.el-목 { color: var(--el-mok); }
.el-화 { color: var(--el-hwa); }
.el-토 { color: var(--el-to); }
.el-금 { color: var(--el-geum); }
.el-수 { color: var(--el-su); }

.elembars { margin: 16px 0 4px; }
.elembars .row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.elembars .name { width: 64px; font-size: .85rem; color: var(--muted); flex: none; }
.elembars .track { flex: 1; height: 12px; background: #0e0b20; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.elembars .fill { height: 100%; border-radius: 999px; transition: width .6s ease; }
.elembars .cnt { width: 20px; text-align: right; font-size: .85rem; color: var(--muted); flex: none; }
.f-목 { background: var(--el-mok); }
.f-화 { background: var(--el-hwa); }
.f-토 { background: var(--el-to); }
.f-금 { background: var(--el-geum); }
.f-수 { background: var(--el-su); }

.reading h3 {
  color: var(--gold-soft);
  font-size: 1.05rem;
  margin: 22px 0 8px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.reading h3:first-child { border-top: none; padding-top: 0; margin-top: 12px; }
.reading p { font-size: .95rem; color: #ddd6f3; }
.kw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kw span {
  font-size: .78rem;
  color: var(--gold-soft);
  border: 1px solid #4a3f5f;
  background: #e6c15c14;
  border-radius: 999px;
  padding: 3px 11px;
}

/* ===== 타로 ===== */
.spreads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 560px) { .spreads { grid-template-columns: repeat(4, 1fr); } }
.spreads button {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 6px;
  font-family: inherit;
  font-size: .92rem;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.spreads button .ic { display: block; font-size: 1.4rem; margin-bottom: 6px; }
.spreads button.on, .spreads button:hover { border-color: var(--gold); background: var(--card-hi); }

.deck { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 24px 0 8px; perspective: 900px; }
.tcard {
  width: 72px;
  height: 112px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .55s ease, opacity .3s ease;
  border-radius: 10px;
}
.tcard.picked { transform: rotateY(180deg); cursor: default; }
.tcard.dim { opacity: .25; pointer-events: none; }
.tcard .face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}
.tcard .back {
  background:
    radial-gradient(circle at 50% 42%, #2c2456 0 26%, transparent 27%),
    repeating-linear-gradient(45deg, #191436 0 6px, #1e1840 6px 12px);
  color: var(--gold);
  font-size: 1.3rem;
}
.tcard .front {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #241d49, #171233);
  color: var(--gold-soft);
  font-size: 1.6rem;
}
.tcard .front .rev { transform: rotate(180deg); }
.tcard .front small { font-size: .56rem; color: var(--muted); margin-top: 6px; text-align: center; padding: 0 3px; }

.tresult { margin-top: 10px; }
.tresult .tr-card {
  background: #0e0b20;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  margin-top: 12px;
}
.tresult .pos { font-size: .8rem; color: var(--purple); margin-bottom: 4px; }
.tresult h3 { color: var(--gold-soft); font-size: 1.1rem; }
.tresult .ori { font-size: .8rem; color: var(--muted); margin: 2px 0 8px; }
.tresult p { font-size: .93rem; color: #ddd6f3; }
.hint { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 16px; }

/* ===== 오늘의 운세 ===== */
.zodiacs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 560px) { .zodiacs { grid-template-columns: repeat(6, 1fr); } }
.zodiacs button {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 4px;
  font-family: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.zodiacs button .ic { display: block; font-size: 1.5rem; margin-bottom: 4px; }
.zodiacs button.on, .zodiacs button:hover { border-color: var(--gold); background: var(--card-hi); }
.year-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.year-chips button {
  background: #0e0b20;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s ease;
}
.year-chips button.on, .year-chips button:hover { border-color: var(--gold); color: var(--gold-soft); background: #e6c15c14; }
.score { color: var(--gold); letter-spacing: 2px; }
.score .off { color: #3d3663; }
.daily-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.daily-meta div {
  flex: 1;
  min-width: 120px;
  background: #0e0b20;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.daily-meta .k { font-size: .76rem; color: var(--muted); margin-bottom: 4px; }
.daily-meta .v { font-size: 1rem; color: var(--gold-soft); font-weight: 700; }

/* ===== FAQ / 동의 ===== */
details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0e0b20;
  margin-top: 10px;
  padding: 0 16px;
}
details summary {
  cursor: pointer;
  padding: 13px 0;
  font-size: .95rem;
  color: var(--gold-soft);
  list-style: none;
}
details summary::before { content: "✦ "; color: var(--purple); }
details[open] summary { border-bottom: 1px dashed var(--line); }
details p { padding: 12px 0 14px; font-size: .9rem; color: #ddd6f3; }
.check.consent { margin-top: 18px; }
.check.consent a { font-size: .84rem; }

/* ===== 상담 CTA ===== */
.cta-box {
  margin-top: 22px;
  border: 1px solid #4f4326;
  background: linear-gradient(160deg, #2a2246, #1a1633);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
}
.cta-box .cta-t { font-family: "Gowun Batang", serif; color: var(--gold-soft); font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.cta-box p { font-size: .88rem; color: var(--muted); }
a.btn { display: block; text-align: center; text-decoration: none; }
a.btn:hover { text-decoration: none; }
@media (min-width: 560px) { .menu a.card.wide { grid-column: span 2; } }

/* ===== 궁합 ===== */
.duo { display: grid; gap: 18px; }
@media (min-width: 560px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo h2 { color: var(--gold-soft); font-size: 1.05rem; }
.gh-score-wrap { text-align: center; margin-bottom: 16px; }
.gh-score { font-family: "Gowun Batang", serif; font-size: 3.4rem; font-weight: 700; color: var(--gold-soft); line-height: 1.1; text-shadow: 0 0 30px #e6c15c33; }
.gh-score small { font-size: 1.2rem; margin-left: 4px; color: var(--muted); }
.gh-track { height: 12px; background: #0e0b20; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.gh-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #a78bfa, #e6c15c); transition: width .8s ease; }
.gh-pillars { grid-template-columns: 1fr auto 1fr; align-items: center; }
.gh-heart { font-size: 1.6rem; text-align: center; }

/* ===== 평가 + 피드백 ===== */
#feedback .stars { font-size: 2rem; letter-spacing: 6px; cursor: pointer; user-select: none; }
#feedback .stars span { color: #3d3663; transition: color .12s ease; }
#feedback .stars span.on { color: var(--gold); }
#rate-thanks { margin-top: 10px; font-size: .9rem; color: var(--ok); }
#fb-form textarea { min-height: 96px; resize: vertical; margin-top: 4px; }
#fb-status { font-size: .88rem; margin-left: 10px; }
#fb-send { width: auto; padding: 10px 26px; margin-top: 12px; font-size: .95rem; }

/* ===== 푸터 ===== */
footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 20px 44px;
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  border-top: 1px solid var(--line);
  line-height: 1.9;
}
footer .flinks { margin-bottom: 6px; }
footer .flinks a { color: var(--muted); margin: 0 8px; }
footer .flinks a:hover { color: var(--gold-soft); }

.hidden { display: none !important; }
@media (max-width: 420px) {
  .hero h1 { font-size: 2.1rem; }
  .pillar .hanja { font-size: 1.35rem; }
  nav .links { gap: 10px; font-size: .84rem; }
}
