/* ─────────────────────────────────────────────────────────────
   복주머니 · 2027 신년사주 & 타로
   팔레트: 딥네이비 #141B2D · 한지 크림 #FAF7F0 · 금 #C9A45C
   ───────────────────────────────────────────────────────────── */

:root {
  --navy: #141B2D;
  --navy-2: #1C2540;
  --navy-3: #263254;
  --cream: #FAF7F0;
  --cream-2: #FFFDF8;
  --paper: #F2ECDF;
  --gold: #C9A45C;
  --gold-2: #E0C68E;
  --gold-dim: rgba(201, 164, 92, 0.28);
  --ink: #22201D;
  --ink-2: #3B3831;
  --muted: #6B655C;
  --muted-2: #8D867A;
  --line: #E6DECF;
  --line-soft: rgba(201, 164, 92, 0.22);
  --red: #B23A2E;
  --green: #4E7A55;
  --amber: #B07A2E;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.55);
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'Apple SD Gothic Neo', serif;
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
  --maxw: 720px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.large .app { zoom: 1.12; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(201, 164, 92, 0.13), transparent 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(201, 164, 92, 0.07), transparent 70%),
    var(--navy);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  padding: 10px 16px; border-radius: 8px; background: var(--gold); color: var(--navy);
  text-decoration: none; font-weight: 700;
}
.skip-link:focus { left: 12px; }

/* ── 레이아웃 ─────────────────────────────────────────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
  padding-left: max(18px, calc((100% - var(--maxw)) / 2));
  padding-right: max(18px, calc((100% - var(--maxw)) / 2));
  background: rgba(20, 27, 45, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(201, 164, 92, 0.16);
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { color: var(--gold); display: inline-flex; }
.brand-text {
  font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: 0.02em;
  color: var(--cream);
}
.topbar-tools { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  background: transparent; border: 1px solid rgba(201, 164, 92, 0.26);
  color: var(--cream); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.icon-btn:hover { background: rgba(201, 164, 92, 0.12); }
.icon-btn[aria-pressed="true"] { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; }
.icon-btn sup { font-size: 9px; }

main#view {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 18px 48px;
  outline: none;
}

.site-footer {
  border-top: 1px solid rgba(201, 164, 92, 0.16);
  padding: 26px 18px 40px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.7;
  background: rgba(0, 0, 0, 0.14);
}
.footer-brand { margin: 0 0 6px; color: var(--gold-2); font-family: var(--serif); font-size: 13px; letter-spacing: 0.04em; }
.footer-links { margin: 0 0 6px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.footer-note { margin: 4px auto 0; max-width: 560px; }
.footer-note.small { font-size: 11.5px; color: #7E7A73; }
.site-footer a { color: var(--muted-2); text-decoration: underline; text-underline-offset: 2px; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--muted-2); text-decoration: underline; text-underline-offset: 2px; font-size: 12.5px;
}
.link-btn:hover { color: var(--gold-2); }

.noscript { margin: 24px; padding: 16px; border: 1px solid var(--gold); border-radius: 12px; background: var(--cream); color: var(--ink); }

/* ── 공통 요소 ────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--gold); opacity: 0.7; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -0.01em; }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title { font-size: 20px; color: var(--cream); }
.section-title .num { color: var(--gold); font-family: var(--sans); font-size: 12px; letter-spacing: 0.1em; margin-right: 8px; vertical-align: 2px; }
.section-sub { color: var(--muted-2); font-size: 13px; margin: 6px 0 0; }

.card {
  background: linear-gradient(180deg, var(--cream-2), var(--cream));
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card h2, .card h3 { color: var(--ink); }

.card-dark {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--cream);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid transparent;
  padding: 14px 22px; font-size: 15.5px; font-weight: 600; font-family: var(--sans);
  cursor: pointer; text-decoration: none; text-align: center;
  transition: transform 0.15s ease, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn-primary { background: var(--gold); color: var(--navy); box-shadow: 0 10px 24px -12px rgba(201, 164, 92, 0.8); }
.btn-primary:hover { background: var(--gold-2); }
.btn-ghost { border-color: rgba(201, 164, 92, 0.42); color: var(--cream); background: transparent; }
.btn-ghost:hover { background: rgba(201, 164, 92, 0.1); }
.btn-ink { background: var(--navy); color: var(--cream); }
.btn-ink:hover { background: var(--navy-2); }
.btn-line { border-color: var(--line); background: var(--cream-2); color: var(--ink); }
.btn-line:hover { border-color: var(--gold); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 13.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.6); color: var(--ink-2);
}
.chip-gold { border-color: var(--gold-dim); background: rgba(201, 164, 92, 0.1); color: var(--gold-2); }

/* ── 홈 ──────────────────────────────────────────────────── */
.hero { padding: 26px 0 6px; position: relative; }
.hero-orn {
  position: absolute; right: -6px; top: -18px;
  font-family: var(--serif); font-size: 148px; line-height: 1;
  color: rgba(201, 164, 92, 0.09); pointer-events: none; user-select: none;
}
.hero h1 {
  font-size: clamp(30px, 8.4vw, 44px); line-height: 1.28; margin: 0 0 14px;
  color: var(--cream);
}
.hero h1 em { font-style: normal; color: var(--gold-2); }
.hero-sub { color: #C7C2B7; font-size: 15px; margin: 0 0 22px; max-width: 30em; }
.hero-actions { display: grid; gap: 10px; grid-template-columns: 1fr; }
.hero-meta {
  margin: 18px 0 0; font-size: 12.5px; color: var(--muted-2);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); opacity: 0.6; }

