/* =========================================================
   Lunar Soopoolleaf — 별자리
   home.css + time.css 위에 얹습니다.
   ========================================================= */

.zd-main { padding-bottom: 48px; }

.zd-fallback {
  width: min(100%, 460px);
  margin: 10px auto 0;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}


/* ---------- 고른 별자리 ---------- */

.zd-card {
  width: min(100%, 720px);
  margin: 16px auto 0;
  padding: 20px 20px 16px;
  border: 2px solid var(--surface);
  border-top: 5px solid var(--zd);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 16px;
}

.zd-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.zd-symbol {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: color-mix(in srgb, var(--zd) 18%, var(--surface));
  color: var(--zd);
  font-size: 34px;
  line-height: 1;
}

.zd-card-title { display: flex; flex-direction: column; gap: 2px; }
.zd-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.zd-card-title h2 { margin: 0; font-size: clamp(24px, 5vw, 30px); font-weight: 900; letter-spacing: -.03em; }
.zd-dates { font-size: 13px; font-weight: 700; color: var(--muted); }

.zd-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.zd-facts li {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.zd-facts span { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.zd-facts b { font-size: 14px; }

.zd-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.zd-chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
}

.zd-block { display: flex; flex-direction: column; gap: 6px; }

.zd-block h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-ink);
}

.zd-block p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  word-break: keep-all;
}

.zd-planet dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.zd-planet dt { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; padding-top: 3px; }
.zd-planet dd { margin: 0; font-size: 13.5px; line-height: 1.7; word-break: keep-all; }

.zd-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.zd-tarot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 16px;
  background: var(--soft);
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: transform .14s ease;
}

.zd-tarot:hover { transform: translateY(-2px); }

.zd-tarot img {
  width: 90px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(20, 31, 25, .18);
  margin-bottom: 4px;
}

.zd-tarot-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.zd-tarot b { font-size: 14px; }
.zd-tarot small { font-size: 11px; font-weight: 700; color: var(--primary-ink); }

.zd-tarot-suit { justify-content: center; }

.zd-suit-dot {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--zd);
  margin-bottom: 6px;
  box-shadow: 0 8px 20px rgba(20, 31, 25, .18);
}

.zd-actions { display: flex; justify-content: center; }

.zd-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--primary);
  border-radius: 14px;
  background: rgba(82, 183, 136, .10);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.zd-share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }


/* ---------- 12별자리 ---------- */

.zd-all { width: min(100%, 720px); margin: 22px auto 0; }

.zd-all-title { margin: 0 0 10px; font-size: 15px; font-weight: 800; }

.zd-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.zd-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: transform .14s ease, border-color .16s ease;
}

.zd-tile:hover { transform: translateY(-2px); border-color: var(--zd); }
.zd-tile.is-on { border-color: var(--zd); background: color-mix(in srgb, var(--zd) 10%, var(--surface)); }

.zd-tile-symbol { font-size: 24px; line-height: 1; color: var(--zd); margin-bottom: 4px; }
.zd-tile b { font-size: 13.5px; }
.zd-tile-dates { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.zd-tile-meta { font-size: 10px; color: var(--muted); }

.zd-note { margin-top: 18px; }


/* ---------- 토스트 ---------- */

.spread-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 900000;
  max-width: calc(100vw - 28px);
  min-height: 34px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .16s ease, transform .18s ease, visibility .16s ease;
  pointer-events: none;
}

.spread-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }


/* ---------- 모바일 ---------- */

@media (max-width: 640px) {
  .zd-card { padding: 16px 14px 14px; border-radius: 20px; }
  .zd-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .zd-facts b { font-size: 12.5px; }
  .zd-cards { gap: 6px; }
  .zd-tarot img { width: 72px; }
  .zd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .zd-tile { padding: 12px 4px 10px; }
  .zd-tile-dates { font-size: 9.5px; }
  .zd-planet dl { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 380px) {
  .zd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .zd-tarot, .zd-tile { transition: none; }
}
