/**
 * Khối "góc nhìn khác" giữa các trang bói (boi_flow_crosslinks trong functions.php).
 * Nạp ở mọi trang vì cả trang Bói Tình Yêu (không dùng flow-shell) cũng có khối này.
 * Trang riêng chỉnh số cột trong daily.css, knowledge.css, card-post.css, love.css.
 */
.flow-crosslinks {
    margin: 1.8rem auto 0;
    padding: 1.3rem 1.2rem 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--theme-surface-3);
    background: var(--theme-surface-1);
}
.flow-crosslinks-title {
    margin: 0 0 0.9rem;
    text-align: center;
    color: var(--theme-text-secondary);
    font-weight: 700;
    font-size: 1rem;
}
.flow-crosslinks-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}
.flow-crosslink {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-0, rgba(255,255,255,0.03));
    text-decoration: none;
    color: var(--theme-text-body);
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.flow-crosslink:hover {
    border-color: var(--theme-gold-text);
    background: rgba(var(--boi-tint-rgb), 0.08);
    transform: translateY(-2px);
}
.flow-crosslink-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--theme-text-muted);
}
.flow-crosslink-name {
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--theme-gold-text);
}
.flow-crosslink-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--theme-text-soft);
}
@media (max-width: 720px) {
    .flow-crosslinks { padding: 1.1rem 0.9rem 1rem; }
    .flow-crosslinks-grid { grid-template-columns: 1fr; gap: 0.6rem; }
    .flow-crosslink { padding: 0.8rem 0.9rem; }
}

/* 4 thẻ: 4 cột trên máy tính, 2 cột trên máy tính bảng. */
@media (min-width: 1001px) {
    .flow-crosslinks.is-n4 .flow-crosslinks-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1000px) and (min-width: 721px) {
    .flow-crosslinks.is-n4 .flow-crosslinks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hàng "Hoặc thử" — mọi công cụ còn lại, dạng chip. */
.flow-crosslinks .flow-crosslinks-more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 0;
}
.flow-crosslinks-more-t {
    font-size: 0.85rem;
    color: var(--theme-text-muted);
    margin-right: 0.15rem;
}
.flow-crosslink-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-0, rgba(255,255,255,0.03));
    color: var(--theme-text-body);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.flow-crosslink-chip:hover,
.flow-crosslink-chip:focus-visible {
    border-color: var(--theme-gold-text);
    color: var(--theme-gold-text);
    background: rgba(var(--boi-tint-rgb), 0.08);
}
@media (max-width: 720px) {
    .flow-crosslinks .flow-crosslinks-more { justify-content: flex-start; }
    .flow-crosslinks-more-t { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .flow-crosslink, .flow-crosslink-chip { transition: none; }
    .flow-crosslink:hover { transform: none; }
}

/* Thẻ bấm được toàn bộ nhưng anchor text chỉ là từ khoá: <div class="xl-card"> … <a class="xl-stretch">từ khoá</a>.
   Dùng ở khối góc nhìn khác, Thần số học, Bói Tình Yêu, trang chủ, trang từng lá. */
.xl-card { position: relative; cursor: pointer; }
.xl-stretch { text-decoration: none; }
.flow-crosslink-name .xl-stretch, .home-card-today-name .xl-stretch { color: inherit; }
.xl-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.xl-stretch:focus-visible { outline: none; }
.xl-card:focus-within { outline: 2px solid var(--theme-gold-text); outline-offset: 2px; }
.flow-crosslink:hover .xl-stretch, .flow-crosslink:focus-within .xl-stretch { text-decoration: underline; text-underline-offset: 3px; }

/* Link sang bài từng lá: mũi tên vẽ bằng CSS để không lẫn vào anchor text. */
#dlPostLink::after, .dl-past-link::after, .flow-sheet-link::after { content: " →"; }

/* Footer studio: Giới thiệu · Xem bói (công cụ chính) · Về Boihangngay · Liên hệ · Mạng xã hội (has-g1; các lớp has-g3–5 giữ cho bố cục cũ).
   footer.php gắn has-gN (N = số nhóm, boi_studio_groups). Từ 4 nhóm: phần giới thiệu lên một hàng riêng. */
@media (min-width: 1201px) {
    .footer-row { grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); gap: 2.25rem; }
    .footer-row.has-g1 { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); }
    .footer-row.has-g3 { grid-template-columns: 1.4fr repeat(6, minmax(0, 1fr)); gap: 1.75rem; }
    .footer-row.has-g4 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1.5rem; }
    .footer-row.has-g5 { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1.5rem; }
    .footer-row.has-g4 .footer-col-about,
    .footer-row.has-g5 .footer-col-about { grid-column: 1 / -1; max-width: 640px; margin-bottom: 0.75rem; }
}

/* Footer chỉ còn một cột "Xem bói" (công cụ chính, 19/10/2026) + dòng "Xem tất cả kiểu bói". */
.footer-links .footer-all a { font-weight: 800; color: var(--theme-gold-text); }

/* Footer chưa có logo ảnh: hiện tên site. */
.footer-site-name { font-size: 1.6rem; font-weight: 800; color: var(--theme-gold-text); text-decoration: none; }

/* ==========================================================================
   Bản Kẹo bông (07/10/2026) — cùng ngôn ngữ trang chủ: chữ nhỏ trên tiêu đề, thẻ trắng bo tròn có icon nhãn dán,
   chip có icon. Trang công cụ có lượt bói: khối ẩn tới khi khách bói xong (.is-after[hidden] → .is-in).
   Chọn lọc .flow-crosslinks.xl2 để thắng cute.css (nạp sau). Không đặt số cột — trang riêng tự chia.
   ========================================================================== */