.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; }
.trust-item {
  border-top: 1px solid rgba(201, 164, 92, 0.24);
  padding-top: 10px; font-size: 12px; color: #B9B3A7; line-height: 1.5;
}
.trust-item b { display: block; color: var(--gold-2); font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }

.today-card { display: flex; gap: 18px; align-items: center; }
.today-card .mini-card {
  width: 76px; flex: 0 0 76px; aspect-ratio: 5 / 8; border-radius: 8px;
  border: 1px solid var(--gold); display: grid; place-items: center;
  background: linear-gradient(160deg, #1E2A47, #101728);
  color: var(--gold-2); font-family: var(--serif); font-size: 24px;
  box-shadow: inset 0 0 0 3px rgba(20, 27, 45, 0.9), inset 0 0 0 4px rgba(201, 164, 92, 0.4);
}
.today-body { flex: 1; min-width: 0; }
.today-body h3 { font-size: 17px; margin-bottom: 4px; }
.today-body p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.today-body .kw { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

.zodiac-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.zodiac-btn {
  border: 1px solid rgba(201, 164, 92, 0.2); background: rgba(255, 255, 255, 0.03);
  border-radius: 12px; padding: 12px 6px; cursor: pointer; color: var(--cream);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: background 0.2s, border-color 0.2s;
}
.zodiac-btn:hover { background: rgba(201, 164, 92, 0.1); border-color: var(--gold-dim); }
.zodiac-btn .animal { font-size: 22px; line-height: 1.1; }
.zodiac-btn .name { font-size: 11.5px; color: #C7C2B7; }
.zodiac-btn.good { border-color: rgba(201, 164, 92, 0.45); }
.zodiac-btn.care .animal { filter: grayscale(0.35); }

/* ── 폼 ──────────────────────────────────────────────────── */
.form-head { margin-bottom: 20px; }
.form-head h1 { font-size: clamp(24px, 6.6vw, 32px); color: var(--ink); line-height: 1.3; }
.form-head p { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }

.field { margin-bottom: 18px; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.field-label .opt { font-weight: 400; color: var(--muted-2); font-size: 11.5px; }
.field-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted-2); line-height: 1.55; }

.date-row { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 8px; }
.input, .select {
  width: 100%; padding: 12px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--cream-2); color: var(--ink);
  font-size: 16px; font-family: var(--sans);
  appearance: none; -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.18); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select { padding-right: 30px; }

.segmented { display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.segmented label { flex: 1; text-align: center; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented span {
  display: block; padding: 9px 6px; border-radius: 8px; font-size: 14px; color: var(--muted);
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.segmented input:checked + span { background: var(--navy); color: var(--cream); font-weight: 600; }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.28); }

.check-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); }
.check-line input { margin-top: 3px; accent-color: var(--navy); width: 16px; height: 16px; }

