/* Bói Kiều — gieo quẻ trên 3254 câu Truyện Kiều. Tông peach/cream pastel Mèo Béo, mobile-first. */
.bk-wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; color: var(--text-main, #5c4b47); }

/* ── Hero ── */
.bk-hero { text-align: center; margin-bottom: 18px; }
.bk-eyebrow {
  display: inline-block; font-weight: 700; font-size: 0.82rem; color: var(--accent, #d67d63);
  background: var(--peach-light, #fff5f2); border: 1px solid var(--border-soft, #ffe6e0);
  padding: 5px 14px; border-radius: 999px; margin: 0 0 10px;
}
.bk-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 2rem; color: var(--accent-soft, #e59882); margin: 0 0 8px; }
.bk-sub { color: var(--text-muted, #8a7772); line-height: 1.65; margin: 0 auto; max-width: 52ch; font-size: 0.95rem; }
.bk-sub strong { color: var(--accent, #d67d63); }

/* ── Sân khấu cuốn sách ── */
.bk-stage {
  position: relative; text-align: center;
  background: radial-gradient(120% 90% at 50% 8%, #fff8ee 0%, #fff3f0 60%, #ffeef0 100%);
  border: 1px solid var(--border-soft, #ffe6e0); border-radius: 28px;
  box-shadow: var(--shadow-card, 0 8px 24px -10px rgba(250, 208, 196, 0.6));
  padding: 16px 18px 24px; margin-bottom: 20px; scroll-margin-top: 90px;
}
.bk-scene { display: grid; place-items: center; }
.bk-book { width: 320px; max-width: 88%; height: auto; }

/* cuốn sách thở nhẹ khi đứng yên */
.bk-book-body { transform-box: fill-box; transform-origin: 50% 90%; animation: bk-float 4.6s ease-in-out infinite; }
@keyframes bk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* trang giấy lật khi đang mở sách */
.bk-leaf { transform-box: fill-box; transform-origin: 0% 50%; opacity: 0; }
.bk-book.opening .bk-book-body { animation: bk-nudge 0.9s ease-in-out infinite; }
.bk-book.opening .bk-leaf { animation: bk-flip 0.62s ease-in infinite; }
.bk-book.opening .bk-leaf2 { animation-delay: 0.31s; }
@keyframes bk-nudge { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes bk-flip {
  0% { opacity: 0; transform: rotateY(0deg); }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: rotateY(-165deg); }
}
.bk-sparkle { transform-box: fill-box; transform-origin: 50% 50%; animation: bk-twinkle 2.8s ease-in-out infinite; }
.bk-sparkle.s2 { animation-delay: 0.9s; }
.bk-sparkle.s3 { animation-delay: 1.7s; }
@keyframes bk-twinkle { 0%, 100% { opacity: 0.35; transform: scale(0.82); } 50% { opacity: 1; transform: scale(1.1); } }

@media (prefers-reduced-motion: reduce) {
  .bk-book-body, .bk-book.opening .bk-book-body, .bk-sparkle { animation: none; }
}

/* ── Bài khấn ── */
.bk-khan {
  margin: 4px auto 18px; max-width: 460px; text-align: left;
  background: #fffaf6; border: 1px dashed var(--primary-peach-hover, #fbc1b0);
  border-radius: 20px; padding: 14px 18px;
}
.bk-khan-title {
  display: flex; align-items: center; gap: 7px; font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 0.86rem; color: var(--accent, #d67d63); margin: 0 0 8px;
}
.bk-khan-title svg { width: 1.15em; height: 1.15em; flex: none; }
.bk-khan p { margin: 0 0 4px; font-size: 0.9rem; line-height: 1.6; color: #7a635d; font-style: italic; }
.bk-khan p:last-child { margin-bottom: 0; }

/* ── Khuôn hỏi quẻ ── */
.bk-form { max-width: 460px; margin: 0 auto; text-align: left; }
.bk-label {
  display: block; font-family: 'Nunito', sans-serif; font-weight: 700;
  font-size: 0.86rem; color: var(--accent, #d67d63); margin: 0 0 7px;
}
.bk-label em { font-style: normal; color: var(--text-muted, #8a7772); font-weight: 600; }
.bk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.bk-chip { position: relative; }
.bk-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.bk-chip span {
  display: inline-block; cursor: pointer; padding: 8px 15px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--border-soft, #ffe6e0);
  font-size: 0.85rem; font-weight: 600; color: #7a635d; transition: 0.2s;
}
.bk-chip input:checked + span {
  background: linear-gradient(135deg, #fad0c4 0%, #fbc1b0 100%);
  border-color: var(--primary-peach-hover, #fbc1b0); color: #7a4a3a; font-weight: 800;
}
.bk-chip input:focus-visible + span { outline: 2px solid var(--accent, #d67d63); outline-offset: 2px; }
.bk-input, .bk-textarea {
  width: 100%; box-sizing: border-box; padding: 12px 15px;
  border: 1.5px solid var(--border-soft, #ffe6e0); border-radius: 16px;
  background: var(--input-bg, #fffaf9); font-family: inherit; font-size: 16px;
  color: var(--text-main, #5c4b47); outline: none; transition: border-color 0.2s;
}
.bk-input:focus, .bk-textarea:focus { border-color: var(--primary-peach-hover, #fbc1b0); }
.bk-textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.bk-count { text-align: right; font-size: 0.76rem; color: var(--text-muted, #8a7772); margin: 5px 0 14px; }

.bk-btn {
  width: 100%; justify-content: center; padding: 15px 26px;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.05rem; cursor: pointer;
  border: none; border-radius: 999px; display: inline-flex; align-items: center; gap: 9px;
  color: #7a4a3a; background: linear-gradient(135deg, #ffd9a0 0%, #ff9e7d 100%);
  box-shadow: 0 8px 20px rgba(255, 158, 125, 0.5); transition: transform 0.25s, box-shadow 0.25s;
}
.bk-btn:hover:not(:disabled) { transform: translateY(-3px) scale(1.01); box-shadow: 0 12px 26px rgba(255, 158, 125, 0.65); }
.bk-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.bk-btn svg { width: 1.3em; height: 1.3em; flex: none; }
.bk-hint { font-size: 0.8rem; color: var(--text-muted, #8a7772); margin: 11px 0 0; min-height: 1.2em; line-height: 1.5; text-align: center; }
.bk-hint.err { color: var(--error-fg, #b03b3b); font-weight: 600; }

/* ── Panel dùng chung ── */
.bk-panel {
  background: #fff; border: 1px solid var(--border-soft, #ffe6e0); border-radius: 24px;
  box-shadow: var(--shadow-card, 0 8px 24px -10px rgba(250, 208, 196, 0.6));
  padding: 22px 22px 24px; margin-bottom: 18px;
}
.bk-panel-title {
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.15rem;
  color: var(--accent, #d67d63); margin: 0 0 6px; padding-bottom: 10px;
  border-bottom: 2px dashed var(--border-soft, #ffe6e0);
}
.bk-panel-sub { color: var(--text-muted, #8a7772); font-size: 0.9rem; line-height: 1.6; margin: 10px 0 16px; }

/* ── Bốn bước ── */
.bk-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.bk-step { display: flex; gap: 12px; align-items: flex-start; }
.bk-step-no {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #fad0c4, #fbc1b0); color: #7a4a3a;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.bk-step b { display: block; font-family: 'Nunito', sans-serif; font-size: 0.95rem; color: var(--text-main, #5c4b47); margin-bottom: 2px; }
.bk-step p { margin: 0; font-size: 0.88rem; line-height: 1.6; color: var(--text-muted, #8a7772); }

/* ── 14 đoạn truyện ── */
.bk-sections { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bk-section {
  display: flex; gap: 11px; align-items: baseline;
  background: var(--peach-light, #fff5f2); border: 1px solid var(--border-soft, #ffe6e0);
  border-radius: 16px; padding: 10px 14px;
}
.bk-section-no {
  flex: none; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.74rem;
  color: var(--accent, #d67d63); background: #fff; border-radius: 999px;
  padding: 3px 10px; white-space: nowrap;
}
.bk-section-name { font-size: 0.88rem; line-height: 1.55; color: var(--text-main, #5c4b47); }

/* ── Nội dung SEO + FAQ ── */
.bk-seo-p { font-size: 0.94rem; line-height: 1.75; color: var(--text-main, #5c4b47); margin: 0 0 14px; }
.bk-seo-p strong { color: var(--accent, #d67d63); }
.bk-verse {
  margin: 0 0 16px; padding: 12px 18px; border-left: 4px solid var(--primary-peach-hover, #fbc1b0);
  background: #fffaf6; border-radius: 0 16px 16px 0; font-size: 0.95rem; line-height: 1.9; color: #7a635d;
}
.bk-faq-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.02rem; color: var(--accent-soft, #e59882); margin: 22px 0 12px; }
.bk-faq {
  border: 1px solid var(--border-soft, #ffe6e0); border-radius: 16px;
  background: var(--peach-light, #fff5f2); margin-bottom: 9px; padding: 0 16px;
}
.bk-faq summary {
  cursor: pointer; list-style: none; padding: 12px 0; font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: 0.92rem; color: var(--text-main, #5c4b47);
}
.bk-faq summary::-webkit-details-marker { display: none; }
.bk-faq summary::after { content: '+'; float: right; color: var(--accent, #d67d63); font-weight: 800; }
.bk-faq[open] summary::after { content: '–'; }
.bk-faq p { margin: 0 0 13px; font-size: 0.89rem; line-height: 1.7; color: var(--text-muted, #8a7772); }

/* ── Khám phá thêm ── */
.bk-promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.bk-promo-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px;
  text-decoration: none; padding: 15px 11px; border-radius: 20px;
  background: linear-gradient(135deg, #fff 0%, var(--peach-light, #fff5f2) 100%);
  border: 1px solid var(--border-soft, #ffe6e0); transition: transform 0.25s, box-shadow 0.25s;
}
.bk-promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card, 0 8px 24px -10px rgba(250, 208, 196, 0.6)); }
.bk-promo-ico { width: 34px; height: 34px; }
.bk-promo-name { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.9rem; color: var(--accent, #d67d63); }
.bk-promo-desc { font-size: 0.78rem; line-height: 1.5; color: var(--text-muted, #8a7772); }

.bk-footnote { text-align: center; font-size: 0.82rem; line-height: 1.7; color: var(--text-muted, #8a7772); margin: 20px auto 0; max-width: 54ch; }

@media (max-width: 560px) {
  .bk-wrap { padding: 18px 12px 52px; }
  .bk-title { font-size: 1.7rem; }
  .bk-panel { padding: 18px 15px 20px; border-radius: 20px; }
  .bk-stage { padding: 12px 12px 20px; border-radius: 22px; }
  .bk-promo-grid { grid-template-columns: 1fr; }
}
