/* =========================================================
   Lunar Soopoolleaf — 생년월일 수비학 (선 · 문 · 소울 넘버)
   home.css + time.css 위에 얹습니다. 날짜 칸은 time.css 의 .tc-* 를 그대로 씀.
   ========================================================= */

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

.bn-solar {
  margin: 0 2px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  word-break: keep-all;
}

.bn-solar a {
  color: var(--primary-ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}


/* ---------- 결과 세 장 ---------- */

.bn-three {
  width: min(100%, 880px);
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bn-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 12px;
  border: 2px solid var(--surface);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.bn-card-sun  { background: linear-gradient(150deg, rgba(232,151,79,.16), rgba(232,151,79,.04)), var(--surface); }
.bn-card-moon { background: linear-gradient(150deg, rgba(111,143,214,.16), rgba(90,200,189,.05)), var(--surface); }
.bn-card-soul { background: linear-gradient(150deg, rgba(82,183,136,.16), rgba(82,183,136,.04)), var(--surface); }

.bn-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}

.bn-kicker i {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.bn-kicker i svg { width: 16px; height: 16px; }

.bn-card-sun  .bn-kicker i { color: #e8974f; }
.bn-card-moon .bn-kicker i { color: #6f8fd6; }
.bn-card-soul .bn-kicker i { color: var(--primary); }

.bn-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  word-break: keep-all;
}

.bn-body {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.bn-frame {
  flex: 0 0 auto;
  width: 96px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(20, 31, 25, .18);
  line-height: 0;
}

.bn-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.bn-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bn-number {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--text);
}

.bn-card-sun  .bn-number { color: #d8863f; }
.bn-card-moon .bn-number { color: #5f80cc; }
.bn-card-soul .bn-number { color: var(--primary-ink); }

.bn-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.bn-en {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}

.bn-meaning {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  word-break: keep-all;
}

.bn-detail {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-ink);
  text-decoration: none;
}

.bn-detail:hover { text-decoration: underline; }


/* 계산 과정 */

.bn-how {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.bn-how summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.bn-how summary::-webkit-details-marker { display: none; }

.bn-how summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 5px;
  transition: transform .15s ease;
}

.bn-how[open] summary::before { transform: rotate(90deg); }

.bn-how-rule {
  margin: 8px 0 6px;
  line-height: 1.65;
  word-break: keep-all;
}

.bn-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bn-steps li {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
}


/* ---------- 공유 ---------- */

.bn-share {
  width: min(100%, 460px);
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bn-share-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .14s ease, background-color .2s ease, opacity .2s ease;
}

.bn-share-button > span { overflow: hidden; text-overflow: ellipsis; }

.bn-share-button svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bn-share-button:hover { transform: translateY(-1px); }
.bn-share-button:active { transform: translateY(1px); }

.bn-share-button.is-primary {
  border-color: var(--primary);
  background: rgba(82, 183, 136, .10);
}

.bn-share-button.is-busy { opacity: .6; pointer-events: none; }


/* ---------- 빈 화면 설명 ---------- */

.bn-about {
  width: min(100%, 460px);
  margin: 14px auto 0;
  display: grid;
  gap: 8px;
}

.bn-about-row {
  padding: 13px 16px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bn-about-row b { font-size: 13.5px; }
.bn-about-row span { font-size: 11px; font-weight: 600; color: var(--muted); }
.bn-about-row p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--text); word-break: keep-all; }

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


/* ---------- 토스트 (스프레드 CSS 를 안 읽는 페이지용) ---------- */

.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: 760px) {
  .bn-three {
    grid-template-columns: 1fr;
    width: min(100%, 460px);
  }
}

@media (max-width: 420px) {
  .bn-share-button { font-size: 11.5px; gap: 4px; padding: 0 6px; }
  .bn-frame { width: 84px; }
  .bn-number { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .bn-share-button, .bn-how summary::before { transition: none; }
}
