/* =========================================
   운세첩 – 기본 스타일
   ========================================= */
:root {
  --bg: #f6f2ea;
  --surface: #ffffff;
  --ink: #1f1b2e;
  --ink-soft: #5d5870;
  --muted: #9a94a8;
  --line: #e6e0d4;
  --accent: #7a3cff;
  --accent-ink: #ffffff;
  --accent-soft: #efe7ff;
  --gold: #b8892f;
  --danger: #d6424a;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(31, 27, 46, 0.08);
  --font-sans: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --font-serif: "Noto Serif KR", serif;
}

:root { color-scheme: light; }

/* ENFJ 사주가 – 밝고 따뜻한 테마 (기본) */
:root[data-persona="enfj"] {
  --bg: #fff7f2;
  --surface: #ffffff;
  --ink: #2b1f1d;
  --ink-soft: #6b5a55;
  --muted: #a1908a;
  --line: #f1e1d8;
  --accent: #f0643f;
  --accent-ink: #ffffff;
  --accent-soft: #ffe8df;
  --gold: #d9902a;
  --shadow: 0 10px 30px rgba(240, 100, 63, 0.10);
}

/* ISTJ 사주가 – 어둡고 차분한 테마 */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14121c;
  --surface: #1e1b29;
  --ink: #f1eef8;
  --ink-soft: #b9b3c9;
  --muted: #7f7891;
  --line: #322d42;
  --accent: #9b6bff;
  --accent-ink: #ffffff;
  --accent-soft: #2c2342;
  --gold: #d9ad5b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 500px at 50% -200px, var(--accent-soft), transparent 70%),
    var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

/* ---------- Hero ---------- */
.hero { text-align: center; margin-bottom: 28px; }
.hero__eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  letter-spacing: 0.4em;
  color: var(--gold);
  font-size: 14px;
}
.hero__title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 6.5vw, 30px);
  line-height: 1.35;
}
.hero__desc { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
.card + .card { margin-top: 20px; }

/* ---------- Field ---------- */
.field { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.field__label {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.field__hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

.row { display: flex; gap: 8px; align-items: center; }
.row + .row { margin-top: 10px; }
.row--between { justify-content: space-between; margin-bottom: 10px; }
.row--between .field__label { margin-bottom: 0; }
.row--3 > * { flex: 1 1 0; min-width: 0; }
.row--3 > :first-child { flex: 1.4 1 0; }
.row--2 > * { flex: 1 1 0; min-width: 0; }

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px; /* iOS 확대 방지 */
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  appearance: none;
  -webkit-appearance: none;
}
select.input {
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239a94a8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background-color: var(--surface);
}
.input:disabled { opacity: .45; cursor: not-allowed; }
.input.is-invalid { border-color: var(--danger); }

/* ---------- Segmented control ---------- */
.segmented {
  display: flex;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s;
}
.segmented input:checked + label {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(31, 27, 46, .1);
}
.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; }
.segmented--sm { flex: 0 0 auto; }
.segmented--sm label { padding: 6px 16px; font-size: 14px; }

/* ---------- Checkbox ---------- */
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.check[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, filter .15s, opacity .15s;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.is-loading .btn__label::before {
  content: "";
  display: inline-block;
  width: 16px; height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Messages ---------- */
.form-error {
  margin: -6px 0 14px;
  font-size: 14px;
  color: var(--danger);
}
.privacy {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 100;
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Result (2단계 이후 사용) ---------- */
.result { text-align: center; }

/* =========================================
   2단계: 광고 게이트 · 더미 광고 · 명식 · 기본 운세
   ========================================= */
:root {
  --el-wood: #2f9e6a;
  --el-fire: #e0533d;
  --el-earth: #c08a2b;
  --el-metal: #8a8f9c;
  --el-water: #2d5fb8;
}
:root[data-theme="dark"] {
  --el-wood: #4cc28b;
  --el-fire: #ff7a62;
  --el-earth: #e0aa4a;
  --el-metal: #b3b8c4;
  --el-water: #6b97ea;
}
.el-wood  { color: var(--el-wood); }
.el-fire  { color: var(--el-fire); }
.el-earth { color: var(--el-earth); }
.el-metal { color: var(--el-metal); }
.el-water { color: var(--el-water); }
.bg-wood  { background: var(--el-wood); }
.bg-fire  { background: var(--el-fire); }
.bg-earth { background: var(--el-earth); }
.bg-metal { background: var(--el-metal); }
.bg-water { background: var(--el-water); }

[hidden] { display: none !important; }

/* ---------- 광고 게이트 ---------- */
.gate { margin-top: 20px; text-align: center; }
.gate__eyebrow, .result__eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--gold);
}
.gate__title, .result__title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.45;
}
.gate__preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 auto 20px;
  max-width: 280px;
}
.gate__preview span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--muted);
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 12px;
  filter: blur(.5px);
}
.gate__note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.btn__icon { font-size: 13px; }

