/* ─── MysticPaws · 5-Theme ────────────────────────────────
   테마: mystic(달빛 미스틱·기본) · pastel(파스텔 팝) ·
         vintage(빈티지 타로) · neon(네온 아케이드) ·
         minimal(미니멀 모던)
   body[data-theme]가 변수와 분위기를 결정한다.
──────────────────────────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── 테마 변수 ── */
body[data-theme="mystic"] {
  --font-head: "Jua", "Apple SD Gothic Neo", sans-serif;
  --font-body: "Gowun Dodum", "Apple SD Gothic Neo", sans-serif;
  --text: #e6dff5;
  --text-soft: #a396c9;
  --accent: #b79df1;
  --accent-2: #f0c75e;
  --accent-3: #7fd4c0;
  --panel: rgba(230, 223, 245, 0.05);
  --line: rgba(183, 157, 241, 0.5);
  --line-2: rgba(240, 199, 94, 0.5);
  --line-3: rgba(127, 212, 192, 0.45);
  --gold: #f0c75e;
  --bw: 1.5px;
  --rad: 18px;
  --shadow: 0 12px 30px rgba(10, 6, 30, 0.45);
  --btn-bg: linear-gradient(160deg, #9d7fe0 0%, #7a5cc9 100%);
  --btn-text: #ffffff;
  --btn-line: rgba(183, 157, 241, 0.9);
  --card-back-bg: linear-gradient(160deg, #2a2150 0%, #171230 100%);
  --card-back-line: rgba(240, 199, 94, 0.7);
  --card-front-bg: linear-gradient(160deg, #f9f5ff 0%, #ece2ff 100%);
  --card-front-line: #b79df1;
  background:
    radial-gradient(ellipse 90% 60% at 50% -12%, #2c2158 0%, transparent 62%),
    radial-gradient(ellipse 55% 40% at 85% 100%, #241b49 0%, transparent 60%),
    radial-gradient(1px 1px at 22% 28%, rgba(230, 223, 245, 0.45), transparent),
    radial-gradient(1px 1px at 70% 18%, rgba(240, 199, 94, 0.4), transparent),
    radial-gradient(1px 1px at 42% 70%, rgba(230, 223, 245, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 88% 55%, rgba(183, 157, 241, 0.4), transparent),
    #171230;
}

body[data-theme="pastel"] {
  --font-head: "Jua", "Apple SD Gothic Neo", sans-serif;
  --font-body: "Gowun Dodum", "Apple SD Gothic Neo", sans-serif;
  --text: #5b4a77;
  --text-soft: #8d7fa8;
  --accent: #9d7fe0;
  --accent-2: #ff8fb1;
  --accent-3: #5ec9a8;
  --panel: #ffffff;
  --line: #cdb9f7;
  --line-2: #ffd3e0;
  --line-3: #a8e6cf;
  --gold: #f5b944;
  --bw: 4px;
  --rad: 26px;
  --shadow: 0 10px 24px rgba(157, 127, 224, 0.18);
  --btn-bg: linear-gradient(160deg, #ff8fb1 0%, #ff7aa5 100%);
  --btn-text: #ffffff;
  --btn-line: #ffffff;
  --card-back-bg: linear-gradient(160deg, #cdb9f7 0%, #9d7fe0 100%);
  --card-back-line: #ffffff;
  --card-front-bg: #ffffff;
  --card-front-line: #ffd97a;
  background:
    radial-gradient(ellipse 90% 60% at 15% -5%, #e9defc 0%, transparent 60%),
    radial-gradient(ellipse 80% 55% at 90% 8%, #ffe4ec 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 50% 105%, #d9f5e9 0%, transparent 60%),
    #fff6e5;
}

body[data-theme="vintage"] {
  --font-head: "Song Myung", "Apple SD Gothic Neo", serif;
  --font-body: "Gowun Dodum", "Apple SD Gothic Neo", sans-serif;
  --text: #e9dfc8;
  --text-soft: #a89a7c;
  --accent: #c9a55c;
  --accent-2: #c9a55c;
  --accent-3: #8fa387;
  --panel: rgba(255, 246, 224, 0.045);
  --line: rgba(201, 165, 92, 0.5);
  --line-2: rgba(201, 165, 92, 0.5);
  --line-3: rgba(201, 165, 92, 0.5);
  --gold: #c9a55c;
  --bw: 1px;
  --rad: 8px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  --btn-bg: linear-gradient(160deg, #c9a55c 0%, #a9873f 100%);
  --btn-text: #241d10;
  --btn-line: #e9dfc8;
  --card-back-bg: linear-gradient(160deg, #232041 0%, #16132c 100%);
  --card-back-line: rgba(201, 165, 92, 0.75);
  --card-front-bg: linear-gradient(160deg, #f4ead2 0%, #e6d7b3 100%);
  --card-front-line: #a9873f;
  background:
    radial-gradient(ellipse 100% 65% at 50% -10%, #232041 0%, transparent 65%),
    radial-gradient(1px 1px at 20% 30%, rgba(233, 223, 200, 0.4), transparent),
    radial-gradient(1px 1px at 75% 20%, rgba(233, 223, 200, 0.3), transparent),
    radial-gradient(1px 1px at 40% 75%, rgba(201, 165, 92, 0.35), transparent),
    radial-gradient(1px 1px at 88% 60%, rgba(233, 223, 200, 0.25), transparent),
    #131022;
}

body[data-theme="neon"] {
  --font-head: "Orbit", "Apple SD Gothic Neo", sans-serif;
  --font-body: "Orbit", "Apple SD Gothic Neo", sans-serif;
  --text: #eae6ff;
  --text-soft: #8f87b8;
  --accent: #22e6ff;
  --accent-2: #ff2ea6;
  --accent-3: #b6ff4d;
  --panel: rgba(255, 255, 255, 0.035);
  --line: rgba(34, 230, 255, 0.55);
  --line-2: rgba(255, 46, 166, 0.55);
  --line-3: rgba(182, 255, 77, 0.5);
  --gold: #ffe14d;
  --bw: 1.5px;
  --rad: 10px;
  --shadow: 0 0 22px rgba(34, 230, 255, 0.14);
  --btn-bg: linear-gradient(160deg, #ff2ea6 0%, #d3117e 100%);
  --btn-text: #ffffff;
  --btn-line: rgba(255, 46, 166, 0.9);
  --card-back-bg: linear-gradient(160deg, #191238 0%, #0c0722 100%);
  --card-back-line: rgba(34, 230, 255, 0.8);
  --card-front-bg: #120d2b;
  --card-front-line: #ffe14d;
  background:
    radial-gradient(ellipse 85% 55% at 50% -12%, #1c0f3d 0%, transparent 62%),
    radial-gradient(ellipse 60% 45% at 90% 100%, #250b2e 0%, transparent 60%),
    #07040f;
}

body[data-theme="minimal"] {
  --font-head: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --text: #21201d;
  --text-soft: #8a867d;
  --accent: #21201d;
  --accent-2: #21201d;
  --accent-3: #21201d;
  --panel: #ffffff;
  --line: #e6e2d9;
  --line-2: #e6e2d9;
  --line-3: #e6e2d9;
  --gold: #b9b3a4;
  --bw: 1px;
  --rad: 14px;
  --shadow: 0 2px 10px rgba(33, 32, 29, 0.06);
  --btn-bg: #21201d;
  --btn-text: #faf9f6;
  --btn-line: #21201d;
  --card-back-bg: #f1eee7;
  --card-back-line: #dcd7cb;
  --card-front-bg: #ffffff;
  --card-front-line: #21201d;
  background: #faf9f6;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: color 0.3s ease;
}

/* ── 테마 전환 버튼 ── */
.theme-switch {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  display: flex;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.theme-switch button {
  font-size: 17px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  line-height: 1;
}
.theme-switch button:hover { transform: scale(1.15); }
.theme-switch button.active {
  border-color: var(--accent);
  background: rgba(127, 127, 127, 0.12);
}
.theme-switch .lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  margin-left: 2px;
  border-radius: 999px;
  border: 2px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-soft);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.theme-switch .lang-btn:hover {
  transform: scale(1.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── 떠다니는 장식 ── */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.stars::before,
.stars::after {
  position: absolute;
  font-size: 20px;
  opacity: 0.35;
  word-spacing: 12vw;
  white-space: nowrap;
  animation: drift 32s linear infinite;
  left: -10%;
}
.stars::before { content: ""; top: 16%; }
.stars::after { content: ""; top: 68%; font-size: 17px; animation-duration: 44s; animation-delay: -14s; }
body[data-theme="mystic"] .stars::before,
body[data-theme="mystic"] .stars::after {
  color: var(--gold);
  opacity: 0.45;
}
body[data-theme="mystic"] .stars::before { content: "✦ ☽ 🐾 ✧ ⭐ ☾ ✨"; }
body[data-theme="mystic"] .stars::after  { content: "✧ 🌙 ⋆ 🐾 ✦ ⋆"; }
body[data-theme="pastel"] .stars::before { content: "🌸 ⭐ 🐾 💜 ☁️ 🍀"; }
body[data-theme="pastel"] .stars::after  { content: "☁️ 💛 🐾 🌙 🍑 ⭐"; }
body[data-theme="vintage"] .stars::before,
body[data-theme="vintage"] .stars::after {
  color: var(--gold);
  opacity: 0.4;
  animation: none;
  left: 0;
  width: 100%;
  text-align: center;
  letter-spacing: 10vw;
}
body[data-theme="vintage"] .stars::before { content: "✦ ☽ ✧ ★ ✧ ☾ ✦"; }
body[data-theme="vintage"] .stars::after  { content: "✧ ⋆ ✦ ⋆ ✧"; }
body[data-theme="neon"] .stars::before { content: "✦ ▲ ✧ ● ✦ ◆"; color: var(--accent); opacity: 0.25; }
body[data-theme="neon"] .stars::after  { content: "◆ ✧ ● ✦ ▲"; color: var(--accent-2); opacity: 0.25; }
body[data-theme="minimal"] .stars { display: none; }
@keyframes drift {
  from { transform: translateX(-8vw); }
  to   { transform: translateX(110vw); }
}

/* ── 히어로 ── */
.hero {
  text-align: center;
  padding: 62px 20px 34px;
  position: relative;
  z-index: 1;
}
.hero-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 54px;
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: 999px;
  padding: 16px 32px;
  box-shadow: var(--shadow);
}
body[data-theme="pastel"] .hero-cat { animation: squish 3s ease-in-out infinite; }
body[data-theme="minimal"] .hero-cat { background: transparent; border-color: transparent; box-shadow: none; padding: 0; }
@keyframes squish {
  0%, 100% { transform: scale(1, 1); }
  30%      { transform: scale(1.04, 0.94); }
  60%      { transform: scale(0.96, 1.05); }
}
.mascot {
  width: 84px;
  height: 84px;
  display: block;
}
.hero-cat { gap: 12px; }
.doge-face img {
  width: 108px;
  height: 108px;
  display: block;
}
.hero-doge-face { display: inline-block; }
body[data-theme="pastel"] .hero-doge-face { animation: tilt 3s ease-in-out 0.3s infinite; }
@keyframes tilt {
  0%, 100% { transform: rotate(0); }
  50%      { transform: rotate(10deg); }
}
.hero-title {
  margin-top: 22px;
  font-family: var(--font-head);
  font-size: clamp(32px, 6.5vw, 54px);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 1px;
}
.hero-title .accent { color: var(--accent-2); }
body[data-theme="pastel"] .hero-title { text-shadow: 3px 3px 0 #ffffff, 5px 5px 0 #ffd3e0; }
body[data-theme="mystic"] .hero-title { text-shadow: 0 0 28px rgba(183, 157, 241, 0.55); }
body[data-theme="mystic"] .hero-title .accent { text-shadow: 0 0 28px rgba(240, 199, 94, 0.5); }
body[data-theme="vintage"] .hero-title { letter-spacing: 4px; text-shadow: 0 0 26px rgba(201, 165, 92, 0.35); }
body[data-theme="neon"] .hero-title {
  text-shadow: 0 0 10px rgba(34, 230, 255, 0.9), 0 0 34px rgba(34, 230, 255, 0.45);
}
body[data-theme="neon"] .hero-title .accent {
  text-shadow: 0 0 10px rgba(255, 46, 166, 0.9), 0 0 34px rgba(255, 46, 166, 0.45);
}
body[data-theme="minimal"] .hero-title { font-weight: 600; letter-spacing: -1px; }
.hero-sub { margin-top: 12px; color: var(--text-soft); font-size: clamp(14px, 2.6vw, 17px); }
.hero-doge {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--accent-3);
  border: 1px dashed var(--line-3);
  border-radius: 999px;
  padding: 6px 18px;
}
body[data-theme="minimal"] .hero-doge { border-style: solid; color: var(--text-soft); }

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 10px 20px 80px;
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(20px, 3.5vw, 26px);
  margin-bottom: 20px;
  color: var(--text);
}
body[data-theme="minimal"] .section-title { font-weight: 600; }

.hidden { display: none !important; }

/* ── 모드 선택 ── */
.mode-buttons {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.mode-btn {
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--rad);
  padding: 26px 24px;
  width: 250px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
body[data-theme="pastel"] .mode-btn:nth-child(2) { border-color: var(--line-2); }
body[data-theme="pastel"] .mode-btn:nth-child(3) { border-color: var(--line-3); }
body[data-theme="neon"] .mode-btn:nth-child(1) { box-shadow: 0 0 18px rgba(34, 230, 255, 0.18), inset 0 0 12px rgba(34, 230, 255, 0.06); }
body[data-theme="neon"] .mode-btn:nth-child(2) { border-color: var(--line-2); box-shadow: 0 0 18px rgba(255, 46, 166, 0.18), inset 0 0 12px rgba(255, 46, 166, 0.06); }
body[data-theme="neon"] .mode-btn:nth-child(3) { border-color: var(--line-3); box-shadow: 0 0 18px rgba(182, 255, 77, 0.15), inset 0 0 12px rgba(182, 255, 77, 0.05); }
.mode-btn:hover { transform: translateY(-6px); }
body[data-theme="pastel"] .mode-btn:hover { transform: translateY(-6px) rotate(-1.5deg); }
body[data-theme="minimal"] .mode-btn:hover { border-color: var(--accent); }
.mode-btn:active { transform: translateY(-2px) scale(0.97); }
.mode-emoji { font-size: 38px; }
.mode-illust { width: 70px; height: 70px; }
body[data-theme="pastel"] .mode-emoji,
body[data-theme="pastel"] .mode-illust { animation: bob 2.4s ease-in-out infinite; }
body[data-theme="pastel"] .mode-btn:nth-child(2) .mode-emoji,
body[data-theme="pastel"] .mode-btn:nth-child(2) .mode-illust { animation-delay: 0.3s; }
body[data-theme="pastel"] .mode-btn:nth-child(3) .mode-emoji,
body[data-theme="pastel"] .mode-btn:nth-child(3) .mode-illust { animation-delay: 0.6s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.mode-name { font-family: var(--font-head); font-size: 18px; color: var(--accent); }
body[data-theme="pastel"] .mode-btn:nth-child(2) .mode-name { color: var(--accent-2); }
body[data-theme="pastel"] .mode-btn:nth-child(3) .mode-name { color: var(--accent-3); }
body[data-theme="neon"] .mode-btn:nth-child(2) .mode-name { color: var(--accent-2); }
body[data-theme="neon"] .mode-btn:nth-child(3) .mode-name { color: var(--accent-3); }
body[data-theme="minimal"] .mode-name { font-weight: 600; }
.mode-desc { font-size: 13px; color: var(--text-soft); }

/* ── 카드 스프레드 ── */
.spread-style {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.spread-style button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 12.5px;
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.spread-style button:hover { transform: translateY(-2px); }
.spread-style button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(127, 127, 127, 0.1);
}

.spread-count {
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 24px;
}
.deck {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  perspective: 1200px;
  margin-bottom: 30px;
}
.card {
  width: 64px;
  height: 100px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.1, 0.2, 1);
  border-radius: calc(var(--rad) * 0.7);
}
.card:not(.flipped):hover { transform: translateY(-10px) rotate(-3deg); }
.card.flipped { transform: rotateY(180deg); cursor: default; }
.card.dimmed { opacity: 0.3; pointer-events: none; transition: opacity 0.4s ease; }
.card-face {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--rad) * 0.7);
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.card-back-face {
  background: var(--card-back-bg);
  border: var(--bw) solid var(--card-back-line);
  box-shadow: var(--shadow);
  font-size: 30px;
}
.card-back-img { width: 58%; height: auto; }
.card-back-face::after {
  position: absolute;
  bottom: 9px;
  font-size: 12px;
  opacity: 0.85;
}
body[data-theme="mystic"] .card-back-face::after { content: "🐾"; }
body[data-theme="mystic"] .card-front-face { color: #4a3d6b; }
body[data-theme="pastel"] .card-back-face::after { content: "♡"; color: #fff; }
body[data-theme="vintage"] .card-back-face::after { content: "✦"; color: var(--gold); }
body[data-theme="neon"] .card-back-face::after { content: "▲"; color: var(--accent); }
body[data-theme="minimal"] .card-back-face { font-size: 24px; filter: grayscale(1); opacity: 0.9; }
body[data-theme="minimal"] .card-back-face::after { content: "·"; color: var(--text-soft); }
body[data-theme="neon"] .card-back-face { box-shadow: 0 0 16px rgba(34, 230, 255, 0.25); }
.card-front-face {
  transform: rotateY(180deg);
  background: var(--card-front-bg);
  border: var(--bw) solid var(--card-front-line);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 8px;
  text-align: center;
}
body[data-theme="vintage"] .card-front-face { color: #4a3b22; }
body[data-theme="neon"] .card-front-face { box-shadow: 0 0 18px rgba(255, 225, 77, 0.3); }
.card-front-face .card-emoji { font-size: 34px; }
.card-front-face .card-illust { width: 46px; height: 46px; }
.card-front-face .card-no {
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-top: 4px;
  color: var(--text-soft);
}
body[data-theme="vintage"] .card-front-face .card-no { color: #8a7347; }
.card-front-face .card-name {
  font-family: var(--font-head);
  font-size: 9px;
  margin-top: 2px;
  line-height: 1.3;
  color: var(--accent);
}
body[data-theme="vintage"] .card-front-face .card-name { color: #6d5426; }
body[data-theme="neon"] .card-front-face .card-name { color: var(--gold); }

/* 부채꼴 스프레드 — --fa(-1~1)에 따라 아래쪽 먼 축을 중심으로 회전 */
.deck.fan {
  display: block;
  position: relative;
  height: 440px;
}
.deck.fan .card {
  position: absolute;
  left: calc(50% - 32px);
  top: 12px;
  transform-origin: 50% 620px;
  transform: rotate(calc(var(--fa) * 52deg));
}
.deck.fan .card:not(.flipped):hover {
  transform: rotate(calc(var(--fa) * 52deg)) translateY(-18px);
  z-index: 20;
}
.deck.fan .card.flipped {
  transform: rotate(calc(var(--fa) * 52deg)) rotateY(180deg) translateY(-14px);
  z-index: 10;
}

/* 셔플 딜링 — 22장이 회전하며 날아와 자리를 잡는다 */
.deck.deal .card {
  width: 84px;
  height: 132px;
  animation: deal-in 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) backwards;
}
@keyframes deal-in {
  from {
    transform: translateY(-160px) rotate(540deg) scale(0.25);
    opacity: 0;
  }
}

/* ── 결과 ── */
.result-mascot {
  text-align: center;
  margin-bottom: 16px;
}
.result-mascot img {
  width: 100px;
  height: 100px;
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.reading {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 26px;
}
.reading-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--rad);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.reading-card:nth-child(2) { border-color: var(--line-2); animation-delay: 0.12s; }
.reading-card:nth-child(3) { border-color: var(--line-3); animation-delay: 0.24s; }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.reading-emoji {
  font-size: 38px;
  flex-shrink: 0;
  border-radius: calc(var(--rad) * 0.6);
  padding: 10px;
  background: rgba(127, 127, 127, 0.08);
}
.reading-illust {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  border-radius: calc(var(--rad) * 0.6);
  padding: 8px;
  background: rgba(127, 127, 127, 0.08);
}
.reading-body { flex: 1; }
.reading-slot {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--btn-text);
  background: var(--accent);
  border-radius: 999px;
  padding: 3px 12px;
}
body[data-theme="pastel"] .reading-slot { color: #fff; }
body[data-theme="pastel"] .reading-card:nth-child(2) .reading-slot { background: var(--accent-2); }
body[data-theme="pastel"] .reading-card:nth-child(3) .reading-slot { background: var(--accent-3); }
body[data-theme="vintage"] .reading-slot { color: #241d10; }
body[data-theme="neon"] .reading-slot { color: #07040f; }
body[data-theme="neon"] .reading-card:nth-child(2) .reading-slot { background: var(--accent-2); color: #fff; }
body[data-theme="neon"] .reading-card:nth-child(3) .reading-slot { background: var(--accent-3); }
.reading-title {
  font-family: var(--font-head);
  font-size: 18px;
  color: var(--text);
  margin: 8px 0 8px;
}
.reading-text { font-size: 15px; line-height: 1.8; color: var(--text); }
.reading-keywords { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.keyword {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  background: transparent;
}

.fortune-summary {
  text-align: center;
  background: var(--panel);
  border: 1.5px dashed var(--accent-2);
  border-radius: var(--rad);
  padding: 20px 22px;
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.8;
  box-shadow: var(--shadow);
}
body[data-theme="minimal"] .fortune-summary { border-style: solid; border-color: var(--line); }
.fortune-summary .lucky { font-family: var(--font-head); color: var(--accent-2); }
body[data-theme="vintage"] .fortune-summary .lucky,
body[data-theme="minimal"] .fortune-summary .lucky { color: var(--accent); }
body[data-theme="minimal"] .fortune-summary .lucky { font-weight: 600; }

/* ── 포춘도지 ── */
.doge-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-bottom: 32px;
}
.doge-face {
  font-size: 80px;
  background: var(--panel);
  border: var(--bw) solid var(--card-front-line);
  border-radius: 50%;
  padding: 20px;
  box-shadow: var(--shadow);
  animation: doge-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body[data-theme="neon"] .doge-face { box-shadow: 0 0 24px rgba(255, 225, 77, 0.35); }
@keyframes doge-bounce {
  0%   { transform: scale(0.3) rotate(-16deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.doge-bubble {
  position: relative;
  max-width: 520px;
  background: var(--panel);
  border: var(--bw) solid var(--line-2);
  color: var(--text);
  border-radius: var(--rad);
  padding: 22px 28px;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
  box-shadow: var(--shadow);
  animation: bubble-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.doge-bubble::before {
  content: "";
  position: absolute;
  top: calc(-10px - var(--bw) * 2);
  left: 50%;
  transform: translateX(-50%);
  border: 11px solid transparent;
  border-bottom-color: var(--line-2);
  border-top: none;
}
@keyframes bubble-pop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.doge-lucky {
  font-family: var(--font-head);
  color: var(--accent-3);
  font-size: 15px;
  border: 1px dashed var(--line-3);
  border-radius: 999px;
  padding: 8px 22px;
}
body[data-theme="minimal"] .doge-lucky { border-style: solid; color: var(--text); }
.doge .ghost-btn { margin-top: 12px; }

/* ── 버튼 ── */
.primary-btn {
  display: block;
  margin: 0 auto;
  font-family: var(--font-head);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 17px;
  border: 2px solid var(--btn-line);
  border-radius: 999px;
  padding: 14px 42px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow);
}
body[data-theme="pastel"] .primary-btn { border-width: 4px; box-shadow: 0 10px 24px rgba(255, 143, 177, 0.4); }
body[data-theme="neon"] .primary-btn { box-shadow: 0 0 20px rgba(255, 46, 166, 0.5); }
.primary-btn:hover { transform: translateY(-3px) scale(1.02); }
.primary-btn:active { transform: scale(0.96); }
.ghost-btn {
  display: block;
  margin: 0 auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 13px;
  border-radius: 999px;
  padding: 9px 24px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ── 히어로 메뉴 ── */
.home-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.home-nav a {
  font-family: var(--font-head);
  font-size: 14px;
  color: var(--text-soft);
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.home-nav a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── 홈 본문 텍스트 ── */
.prose {
  max-width: 680px;
  margin: 0 auto 8px;
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--rad);
  box-shadow: var(--shadow);
  padding: 26px 30px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.prose p { margin-bottom: 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose ol { margin: 0 0 0 20px; }
.prose li { margin-bottom: 10px; }
.prose a { color: var(--accent); }
.prose strong { color: var(--accent); }

/* ── FAQ ── */
.faq details {
  max-width: 680px;
  margin: 0 auto 10px;
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--rad);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 15px;
  color: var(--text);
  padding: 16px 22px;
  list-style: none;
}
.faq summary::before { content: "🐾 "; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: var(--accent); }
.faq details p {
  padding: 0 22px 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-soft);
}
.faq details a { color: var(--accent); }

/* ── 더 알아보기 ── */
.learn {
  max-width: 860px;
  margin: 60px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
.learn-intro {
  text-align: center;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.8;
  max-width: 620px;
  margin: 0 auto 26px;
}
.learn-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.learn-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: var(--bw) solid var(--line);
  border-radius: var(--rad);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.learn-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.learn-name {
  display: block;
  font-family: var(--font-head);
  font-size: 16px;
  margin-bottom: 6px;
}
.learn-desc {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
}

footer {
  text-align: center;
  padding: 34px 20px 46px;
  color: var(--text-soft);
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.footer-mascots img { width: 110px; height: auto; opacity: 0.95; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin: 10px 0 14px;
}
.footer-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
}
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
footer p:first-of-type { font-family: var(--font-head); color: var(--text); }
.footer-small { margin-top: 6px; font-size: 12px; }

@media (max-width: 540px) {
  .hero-cat { font-size: 40px; padding: 12px 24px; }
  .mascot { width: 62px; height: 62px; }
  .doge-face img { width: 84px; height: 84px; }
  .deck { gap: 7px; }
  .card { width: 44px; height: 68px; border-radius: 10px; }
  .deck.fan { height: 250px; }
  .deck.fan .card {
    left: calc(50% - 22px);
    transform-origin: 50% 400px;
    transform: rotate(calc(var(--fa) * 32deg));
  }
  .deck.fan .card:not(.flipped):hover { transform: rotate(calc(var(--fa) * 32deg)) translateY(-14px); }
  .deck.fan .card.flipped { transform: rotate(calc(var(--fa) * 32deg)) rotateY(180deg) translateY(-10px); }
  .deck.deal .card { width: 60px; height: 94px; }
  .card-face { border-radius: 10px; }
  .card-front-face .card-emoji { font-size: 25px; }
  .card-front-face .card-illust { width: 34px; height: 34px; }
  .reading-illust { width: 52px; height: 52px; }
  .card-front-face .card-no,
  .card-front-face .card-name { display: none; }
  .reading-card { padding: 16px; gap: 12px; }
  .reading-emoji { font-size: 30px; padding: 8px; }
  .doge-face { font-size: 60px; }
  .theme-switch { top: 8px; right: 8px; }
}
