:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #0f172a;
  --ink2: #334155;
  --ink3: #64748b;
  --line: #e2e8f0;
  --pri: #4f46e5;
  --pri-hover: #4338ca;
  --pri-light: #eef2ff;
  --pri2: #6366f1;
  --gold: #d97706;
  --gold-light: #fef3c7;
  --good: #059669;
  --good-light: #d1fae5;
  --bad: #e11d48;
  --bad-light: #ffe4e6;
  --mixed: #d97706;
  --mixed-light: #fef3c7;
  --r: 16px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
}

[data-theme="dark"] {
  --bg: #090d16;
  --paper: #111827;
  --ink: #f8fafc;
  --ink2: #cbd5e1;
  --ink3: #64748b;
  --line: #1e293b;
  --pri: #818cf8;
  --pri-hover: #a5b4fc;
  --pri-light: rgba(99, 102, 241, 0.15);
  --pri2: #a5b4fc;
  --gold: #f59e0b;
  --gold-light: rgba(245, 158, 11, 0.15);
  --good: #10b981;
  --good-light: rgba(16, 185, 129, 0.15);
  --bad: #f43f5e;
  --bad-light: rgba(244, 63, 94, 0.15);
  --mixed: #f59e0b;
  --mixed-light: rgba(245, 158, 11, 0.15);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  font-size: 16px;
  word-break: keep-all;
  transition: background-color 0.25s, color 0.25s;
}

a { color: var(--pri); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--pri-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.brand small { font-weight: 500; color: var(--ink3); font-size: 12px; margin-left: 4px; }
.nav-wrap { display: flex; align-items: center; gap: 6px; }
.nav { display: flex; gap: 4px; font-size: 14px; font-weight: 600; }
.nav a {
  padding: 7px 11px;
  border-radius: 10px;
  color: var(--ink2);
}
.nav a.on, .nav a:hover {
  background: var(--pri-light);
  color: var(--pri);
  text-decoration: none;
}
.theme-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--ink2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.theme-btn:hover { background: var(--pri-light); color: var(--pri); }


main { padding: 26px 0 50px; }
.crumb { font-size: 13px; color: var(--ink3); margin-bottom: 14px; }
.crumb a { color: var(--ink3); }

h1 { font-size: 28px; line-height: 1.35; margin: 0 0 14px; letter-spacing: -0.5px; font-weight: 800; }
h2 { font-size: 21px; margin: 36px 0 14px; padding-left: 12px; border-left: 4px solid var(--pri); font-weight: 800; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 17px; margin: 18px 0 8px; font-weight: 700; }
p { margin: 10px 0; }
.lead { font-size: 16.5px; color: var(--ink2); line-height: 1.85; }

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 22px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}

.hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  border-radius: 20px;
  padding: 32px 26px;
  margin: 8px 0 24px;
  box-shadow: var(--shadow-lg);
}
.hero h1 { color: #fff; font-size: 29px; margin-bottom: 8px; }
.hero p { color: rgba(255, 255, 255, 0.92); font-size: 16px; margin: 0 0 18px; }
.hero .search input {
  background: #ffffff;
  color: #0f172a;
  border: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Search Box */
.search { display: flex; gap: 8px; margin: 16px 0 6px; position: relative; }
.search input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input:focus {
  border-color: var(--pri);
  box-shadow: 0 0 0 3px var(--pri-light);
}
.search-hint { font-size: 12.5px; color: var(--ink3); margin-top: 4px; }
.search-res {
  margin: 8px 0;
  background: var(--paper);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.search-res a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--ink);
  transition: background 0.15s;
}
.search-res a:last-child { border-bottom: none; }
.search-res a:hover { background: var(--pri-light); text-decoration: none; }

/* [NEW] Overview Card & Energy Gauge */
.overview-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.energy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14.5px;
}
.energy-bar-wrap {
  background: var(--line);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.energy-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}