/* ---------- 더미 광고 오버레이 ---------- */
.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 8, 18, .82);
  backdrop-filter: blur(4px);
  animation: fade-in .2s ease-out;
}
.ad-overlay.is-closing { opacity: 0; transition: opacity .25s; }
@keyframes fade-in { from { opacity: 0; } }
.ad-overlay__box {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 36px 24px 24px;
  text-align: center;
  color: #fff;
  background: #1e1b29;
  border-radius: var(--radius-lg);
}
.ad-overlay__badge {
  position: absolute;
  top: 14px; left: 14px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #1e1b29;
  background: #f5c84c;
  border-radius: 6px;
}
.ad-overlay__spinner {
  width: 44px; height: 44px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.ad-overlay__title { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.ad-overlay__desc { margin: 0 0 18px; font-size: 14px; color: rgba(255,255,255,.75); }
.ad-overlay__bar { height: 6px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; }
.ad-overlay__bar span { display: block; width: 0; height: 100%; background: #9b6bff; }
.ad-overlay__note { margin: 14px 0 0; font-size: 11.5px; color: rgba(255,255,255,.45); }

/* ---------- 결과: 명식 ---------- */
.result { margin-top: 20px; }
.result .card { text-align: center; }
.result__meta { margin: -8px 0 20px; font-size: 13.5px; color: var(--ink-soft); }
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.pillar { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pillar__label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pillar--me .pillar__label { color: var(--accent); }
.pillar__char {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pillar--me .pillar__char { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pillar__hanja { font-family: var(--font-serif); font-size: clamp(26px, 8vw, 34px); line-height: 1.1; }
.pillar__ko { margin-top: 2px; font-size: 11.5px; color: var(--ink-soft); }
.pillar__char--empty { font-size: 24px; color: var(--muted); border-style: dashed; }
.pillar__ss { font-size: 11.5px; color: var(--muted); min-height: 1em; }

/* ---------- 결과: 기본 운세 ---------- */
.result .fortune { text-align: left; }
.fortune p { margin: 0 0 10px; font-size: 15px; color: var(--ink-soft); }
.fortune strong { color: var(--ink); margin-right: 4px; }
.fortune__h {
  margin: 22px 0 8px;
  padding-top: 18px;
  font-size: 16px;
  border-top: 1px solid var(--line);
}
.fortune .result__eyebrow + .fortune__h { margin-top: 4px; padding-top: 0; border-top: 0; }
.fortune__lead { font-family: var(--font-serif); font-size: 17px !important; color: var(--ink) !important; }

.el-bars { display: grid; gap: 8px; margin: 4px 0 14px; }
.el-bar { display: grid; grid-template-columns: 24px 1fr 20px; align-items: center; gap: 10px; }
.el-bar__name { font-family: var(--font-serif); font-size: 17px; font-weight: 700; }
.el-bar__track { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.el-bar__fill { display: block; height: 100%; border-radius: 999px; }
.el-bar__num { font-size: 14px; font-weight: 700; text-align: right; }

/* =========================================
   3단계: 만세력 상세 · 상세 풀이 잠금
   ========================================= */
.result > .card + .card, .result > .sec-nav + .card { margin-top: 14px; }
.summary { text-align: center; }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
.desc { margin: 0 0 10px; font-size: 15px; color: var(--ink-soft); }
.desc strong { color: var(--ink); margin-right: 4px; }
.lead { margin: 0 0 6px; font-family: var(--font-serif); font-size: 17px; }
.sec__title { margin: 0 0 16px; font-family: var(--font-serif); font-size: 19px; }
.sub-h { margin: 20px 0 10px; font-size: 15px; }
.sub-h small { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 4px; }
.sec .result__eyebrow + .sec__title + .sub-h { margin-top: 0; }
.sec { scroll-margin-top: 64px; }

/* 바로가기 탭 */
.sec-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 6px;
  margin: 14px -16px 0;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.sec-nav::-webkit-scrollbar { display: none; }
.sec-nav a {
  flex: 0 0 auto;
  padding: 7px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.sec-nav a:hover { color: var(--accent); border-color: var(--accent); }

/* 글자 타일 */
.tile {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
}
.tile--wood  { background: var(--el-wood); }
.tile--fire  { background: var(--el-fire); }
.tile--earth { background: var(--el-earth); }
.tile--metal { background: var(--el-metal); }
.tile--water { background: var(--el-water); }
.tile__hanja { font-family: var(--font-serif); font-size: clamp(24px, 7.5vw, 32px); line-height: 1.1; }
.tile__ko { font-size: 11px; opacity: .9; }
.tile--sm { border-radius: 9px; }
.tile--sm .tile__hanja { font-size: 20px; }
.tile--sm .tile__ko { font-size: 10px; }

/* 사주원국 표 */
.wg {
  display: grid;
  grid-template-columns: 44px repeat(4, minmax(0, 1fr));
  gap: 6px 6px;
  align-items: center;
}
.wg__label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: left; }
.wg__head { text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.wg__head.is-me { color: var(--accent); }
.wg__cell { display: flex; justify-content: center; text-align: center; min-width: 0; }
.wg__cell--top { align-self: start; }
.wg .is-me .tile { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.god { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.hidden-gan { font-size: 13px; letter-spacing: .02em; }
.hidden-gan b { font-weight: 700; }
.badges { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
}
.badge--good { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* 막대 그래프 */
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "n t v" ". s s"; align-items: center; column-gap: 10px; row-gap: 3px; }
.bar__name { grid-area: n; font-size: 14px; font-weight: 700; }
.bar__track { grid-area: t; height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: 999px; min-width: 2px; }
.bar__num { grid-area: v; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.bar__tag { grid-area: s; font-size: 11.5px; color: var(--muted); }
.bar__tag.is-low { color: var(--el-water); }
.bar__tag.is-high { color: var(--el-fire); }
.bar__sub { grid-area: s; font-size: 11.5px; color: var(--muted); }
.bar:has(.bar__tag) .bar__sub { display: none; }

/* 신강신약 */
.gauge { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.gauge__seg {
  padding: 8px 0;
  font-size: 10.5px;
  text-align: center;
  color: var(--muted);
  background: var(--bg);
  border-radius: 6px;
  word-break: keep-all;
}
.gauge__seg.is-on.is-weak { background: var(--el-water); color: #fff; font-weight: 700; }
.gauge__seg.is-on.is-strong { background: var(--el-fire); color: #fff; font-weight: 700; }
.strength__label { margin: 14px 0 10px; text-align: center; font-size: 15px; }
.strength__label small { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 16px; }
.chip { padding: 5px 10px; font-size: 12.5px; color: var(--muted); background: var(--bg); border-radius: 999px; }
.chip.is-on { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.yongs { display: grid; grid-template-columns: repeat(3, 72px); justify-content: center; gap: 14px; margin-bottom: 12px; }
.yong { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.yong__role { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }

/* 사주관계 */
.rel-list, .ss-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rel { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.rel__type { flex: 0 0 auto; min-width: 40px; padding: 3px 8px; font-size: 12.5px; font-weight: 700; text-align: center; border-radius: 8px; }
.rel__type.is-good { color: var(--el-wood); background: color-mix(in srgb, var(--el-wood) 14%, transparent); }
.rel__type.is-bad { color: var(--el-fire); background: color-mix(in srgb, var(--el-fire) 14%, transparent); }
.rel__chars { font-family: var(--font-serif); font-size: 16px; font-weight: 700; }
.rel__pos { margin-left: auto; font-size: 12.5px; color: var(--muted); text-align: right; }
.glossary { margin: 16px 0 0; padding: 12px 14px; font-size: 13px; background: var(--bg); border-radius: 12px; }
.glossary dt { font-weight: 700; margin-top: 6px; }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 2px 0 0; color: var(--ink-soft); }

/* 신살 */
.ss { padding: 12px 14px; background: var(--bg); border-radius: 12px; }
.ss .badge { font-size: 12.5px; padding: 3px 8px; }
.ss__where { margin-left: 8px; font-size: 12px; color: var(--muted); }
.ss p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-soft); }

/* 대운 · 세운 · 월운 */
.luck-head { display: flex; justify-content: center; gap: 8px; margin-bottom: 4px; }
.luck-head__num, .luck-head__dir { padding: 6px 14px; font-size: 14px; border-radius: 999px; background: var(--bg); }
.luck-head__num strong { color: var(--accent); font-size: 16px; }
.luck-head__dir { font-weight: 700; color: var(--el-wood); }
.luck-head__dir.is-rev { color: var(--el-fire); }
.luck-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.luck {
  flex: 0 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 5px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  scroll-snap-align: center;
}
.luck[data-d], .luck[data-y] { cursor: pointer; }
.luck:not([data-d]):not([data-y]) { cursor: default; }
.luck.is-current { border: 1px dashed var(--accent); }
.luck.is-active { background: var(--accent-soft); border: 1px solid var(--accent); }
.luck__top { font-size: 12.5px; font-weight: 700; }
.luck__god { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; }
.luck__stage { font-size: 10.5px; color: var(--muted); }

/* 상세 풀이 – 잠금 */
.premium { overflow: hidden; }
.pm-list { display: grid; gap: 12px; }
.pm-card { padding: 16px; background: var(--bg); border-radius: 14px; }
.pm-card__title { margin: 0 0 6px; font-size: 17px; }
.pm__h { margin: 14px 0 6px; font-size: 14.5px; color: var(--ink); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.kv dt { font-weight: 700; color: var(--ink); white-space: nowrap; }
.kv dd { margin: 0; color: var(--ink-soft); }
.pass {
  margin-bottom: 12px;
  padding: 10px 14px;
  font-size: 14px;
  text-align: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
}

.locked { position: relative; min-height: 420px; }
.locked__content {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
  max-height: 560px;
  overflow: hidden;
}
.locked__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 8px;
  text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 30%, transparent), color-mix(in srgb, var(--surface) 75%, transparent));
}
.locked__icon {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  margin-bottom: 6px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent);
}
.locked__title { margin: 0; font-family: var(--font-serif); font-size: 19px; font-weight: 700; }
.locked__desc { margin: 0 0 16px; font-size: 14px; color: var(--ink-soft); }
.btn--pay {
  height: auto;
  min-height: 72px;
  padding: 14px 20px;
  font-size: 18px;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(135deg, #8a4dff, #e0533d);
  box-shadow: 0 10px 28px color-mix(in srgb, #8a4dff 40%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
.btn--pay:hover { filter: brightness(1.06); }
@keyframes pulse { 50% { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .btn--pay { animation: none; } }

/* =========================================
   전문성 보완: 일주 · 운 길흉 · 안내
   ========================================= */
.chips--left { justify-content: flex-start; margin-top: 4px; }
.warn-list { margin: 12px 0 0; padding: 10px 14px 10px 30px; font-size: 12.5px; text-align: left; color: var(--ink-soft); background: var(--accent-soft); border-radius: 12px; }
.warn-list li + li { margin-top: 4px; }
.luck { position: relative; }
.luck__fav { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.luck--good .luck__fav { color: #fff; background: var(--el-wood); }
.luck--bad .luck__fav { color: #fff; background: var(--el-fire); }
.luck-desc { margin-top: 8px; padding: 12px 14px; font-size: 13.5px; background: var(--bg); border-radius: 12px; }
.yongs { grid-template-columns: repeat(auto-fit, 72px); }


/* =========================================
   분석 관점 전환 (ENFJ · ISTJ)
   ========================================= */
.persona { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.persona__btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px; font: inherit; text-align: center; cursor: pointer;
  color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s, background .15s;
}
.persona__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.persona__btn.is-on { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.persona__name { font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.persona__btn--enfj .persona__name::before { content: "☀︎ "; }
.persona__btn--istj .persona__name::before { content: "☾ "; }
.persona__tag { font-size: 11.5px; color: var(--muted); }
.hero .persona { max-width: 420px; margin: 18px auto 0; }
.persona-comment { margin-top: 14px; padding: 14px 16px; text-align: left; background: var(--bg); border-radius: 14px; }
.persona-comment__who { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.persona-comment__text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.compare { margin: 6px 0 10px; padding: 10px 12px; font-size: 13px; color: var(--ink-soft); background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; }

/* =========================================
   캐릭터 · 용어 풀이 · 오늘의 점수 · 화면 전환
   ========================================= */
/* 아바타 */
.avatar { display: inline-block; flex: 0 0 auto; border-radius: 50%; overflow: hidden; line-height: 0; }
.avatar svg { width: 100%; height: 100%; display: block; }

/* 관점 버튼 (캐릭터) */
.persona__btn { gap: 4px; padding: 14px 8px 12px; }
.persona__btn .avatar { margin-bottom: 4px; box-shadow: 0 0 0 3px var(--surface); transition: transform .15s; }
.persona__btn.is-on .avatar { transform: scale(1.06); box-shadow: 0 0 0 3px var(--accent); }
.persona__btn--enfj .persona__name::before, .persona__btn--istj .persona__name::before { content: none; }
.persona__name { font-size: 15px; }
.persona__role { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }

/* 한마디 카드 */
.persona-comment { display: flex; gap: 12px; align-items: flex-start; }
.persona-comment__who span { margin-left: 4px; font-size: 11px; font-weight: 500; color: var(--muted); }

/* 말풍선 */
.bubble { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; }
.bubble p {
  position: relative; margin: 0; padding: 9px 12px; font-size: 13px; line-height: 1.55;
  color: var(--ink-soft); background: var(--bg); border-radius: 4px 14px 14px 14px;
}
.bubble p b { display: block; margin-bottom: 2px; font-size: 11.5px; color: var(--accent); }
.gate #gate-bubble .bubble { text-align: left; margin: -4px 0 18px; }

/* 용어 버튼 */
.term {
  padding: 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px;
}
.term:hover { color: var(--accent); text-decoration-color: var(--accent); }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.term.badge, .term.chip, .term.rel__type, .term.luck-head__dir { text-decoration: none; }
.term.badge { padding: 2px 6px; font-size: 11px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); border-radius: 6px; }
.term.badge--good { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.term.chip { padding: 5px 10px; font-size: 12.5px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.term.chip.is-on { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.term.rel__type { padding: 3px 8px; font-size: 12.5px; font-weight: 700; border-radius: 8px; }
.term.luck-head__dir { padding: 6px 14px; font-size: 14px; border-radius: 999px; background: var(--bg); }
.wg__label .term { font-size: 11.5px; font-weight: 700; color: var(--muted); }

/* 용어 설명 시트 */
.sheet { position: fixed; inset: 0; z-index: 300; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(10, 8, 18, .5); animation: fade-in .15s ease-out; }
.sheet__panel {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 520px; max-height: 80vh; overflow-y: auto;
  padding: 26px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); color: var(--ink); border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); animation: sheet-up .2s ease-out;
}
@keyframes sheet-up { from { transform: translate(-50%, 30px); opacity: .6; } }
.sheet__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; font-size: 16px; color: var(--muted); background: var(--bg); border: 0; border-radius: 50%; cursor: pointer; }
.sheet__title { margin: 0 0 10px; font-family: var(--font-serif); font-size: 21px; }
.sheet__desc { margin: 0 0 16px; font-size: 15px; line-height: 1.7; color: var(--ink-soft); }
.sheet__remark .bubble { margin: 0; }
body.is-sheet-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .sheet__panel, .sheet__backdrop { animation: none; } }

/* 오늘의 사주 점수 */
.today { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.today__ring {
  --c: var(--accent);
  position: relative; flex: 0 0 auto; width: 112px; height: 112px; border-radius: 50%;
  display: flex; align-items: baseline; justify-content: center; padding-top: 34px;
  background: conic-gradient(var(--c) var(--deg), var(--bg) 0);
}
.today__ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.today__ring--good { --c: var(--el-wood); }
.today__ring--mid { --c: var(--el-earth); }
.today__ring--bad { --c: var(--el-fire); }
.today__score { position: relative; font-family: var(--font-serif); font-size: 34px; font-weight: 700; line-height: 1; }
.today__unit { position: relative; margin-left: 2px; font-size: 13px; color: var(--muted); }
.today__info { min-width: 0; }
.today__info p { margin: 0; }
.today__grade { font-size: 20px; font-weight: 700; }
.today__grade--good { color: var(--el-wood); }
.today__grade--mid { color: var(--el-earth); }
.today__grade--bad { color: var(--el-fire); }
.today__date { margin-top: 2px !important; font-size: 12.5px; color: var(--muted); }
.today__key { margin-top: 8px !important; font-size: 14px; color: var(--ink-soft); }
.today__lucky { margin-top: 6px !important; font-size: 12.5px; color: var(--muted); }
.today__lucky b { color: var(--ink); font-weight: 600; }

/* 결과 화면 상단 바 */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; gap: 10px; margin: -40px -16px 8px; padding: 12px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
}
.topbar__back { padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.topbar__title { font-family: var(--font-serif); font-size: 15px; color: var(--ink-soft); }
#view-result .sec-nav { top: 56px; }
#view-result .gate { margin-top: 8px; }
#view-result .result { margin-top: 8px; }
#view-result .sec { scroll-margin-top: 118px; }
.persona__tag, .persona__name { word-break: keep-all; }
.hero-intro { max-width: 420px; margin: 12px auto 0; text-align: left; }
.hero-intro .bubble { margin: 0; }
.hero-intro .bubble p { background: var(--surface); border: 1px solid var(--line); }
.hero__desc, .bubble p, .desc { word-break: keep-all; }

/* =========================================
   비교 분석 반영: 격국 · 설정 · 궁합 · 공유 · 재방문
   ========================================= */
.btn--sm { height: 46px; font-size: 15px; }
.btn--ghost { height: 42px; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); }
.summary__actions { display: flex; justify-content: center; margin-top: 14px; }
.summary__actions .btn { width: auto; padding: 0 18px; }

.gyeok { margin: 14px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.gyeok small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

.settings { margin-top: 12px; text-align: left; font-size: 14px; }
.settings summary { cursor: pointer; padding: 10px 12px; color: var(--ink-soft); background: var(--bg); border-radius: 12px; list-style: none; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary small { margin-left: 6px; font-size: 12px; color: var(--muted); }
.settings[open] summary { margin-bottom: 10px; }
.settings__row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; margin-bottom: 8px; }
.settings__row span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.settings__row .input { height: 42px; font-size: 14px; }

.compat-form { display: grid; gap: 8px; }
.compat-form .row + .row { margin-top: 0; }
.compat-form .input { height: 44px; font-size: 14px; padding: 0 10px; }
.compat-form select.input { padding-right: 26px; background-position: right 8px center; }
#compat-result:not(:empty) { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.compat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.compat-list li { padding: 10px 12px; background: var(--bg); border-radius: 12px; border-left: 3px solid var(--el-wood); }
.compat-list li.is-bad { border-left-color: var(--el-fire); }
.compat-list b { font-size: 14px; }
.compat-list .pts { float: right; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.compat-list p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-soft); word-break: keep-all; }

.welcome { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; text-align: center; }
.welcome__text { margin: 0; font-size: 14.5px; color: var(--ink-soft); word-break: keep-all; }
.welcome__text strong { color: var(--ink); }
#sec-compat .compat-list, #sec-compat .bubble, .settings { text-align: left; }

/* 명식 보관함 · 삼재 */
.vault { margin-bottom: 16px; padding: 18px 16px; }
.vault__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.vault__title { margin: 0; font-size: 16px; }
.vault__new { padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 999px; cursor: pointer; }
.vault__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.vault__item { display: flex; align-items: stretch; gap: 6px; }
.vault__load { flex: 1; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "rel name" "rel date"; column-gap: 10px; align-items: center; padding: 9px 12px; font: inherit; text-align: left; color: var(--ink); background: var(--bg); border: 1px solid transparent; border-radius: 12px; cursor: pointer; }
.vault__item.is-on .vault__load { border-color: var(--accent); }
.vault__rel { grid-area: rel; padding: 3px 8px; font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 8px; }
.vault__load strong { grid-area: name; font-size: 14.5px; }
.vault__load small { grid-area: date; font-size: 12px; color: var(--muted); }
.vault__del { width: 40px; font-size: 13px; color: var(--muted); background: var(--bg); border: 0; border-radius: 12px; cursor: pointer; }
.vault__del:hover { color: var(--el-fire); }
.chip.is-warn { color: #fff; background: var(--el-fire); font-weight: 700; }
.locked__note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* =====================================================================
   DESIGN REFRESH v2 — 타이포 스케일 · 정렬 · 위계 정리
   - 본문/UI: Pretendard (한글 UI 가독성), 제목: 고운바탕, 한자: Noto Serif KR
   - 읽는 글은 왼쪽 정렬, 숫자·요약만 가운데 정렬
   - 8px 간격 체계, 카드 머리말 통일, 말풍선은 보조 정보로 한 단계 낮춤
   ===================================================================== */
:root {
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-display: "Gowun Batang", "Noto Serif KR", serif;
  --font-hanja: "Noto Serif KR", "Gowun Batang", serif;
  --font-serif: var(--font-display);

  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13.5px;
  --fs-base: 15px;
  --fs-md: 16.5px;
  --fs-lg: 19px;
  --fs-xl: 23px;
  --fs-2xl: 28px;
  --lh-body: 1.72;
  --lh-tight: 1.3;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --radius: 12px;
  --radius-lg: 20px;
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); font-size: var(--fs-base); line-height: 1.55; letter-spacing: -0.01em; font-feature-settings: "tnum" 0; }
h1, h2, h3, h4 { letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
.container { max-width: 520px; padding: var(--sp-8) var(--sp-4) 72px; }

/* ---------- 첫 화면 ---------- */
.hero { margin-bottom: var(--sp-5); }
.hero__eyebrow { font-family: var(--font-hanja); font-size: var(--fs-xs); letter-spacing: .5em; margin-bottom: var(--sp-2); }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 7vw, 30px); line-height: 1.35; margin-bottom: var(--sp-2); }
.hero__desc { font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-soft); }

/* 사주가 선택: 가로형 카드 (아바타 + 이름/역할/소개) */
.persona { gap: var(--sp-2); }
.persona__btn {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto;
  column-gap: 10px; row-gap: 1px; align-items: center; justify-items: start;
  padding: 12px; text-align: left; border-radius: 16px;
}
.persona__btn .avatar { grid-row: 1 / span 3; width: 44px !important; height: 44px !important; margin: 0; }
.persona__name { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; color: var(--ink); line-height: 1.2; }
.persona__role { font-size: var(--fs-2xs); letter-spacing: .04em; }
.persona__tag { font-size: var(--fs-2xs); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.persona__btn.is-on { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.persona__btn.is-on .avatar { transform: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }

/* 소개 말풍선: 2줄 미리보기 → 누르면 펼침 */
.hero-intro { display: block; width: 100%; max-width: 520px; margin: var(--sp-3) auto 0; padding: 0; font: inherit; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.hero-intro:not(.is-open) .bubble p { max-height: calc(16px + 1.55em + 3.2em); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.hero-intro__more { display: block; margin: 4px 0 0 46px; font-size: var(--fs-xs); font-weight: 600; color: var(--accent); }
.hero-intro.is-open .hero-intro__more { display: none; }

/* ---------- 카드 · 섹션 머리말 ---------- */
.card { padding: var(--sp-6) var(--sp-5); border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(31,27,46,.06); }
:root[data-theme="dark"] .card { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.35); }
.result .card { text-align: left; }
.result__eyebrow, .gate__eyebrow { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: var(--sp-1); }
.sec__title, .result__title, .gate__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); line-height: var(--lh-tight); margin: 0 0 var(--sp-4); }
.sec .result__eyebrow + .sec__title { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line); }
.sub-h { font-size: var(--fs-md); font-weight: 700; margin: var(--sp-6) 0 var(--sp-3); }
.sub-h small { font-size: var(--fs-xs); }
.desc, .fortune p { font-size: var(--fs-base); line-height: var(--lh-body); color: var(--ink-soft); }
.lead { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.45; color: var(--ink); margin-bottom: var(--sp-2); }
.field__hint { font-size: var(--fs-xs); line-height: 1.6; }
.small { font-size: var(--fs-sm); }

/* 말풍선: 본문보다 한 단계 낮은 보조 정보 */
.bubble { gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.bubble .avatar { width: 30px !important; height: 30px !important; }
.bubble p { padding: 8px 12px; font-size: var(--fs-sm); line-height: 1.6; border-radius: 4px 14px 14px 14px; }
.bubble p b { font-size: var(--fs-2xs); letter-spacing: .02em; }

/* ---------- 결과 요약 ---------- */
.summary { text-align: center; }
.summary .result__title { margin-bottom: var(--sp-3); }
.summary__chips { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; margin-bottom: var(--sp-4); }
.summary__chips span { padding: 4px 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft); background: var(--bg); border-radius: 999px; }
.mini-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 64px)); justify-content: center; gap: 8px; margin: 0 auto var(--sp-3); }
.mini-pillars__col { display: grid; gap: 4px; justify-items: center; }
.mini-pillars__label { font-size: var(--fs-2xs); font-weight: 700; color: var(--muted); }
.mini-pillars__col.is-me .mini-pillars__label { color: var(--accent); }
.mini-pillars__col.is-me .tile { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
.tile--empty { display: grid; place-items: center; color: var(--muted); background: var(--bg); border: 1px dashed var(--line); }
.result__meta { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); margin: 0 0 var(--sp-2); }
.summary .persona { margin-top: var(--sp-4); }
.persona-comment { margin-top: var(--sp-3); padding: var(--sp-4); text-align: left; border-radius: 16px; }
.persona-comment .avatar { width: 48px !important; height: 48px !important; }
.persona-comment__text { font-size: var(--fs-base); line-height: var(--lh-body); }
.summary__tools { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-4); }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; list-style: none;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.summary__tools .settings { margin: 0; }
.summary__tools .settings summary { padding: 0 16px; background: var(--surface); border-radius: 999px; }
.summary__tools .settings[open] { flex-basis: 100%; padding: var(--sp-3); background: var(--bg); border-radius: 16px; }
.summary__tools .settings[open] summary { margin: 0 auto var(--sp-3); width: max-content; }
.settings__lead { margin: 0 0 var(--sp-3); font-size: var(--fs-xs); color: var(--muted); text-align: center; }

/* 섹션 바로가기 */
.sec-nav { gap: 6px; padding: 10px var(--sp-4); }
.sec-nav a { padding: 6px 12px; font-size: var(--fs-sm); font-weight: 600; }

/* ---------- 폼 ---------- */
.field { margin-bottom: var(--sp-5); }
.field__label { font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--sp-2); }
.input { height: 50px; border-radius: 12px; }
.btn { height: 54px; border-radius: 14px; font-size: var(--fs-md); letter-spacing: -0.01em; }
.btn--primary { box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
.privacy { font-size: var(--fs-xs); }

/* ---------- 원국표 ---------- */
.tile__hanja { font-family: var(--font-hanja); }
.wg { gap: 6px 5px; }
.wg__head { font-size: var(--fs-sm); }
.god { font-size: var(--fs-xs); }
.hidden-gan { font-size: var(--fs-xs); }

/* ---------- 수치 ---------- */
.today__score, .bar__num, .luck__top, .el-bar__num, .compat-list .pts { font-variant-numeric: tabular-nums; }
.today__score { font-family: var(--font-sans); font-weight: 800; letter-spacing: -0.03em; }
.today__grade { font-family: var(--font-display); }
.gyeok { font-size: var(--fs-base); }
.gyeok small { font-size: var(--fs-xs); line-height: 1.55; }

/* ---------- 목록류 ---------- */
.rel, .ss, .compat-list li, .pm-card { border-radius: 14px; }
.ss p, .compat-list p { font-size: var(--fs-sm); line-height: 1.65; }
.pm__h { font-size: var(--fs-base); margin: var(--sp-5) 0 var(--sp-2); }
.pm-card__title { font-family: var(--font-display); font-size: var(--fs-lg); }
.glossary { font-size: var(--fs-sm); line-height: 1.6; }

/* 결과 화면 상단바 */
.topbar { margin-top: calc(-1 * var(--sp-8)); }
.topbar__title { font-family: var(--font-display); }

/* 넓은 화면: 여백만 키우고 읽기 폭은 유지 */
@media (min-width: 720px) {
  .container { padding-top: 56px; }
  .hero__title { font-size: 34px; }
}

/* v2 마감 보정 */
body { word-break: keep-all; overflow-wrap: break-word; }
.summary .persona__tag { display: none; }
.summary .persona__btn { padding-block: 10px; }

/* =========================================================
   PREMIUM v3 — 결제 전 오퍼 · 결제 후 탭/요약/아코디언 · 부적
   ========================================================= */
.premium .sec__title { font-size: var(--fs-lg); }

/* ---------- 결제 전: 오퍼 ---------- */
.offer { display: grid; gap: var(--sp-4); }
.offer__head { padding: var(--sp-5) var(--sp-4); border-radius: 16px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #ff8a5c 0%, #e8476b 45%, #7a3cff 100%); }
:root[data-theme="dark"] .offer__head { background: radial-gradient(120% 140% at 0% 0%, #6b3fd6 0%, #3b2580 55%, #1c1636 100%); }
.offer__eyebrow { margin: 0 0 6px; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .12em; opacity: .85; }
.offer__title { margin: 0; font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.3; }
.offer__expired { margin: 10px 0 0; padding: 6px 10px; font-size: var(--fs-xs); background: rgba(255,255,255,.18); border-radius: 8px; }
.offer .bubble { margin: 0; }
.offer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.offer-item { padding: 14px 14px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.offer-item__top { display: flex; align-items: center; gap: 8px; }
.offer-item__icon { font-size: 20px; line-height: 1; }
.offer-item__title { font-weight: 700; font-size: var(--fs-md); }
.offer-item__badge { padding: 2px 8px; font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; }
.offer-item__score { margin-left: auto; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--muted); filter: blur(3.5px); user-select: none; }
.offer-item__score small { font-size: 12px; }
.offer-item__hook { margin: 8px 0 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); line-height: 1.55; }
.offer-item__locked { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.offer-item__locked li { position: relative; padding-left: 20px; font-size: var(--fs-xs); color: var(--ink-soft); }
.offer-item__locked li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 11px; height: 9px; border-radius: 2px; background: var(--muted); }
.offer-item__locked li::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 5px; border: 1.6px solid var(--muted); border-bottom: 0; border-radius: 4px 4px 0 0; }
.offer__cta { position: relative; padding: var(--sp-5) var(--sp-4) var(--sp-4); text-align: center; border: 2px solid var(--accent); border-radius: 18px; background: var(--surface); }
.offer__price { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 10px; }
.offer__won { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.offer__won small { font-size: 18px; margin-left: 2px; }
.offer__per { font-size: var(--fs-xs); color: var(--muted); }
.offer__perks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; text-align: left; justify-content: center; }
.offer__perks li { position: relative; padding-left: 22px; font-size: var(--fs-sm); color: var(--ink); }
.offer__perks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 16px; height: 16px; font-size: 11px; line-height: 16px; text-align: center; color: #fff; background: var(--accent); border-radius: 50%; }
.offer__cta .btn--pay { min-height: 60px; font-size: var(--fs-md); }

/* ---------- 결제 후: 한눈에 보기 ---------- */
.pm-overview { margin-bottom: var(--sp-4); padding: var(--sp-4); background: var(--bg); border-radius: 16px; }
.pm-overview__label { margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.pm-overview__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pm-score { display: grid; gap: 4px; padding: 10px 12px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pm-score__name { font-size: var(--fs-xs); color: var(--ink-soft); }
.pm-score__num { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pm-score__num small { font-size: 12px; margin-left: 1px; color: var(--muted); }
.pm-score__bar { height: 5px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.pm-score__bar i { display: block; height: 100%; border-radius: 99px; }
.tone-good { background: var(--el-wood); } .tone-mid { background: var(--el-earth); } .tone-bad { background: var(--el-fire); }

/* ---------- 탭 ---------- */
.pm-tabs { display: flex; gap: 6px; margin: 0 calc(var(--sp-5) * -1) var(--sp-4); padding: 10px var(--sp-5); overflow-x: auto; scrollbar-width: none; background: var(--surface); border-bottom: 1px solid var(--line); }
.pm-tabs::-webkit-scrollbar { display: none; }
.pm-tab { flex: 0 0 auto; padding: 8px 14px; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); background: var(--bg); border: 1px solid transparent; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.pm-tab[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); }

/* ---------- 패널 ---------- */
.pm-panel { display: grid; gap: var(--sp-3); animation: pmIn .25s ease; }
.pm-panel[hidden] { display: none; }
@keyframes pmIn { from { opacity: 0; transform: translateY(6px); } }
.pm-hero { display: flex; align-items: center; gap: 14px; }
.pm-hero__score { flex: 0 0 76px; height: 76px; display: flex; align-items: baseline; justify-content: center; padding-top: 18px; border-radius: 50%; color: #fff; background: var(--el-earth); }
.pm-hero__score b { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.pm-hero__score span { font-size: 12px; margin-left: 1px; opacity: .85; }
.pm-hero__score--good { background: var(--el-wood); } .pm-hero__score--bad { background: var(--el-fire); }
.pm-hero__score--icon { align-items: center; padding: 0; font-size: 34px; background: var(--accent-soft); }
.pm-hero__cat { margin: 0 0 2px; font-size: var(--fs-xs); font-weight: 700; color: var(--accent); }
.pm-hero__headline { margin: 0; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; line-height: 1.4; }
.pm-keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-keywords span { padding: 4px 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; }
.pm-summary { padding: 14px 16px; background: var(--bg); border-left: 3px solid var(--accent); border-radius: 4px 14px 14px 4px; }
.pm-summary__label { margin: 0 0 6px; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.pm-summary ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.pm-summary li { font-size: var(--fs-sm); line-height: 1.6; color: var(--ink); }
.pm-more { margin: 6px 0 0; font-size: var(--fs-sm); font-weight: 700; }
.pm-more span { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.pm-accs { display: grid; gap: 8px; }
.pm-acc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.pm-acc.is-current { border-color: var(--accent); }
.pm-acc summary { display: flex; align-items: center; gap: 8px; padding: 13px 14px; list-style: none; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; }
.pm-acc summary::-webkit-details-marker { display: none; }
.pm-acc summary::after { content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.pm-acc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.pm-acc__h { min-width: 0; }
.pm-acc__now { padding: 1px 7px; font-size: 10.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; }
.pm-acc__body { padding: 0 14px 14px; }
.pm-acc__body .desc { margin: 0; }
.fav { flex: 0 0 auto; padding: 1px 7px; font-size: 10.5px; font-weight: 700; border-radius: 999px; color: #fff; background: var(--el-earth); }
.fav--good { background: var(--el-wood); } .fav--bad { background: var(--el-fire); }
.pm-closing .bubble { margin: 4px 0 0; }

/* 월별 막대 */
.m-strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 92px; padding: 8px 8px 0; background: var(--bg); border-radius: 12px; }
.m-strip__cell { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.m-strip__cell i { display: block; border-radius: 4px 4px 0 0; background: var(--el-earth); }
.m-strip__cell--good i { background: var(--el-wood); } .m-strip__cell--bad i { background: var(--el-fire); }
.m-strip__cell b { display: block; padding: 3px 0 4px; font-size: 10px; font-weight: 600; text-align: center; color: var(--muted); }
.m-strip__cell.is-now b { color: var(--accent); font-weight: 800; }
.m-strip__cell.is-now i { outline: 2px solid var(--accent); outline-offset: 1px; }

/* 궁합 (연애 탭 안) */
.pm-compat { padding: var(--sp-4); background: var(--bg); border-radius: 16px; }
.pm-compat__h { margin: 0 0 4px; font-family: var(--font-display); font-size: var(--fs-md); }
.pm-compat__lead { margin: 0 0 12px; font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.6; }
.pm-compat .input { background-color: var(--surface); }
.pm-compat #compat-result .compat-list li { background: var(--surface); }

/* ---------- 하단 고정 결제 바 ---------- */
.pay-bar { position: fixed; left: 50%; bottom: 12px; z-index: 40; display: flex; align-items: center; gap: 10px;
  width: min(496px, calc(100% - 24px)); padding: 10px 10px 10px 16px; transform: translateX(-50%);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 32px rgba(0,0,0,.18); animation: barIn .25s ease; }
.pay-bar[hidden] { display: none; }
@keyframes barIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.pay-bar__txt { display: grid; min-width: 0; line-height: 1.35; }
.pay-bar__txt b { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-bar__txt span { font-size: var(--fs-2xs); color: var(--muted); }
.pay-bar .pay-bar__btn { flex: 0 0 auto; width: auto; min-height: 46px; height: 46px; margin-left: auto; padding: 0 16px; font-size: var(--fs-sm); animation: none; }

/* ---------- 부적 배너 ---------- */
.talisman-cta { display: grid; grid-template-columns: 112px 1fr; gap: var(--sp-4); align-items: center; }
.talisman-cta__art { position: relative; display: grid; place-items: center; height: 168px; border-radius: 10px;
  background: linear-gradient(160deg, #f7dc8c, #e9c25f); border: 3px double #b3261e; box-shadow: 0 8px 20px rgba(179,38,30,.18); transform: rotate(-3deg); }
.talisman-cta__seal { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); padding: 2px 6px; font-family: var(--font-hanja); font-size: 12px; font-weight: 700; color: #fbe7a6; background: #b3261e; border-radius: 3px; white-space: nowrap; }
.talisman-cta__art svg { margin-top: 16px; }
.talisman-cta__txt .sec__title { margin-bottom: 6px; padding: 0; border: 0; }
.talisman-cta__txt .desc { margin: 0 0 12px; font-size: var(--fs-sm); }
.talisman-cta .btn { width: 100%; }

/* ---------- 부적 페이지 ---------- */
.tl { display: grid; gap: var(--sp-4); }
.tl__title { margin: 0; font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.3; }
.tl__lead { margin: -8px 0 0; font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.65; }
.tl__period label { font-size: var(--fs-sm); padding: 9px 0; }
.tl__frame { position: relative; width: min(100%, 320px); margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px rgba(120, 60, 10, .28); background: #f1cf72; }
.tl__frame img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-touch-callout: default; }
.tl__frame.is-sealed img { filter: blur(2px) saturate(.9); }
.tl__lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: rgba(60, 20, 10, .28); }
.tl__lock[hidden] { display: none; }
.tl__lock-seal { display: grid; place-items: center; width: 84px; height: 84px; font-family: var(--font-hanja); font-size: 44px; font-weight: 700; color: #fbe7a6; background: #b3261e; border-radius: 10px; transform: rotate(-6deg); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.tl__lock p { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); line-height: 1.5; }
.tl__frame.is-revealing img { animation: tlReveal 1.1s cubic-bezier(.2,.8,.2,1); }
@keyframes tlReveal { 0% { clip-path: inset(0 0 100% 0); filter: brightness(1.6); } 100% { clip-path: inset(0 0 0 0); filter: none; } }
.tl .bubble { margin: 0; }
.tl__actions { display: grid; gap: 8px; }
.tl__actions[hidden], .tl__meaning[hidden] { display: none; }
.tl__actions .btn--ghost { height: 50px; }
.tl__actions .field__hint { margin: 0; text-align: center; }
.tl__meaning { padding: var(--sp-4); background: var(--bg); border-radius: 14px; }
.tl__wish { margin: 0 0 6px; font-weight: 700; }
.tl__wish-h { font-family: var(--font-hanja); font-size: 22px; color: #b3261e; letter-spacing: .08em; margin-right: 6px; }
:root[data-theme="dark"] .tl__wish-h { color: #ff8a73; }
.tl__meaning .desc { margin: 0 0 10px; }
.tl__upsell { display: grid; gap: 10px; padding: var(--sp-4); border: 1px dashed var(--accent); border-radius: 14px; }
.tl__upsell p { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.6; }
.tl__upsell b { color: var(--ink); }
.tl__upsell .btn { height: 46px; }
@media (prefers-reduced-motion: reduce) { .pm-panel, .pay-bar, .tl__frame.is-revealing img { animation: none; } }
.premium.is-unlocked { overflow: visible; }

/* =========================================================
   CHARACTERS v2 — 크게 보여 주기 · 눈 깜빡임
   ========================================================= */
.avatar { background: transparent; }
.avatar .eye { transform-box: fill-box; transform-origin: center; animation: blink 5.2s infinite; }
.avatar--istj .eye { animation-duration: 6.8s; animation-delay: 1.3s; }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }
.bubble .avatar .eye { animation: none; }
.persona__btn .avatar { width: 58px !important; height: 58px !important; }
.persona__btn { grid-template-columns: 58px 1fr; }
.persona__btn.is-on .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent), 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.persona-comment .avatar { width: 64px !important; height: 64px !important; }
.gate #gate-bubble .avatar, .tl .bubble .avatar { width: 44px !important; height: 44px !important; }
@media (prefers-reduced-motion: reduce) { .avatar .eye { animation: none; } }
.summary .persona__btn { grid-template-columns: 46px 1fr; }
.summary .persona__btn .avatar { width: 46px !important; height: 46px !important; }
.persona__name, .persona__role { white-space: nowrap; }

/* =========================================================
   CHARACTERS v3 — 일러스트 이미지 (웹소설 표지풍)
   ========================================================= */
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar { background: var(--line); }
.persona--hero { grid-template-columns: 1fr 1fr; gap: 10px; max-width: none; }
.persona__card { position: relative; display: block; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: #1b1626; text-align: left; isolation: isolate; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.persona__card .persona__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .3s ease; z-index: -2; }
.persona__card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(10,6,20,.82) 100%); }
.persona__card:not(.is-on) .persona__art { filter: saturate(.55) brightness(.72); }
.persona__card:hover .persona__art { transform: scale(1.04); }
.persona__card.is-on { box-shadow: 0 0 0 3px var(--accent), 0 14px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.persona__txt { position: absolute; left: 12px; right: 10px; bottom: 11px; display: grid; gap: 1px; }
.persona__card .persona__name { color: #fff; font-size: var(--fs-lg); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.persona__card .persona__role { color: #ffd9a8; font-weight: 700; }
.persona__btn--istj.persona__card .persona__role { color: #cdb8ff; }
.persona__card .persona__tag { color: rgba(255,255,255,.82); white-space: normal; }
.persona__check { position: absolute; top: 10px; right: 10px; padding: 3px 9px; font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; opacity: 0; transform: translateY(-4px); transition: .2s; }
.persona__card.is-on .persona__check { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .persona__card .persona__art { transition: none; } }

/* =========================================================
   v14 — 전문 항목(한난조습·궁위·교운기) · 접기 · 스크롤 표시 · 캐릭터 프로필
   ========================================================= */
/* 접힌 섹션 */
.sec__body.is-folded { max-height: 420px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.fold-btn { display: block; width: 100%; margin-top: var(--sp-3); padding: 11px; font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 12px; cursor: pointer; }
/* 바로가기 현재 위치 */
.sec-nav a.is-active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* 한난조습 */
.climate { padding: var(--sp-4); background: var(--bg); border-radius: 14px; }
.climate__title { margin: 0 0 10px; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; }
.climate__row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-xs); color: var(--muted); }
.climate__row span:last-child { text-align: right; }
.climate__track { position: relative; height: 8px; border-radius: 99px; }
.climate__track--temp { background: linear-gradient(90deg, #4f7fd8, #d9d4c8 50%, #e8603f); }
.climate__track--hum { background: linear-gradient(90deg, #3b8fb0, #d9d4c8 50%, #c99a4a); }
.climate__track i { position: absolute; top: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); transform: translateY(-50%); }
.climate .desc { margin: 10px 0 0; }

/* 궁위 */
.palaces { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: grid; gap: 8px; }
.palace { padding: 12px 14px; background: var(--bg); border-radius: 14px; border-left: 3px solid var(--line); }
.palace.is-me { border-left-color: var(--accent); }
.palace--empty { opacity: .6; }
.palace__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.palace__head b { font-family: var(--font-display); font-size: var(--fs-md); }
.palace__head span { font-size: var(--fs-xs); color: var(--muted); }
.palace__gods { display: flex; gap: 6px; margin: 6px 0 4px; }
.palace__gods span { padding: 2px 8px; font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-soft); background: var(--surface); border-radius: 999px; }
.palace .desc { margin: 0; font-size: var(--fs-sm); }
.hit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hit { padding: 12px 14px; border-radius: 14px; background: var(--bg); border-left: 3px solid var(--el-earth); }
.hit--good { border-left-color: var(--el-wood); }
.hit--bad { border-left-color: var(--el-fire); }
.hit b { font-size: var(--fs-sm); margin-right: 6px; }
.hit span { font-size: var(--fs-xs); color: var(--muted); }
.hit p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.6; }
.note-box { margin: var(--sp-4) 0 0; padding: 12px 14px; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink); background: var(--accent-soft); border-radius: 12px; }

/* 캐릭터 프로필 */
.profile-link { display: inline-block; margin: 8px 0 0; padding: 6px 12px; font: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--accent); background: transparent; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 999px; cursor: pointer; }
.profile-link--sm { margin: 0 0 0 6px; padding: 1px 8px; font-size: 10.5px; vertical-align: 1px; }
.hero .profile-link { display: block; margin: 10px auto 0; }
.sheet--profile .sheet__panel { padding: 0 0 var(--sp-5); max-height: 88vh; overflow-y: auto; }
.profile__hero { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 20px 20px 0 0; }
.profile__hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.profile__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10,6,20,.85)); }
.profile__hero-txt { position: absolute; left: 18px; bottom: 14px; z-index: 1; color: #fff; }
.profile__title { margin: 0; font-size: var(--fs-xs); font-weight: 700; color: #ffd9a8; }
.profile--istj .profile__title { color: #cdb8ff; }
.profile__name { margin: 2px 0; font-family: var(--font-display); font-size: var(--fs-2xl); }
.profile__meta { margin: 0; font-size: var(--fs-xs); opacity: .85; }
.profile__quote { margin: var(--sp-4) var(--sp-5) 0; padding: 0 0 0 12px; font-family: var(--font-display); font-size: var(--fs-md); line-height: 1.6; border-left: 3px solid var(--accent); color: var(--ink); }
.profile__bio { margin: var(--sp-3) var(--sp-5) 0; font-size: var(--fs-sm); line-height: 1.75; color: var(--ink-soft); }
.profile__kv { margin: var(--sp-4) var(--sp-5) 0; font-size: var(--fs-sm); }
.profile__kv dd { line-height: 1.6; }
.profile__about { display: flex; gap: 10px; align-items: flex-start; margin: var(--sp-4) var(--sp-5) 0; padding: 12px; background: var(--bg); border-radius: 14px; }
.profile__about p { margin: 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-soft); }
.profile__about b { display: block; margin-bottom: 2px; font-size: var(--fs-xs); color: var(--accent); }
.sheet--profile .sheet__close { z-index: 2; color: #fff; background: rgba(0,0,0,.35); }
/* 작은 화면에서 첫 화면 카드 높이 줄이기 */
@media (max-width: 360px) { .persona__card { aspect-ratio: 4 / 5; } }

/* v15 — 첫 화면 사주가 카드 크게 (선택한 쪽이 더 넓어짐) */
.persona--hero { display: flex; gap: 8px; margin: var(--sp-4) -6px 0; }
.persona--hero .persona__card { flex: 1 1 0; min-width: 0; aspect-ratio: auto; height: min(92vw, 400px); border-radius: 20px; transition: flex-grow .35s ease, box-shadow .2s; }
.persona--hero .persona__card.is-on { flex-grow: 1.6; }
.persona--hero .persona__card .persona__art { object-position: center 18%; }
.persona--hero .persona__card:not(.is-on) .persona__tag { display: none; }
.persona--hero .persona__card .persona__name { font-size: var(--fs-xl); }
.persona--hero .persona__card:not(.is-on) .persona__name { font-size: var(--fs-md); }
@media (max-width: 360px) { .persona--hero .persona__card { height: 88vw; } }
@media (prefers-reduced-motion: reduce) { .persona--hero .persona__card { transition: none; } }

/* =========================================================
   v19 — 결제 전 고지 · 사업자 정보 푸터 · 약관 페이지
   ========================================================= */
.offer__spec { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; padding: 12px 14px; text-align: left; font-size: var(--fs-xs); background: var(--bg); border-radius: 12px; }
.offer__spec dt { font-weight: 700; color: var(--ink-soft); }
.offer__spec dd { margin: 0; color: var(--ink); }
.consent { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; text-align: left; font-size: var(--fs-xs); line-height: 1.55; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.consent a, .locked__note a { color: var(--accent); }
.consent.is-warn { border-color: var(--el-fire); background: color-mix(in srgb, var(--el-fire) 8%, transparent); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.pass__order { display: block; margin-top: 2px; font-size: var(--fs-2xs); opacity: .75; }

.site-footer { max-width: 520px; margin: 0 auto; padding: var(--sp-6) var(--sp-4) calc(var(--sp-8) + 64px); font-size: var(--fs-2xs); line-height: 1.7; color: var(--muted); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; }
.site-footer__nav a { color: var(--ink-soft); text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 6px; }
body:has(#view-talisman:not([hidden])) .site-footer { padding-bottom: var(--sp-8); }

.legal .topbar a { text-decoration: none; }
.legal__body h1 { margin: 0 0 4px; font-family: var(--font-display); font-size: var(--fs-xl); }
.legal__date { margin: 0 0 var(--sp-5); font-size: var(--fs-xs); color: var(--muted); }
.legal__body h2 { margin: var(--sp-5) 0 6px; font-size: var(--fs-md); }
.legal__body p, .legal__body li { font-size: var(--fs-sm); line-height: 1.75; color: var(--ink-soft); }
.legal__body ul, .legal__body ol { margin: 0; padding-left: 20px; }
.legal__body a { color: var(--accent); }
.legal__table { width: 100%; margin: 6px 0; border-collapse: collapse; font-size: var(--fs-xs); }
.legal__table th, .legal__table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
.legal__table th { color: var(--ink); }

/* 로딩 화면 (실제 광고 승인 전) */
.ad-overlay--loading { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ad-overlay--loading .ad-overlay__box { color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.ad-overlay__avatar { display: block; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); animation: avatarBob 1.6s ease-in-out infinite; }
@keyframes avatarBob { 50% { transform: translateY(-4px); } }
.ad-overlay--loading .ad-overlay__title { font-family: var(--font-display); font-size: var(--fs-md); line-height: 1.5; margin-bottom: 16px; }
.ad-overlay--loading .ad-overlay__bar { background: var(--bg); }
.ad-overlay--loading .ad-overlay__bar span { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .ad-overlay__avatar { animation: none; } }