details.advanced { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
details.advanced summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
details.advanced summary::-webkit-details-marker { display: none; }
details.advanced summary::before { content: '+'; color: var(--gold); font-size: 15px; }
details.advanced[open] summary::before { content: '−'; }
details.advanced .advanced-body { padding-top: 12px; }

.submit-wrap { margin-top: 22px; }
.privacy-inline { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; color: var(--muted-2); margin-top: 10px; line-height: 1.5; }

/* ── 로딩 ────────────────────────────────────────────────── */
.loading { min-height: 52vh; display: grid; place-items: center; text-align: center; }
.loading p { color: var(--gold-2); font-family: var(--serif); font-size: 17px; letter-spacing: 0.02em; }
.loading .paper {
  width: 64px; height: 82px; margin: 0 auto 20px; border-radius: 4px;
  border: 1px solid rgba(201, 164, 92, 0.5);
  background:
    repeating-linear-gradient(180deg, rgba(201, 164, 92, 0.16) 0 1px, transparent 1px 12px),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  animation: sway 1.1s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes sway {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-6px); }
}

/* ── 결과 공통 ───────────────────────────────────────────── */
.result-head { margin-bottom: 22px; }
.result-head h1 { font-size: clamp(25px, 6.8vw, 34px); color: var(--cream); line-height: 1.3; }
.result-head .who { color: var(--gold-2); }
.result-meta { margin: 10px 0 0; font-size: 13px; color: #B9B3A7; line-height: 1.7; }
.result-meta b { color: var(--cream); font-weight: 600; }
.result-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.notes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.notes li {
  font-size: 12px; color: #A9A399; padding-left: 14px; position: relative; line-height: 1.55;
}
.notes li::before { content: ''; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: 0.6; }

/* 사주 원국 표 */
.pillar-card { padding: 18px 14px 14px; }
.pillar-caption { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 12px; }
.pillar-caption h2 { font-size: 16px; }
.pillar-caption span { font-size: 11.5px; color: var(--muted-2); }

table.pillars { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.pillars th, table.pillars td { text-align: center; vertical-align: middle; }
table.pillars thead th {
  font-family: var(--sans); font-weight: 500; font-size: 11.5px; color: var(--muted);
  padding: 0 0 8px; letter-spacing: 0.06em;
}
table.pillars thead th.is-day { color: var(--red); }
table.pillars tbody th {
  width: 34px; font-size: 10.5px; font-weight: 500; color: var(--muted-2);
  letter-spacing: 0.02em; text-align: left; padding-left: 2px;
}
table.pillars td {
  border-top: 1px solid var(--line);
  padding: 9px 2px;
}
table.pillars .hanja { display: block; font-family: var(--serif); font-size: 25px; line-height: 1.15; color: var(--ink); }
table.pillars .ko { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
table.pillars .el { display: inline-block; margin-top: 3px; font-size: 10px; padding: 0 5px; border-radius: 999px; background: rgba(201, 164, 92, 0.14); color: var(--muted); }
table.pillars tr.ten-god td { border-top: 0; padding-top: 8px; padding-bottom: 6px; font-size: 11.5px; color: var(--muted); }
table.pillars tr.ten-god td.hl { color: var(--red); font-weight: 600; }
table.pillars td.day-master { position: relative; background: rgba(178, 58, 46, 0.045); }
table.pillars td.day-master .hanja { color: var(--red); }
table.pillars td.day-master .el { background: rgba(178, 58, 46, 0.1); color: var(--red); }
table.pillars tr.branch td { padding-bottom: 14px; }
.pillar-foot { margin: 10px 2px 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.pillar-foot b { color: var(--ink); }

/* 오행 */
.elements-block { margin-top: 14px; }
.element-stacked { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--paper); }
.element-stacked span { display: block; height: 100%; }
.element-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 12px; }
.element-item { text-align: center; }
.element-item .el-name { font-size: 12px; color: var(--muted); }
.element-item .el-val { font-family: var(--serif); font-size: 17px; color: var(--ink); line-height: 1.2; }
.element-item .el-cnt { font-size: 10px; color: var(--muted-2); }
.element-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.65; }

/* 총운 */
.summary-card h2 { font-size: 13px; letter-spacing: 0.18em; color: var(--gold); font-family: var(--sans); font-weight: 600; margin-bottom: 10px; }
.summary-card .headline { font-family: var(--serif); font-size: clamp(21px, 5.6vw, 26px); color: var(--ink); line-height: 1.4; margin: 0 0 12px; }
.summary-card p { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); line-height: 1.8; }
.summary-card p:last-child { margin-bottom: 0; }
.summary-quote {
  border-left: 2px solid var(--gold); padding: 2px 0 2px 12px; margin: 16px 0 0;
  font-family: var(--serif); font-size: 14.5px; color: var(--ink); line-height: 1.7;
}

