/* 운세 번호 (/fortune, /fortune/dream·tarot·star·animal·mbti). 색은 style.css 의 이름표(변수)를 그대로 쓴다. */

/* ── 운세 모음 ── */
.fortune-hero h2 { font-size: 1.35rem; line-height: 1.35; word-break: keep-all; }
.fortune-kicker { color: var(--gold); font-weight: 800; font-size: .85rem; letter-spacing: .04em; margin-bottom: 4px; }
.fortune-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .fortune-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fortune-tile { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--card-shadow); color: var(--ink); text-decoration: none; }
.fortune-tile b { display: block; font-size: 1rem; }
.fortune-tile small { display: block; color: var(--sub); font-size: .8rem; line-height: 1.3; word-break: keep-all; }
.fortune-tile .tile-dot { flex: 0 0 auto; }
.fortune-tile:hover { border-color: var(--emerald-500); }
.fortune-login-hint { text-align: center; }

/* 홈의 운세 칸: 방법별 바로가기 */
.fortune-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
/* 보라 바탕이 밝은 오른쪽에서도 흰 글씨가 잘 읽히게 칩 바탕은 어둡게 (대비 4.5:1 이상) */
.fortune-chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: 999px; background: rgb(0 0 0 / 22%); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; }
.fortune-chips a:hover { background: rgb(0 0 0 / 34%); }

/* ── 방법별 화면 머리 칸 ── */
.fortune-head h2 { margin-bottom: 4px; }
.fortune-crumb { margin-bottom: 6px; font-size: .85rem; }
.fortune-crumb a { color: #fff; opacity: .9; }

/* ── 결과 ── */
.fortune-balls { margin-top: 4px; }
.fortune-actions { margin-top: 12px; }
.fortune-daily { margin-top: 8px; font-size: .8rem; }
.fortune-reading .reading-row { padding: 10px 0; border-top: 1px solid var(--outline); }
.fortune-reading .reading-row:first-of-type { border-top: 0; padding-top: 0; }
.fortune-reading .reading-row p { margin-top: 2px; }

/* ── 꿈 해몽: 고르는 칸 ── */
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--input-border); background: var(--surface-variant); color: var(--ink); font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--emerald-700); border-color: var(--emerald-700); color: #fff; }
.chip.picked { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 800; }
.picked-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 4px; min-height: 40px; }
.picked-row .label { margin-right: 4px; }
.dream-choices h3 { font-size: .9rem; color: var(--sub); margin: 12px 0 6px; }
.dream-meaning { padding: 8px 0; }
.dream-meaning p { color: var(--sub); margin-top: 2px; }
.luck-tag { display: inline-block; border-radius: 999px; background: var(--index-bg); color: var(--index-text); font-size: .75rem; font-weight: 800; padding: 1px 8px; vertical-align: middle; }

/* ── 타로 ── */
/* 여섯 자리는 휴대폰에서도 한 줄 (카드 더미가 바로 아래 보이게) */
.tarot-slots { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 640px) { .tarot-slots { gap: 12px; } }
.tarot-slot { display: grid; gap: 4px; align-content: start; }
.slot-name { font-size: .7rem; line-height: 1.25; font-weight: 700; color: var(--sub); text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
/* 자리 이름이 한 줄이든 두 줄이든 카드 칸의 높이가 맞게 */
.tarot-slot .slot-name { min-height: 2.5em; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .slot-name { font-size: .8rem; } }
.tarot-empty { aspect-ratio: 2 / 3; border: 2px dashed var(--outline); border-radius: 8px; }
.tarot-face { margin: 0; display: grid; gap: 4px; }
.tarot-face img, .tarot-face svg { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 8px; box-shadow: 0 2px 8px rgb(0 0 0 / 25%); background: #0d3a2f; }
.tarot-face figcaption { font-size: .72rem; line-height: 1.25; font-weight: 700; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
@media (min-width: 640px) { .tarot-face figcaption { font-size: .8rem; } }
.flip-in { animation: tarot-flip 650ms ease-out; }
@keyframes tarot-flip {
  from { transform: perspective(700px) rotateY(90deg); opacity: .4; }
  to { transform: perspective(700px) rotateY(0); opacity: 1; }
}
.tarot-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 4px; max-width: 640px; margin: 16px auto 0; }
@media (min-width: 640px) { .tarot-deck { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; } }
.tarot-back { aspect-ratio: 2 / 3; padding: 0; border: 1px solid rgb(212 175 55 / 70%); border-radius: 5px; background: #0d3a2f url(../img/tarot/back.webp) center / cover; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease; }
.tarot-back:hover, .tarot-back:focus-visible { transform: translateY(-4px); box-shadow: 0 4px 10px rgb(0 0 0 / 35%); }
.tarot-back.taken { visibility: hidden; }
.tarot-readings { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.tarot-reading { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; }
.tarot-reading h3 { margin: 2px 0 4px; font-size: 1rem; }
.tarot-reading .slot-name { text-align: left; }
/* 카드 메시지 목록은 옆 제목에 이름이 있어 그림 아래 이름은 감춘다 */
.tarot-reading figcaption { display: none; }
.tarot-reading p { color: var(--ink); }

/* ── MBTI ── */
.mbti-pairs { display: grid; gap: 8px; }
.mbti-pair button b { margin-right: 4px; }
.blood-choice { flex-wrap: wrap; }
.blood-choice button { flex: 1 0 auto; min-width: 64px; }
.mbti-now { margin-top: 12px; font-size: 1.05rem; text-align: center; }

/* ── 설명 글 (검색용 서버 페이지와 화면이 함께 쓴다) ── */
.fortune-guide summary { cursor: pointer; font-weight: 800; min-height: 32px; }
.fortune-guide[open] summary { margin-bottom: 8px; }
.fortune-guide h2, .fortune-guide-open h2 { font-size: 1.05rem; margin: 18px 0 8px; }
.fortune-guide h3, .fortune-guide-open h3 { font-size: .95rem; margin: 14px 0 6px; }
.guide-steps { margin: 6px 0; padding-left: 22px; display: grid; gap: 6px; }
.guide-table { font-size: .88rem; }
.guide-table td, .guide-table th { white-space: nowrap; }
.guide-dl, .dream-list { margin: 0; display: grid; gap: 8px; }
.guide-dl dt, .dream-list dt { font-weight: 800; }
.guide-dl dd, .dream-list dd { margin: 0; color: var(--sub); }
.guide-cards { padding-left: 18px; display: grid; gap: 4px; }

@media (prefers-reduced-motion: reduce) {
  .flip-in { animation: none; }
  .tarot-back { transition: none; }
  .tarot-back:hover, .tarot-back:focus-visible { transform: none; }
}