.energy-good { background: linear-gradient(90deg, #10b981, #059669); }
.energy-bad { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.energy-mixed { background: linear-gradient(90deg, #f59e0b, #d97706); }

/* Verdict Badge */
.verdict {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin: 14px 0;
}
.verdict .tag {
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 13.5px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
}
.tag.good { background: var(--good); }
.tag.bad { background: var(--bad); }
.tag.mixed { background: var(--mixed); }
.verdict p { margin: 0; font-size: 14.5px; color: var(--ink2); font-weight: 500; }

/* [NEW] Numbered Scenario Cards (상황별 카드) */
.scenario-grid { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.scenario-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--pri);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}
.scenario-card:hover { transform: translateX(3px); border-color: var(--pri); }
.scenario-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.scenario-num {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--pri);
  background: var(--pri-light);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.scenario-title { font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 0; }
.scenario-desc { margin: 6px 0 0; font-size: 15px; color: var(--ink2); line-height: 1.75; }

/* [NEW] Carl Jung Psychology Box */
.psych-box {
  background: var(--paper);
  border: 1.5px solid var(--pri2);
  border-radius: var(--r);
  padding: 24px;
  margin: 26px 0;
  box-shadow: var(--shadow);
  position: relative;
}
.psych-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pri-light);
  color: var(--pri);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.psych-box p { font-size: 15.5px; color: var(--ink2); line-height: 1.85; margin: 0; }

/* [NEW] Action Prescription Box */
.action-box {
  background: linear-gradient(135deg, var(--good-light), var(--bg));
  border: 1.5px solid var(--good);
  border-radius: var(--r);
  padding: 22px 24px;
  margin: 24px 0;
}
.action-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--good);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.action-box p { font-size: 15px; color: var(--ink2); line-height: 1.8; margin: 0; }

/* Bridge Card (High CPC Monetization) */
.bridge {
  background: linear-gradient(135deg, var(--pri-light), var(--gold-light));
  border: 1.5px solid var(--gold);
  border-radius: var(--r);
  padding: 20px 22px;
  margin: 26px 0;
  box-shadow: var(--shadow);
}
.bridge .k {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-block;
  background: var(--paper);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.bridge a {
  display: block;
  font-weight: 800;
  font-size: 17px;
  margin: 6px 0 6px;
  color: var(--ink);
}
.bridge p { margin: 0; font-size: 14.5px; color: var(--ink2); }

/* Rel Grid */
.rel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.rel a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.2s;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rel a:hover { border-color: var(--pri); transform: translateY(-2px); text-decoration: none; }
@media(max-width: 500px) { .rel { grid-template-columns: 1fr; } }

/* FAQ */
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 10px 0;
  box-shadow: var(--shadow);
  transition: background 0.2s;
}
.faq summary { font-weight: 700; cursor: pointer; font-size: 15.5px; outline: none; }
.faq p { font-size: 15px; color: var(--ink2); margin: 10px 0 4px; line-height: 1.75; }

/* Buttons */
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:hover { border-color: var(--pri); color: var(--pri); }
.btn.pri { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.pri:hover { background: var(--pri-hover); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.gold:hover { opacity: 0.92; color: #fff; }
.btn:active { transform: scale(0.97); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Ads */
.ad { min-height: 0; margin: 24px 0; text-align: center; }
.ad.is-live { min-height: 120px; }
.ad.is-hidden { display: none; }
.ad ins { display: block; }
/* 상단·중단(디스플레이): 폭 336px 상자 → 336×280 또는 300×250 으로 나온다 */
/* 폭은 336px, 화면이 좁으면 본문 폭(화면 − 좌우 여백 20px)까지. 안쪽 여백이 있는 상자 안에서도 가운데에 그 폭을 유지한다 */
.ad[data-ad="top"], .ad[data-ad="mid"], .ad[data-ad="fortune"] { width: clamp(300px, calc(100vw - 20px), 336px); margin-left: calc(50% - clamp(150px, calc(50vw - 10px), 168px)); margin-right: 0; }
.ad.is-live[data-ad="top"], .ad.is-live[data-ad="mid"], .ad.is-live[data-ad="fortune"] { min-height: 250px; }
/* 광고가 채워지지 않으면 자리를 접는다 */
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
/* 로컬 미리보기(localhost)에서만: 광고 자리를 점선 상자로 보여 준다. 실제 도메인에서는 적용되지 않는다 */
.ads-preview .ad.is-live { display: block !important; position: relative; min-height: 250px; outline: 2px dashed #e5484d; outline-offset: -2px; background: rgba(229, 72, 77, .06); }
.ads-preview .ad.is-live::after { content: "광고 자리 · 상단/중단 (336×280 · 300×250)"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: #e5484d; pointer-events: none; }
.ads-preview .ad.is-live[data-ad="bottom"]::after { content: "광고 자리 · 하단 멀티플렉스"; }
/* 채워지지 않은 자리는 애드센스가 바깥 상자의 높이를 인라인으로 지우므로, 표시용 상자를 직접 세운다 */
.ads-preview .ad.is-live:has(ins[data-ad-status="unfilled"])::after { position: static; height: 250px; }
.ads-preview .ad.is-live ins[data-ad-status="unfilled"] { display: none !important; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.grid a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.grid a small { display: block; font-weight: 500; color: var(--ink3); font-size: 12px; margin-top: 3px; }
.grid a:hover { border-color: var(--pri); transform: translateY(-2px); text-decoration: none; }
@media(max-width: 500px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.grid.four { grid-template-columns: repeat(4, 1fr); }
@media(max-width: 600px) { .grid.four { grid-template-columns: repeat(3, 1fr); } }
@media(max-width: 420px) { .grid.four { grid-template-columns: repeat(2, 1fr); } }

/* Fortune Card */
.stars { color: var(--gold); letter-spacing: 2px; font-size: 15px; }
.f-area { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.f-area:first-child { border-top: 0; }
.f-area b { flex: 0 0 80px; font-size: 15px; color: var(--pri); }
.f-area div { flex: 1; font-size: 15px; color: var(--ink2); }
.f-lucky { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.f-lucky div {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--ink3);
}
.f-lucky div b { display: block; font-size: 16px; color: var(--ink); margin-top: 2px; }
@media(max-width: 480px) { .f-lucky { grid-template-columns: repeat(2, 1fr); } }

.fcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.fcard .date { font-size: 13.5px; color: var(--ink3); }
.fcard .name { font-size: 24px; font-weight: 900; margin: 4px 0 12px; letter-spacing: -0.4px; }

/* Interactive Widgets */
.widget-box {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow);
}
.widget-box h3 { margin-top: 0; display: flex; align-items: center; gap: 8px; font-size: 18px; }

/* Lotto Balls */
.lotto-balls { display: flex; gap: 10px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.lotto-ball {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.ball-yellow { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ball-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ball-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.ball-gray { background: linear-gradient(135deg, #64748b, #475569); }
.ball-green { background: linear-gradient(135deg, #10b981, #059669); }

/* Amulet Box */
.amulet-canvas-wrap { text-align: center; margin: 16px 0; }
#amuletCanvas { border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 100%; height: auto; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0; }
.cal div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  font-size: 13.5px;
  min-height: 56px;
}
.cal div.h { background: var(--bg); font-weight: 700; min-height: auto; padding: 6px; }
.cal div.son { background: var(--gold-light); border-color: var(--gold); font-weight: 800; color: #92400e; }
.cal div small { display: block; color: var(--ink3); font-size: 10.5px; }
.cal div.off { opacity: 0.35; }

/* List */
.list { columns: 2; column-gap: 24px; font-size: 15px; }
.list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
}
.list a:hover { color: var(--pri); }
@media(max-width: 500px) { .list { columns: 1; } }

.note {
  font-size: 14px;
  color: var(--ink3);
  background: var(--bg);
  border-left: 3px solid var(--pri);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 16px 0;
}
.kw { font-size: 13px; color: var(--ink3); margin: 14px 0; }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--paper); margin: 14px 0; border-radius: 8px; overflow: hidden; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
th { background: var(--bg); font-weight: 700; }

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  font-size: 13px;
  color: var(--ink3);
  text-align: center;
  line-height: 2;
  background: var(--paper);
}
footer a { color: var(--ink3); margin: 0 6px; }

/* ================= [NEW] Mystic Aurora Hero Banner ================= */
.dream-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  padding: 30px 28px;
  margin: 12px 0 22px;
  color: #ffffff;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dream-hero.hero-good {
  background: radial-gradient(circle at 85% 15%, rgba(52, 211, 153, 0.4), transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(16, 185, 129, 0.3), transparent 55%),
              linear-gradient(135deg, #064e3b 0%, #065f46 30%, #047857 60%, #1e1b4b 100%);
}
.dream-hero.hero-bad {
  background: radial-gradient(circle at 85% 15%, rgba(244, 63, 94, 0.4), transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(225, 29, 72, 0.3), transparent 55%),
              linear-gradient(135deg, #450a0a 0%, #881337 30%, #4c0519 60%, #1e1b4b 100%);
}
.dream-hero.hero-mixed {
  background: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.45), transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(217, 119, 6, 0.35), transparent 55%),
              linear-gradient(135deg, #1e1b4b 0%, #312e81 35%, #1e3a8a 70%, #0f172a 100%);
}

.hero-bg-sparkles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(1.5px 1.5px at 25px 25px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 140px 75px, rgba(255,255,255,0.9), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 280px 35px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 420px 100px, rgba(253,224,71,0.95), rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 580px 65px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 730px 45px, rgba(255,255,255,0.85), rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 800px 180px;
  opacity: 0.65;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 22px;
}

.hero-symbol-orb {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 0 16px rgba(255, 255, 255, 0.25);
  transition: transform 0.3s ease;
}
.dream-hero:hover .hero-symbol-orb {
  transform: scale(1.08) rotate(4deg);
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.hero-cat-tag {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-energy-tag {
  font-size: 12px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.32);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(254, 240, 138, 0.35);
}

.hero-title {
  color: #ffffff !important;
  font-size: 25px !important;
  font-weight: 800 !important;
  margin: 0 0 8px !important;
  line-height: 1.35 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.hero-verdict-highlight {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  line-height: 1.55;
}



/* ================= [NEW] Scenario Badges (세부 상황 감정 뱃지) ================= */
.scenario-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-luck { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-warn { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-mind { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-relation { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.badge-change { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }

[data-theme="dark"] .badge-luck { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
[data-theme="dark"] .badge-warn { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
[data-theme="dark"] .badge-mind { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); }
[data-theme="dark"] .badge-relation { background: rgba(14, 165, 233, 0.15); color: #7dd3fc; border-color: rgba(14, 165, 233, 0.3); }
[data-theme="dark"] .badge-change { background: rgba(20, 184, 166, 0.15); color: #5eead4; border-color: rgba(20, 184, 166, 0.3); }

/* ================= [NEW] Interactive Talisman Section (황금 수호 부적) ================= */
.talisman-section {
  margin: 30px 0;
  position: relative;
}

.talisman-card {
  position: relative;
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 40%, #fde047 100%);
  border: 3px solid #b91c1c;
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: 0 12px 35px -5px rgba(185, 28, 28, 0.2), inset 0 0 20px rgba(245, 158, 11, 0.3);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.talisman-card:hover {
  box-shadow: 0 16px 40px -5px rgba(185, 28, 28, 0.35), inset 0 0 25px rgba(245, 158, 11, 0.45);
}

.talisman-inner-frame {
  position: absolute;
  top: 9px; left: 9px; right: 9px; bottom: 9px;
  border: 1.5px solid #dc2626;
  border-radius: 10px;
  pointer-events: none;
}

.talisman-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2.5px solid #b91c1c;
}
.talisman-corner.tl { top: 13px; left: 13px; border-right: none; border-bottom: none; }
.talisman-corner.tr { top: 13px; right: 13px; border-left: none; border-bottom: none; }
.talisman-corner.bl { bottom: 13px; left: 13px; border-right: none; border-top: none; }
.talisman-corner.br { bottom: 13px; right: 13px; border-left: none; border-top: none; }

.talisman-head {
  margin-bottom: 8px;
}
.talisman-seal-top {
  display: inline-block;
  font-family: serif;
  font-weight: 900;
  font-size: 19px;
  color: #b91c1c;
  letter-spacing: 4px;
  border-bottom: 2px solid #b91c1c;
  padding-bottom: 2px;
}
.talisman-type-tag {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #991b1b;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.talisman-symbol-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 14px 0;
}
.talisman-symbol-large {
  font-size: 48px;
  filter: drop-shadow(0 4px 8px rgba(185, 28, 28, 0.25));
}
.talisman-calligraphy {
  font-family: "Noto Serif KR", serif;
  font-size: 32px;
  font-weight: 900;
  color: #b91c1c;
  letter-spacing: 6px;
  line-height: 1.15;
}
.talisman-calligraphy span { display: inline-block; margin: 0 1px; }

.talisman-body {
  margin: 12px 0 16px;
  position: relative;
  z-index: 1;
}
.talisman-title {
  font-size: 18px;
  font-weight: 800;
  color: #7f1d1d;
  margin: 0 0 6px;
}
.talisman-desc {
  font-size: 14px;
  color: #831843;
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto;
  font-weight: 500;
}

.talisman-stamp {
  display: inline-block;
  border: 2px solid #991b1b;
  color: #991b1b;
  font-family: serif;
  font-weight: 900;
  font-size: 13px;
  padding: 3px 10px;
  letter-spacing: 2px;
  border-radius: 4px;
  transform: rotate(-3deg);
  margin: 8px 0 14px;
  background: rgba(254, 240, 138, 0.85);
}

.talisman-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.talisman-btn {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}
.talisman-btn-sparkle {
  background: #b91c1c;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.35);
}
.talisman-btn-sparkle:hover {
  background: #991b1b;
  transform: translateY(-2px);
}
.talisman-btn-save {
  background: #ffffff;
  color: #7f1d1d;
  border: 1.5px solid #b91c1c;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}
.talisman-btn-save:hover {
  background: #fef2f2;
  transform: translateY(-2px);
}

/* Sparkle Flash Effect */
.talisman-flash {
  animation: talismanSparkle 0.8s ease-out;
}
@keyframes talismanSparkle {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.02); filter: brightness(1.25) drop-shadow(0 0 20px #fde047); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* ================= [NEW] Fortune, Calendar, Compat Hero Banners ================= */
.fortune-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  padding: 30px 28px;
  margin: 12px 0 22px;
  color: #ffffff;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.4), transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(99, 102, 241, 0.35), transparent 50%),
              linear-gradient(135deg, #1e1b4b 0%, #312e81 35%, #1e3a8a 70%, #0f172a 100%);
}

.newyear-hero {
  background: radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.45), transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(220, 38, 38, 0.35), transparent 50%),
              linear-gradient(135deg, #7f1d1d 0%, #991b1b 35%, #b45309 70%, #1e1b4b 100%);
}

.calendar-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  padding: 30px 28px;
  margin: 12px 0 22px;
  color: #ffffff;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at 85% 15%, rgba(217, 119, 6, 0.4), transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(13, 148, 136, 0.4), transparent 50%),
              linear-gradient(135deg, #042f2e 0%, #115e59 35%, #0f766e 70%, #0f172a 100%);
}

.compat-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  padding: 30px 28px;
  margin: 12px 0 22px;
  color: #ffffff;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at 85% 15%, rgba(244, 63, 94, 0.45), transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(236, 72, 153, 0.35), transparent 50%),
              linear-gradient(135deg, #4c0519 0%, #831843 35%, #701a75 70%, #1e1b4b 100%);
}



/* ================= [NEW] Visual Grid Icons ================= */
.grid-icon {
  display: block;
  font-size: 32px;
  line-height: 1.1;
  margin: 2px auto 8px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.grid a:hover .grid-icon {
  transform: scale(1.18) translateY(-2px);
}

/* ================= [NEW] Interactive Compatibility Visual Banner ================= */
.compat-visual-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.08), rgba(236, 72, 153, 0.04));
  border-radius: 14px;
  border: 1px dashed rgba(244, 63, 94, 0.25);
}
.compat-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 40px;
}
.compat-avatar span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  background: var(--paper);
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.compat-heart-pulse {
  font-size: 36px;
  animation: heartPulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(244, 63, 94, 0.4));
}
@keyframes heartPulse {
  0% { transform: scale(1); }
  14% { transform: scale(1.2); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

/* Enhanced Auspicious Day Badge in Calendar */
.cal div.son {
  position: relative;
  background: linear-gradient(135deg, #fef08a, #fde047) !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}
.cal div.son::after {
  content: '福';
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 9px;
  font-family: serif;
  font-weight: 900;
  color: #dc2626;
  background: rgba(255, 255, 255, 0.9);
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
}

/* ==========================================================================
   Comprehensive Mobile & Responsive Optimizations (모바일 최적화)
   ========================================================================== */

/* 1. Fluid Container Wrap (태블릿 및 모바일 여백) */
@media (max-width: 768px) {
  .wrap {
    padding: 0 16px;
  }
}

/* 2. Standard Mobile (화면폭 640px 이하: 일반 스마트폰 환경) */
@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.75;
    -webkit-tap-highlight-color: transparent;
  }

  /* 상단 헤더 & 네비게이션 모바일 최적화 */
  .top .wrap {
    height: 56px;
    padding: 0 14px;
  }
  .brand {
    font-size: 18px;
    gap: 6px;
    letter-spacing: -0.4px;
  }
  .brand svg {
    width: 24px;
    height: 24px;
  }
  .brand small {
    display: none;
  }
  .nav-wrap {
    gap: 4px;
  }
  .nav {
    gap: 2px;
  }
  .nav a {
    padding: 6px 7px;
    font-size: 13px;
    border-radius: 8px;
  }
  .theme-btn {
    padding: 5px 8px;
    font-size: 15px;
    border-radius: 8px;
  }

  /* 본문 영역 및 제목 타이포그래피 */
  main {
    padding: 16px 0 40px;
  }
  .crumb {
    font-size: 12px;
    margin-bottom: 10px;
  }
  h1 {
    font-size: 22px;
    margin-bottom: 10px;
    letter-spacing: -0.4px;
    line-height: 1.35;
  }
  h2 {
    font-size: 18px;
    margin: 28px 0 12px;
    padding-left: 10px;
    border-left-width: 3.5px;
    gap: 6px;
  }
  h3 {
    font-size: 16px;
    margin: 14px 0 6px;
  }
  p, .lead {
    font-size: 15px;
    line-height: 1.75;
  }

  /* 통합 히어로 배너 (꿈해몽·운세·길일·궁합·신년운세) */
  .dream-hero,
  .fortune-hero,
  .calendar-hero,
  .compat-hero,
  .newyear-hero,
  .hero {
    padding: 20px 16px;
    border-radius: 16px;
    margin: 8px 0 18px;
  }
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
  .hero-symbol-orb {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    font-size: 30px;
    border-width: 1.5px;
  }
  .hero-meta {
    gap: 6px;
    margin-bottom: 6px;
  }
  .hero-cat-tag,
  .hero-energy-tag {
    font-size: 11px;
    padding: 2.5px 8px;
  }
  .hero-title {
    font-size: 20px !important;
    line-height: 1.35 !important;
    margin: 0 0 6px !important;
  }
  .hero-verdict-highlight {
    font-size: 13.5px;
    line-height: 1.55;
  }

  /* 카드 & 정보 박스 (총평·심리학·행동처방·브릿지·위젯) */
  .card,
  .overview-card,
  .psych-box,
  .action-box,
  .bridge,
  .widget-box {
    padding: 18px 16px;
    border-radius: 14px;
    margin: 16px 0;
  }
  .verdict {
    padding: 12px 14px;
    gap: 10px;
  }
  .verdict .tag {
    font-size: 12.5px;
    padding: 4px 10px;
  }
  .verdict p {
    font-size: 14px;
  }

  /* 버튼 및 폼 입력 요소 (iOS 자동 줌 방지 font-size 16px 보장) */
  .btnrow {
    gap: 8px;
    margin: 14px 0;
  }
  .btn {
    padding: 11px 14px;
    font-size: 14px;
    min-height: 44px;
    border-radius: 9px;
  }
  select,
  input[type="text"],
  input[type="search"],
  input[type="date"],
  .search input {
    font-size: 16px !important;
  }

  /* 테이블 가로 스크롤 보호 */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13.5px;
  }
  th, td {
    padding: 8px 10px;
    white-space: nowrap;
  }

  /* FAQ 접기/펼치기 터치 최적화 */
  .faq details {
    padding: 12px 14px;
    border-radius: 10px;
  }
  .faq summary {
    font-size: 14.5px;
    line-height: 1.5;
  }
  .faq p {
    font-size: 14px;
    line-height: 1.7;
  }

  /* 푸터 영역 */
  footer {
    padding: 24px 0 36px;
    font-size: 12px;
    line-height: 1.85;
  }
}

/* 3. Medium Mobile (화면폭 560px 이하: 띠별 운세 카드 & 부적 & 궁합 최적화) */
@media (max-width: 560px) {
  /* 띠별/별자리 운세 카드 (.fcard) 가독성 극대화 */
  .fcard {
    padding: 18px 16px;
    border-radius: 14px;
  }
  .fcard .date {
    font-size: 12.5px;
  }
  .fcard .name {
    font-size: 22px;
    margin: 4px 0 10px;
  }
  /* 항목(총운, 애정운 등)과 별점을 상단 헤더줄로 배치하고, 풀이 텍스트는 100% 전폭으로 표시 */
  .f-area {
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
  }
  .f-area b {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 14.5px;
    color: var(--pri);
  }
  .f-area b br {
    display: none;
  }
  .f-area b .stars {
    font-size: 14px;
    letter-spacing: 1.5px;
  }
  .f-area div {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--ink);
  }
  /* 행운의 색·숫자·방향 2열 그리드 배치 */
  .f-lucky {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 14px 0;
  }
  .f-lucky div {
    padding: 9px 8px;
    border-radius: 10px;
    font-size: 12px;
  }
  .f-lucky div b {
    font-size: 15px;
    margin-top: 3px;
  }
  .fcard p.kw {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 14px;
  }

  /* 세부 상황별 넘버링 카드 (.scenario-card) */
  .scenario-grid {
    gap: 10px;
    margin: 14px 0;
  }
  .scenario-card {
    padding: 14px 14px;
    border-radius: 10px;
  }
  .scenario-top {
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 6px;
  }
  .scenario-num {
    font-size: 11px;
    padding: 2.5px 7px;
  }
  .scenario-badge {
    font-size: 11px;
    padding: 2px 7px;
  }
  .scenario-title {
    width: 100%;
    font-size: 15.5px;
    margin: 2px 0 0;
    line-height: 1.4;
  }
  .scenario-desc {
    font-size: 14px;
    line-height: 1.7;
    margin: 6px 0 0;
  }

  /* 황금 수호 부적 카드 (.talisman-card) 모바일 크기 최적화 */
  .talisman-section {
    margin: 22px 0;
  }
  .talisman-card {
    padding: 22px 14px;
    border-width: 2.5px;
    border-radius: 14px;
  }
  .talisman-inner-frame {
    top: 7px; left: 7px; right: 7px; bottom: 7px;
  }
  .talisman-corner {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }
  .talisman-corner.tl { top: 10px; left: 10px; }
  .talisman-corner.tr { top: 10px; right: 10px; }
  .talisman-corner.bl { bottom: 10px; left: 10px; }
  .talisman-corner.br { bottom: 10px; right: 10px; }
  .talisman-seal-top {
    font-size: 16px;
    letter-spacing: 3px;
  }
  .talisman-type-tag {
    font-size: 12px;
  }
  .talisman-symbol-box {
    margin: 10px 0;
    gap: 12px;
  }
  .talisman-symbol-large {
    font-size: 40px;
  }
  .talisman-calligraphy {
    font-size: 26px;
    letter-spacing: 4px;
  }
  .talisman-title {
    font-size: 16.5px;
    margin-bottom: 4px;
  }
  .talisman-desc {
    font-size: 13.5px;
    line-height: 1.6;
  }
  .talisman-stamp {
    font-size: 12px;
    padding: 2px 8px;
    margin: 6px 0 12px;
  }
  .talisman-actions {
    flex-direction: column;
    gap: 8px;
  }
  .talisman-btn {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
    padding: 11px 16px;
  }

  /* 궁합 시각화 배너 & 입력 폼 1열 최적화 */
  .compat-visual-banner {
    gap: 16px;
    padding: 16px 10px;
  }
  .compat-avatar {
    font-size: 34px;
  }
  .compat-avatar span {
    font-size: 11.5px;
    padding: 1px 8px;
  }
  .compat-heart-pulse {
    font-size: 28px;
  }
  [data-compat-form] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* 맞춤 부적 발급기 위젯 */
  #wishSelect {
    width: 100% !important;
  }
  #genAmuletBtn,
  #saveAmuletBtn {
    flex: 1 1 120px;
    min-height: 44px;
  }
  #amuletCanvas {
    max-width: 100%;
    width: 280px;
    height: auto;
  }

  /* 로또 추첨 볼 위젯 */
  .lotto-balls {
    gap: 6px;
  }
  .lotto-ball {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* 모바일 버튼 행 터치 영역 확장 */
  .btnrow .btn {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
  }
}

/* 4. Compact Mobile (화면폭 460px 이하: 손없는날 달력 & 로또볼 한 줄 배치) */
@media (max-width: 460px) {
  /* 7열 손없는날 달력 표 셀 비율 조정 */
  .cal {
    gap: 2.5px;
    margin: 10px 0;
  }
  .cal div {
    padding: 6px 1px;
    min-height: 50px;
    font-size: 12.5px;
    border-radius: 6px;
  }
  .cal div.h {
    padding: 4px 1px;
    font-size: 12px;
    min-height: auto;
  }
  .cal div small {
    font-size: 9px;
    line-height: 1.25;
    letter-spacing: -0.4px;
    margin-top: 1px;
  }
  .cal div.son::after {
    font-size: 7.5px;
    top: 2px;
    right: 2px;
    padding: 0 2px;
  }

  /* 로또 볼 6개 한 줄 표시 보장 */
  .lotto-ball {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  /* 상단 네비게이션 미세 조정 */
  .nav a {
    padding: 5px 6px;
    font-size: 12.5px;
  }
  .brand {
    font-size: 17px;
  }
  .brand svg {
    width: 22px;
    height: 22px;
  }
}

/* 5. Ultra Narrow Devices (화면폭 375px 이하: 초소형 화면 안전 장치) */
@media (max-width: 375px) {
  .wrap {
    padding: 0 10px;
  }
  .top .wrap {
    padding: 0 10px;
  }
  .brand {
    font-size: 16px;
    gap: 4px;
  }
  .brand svg {
    width: 20px;
    height: 20px;
  }
  .nav a {
    padding: 5px 4px;
    font-size: 12px;
  }
  .theme-btn {
    padding: 4px 6px;
    font-size: 13px;
  }
  h1, .hero-title {
    font-size: 19px !important;
  }
  .hero-symbol-orb {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    font-size: 26px;
  }
  .cal div {
    min-height: 46px;
    font-size: 11.5px;
  }
  .cal div small {
    font-size: 8px;
  }
  .lotto-ball {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .btnrow .btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* ============================================================
   [꿈해몽 3D 모션 그래픽] 몽환의 제단 & 무중력 부양 3대 대길몽
   ============================================================ */
.dream-astrolabe-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: 224px;
  margin: 16px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  user-select: none;
}

/* Background Glowing Dream Nebula */
.dream-nebula {
  position: absolute;
  width: 270px;
  height: 160px;
  background: radial-gradient(ellipse at center, rgba(253, 224, 71, 0.28) 0%, rgba(99, 102, 241, 0.3) 45%, rgba(124, 58, 237, 0.18) 65%, transparent 80%);
  filter: blur(24px);
  animation: dream-nebula-pulse 6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}
@keyframes dream-nebula-pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.18); opacity: 1; }
}

/* Celestial Orbit Rings */
.dream-orbit-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.dream-orbit-ring.ring-outer {
  width: 236px;
  height: 236px;
  border: 1px dashed rgba(253, 224, 71, 0.4);
  box-shadow: 0 0 25px rgba(253, 224, 71, 0.15);
  animation: dream-ring-cw 45s linear infinite;
}
.dream-orbit-ring.ring-inner {
  width: 174px;
  height: 174px;
  border: 1px solid rgba(253, 224, 71, 0.25);
  animation: dream-ring-ccw 32s linear infinite;
}
@keyframes dream-ring-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes dream-ring-ccw {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.dream-point {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  color: #fde047;
  opacity: 0.85;
}
.dream-pt-top { top: -8px; left: calc(50% - 6px); }
.dream-pt-right { right: -8px; top: calc(50% - 7px); }
.dream-pt-bottom { bottom: -8px; left: calc(50% - 6px); }
.dream-pt-left { left: -8px; top: calc(50% - 7px); }

.dream-center-orb {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #312e81 0%, #1e1b4b 100%);
  border: 1.5px solid #fde047;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(253, 224, 71, 0.5);
  z-index: 2;
  pointer-events: none;
}
.dream-core-icon {
  font-size: 20px;
  animation: dream-core-pulse 3.5s ease-in-out infinite;
}
@keyframes dream-core-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(253, 224, 71, 0.5)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(253, 224, 71, 0.9)); }
}

/* 3D Floating Dream Cards */
.dream-floating-deck {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
}
.dream-floating-card {
  position: absolute;
  width: 86px;
  height: 138px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  background: #0b0f24;
  border: 1.2px solid rgba(253, 224, 71, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 16px rgba(99, 102, 241, 0.35);
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, filter 0.35s ease;
  overflow: hidden;
}
.dream-floating-card svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Holographic Sheen Sweep */
.dream-holo-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  background-size: 250% 250%;
  animation: dream-shine 4.5s ease-in-out infinite;
  border-radius: 9px;
}
@keyframes dream-shine {
  0% { background-position: -100% -100%; opacity: 0; }
  30% { opacity: 0.65; }
  60% { background-position: 200% 200%; opacity: 0; }
  100% { background-position: 200% 200%; opacity: 0; }
}

/* Card Floating Badges */
.dream-card-badge {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 15, 36, 0.9);
  border: 1px solid rgba(253, 224, 71, 0.6);
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 700;
  color: #fde047;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

/* Individual Floating Cards */
.dream-card-dragon {
  left: calc(50% - 138px);
  animation: float-dragon 4.6s ease-in-out infinite;
}
@keyframes float-dragon {
  0%, 100% { transform: rotate(-9deg) translateY(4px); }
  50% { transform: rotate(-12deg) translateY(-14px); }
}

.dream-card-pig {
  left: calc(50% - 45px);
  width: 90px;
  height: 144px;
  z-index: 6;
  border-color: #fde047;
  box-shadow: 0 14px 34px rgba(0,0,0,0.75), 0 0 22px rgba(253, 224, 71, 0.45);
  animation: float-pig 4s ease-in-out infinite;
}
@keyframes float-pig {
  0%, 100% { transform: translateY(-4px) scale(1.04); }
  50% { transform: translateY(-18px) scale(1.08); }
}

.dream-card-snake {
  left: calc(50% + 50px);
  animation: float-snake 5.1s ease-in-out infinite;
}
@keyframes float-snake {
  0%, 100% { transform: rotate(9deg) translateY(6px); }
  50% { transform: rotate(12deg) translateY(-12px); }
}

/* Hover & Touch Lift */
.dream-floating-card:hover {
  transform: translateY(-22px) scale(1.15) !important;
  z-index: 10 !important;
  box-shadow: 0 20px 42px rgba(0,0,0,0.85), 0 0 30px rgba(253, 224, 71, 0.75);
  filter: brightness(1.2);
}

.dream-stage-caption {
  text-align: center;
  font-size: 12.5px;
  color: #fef08a;
  margin: 0 0 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* 꿈 × 타로 딥 싱크 크로스오버 위젯 */
.dream-tarot-crossover-box {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(76, 29, 149, 0.9));
  border: 1.5px solid rgba(253, 224, 71, 0.5);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 22px 0 26px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  color: #f8fafc;
}
.dt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.dt-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffd56b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dt-badge {
  font-size: 11px;
  background: rgba(253, 224, 71, 0.18);
  border: 1px solid rgba(253, 224, 71, 0.4);
  color: #fde047;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 700;
}
.dt-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  margin: 0 0 14px;
  line-height: 1.5;
}
.dt-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}
.dt-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(253, 224, 71, 0.25);
  padding: 10px 14px;
  border-radius: 12px;
  color: #f8fafc;
  text-decoration: none;
  font-size: 13.5px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dt-chip:hover {
  background: rgba(253, 224, 71, 0.2);
  border-color: #fde047;
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(253, 224, 71, 0.25);
}
.dt-chip b {
  color: #fde047;
  font-weight: 700;
  margin-right: 4px;
}
.dt-chip small {
  color: #94a3b8;
  font-size: 11px;
}

/* Dream Page Tarot Crossover Banner */
.dream-detail-tarot-banner {
  background: linear-gradient(135deg, #0c1127 0%, #1e183a 100%);
  border: 1.2px solid rgba(212, 175, 55, 0.5);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.ddt-text h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #ffd56b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ddt-text p {
  margin: 0;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.45;
}
.ddt-btn {
  background: linear-gradient(135deg, #f5e1a4, #d4af37);
  color: #0c1127;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13.5px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(212,175,55,0.4);
  transition: all 0.2s;
  flex-shrink: 0;
}
.ddt-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  text-decoration: none;
  color: #0c1127;
}

/* Mobile Responsiveness for Dream Astrolabe */
@media (max-width: 560px) {
  .dream-astrolabe-stage {
    height: 195px;
    margin: 12px auto 10px;
  }
  .dream-nebula {
    width: 220px;
    height: 130px;
  }
  .dream-orbit-ring.ring-outer {
    width: 195px;
    height: 195px;
  }
  .dream-orbit-ring.ring-inner {
    width: 145px;
    height: 145px;
  }
  .dream-floating-card {
    width: 72px;
    height: 114px;
  }
  .dream-card-dragon {
    left: calc(50% - 110px);
  }
  .dream-card-pig {
    width: 76px;
    height: 120px;
    left: calc(50% - 38px);
  }
  .dream-card-snake {
    left: calc(50% + 38px);
  }
  .dream-detail-tarot-banner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .ddt-btn {
    width: 100%;
  }
}




/* 버튼·도구와 광고 사이에 두는 안내 문장 (바로 아래 내용을 설명) */
.ad-guard { margin: 28px 0 10px; font-size: 15px; line-height: 1.7; color: var(--ink2); }
/* 광고 바로 아래 소제목은 조금 더 띄운다 (그 밑이 링크 목록인 경우가 많다) */
.ad + h3 { margin-top: 36px; }