.flow-crosslinks.xl2 {
    margin: 28px auto 0; padding: 26px 26px 22px; border-radius: var(--boi-r-xl, 32px);
    border: 1px solid var(--theme-border); background: var(--theme-bg-elevated); box-shadow: var(--boi-card-shadow);
}
.flow-crosslinks.xl2.is-after { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.flow-crosslinks.xl2.is-after.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .flow-crosslinks.xl2.is-after { transition: none; transform: none; } }
.flow-crosslinks.xl2 .xl2-head { text-align: center; margin-bottom: 16px; }
.flow-crosslinks.xl2 .xl2-eyebrow { display: inline-block; margin-bottom: 4px; font-size: .78rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--theme-gold-text); }
.flow-crosslinks.xl2 .flow-crosslinks-title { margin: 0; font-family: var(--boi-font-head); font-weight: 900; font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--theme-text-strong); }
.flow-crosslinks.xl2 .xl2-sub { margin: 4px 0 0; font-size: .92rem; color: var(--theme-text-soft); }
.flow-crosslinks.xl2 .flow-crosslinks-grid { list-style: none; margin: 0; padding: 0; gap: 14px; }
.flow-crosslinks.xl2 .flow-crosslink {
    position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: start; flex-direction: initial;
    padding: 18px; border-radius: var(--boi-r-lg, 24px); border: 1px solid var(--theme-border); background: var(--theme-bg);
    box-shadow: none; text-align: left; transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.flow-crosslinks.xl2 .flow-crosslink:hover { transform: translateY(-3px); border-color: var(--theme-border-strong); box-shadow: var(--boi-card-shadow-hover); background: var(--theme-bg); }
.flow-crosslinks.xl2 .flow-crosslink:hover .xl2-ic { transform: rotate(-6deg) scale(1.05); }
.flow-crosslinks.xl2 .xl2-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 18px; background: var(--theme-surface-2); box-shadow: inset 0 0 0 1px var(--theme-border); transition: transform .25s ease; }
.flow-crosslinks.xl2 .xl2-ic .boi-ic { display: block; width: 36px; height: 36px; }
.flow-crosslinks.xl2 .xl2-body { display: grid; gap: 3px; min-width: 0; }
.flow-crosslinks.xl2 .flow-crosslink-kicker { font-size: .78rem; font-weight: 900; letter-spacing: 0; text-transform: none; color: var(--theme-gold-text); }
.flow-crosslinks.xl2 .flow-crosslink-name { font-size: 1.06rem; font-weight: 900; color: var(--theme-text-strong); }
.flow-crosslinks.xl2 .flow-crosslink-name a { color: var(--theme-text-strong) !important; text-decoration: none; }
.flow-crosslinks.xl2 .flow-crosslink:hover .flow-crosslink-name a { color: var(--theme-gold-text) !important; }
.flow-crosslinks.xl2 .flow-crosslink-desc { font-size: .88rem; line-height: 1.5; color: var(--theme-text-soft); }
.flow-crosslinks.xl2 .xl-stretch::after { content: ""; position: absolute; inset: 0; border-radius: var(--boi-r-lg, 24px); }
.flow-crosslinks.xl2 .flow-crosslinks-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 0; }
.flow-crosslinks.xl2 .flow-crosslinks-more-t { font-size: .84rem; color: var(--theme-text-muted); }
.flow-crosslinks.xl2 .flow-crosslink-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 4px 14px 4px 6px; border-radius: 999px;
    font-size: .88rem; font-weight: 800; color: var(--theme-text-strong); background: var(--theme-bg); border: 1px solid var(--theme-border); text-decoration: none;
}
.flow-crosslinks.xl2 .flow-crosslink-chip:hover { border-color: var(--theme-border-strong); background: var(--theme-surface-2); }
.flow-crosslinks.xl2 .flow-crosslink-chip .boi-ic { display: block; width: 26px; height: 26px; }
@media (max-width: 768px) {
    .flow-crosslinks.xl2 { padding: 20px 14px 16px; border-radius: var(--boi-r-lg, 24px); }
    .flow-crosslinks.xl2 .flow-crosslinks-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Trang có bói trả phí (10/10/2026): 1 link nhỏ dưới khung bói (dẫn xuống mục trong bài của chính trang)
   + mục "Đọc thêm" sau Câu hỏi thường gặp (boi_flow_readmore, in trong .bc của boi-page-copy). Màu theo biến Kẹo bông. ===== */
.flow-sublink { margin: 0.9rem 0 0; text-align: center; font-size: 0.92rem; }
.flow-sublink a { color: var(--theme-gold-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.bc-readmore-list { list-style: none; margin: 0 auto; padding: 0.4rem 1.4rem; max-width: 900px; border-radius: var(--boi-r-lg, 24px);
    background: var(--theme-bg-elevated); border: 1px solid var(--theme-border); box-shadow: var(--boi-card-shadow); }
.bc-readmore-list li { padding: 0.85rem 0; border-top: 1px dashed var(--theme-border-strong); line-height: 1.65; color: var(--theme-text-body); }
.bc-readmore-list li:first-child { border-top: 0; }
.bc-readmore-list a { font-weight: 800; color: var(--theme-gold-text); text-decoration: none; }
.bc-readmore-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 768px) { .bc-readmore-list { padding: 0.2rem 1rem; } }