/* 4축 카드 */
.axis-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.axis-card { padding: 18px; }
.axis-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.axis-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.axis-head .sig { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dot-sig { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-sig.good { background: var(--green); }
.dot-sig.mid { background: var(--gold); }
.dot-sig.care { background: var(--red); }
.axis-card p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.axis-score { font-family: var(--serif); font-size: 13px; color: var(--muted-2); }

/* 행운 */
.lucky-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lucky-chip { background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lucky-chip .k { font-size: 11px; color: var(--muted-2); display: block; margin-bottom: 2px; }
.lucky-chip .v { font-size: 14.5px; color: var(--ink); font-weight: 600; }
.swatches { display: inline-flex; gap: 4px; vertical-align: -2px; margin-left: 5px; }
.swatch { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); }

/* 월별 그래프 */
.month-chart { display: flex; align-items: flex-end; gap: 4px; height: 152px; margin-top: 8px; }
.month-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.month-bar .bar { width: 100%; border-radius: 4px 4px 2px 2px; background: rgba(34, 32, 29, 0.16); transition: height 0.5s ease; min-height: 6px; }
.month-bar.good .bar { background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.month-bar.care .bar { background: rgba(178, 58, 46, 0.55); }
.month-bar .m { font-size: 10px; color: var(--muted-2); }
.month-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.month-list li { display: grid; grid-template-columns: 46px 1fr; gap: 10px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.month-list .m-label { font-family: var(--serif); color: var(--ink); font-size: 13.5px; }
.month-list .tag { font-size: 10.5px; color: var(--gold); border: 1px solid var(--gold-dim); border-radius: 999px; padding: 0 6px; margin-right: 2px; vertical-align: 1px; white-space: nowrap; display: inline-block; }

/* 광고 */
.ad-slot { margin: 26px 0; min-height: 0; }
.ad-slot .ad-inner { display: block; }
.ad-label { display: block; text-align: center; font-size: 10px; letter-spacing: 0.16em; color: rgba(201, 164, 92, 0.55); margin-bottom: 6px; }
.ad-frame {
  border: 1px dashed rgba(201, 164, 92, 0.35); border-radius: 10px;
  min-height: 110px; display: grid; place-items: center;
  color: rgba(201, 164, 92, 0.6); font-size: 12px; background: rgba(255, 255, 255, 0.02);
}
.ad-frame .ad-inner { width: 100%; }

/* 제휴 */
.affiliate { margin-top: 18px; }
.affiliate-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.affiliate-head h3 { font-size: 14px; color: var(--ink); }
.badge-aff { font-size: 10px; letter-spacing: 0.1em; color: var(--muted-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.aff-list { display: grid; gap: 8px; }
.aff-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: rgba(255, 255, 255, 0.55); text-decoration: none; color: var(--ink);
}
.aff-item:hover { border-color: var(--gold); }
.aff-thumb { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); font-size: 18px; flex: 0 0 40px; }
.aff-body { min-width: 0; flex: 1; }
.aff-name { display: block; font-size: 14px; font-weight: 600; }
.aff-note { display: block; font-size: 11.5px; color: var(--muted); }
.aff-cta { margin-left: auto; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.disclosure { font-size: 11px; color: var(--muted-2); margin: 10px 0 0; line-height: 1.5; }

/* 공유 */
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.share-row .btn { padding: 12px 8px; font-size: 13px; }

/* CTA 블록 */
.cta-block { text-align: center; padding: 26px 20px; }
.cta-block h2 { font-size: 20px; color: var(--cream); margin-bottom: 8px; }
.cta-block p { color: #B9B3A7; font-size: 13.5px; margin: 0 0 18px; }

.disclaimer {
  margin-top: 26px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid rgba(201, 164, 92, 0.18); background: rgba(255, 255, 255, 0.03);
  font-size: 11.5px; color: #9E988D; line-height: 1.7;
}

/* ── 타로 ────────────────────────────────────────────────── */
.tarot-hero { text-align: center; padding: 14px 0 4px; }
.tarot-hero h1 { font-size: clamp(26px, 7vw, 36px); color: var(--cream); }
.tarot-hero p { color: #B9B3A7; font-size: 13.5px; margin: 10px auto 0; max-width: 26em; }
.tarot-stage { margin-top: 26px; }
.tarot-picks { display: flex; justify-content: center; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.pick-slot {
  width: 76px; height: 122px; border-radius: 8px; border: 1px dashed rgba(201, 164, 92, 0.35);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  text-align: center; padding: 8px;
  font-size: 11px; color: rgba(201, 164, 92, 0.65); line-height: 1.4;
}
.pick-slot.filled { border-style: solid; border-color: var(--gold); background: rgba(201, 164, 92, 0.08); color: var(--cream); }
.pick-slot .pos { font-size: 10.5px; letter-spacing: 0.04em; }

.tarot-deck { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 560px) { .tarot-deck { grid-template-columns: repeat(6, 1fr); gap: 10px; } }

.tcard {
  position: relative; aspect-ratio: 5 / 8; border-radius: 8px; cursor: pointer;
  background: none; border: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.tcard .inner {
  position: absolute; inset: 0;
  transition: transform 0.26s ease-in;
}
.tcard.flipping .inner { transform: scaleX(0.04); }
.tcard .face {
  position: absolute; inset: 0; border-radius: 8px;
  display: grid; place-items: center; overflow: hidden;
}
.tcard .back {
  background:
    radial-gradient(circle at 50% 38%, rgba(201, 164, 92, 0.24), transparent 55%),
    repeating-linear-gradient(45deg, rgba(201, 164, 92, 0.09) 0 1px, transparent 1px 6px),
    linear-gradient(160deg, #232F4E, #131A2C);
  border: 1px solid rgba(201, 164, 92, 0.45);
  box-shadow: inset 0 0 0 3px rgba(20, 27, 45, 0.95), inset 0 0 0 4px rgba(201, 164, 92, 0.28);
  color: var(--gold-2);
}
.tcard .back span { font-family: var(--serif); font-size: 18px; opacity: 0.85; }
.tcard .front {
  display: none;
  background: linear-gradient(170deg, #FFFDF8, #F3EADA);
  border: 1px solid var(--gold);
  color: var(--ink); text-align: center; padding: 6px;
  flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.tcard.flipped .back { display: none; }
.tcard.flipped .front { display: flex; animation: faceIn 0.26s ease-out; }
@keyframes faceIn { from { opacity: 0.2; } to { opacity: 1; } }
.tcard .front .num { font-family: var(--serif); font-size: 10px; color: var(--gold); letter-spacing: 0.1em; }
.tcard .front .nm { font-family: var(--serif); font-size: 13px; line-height: 1.25; }
.tcard .front .ori { font-size: 9.5px; color: var(--muted); }
.tcard.taken { cursor: default; }
.tcard.taken:not(.flipped) { opacity: 0.35; }
.tcard .pos-tag {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: var(--gold); color: var(--navy); font-size: 9.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}
.tcard.shuffling { animation: shuffle 0.5s ease-in-out infinite; }
@keyframes shuffle {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-6px) rotate(-2deg); }
}

.tarot-reading { margin-top: 34px; scroll-margin-top: 76px; }
.tarot-cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 380px) { .tarot-cards-row { gap: 6px; } }
.tcard-mini {
  border-radius: 10px; border: 1px solid var(--line); background: var(--cream-2);
  padding: 10px 8px; text-align: center; color: var(--ink);
}
.tcard-mini .num { font-family: var(--serif); font-size: 10px; color: var(--gold); }
.tcard-mini .nm { font-family: var(--serif); font-size: 14px; line-height: 1.3; margin: 2px 0; }
.tcard-mini .ori { font-size: 10px; color: var(--muted); }
.tcard-mini .kw { font-size: 10.5px; color: var(--muted-2); margin-top: 4px; }

.reading-item { margin-top: 22px; }
.reading-item .reading-pos { margin: 0 0 4px; font-family: var(--sans); font-size: 11.5px; color: var(--gold); letter-spacing: 0.08em; }
.reading-item h3 { font-size: 16.5px; color: var(--cream); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.reading-item h3 .ori { font-family: var(--sans); font-size: 11.5px; color: #B9B3A7; }
.reading-item p { margin: 6px 0 0; color: #D6D1C6; font-size: 14px; line-height: 1.8; }

/* ── 모달 ────────────────────────────────────────────────── */
.modal-root { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; background: rgba(8, 11, 20, 0.68); padding: 0; }
.modal-root[hidden] { display: none; }
.modal {
  width: 100%; max-width: 640px; max-height: 88vh; overflow: auto;
  background: var(--cream); color: var(--ink);
  border-radius: 20px 20px 0 0; padding: 24px 22px calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.4);
  animation: sheet 0.24s ease-out;
}
@keyframes sheet { from { transform: translateY(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) {
  .modal-root { place-items: center; padding: 24px; }
  .modal { border-radius: 20px; }
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { font-size: 19px; }
.modal-close { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px; }
.modal-body { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.modal-body h3 { font-size: 14.5px; margin: 18px 0 6px; color: var(--ink); }
.modal-body p { margin: 0 0 8px; }
.modal-body ul { padding-left: 18px; margin: 0 0 10px; }
.modal-body li { margin-bottom: 4px; }
.modal-body .small { font-size: 12px; color: var(--muted); }

/* 토스트 */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(250, 247, 240, 0.96); color: var(--ink);
  padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 90;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); animation: toastIn 0.2s ease-out;
  max-width: calc(100vw - 32px); text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── 반응형 ──────────────────────────────────────────────── */
@media (min-width: 620px) {
  .hero-actions { grid-template-columns: 1.15fr 1fr; }
  .axis-grid { grid-template-columns: 1fr 1fr; }
  .lucky-chips { grid-template-columns: repeat(4, 1fr); }
  .zodiac-grid { grid-template-columns: repeat(6, 1fr); }
  .card { padding: 26px; }
  .today-card .mini-card { width: 88px; flex-basis: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 스크린리더 전용 */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ── 정책 문서 페이지 ─────────────────────────────────────── */
main.doc {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  color: #D8D3C8;
  font-size: 14.5px;
  line-height: 1.85;
}
main.doc h1 { color: var(--cream); font-size: clamp(24px, 6.4vw, 30px); margin-bottom: 10px; }
main.doc h2 { color: var(--gold-2); font-size: 15.5px; margin: 26px 0 6px; }
main.doc p { margin: 0 0 10px; }
main.doc a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 2px; }
main.doc .doc-lead { color: var(--cream); font-size: 15px; }
main.doc .doc-note { color: var(--muted-2); font-size: 12.5px; margin-top: 22px; }
main.doc .doc-back { margin-top: 26px; }
main.doc .doc-back a { text-decoration: none; color: var(--gold); }

.link-inline {
  background: none; border: 0; padding: 0; margin-left: 2px;
  color: var(--gold); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
