:root {
  --bg: #0d0b1f;
  --bg2: #17132e;
  --card: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.10);
  --text: #ece8f6;
  --muted: #a9a2c4;
  --gold: #f2c46d;
  --pink: #ff7eb6;
  --wood: #5fd08a;
  --fire: #ff6b6b;
  --earth: #e8b85c;
  --metal: #dfe3ec;
  --water: #6aa8ff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 60% at 50% 0%, #2a1f55 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", sans-serif;
  line-height: 1.65;
  word-break: keep-all;
}
.sky {
  position: fixed; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 32%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 42%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 66%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 20% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 88%, #fff 50%, transparent 51%);
}
main { position: relative; max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }

.hero { text-align: center; padding: 48px 0 24px; }
.brand { color: var(--gold); letter-spacing: .08em; font-size: 14px; margin: 0 0 12px; }
h1, h2, h3 { font-family: "Noto Serif KR", serif; line-height: 1.35; margin: 0 0 12px; }
h1 { font-size: 30px; }
h1 em { font-style: normal; color: var(--gold); text-shadow: 0 0 24px rgba(242, 196, 109, .45); }
h2 { font-size: 23px; }
h3 { font-size: 19px; }
h3 small { font-family: "Pretendard", sans-serif; font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.sub { color: var(--muted); margin: 0; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px 20px; margin: 16px 0; backdrop-filter: blur(6px);
}
.card.accent { border-color: rgba(242, 196, 109, .45); background: linear-gradient(180deg, rgba(242, 196, 109, .10), rgba(255, 126, 182, .06)); }
.eyebrow { color: var(--gold); font-size: 13px; margin: 0 0 6px; }
.lead { font-size: 16px; }
.hidden { display: none !important; }

/* 입력 */
.form .row { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.date select { flex: 1; min-width: 0; }
select, input[type=time] {
  background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 10px; font: inherit; font-size: 16px; appearance: none; -webkit-appearance: none; text-align: center;
}
input[type=time]:disabled { opacity: .4; }
.time .tlabel { color: var(--muted); font-size: 14px; white-space: nowrap; }
.time input[type=time] { flex: 1; min-width: 0; }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; white-space: nowrap; margin-bottom: 12px; }
.time .check { margin: 0; }

.seg label, .chips label { cursor: pointer; }
.seg label { flex: 1; }
.seg input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .chips span {
  display: block; text-align: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--muted); transition: all .15s;
}
.seg input:checked + span, .chips input:checked + span { border-color: var(--gold); color: var(--text); background: rgba(242, 196, 109, .14); }
.seg input:focus-visible + span, .chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.q { margin: 8px 0 8px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips span { padding: 8px 12px; font-size: 14px; }

.btn {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 16px; cursor: pointer;
  font: inherit; font-size: 17px; font-weight: 700; color: #1b1330;
  background: linear-gradient(90deg, var(--gold), #ffd9a0 50%, var(--pink));
  box-shadow: 0 8px 30px rgba(255, 126, 182, .25);
}
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; font-weight: 500; }
.err { color: var(--fire); min-height: 1em; margin: 0 0 8px; font-size: 14px; }
.privacy { color: var(--muted); font-size: 12px; text-align: center; margin: 12px 0 0; }

/* 사주 원국 */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.pillar { text-align: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 0; }
.pillar.unknown { opacity: .5; }
.plabel { font-size: 12px; color: var(--muted); }
.char { font-family: "Noto Serif KR", serif; font-size: 28px; font-weight: 700; line-height: 1.3; }
.pko { font-size: 12px; color: var(--muted); }
.el-목 { color: var(--wood); } .el-화 { color: var(--fire); } .el-토 { color: var(--earth); } .el-금 { color: var(--metal); } .el-수 { color: var(--water); }
.bg-목 { background: var(--wood); } .bg-화 { background: var(--fire); } .bg-토 { background: var(--earth); } .bg-금 { background: var(--metal); } .bg-수 { background: var(--water); }
.two { display: grid; gap: 12px; }
.two b { color: var(--gold); font-size: 14px; }
.two p { margin: 4px 0 0; }

/* 오행 막대 */
.bars { display: grid; gap: 8px; margin-bottom: 14px; }
.bar { display: grid; grid-template-columns: 58px 1fr 20px; gap: 10px; align-items: center; }
.bname { font-size: 14px; font-weight: 600; }
.track { height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 99px; }
.bnum { text-align: right; color: var(--muted); font-size: 14px; }
.weak p { margin: 0 0 10px; }
.lucky { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lucky li { background: var(--bg2); border-radius: 12px; padding: 8px; text-align: center; font-weight: 600; font-size: 14px; }
.lucky span { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }

/* 운 흐름 */
.star { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.star:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.star.focus .shead b::after { content: " · 내 고민"; color: var(--pink); font-size: 12px; font-weight: 500; }
.shead { display: flex; justify-content: space-between; align-items: center; }
.star p { margin: 6px 0 0; color: var(--muted); }
.lv { font-size: 12px; border-radius: 99px; padding: 2px 10px; }
.lv-0 { background: rgba(255, 126, 182, .18); color: var(--pink); }
.lv-low { background: rgba(106, 168, 255, .18); color: var(--water); }
.lv-high { background: rgba(242, 196, 109, .18); color: var(--gold); }

/* 영상 */
.video { margin-top: 12px; }
.thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; background: #000; aspect-ratio: 16 / 9; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; font-size: 22px; }
.frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vtitle { font-weight: 600; margin-top: 8px; font-size: 15px; }
.vlink { color: var(--gold); font-size: 13px; text-decoration: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid .video { margin-top: 0; }
.grid .vtitle { font-size: 13px; }
.grid .play { width: 40px; height: 40px; font-size: 16px; }

/* 잠긴 상세 풀이 */
.locked { position: relative; margin-top: 12px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.blur { filter: blur(5px); padding: 14px; min-height: 250px; color: var(--muted); user-select: none; }
.blur p { margin: 0 0 8px; }
.lockbox { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 16px; text-align: center; background: rgba(13, 11, 31, .55); }
.lockbox p { margin: 0 0 10px; font-size: 14px; }
.lockt { font-weight: 700; font-size: 16px !important; color: var(--gold); }
.lockbox .btn { font-size: 15px; padding: 12px; }
#premium-msg { margin: 10px 0 0; color: var(--text); }

.actions { display: grid; gap: 10px; margin-top: 8px; }
footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 40px; }
footer a { color: var(--gold); text-decoration: none; }
footer p { margin: 4px 0 0; }

@media (max-width: 360px) {
  h1 { font-size: 26px; }
  .char { font-size: 24px; }
}
