@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Charm:wght@400;700&family=Charmonman:wght@400;700&family=Arizonia&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --lapque-primary: #005f66;
    --lapque-primary-dark: #003e43;
    --lapque-primary-light: #e6f4f5;
    --lapque-success: #00a856;
    --lapque-alert: #d50505;
    --lapque-bg: #f4eee3;
    --lapque-parchment: #fffdf8;
    --lapque-gold-solid: #c5a059;
    --lapque-gold-metallic: #d4af37;
    --lapque-gold-light: #fff9e6;
}

/* ==========================================================
   1. FULL VIEWPORT FIXED BACKGROUND (COVER & FIXED SCROLL)
   ========================================================== */
body {
    background-color: var(--lapque-bg) !important;
    background-image: url("../images/bg-que-menh-ly.png") !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

/* Force parent container wrappers to be transparent so body image displays */
#web,
.wrap_background,
.wrap-content,
.lapque-wrapper,
.lapque-wrapper main {
    background: transparent !important;
    background-color: transparent !important;
}

/* Response adjustment for mobile & tablet */
@media (max-width: 1024px) {
    body {
        background-size: cover !important;
        background-position: center top !important;
        background-attachment: fixed !important;
    }
}

/* Main Centered Container Wrapper */
.lapque-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    background: transparent !important;
    background-color: transparent !important;
    zoom: 0.85;
    padding: 24px 0 !important;
    margin-top: 16px !important;
    margin-bottom: 24px !important;
    position: relative !important;
    max-width: 1024px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Main Outer Software Container Frame with Metallic Gold Foil Border & Shadows */
.lapque-wrapper > div {
    background-color: #fffdf9 !important;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(247, 241, 229, 0.85) 0%, transparent 80%),
        radial-gradient(circle at 50% 100%, rgba(243, 235, 217, 0.65) 0%, transparent 80%) !important;
    border-radius: 26px !important;
    border: 2.5px solid #d4af37 !important;
    box-shadow: 
        0 24px 60px rgba(0, 45, 48, 0.18), 
        0 0 0 6px rgba(0, 95, 102, 0.08),
        inset 0 0 45px rgba(185, 140, 65, 0.12) !important;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Metallic Gold Corner Brackets */
.lapque-wrapper > div::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 26px;
    height: 26px;
    border-top: 3px solid #d4af37;
    border-left: 3px solid #d4af37;
    pointer-events: none;
    z-index: 10;
}

.lapque-wrapper > div::after {
    content: "";
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-bottom: 3px solid #d4af37;
    border-right: 3px solid #d4af37;
    pointer-events: none;
    z-index: 10;
}

/* Realistic Header Banner with 3D Lacquer Effect */
.lapque-wrapper > div > div:first-child {
    background: linear-gradient(180deg, #006067 0%, #00454a 60%, #002d30 100%) !important;
    border-bottom: 2px solid #d4af37 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    position: relative;
    padding-top: 1.6rem !important;
    padding-bottom: 1.6rem !important;
}

.lapque-wrapper > div > div:first-child h1 {
    font-family: 'Cinzel', 'Charm', serif !important;
    color: var(--lapque-gold-light) !important;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem) !important;
    font-weight: 800 !important;
    letter-spacing: 4px !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), 0 0 12px rgba(212, 175, 55, 0.5) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.lapque-wrapper > div > div:first-child h1::before,
.lapque-wrapper > div > div:first-child h1::after {
    content: "☯";
    color: #d4af37;
    font-size: 0.9em;
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Main Body Section Area */
.lapque-wrapper main {
    background-color: transparent !important;
    padding: 1.6rem !important;
}

/* ==========================================================
   2. REALISTIC FORM CONTAINER & INPUTS (#page-form)
   ========================================================== */
#page-form {
    max-width: 940px !important;
    margin: 0 auto !important;
}

#page-form > div {
    background: linear-gradient(180deg, #ffffff 0%, #faf5ea 100%) !important;
    border: 1.5px solid #c5a059 !important;
    border-radius: 20px !important;
    box-shadow: 
        0 10px 30px rgba(0, 45, 48, 0.08), 
        inset 0 0 30px rgba(197, 160, 89, 0.08) !important;
    position: relative;
    padding: 26px !important;
}

/* Engraved Form Sub-header */
#page-form > div::before {
    content: "❖ GIEO QUẺ LỤC HÀO BÁT TỰ MỆNH LÝ ❖";
    display: block;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: var(--lapque-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px dashed #c5a059;
}

/* Field Labels */
#page-form label,
#page-form .text-\[\#005f66\] {
    color: var(--lapque-primary) !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
}

/* Form Inputs & Selects with Soft Inner Depth */
#page-form input[type="text"],
#page-form input[type="number"],
#page-form select,
#page-form .border-slate-300 {
    background-color: #fcf9f3 !important;
    border: 1.5px solid #c5a059 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.25s ease !important;
}

#page-form input[type="text"]:focus,
#page-form input[type="number"]:focus,
#page-form select:focus,
#page-form .focus-within\:border-\[\#005f66\]:focus-within {
    border-color: var(--lapque-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 95, 102, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    background-color: #ffffff !important;
}

/* Radio & Checkbox styling */
#page-form input[type="radio"],
#page-form input[type="checkbox"] {
    accent-color: var(--lapque-primary) !important;
}

/* 3D Embossed Metallic Action Button */
#btn_xem_ket_qua {
    background: linear-gradient(180deg, #007a83 0%, #005f66 50%, #00454a 100%) !important;
    border: 2px solid #d4af37 !important;
    color: #fff9e6 !important;
    border-radius: 10px !important;
    padding: 13px 40px !important;
    font-family: 'Cinzel', 'Inter', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: 2.5px !important;
    font-size: 1.02rem !important;
    box-shadow: 
        0 6px 20px rgba(0, 95, 102, 0.4), 
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

#btn_xem_ket_qua:hover {
    background: linear-gradient(180deg, #008f9a 0%, #006e76 50%, #005258 100%) !important;
    box-shadow: 
        0 8px 26px rgba(0, 95, 102, 0.5), 
        0 0 18px rgba(212, 175, 55, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* ==========================================================
   3. REALISTIC PARCHMENT CERTIFICATE CARD (.tu-tru-card)
   ========================================================== */
.tu-tru-card {
    max-width: 940px !important;
    margin: 24px auto !important;
    padding: 36px 40px !important;
    background: 
        radial-gradient(circle at 50% 50%, #fffefb 0%, #f6eee0 100%) !important;
    border: 2px solid #b91c1c !important;
    border-radius: 20px !important;
    box-shadow: 
        0 12px 36px rgba(185, 28, 28, 0.12),
        inset 0 0 45px rgba(197, 160, 89, 0.15) !important;
    position: relative !important;
    outline: 1.5px solid #c5a059;
    outline-offset: -7px;
    text-align: center !important;
    overflow: hidden !important;
}

/* Metallic Corner Accents */
.tu-tru-card::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 22px;
    height: 22px;
    border-top: 2.5px solid #d4af37;
    border-left: 2.5px solid #d4af37;
    pointer-events: none;
    z-index: 2;
}

.tu-tru-card::after {
    content: "";
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-bottom: 2.5px solid #d4af37;
    border-right: 2.5px solid #d4af37;
    pointer-events: none;
    z-index: 2;
}

/* Hoạ tiết hoa đào & chim hạc SVGs */
.tu-tru-card .decor-blossom {
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    width: 175px !important;
    height: 175px !important;
    opacity: 0.45 !important;
    pointer-events: none !important;
    z-index: 0 !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.tu-tru-card .decor-cranes {
    position: absolute !important;
    bottom: 8px !important;
    left: 16px !important;
    width: 160px !important;
    height: 90px !important;
    opacity: 0.14 !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.tu-tru-card .card-content {
    position: relative !important;
    z-index: 1 !important;
}

/* Calligraphy User Fullname */
.user-fullname {
    font-family: 'Charm', 'Charmonman', 'Arizonia', cursive !important;
    color: #2c1810 !important;
    font-size: clamp(2.2rem, 4vw, 2.8rem) !important;
    font-weight: 700 !important;
    margin-bottom: 14px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    letter-spacing: 0.5px !important;
    line-height: 1.25 !important;
}

/* Realistic Parchment Info Data Block */
.lapque-info-block {
    background-color: rgba(245, 235, 217, 0.88) !important;
    border-top: 1px dashed rgba(185, 28, 28, 0.35) !important;
    border-bottom: 1px dashed rgba(185, 28, 28, 0.35) !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 10px !important;
    padding: 18px 24px !important;
    margin: 16px 0 !important;
    color: #2d3748 !important;
    font-size: 1.02rem !important;
    box-shadow: inset 0 0 20px rgba(197, 160, 89, 0.12) !important;
    text-align: left !important;
    line-height: 1.75 !important;
}

.lapque-info-block .info-line {
    margin-bottom: 6px !important;
}
.lapque-info-block .info-line:last-child {
    margin-bottom: 0 !important;
}

.lapque-info-block .info-label {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.lapque-info-block .info-inline-group {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 8px 18px !important;
}

/* Calligraphy Tu Tru Script Line */
.tu-tru-row {
    font-family: 'Charm', 'Charmonman', 'Arizonia', cursive !important;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem) !important;
    font-weight: 700 !important;
    margin-top: 18px !important;
    padding: 8px 24px !important;
    background: rgba(255, 255, 255, 0.75) !important;
    border-radius: 30px !important;
    display: inline-block !important;
    border: 1px solid rgba(197, 160, 89, 0.5) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05), inset 0 1px 0 #ffffff !important;
    white-space: nowrap !important;
}

.tu-tru-sep {
    color: #c5a059 !important;
    font-weight: bold !important;
    padding: 0 8px !important;
    font-family: 'Charm', 'Charmonman', 'Arizonia', cursive !important;
}

/* ==========================================================
   4. VISUAL HEXAGRAM PLAQUES (QUẺ CHỦ & QUẺ BIẾN)
   ========================================================== */
.lapque-output .grid.grid-cols-2 {
    background: linear-gradient(180deg, #fffdf8 0%, #f7f1e5 100%) !important;
    border: 1.5px solid #c5a059 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 45, 48, 0.08), inset 0 0 25px rgba(197, 160, 89, 0.08) !important;
    padding: 24px 16px !important;
    position: relative;
}

/* Vertical Divider */
.lapque-output .grid.grid-cols-2 .bg-slate-200 {
    background-color: #c5a059 !important;
    width: 1.5px !important;
}

/* Hexagram Titles */
#que_chu_title,
#que_bien_title {
    color: var(--lapque-primary) !important;
    font-family: 'Cinzel', serif !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    font-size: clamp(1.05rem, 2vw, 1.35rem) !important;
}

#que_chu_cung,
#que_bien_cung {
    background: #f3ebd9 !important;
    color: var(--lapque-primary) !important;
    border: 1px solid #c5a059 !important;
    padding: 4px 14px !important;
    border-radius: 14px !important;
    display: inline-block;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: 1px !important;
}

/* Solid & Broken Line Graphics with 3D Lacquer Depth */
#que_chu_graphics .bg-\[\#005f66\],
#que_bien_graphics .bg-\[\#005f66\] {
    background: linear-gradient(180deg, #007a83 0%, #005f66 45%, #003a3e 100%) !important;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.2) !important;
    border-radius: 3px !important;
}

/* Dong (Moving/Changing Line) Graphics with Glowing Ruby Lacquer */
#que_chu_graphics .bg-\[\#d50505\],
#que_bien_graphics .bg-\[\#d50505\] {
    background: linear-gradient(180deg, #ff4d4d 0%, #d50505 45%, #7a0000 100%) !important;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 12px rgba(220, 38, 38, 0.65),
        0 2px 5px rgba(0, 0, 0, 0.3) !important;
    border-radius: 3px !important;
    animation: pulseHao 1.8s infinite ease-in-out;
}

@keyframes pulseHao {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
}

/* ==========================================================
   5. REALISTIC HEXAGRAM TABLE (BẢNG 6 HÀO CỤ THỂ)
   ========================================================== */
.lapque-output .overflow-x-auto {
    border-radius: 14px !important;
    border: 1.5px solid #c5a059 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    background-color: #ffffff !important;
    -webkit-overflow-scrolling: touch !important;
}

.lapque-output table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    border: none !important;
}

/* 3D Header Row */
.lapque-output thead tr {
    background: linear-gradient(180deg, #005259 0%, #003a3e 100%) !important;
    border-bottom: 2px solid #d4af37 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.lapque-output thead th {
    color: var(--lapque-gold-light) !important;
    font-family: 'Cinzel', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.84rem !important;
    letter-spacing: 0.5px !important;
    padding: 12px 6px !important;
    border-right: 1px solid rgba(212, 175, 55, 0.25) !important;
    border-bottom: none !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.lapque-output thead th:last-child {
    border-right: none !important;
}

/* Table Body Rows */
.lapque-output tbody tr {
    transition: background-color 0.2s ease !important;
    border-bottom: 1px solid #f1e7d8 !important;
}

.lapque-output tbody tr:nth-child(even) {
    background-color: #fdfbf7 !important;
}

.lapque-output tbody tr:hover {
    background-color: #f5ebe0 !important;
}

/* Table Data Cells */
.lapque-output tbody td {
    padding: 11px 6px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    border-right: 1px solid #f1e7d8 !important;
    vertical-align: middle !important;
}

/* Active Row (Hào Động) - Placed after general td to ensure precedence */
.lapque-output tr.active-row,
.active-row {
    background-color: #fef2f2 !important;
}

.lapque-output tbody tr.active-row td,
.lapque-output tbody tr.active-row td *,
.lapque-output tbody tr.active-row td span,
.lapque-output tbody td.text-\[\#d50505\],
tr.active-row td,
tr.active-row td * {
    color: #d50505 !important;
    font-weight: 700 !important;
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
}

.lapque-output tbody tr.active-row td:first-child {
    border-left: 4px solid #d50505 !important;
    background-color: #fef2f2 !important;
}

/* Badges for Thế, Ứng, Thân */
.lapque-output td:nth-child(2) span {
    display: inline-block !important;
    padding: 3px 9px !important;
    border-radius: 4px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    background: #fdf2f2 !important;
    color: var(--lapque-alert) !important;
    border: 1px solid rgba(213, 5, 5, 0.25) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

/* Center Separator Column */
.lapque-output tbody td.border-r-2 {
    border-right: 2px solid #c5a059 !important;
}
.lapque-output thead th.border-r-2 {
    border-right: 2px solid #d4af37 !important;
}

/* ==========================================================
   6. REALISTIC 3D HÀO LINE BARS IN TABLE (.luchao-bar)
   ========================================================== */
.luchao-bar {
    width: 72px !important;
    height: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    vertical-align: middle !important;
}

.luchao-bar.am {
    justify-content: space-between !important;
}

.luchao-bar.duong .line {
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(180deg, #007a83 0%, #005f66 45%, #003a3e 100%) !important;
    border-radius: 2.5px !important;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.25) !important;
}

.luchao-bar.am .line {
    width: 44% !important;
    height: 100% !important;
    background: linear-gradient(180deg, #007a83 0%, #005f66 45%, #003a3e 100%) !important;
    border-radius: 2.5px !important;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.25) !important;
}

/* Hào Động 3D Ruby Lacquer Bar */
.luchao-bar.dong .line,
.luchao-bar.bien-dong .line {
    background: linear-gradient(180deg, #ff4d4d 0%, #d50505 45%, #7a0000 100%) !important;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 8px rgba(220, 38, 38, 0.6) !important;
}

/* Custom scrollbar */
.lapque-output .overflow-x-auto::-webkit-scrollbar {
    height: 7px;
}
.lapque-output .overflow-x-auto::-webkit-scrollbar-track {
    background: #f3ebd9;
    border-radius: 4px;
}
.lapque-output .overflow-x-auto::-webkit-scrollbar-thumb {
    background: #c5a059;
    border-radius: 4px;
}
.lapque-output .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: var(--lapque-primary);
}

/* ==========================================================
   7. 3D EMBOSSED CTA BUTTON (ZALO CONTACT)
   ========================================================== */
.lapque-output a[href*="zalo.me"] {
    background: linear-gradient(180deg, #007a83 0%, #005f66 50%, #00454a 100%) !important;
    border: 2px solid #d4af37 !important;
    color: var(--lapque-gold-light) !important;
    border-radius: 10px !important;
    padding: 13px 36px !important;
    font-family: 'Cinzel', 'Inter', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    font-size: 0.95rem !important;
    box-shadow: 
        0 8px 24px rgba(0, 95, 102, 0.38), 
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.lapque-output a[href*="zalo.me"]:hover {
    background: linear-gradient(180deg, #008f9a 0%, #006e76 50%, #005258 100%) !important;
    box-shadow: 
        0 10px 28px rgba(0, 95, 102, 0.5), 
        0 0 18px rgba(212, 175, 55, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* Screen reader utility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================================
   8. DEDICATED MOBILE & TABLET RESPONSIVE OPTIMIZATION
   ========================================================== */
@media (max-width: 768px) {
    .lapque-wrapper {
        zoom: 1 !important;
        padding: 8px 4px !important;
        margin-top: 6px !important;
        margin-bottom: 12px !important;
        border-radius: 16px !important;
        max-width: 100% !important;
    }
    .lapque-wrapper main {
        padding: 0.4rem !important;
    }
    
    /* Outer Frame & Card Padding on Mobile */
    .lapque-wrapper > div {
        border-radius: 16px !important;
    }
    .lapque-output > div {
        padding: 10px 6px !important;
        border-radius: 16px !important;
        overflow: hidden !important;
    }
    
    /* Form Padding on Mobile */
    #page-form > div {
        padding: 12px 8px !important;
        border-radius: 14px !important;
    }
    
    /* Tứ Trụ Card on Mobile */
    .tu-tru-card {
        padding: 14px 8px !important;
        margin: 10px auto !important;
        border-radius: 14px !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    /* Prevent Decor SVGs from overlapping text on Mobile */
    .tu-tru-card .decor-blossom {
        width: 85px !important;
        height: 85px !important;
        top: -5px !important;
        right: -5px !important;
        opacity: 0.25 !important;
    }
    .tu-tru-card .decor-cranes {
        width: 75px !important;
        height: 45px !important;
        bottom: 4px !important;
        left: 6px !important;
        opacity: 0.1 !important;
    }
    
    .user-fullname {
        font-size: 1.45rem !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        word-break: break-word !important;
    }
    .lapque-info-block {
        font-size: 0.82rem !important;
        padding: 10px 8px !important;
        line-height: 1.6 !important;
        margin: 10px 0 !important;
    }
    .info-inline-group {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px 12px !important;
        line-height: 1.5 !important;
    }
    .tu-tru-row {
        font-size: 1.1rem !important;
        line-height: 1.5 !important;
        white-space: normal !important;
        word-break: break-word !important;
        padding: 6px 10px !important;
        margin-top: 10px !important;
        display: block !important;
    }
    
    /* Graphic Hexagram Boxes on Mobile */
    .lapque-output .grid.grid-cols-2 {
        padding: 12px 6px !important;
        gap: 6px !important;
        border-radius: 14px !important;
        margin-top: 12px !important;
        margin-bottom: 12px !important;
    }
    #que_chu_title,
    #que_bien_title {
        font-size: 0.88rem !important;
        letter-spacing: 0 !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
    }
    #que_chu_cung,
    #que_bien_cung {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
    }
    #que_chu_graphics .w-24,
    #que_chu_graphics .w-32,
    #que_bien_graphics .w-24,
    #que_bien_graphics .w-32,
    #que_chu_graphics div,
    #que_bien_graphics div {
        width: 66px !important;
        height: 6px !important;
    }
    
    /* Detailed Hexagram Table on Mobile */
    .lapque-output .overflow-x-auto {
        border-radius: 10px !important;
        margin-top: 8px !important;
        -webkit-overflow-scrolling: touch !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03) !important;
        position: relative !important;
        overflow-x: auto !important;
        width: 100% !important;
        padding-bottom: 2px !important;
    }
    
    /* Mobile Scroll Hint Banner */
    .lapque-output .overflow-x-auto::before {
        content: "↔ Vuốt ngang để xem đầy đủ 11 cột Quẻ Biến" !important;
        display: block !important;
        position: sticky !important;
        left: 0 !important;
        width: 100% !important;
        text-align: center !important;
        font-size: 0.68rem !important;
        font-weight: 700 !important;
        color: #005f66 !important;
        background: linear-gradient(90deg, #e0f2f1 0%, #fff8e1 50%, #e0f2f1 100%) !important;
        padding: 4px 6px !important;
        border-bottom: 1px solid #d4af37 !important;
        letter-spacing: 0.3px !important;
        z-index: 15 !important;
    }
    
    /* Always Visible Mobile Scrollbar */
    .lapque-output .overflow-x-auto::-webkit-scrollbar {
        height: 7px !important;
        display: block !important;
    }
    .lapque-output .overflow-x-auto::-webkit-scrollbar-track {
        background: #f1f5f9 !important;
        border-radius: 4px !important;
    }
    .lapque-output .overflow-x-auto::-webkit-scrollbar-thumb {
        background: #005f66 !important;
        border-radius: 4px !important;
    }
    
    .lapque-output table {
        min-width: 540px !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }
    .lapque-output thead th {
        padding: 7px 4px !important;
        font-size: 0.72rem !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
        background: #f1f5f9 !important;
        color: #005f66 !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        vertical-align: middle !important;
    }
    .lapque-output tbody td {
        padding: 7px 4px !important;
        font-size: 0.75rem !important;
        white-space: nowrap !important;
        text-align: center !important;
        line-height: 1.4 !important;
        vertical-align: middle !important;
    }
    
    /* Sticky 1st Column (Hào Vạch) on Mobile Scroll */
    .lapque-output th:first-child,
    .lapque-output td:first-child {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        background-color: #ffffff !important;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.08) !important;
    }
    .lapque-output thead th:first-child {
        background-color: #f1f5f9 !important;
    }
    .active-row td:first-child {
        background-color: #fff2f2 !important;
    }
    
    /* Hào Bar inside Table on Mobile */
    .luchao-bar {
        width: 40px !important;
        height: 8px !important;
        margin: 0 auto !important;
    }
    
    /* Badges for Thế / Ứng / Thân on Mobile */
    .lapque-output td:nth-child(2) span {
        padding: 2px 5px !important;
        font-size: 0.68rem !important;
        display: inline-block !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }
    
    /* Active Row (Hào Động) on Mobile */
    .lapque-output tbody tr.active-row td,
    .lapque-output tbody tr.active-row td span,
    .active-row td {
        background-color: rgba(213, 5, 5, 0.08) !important;
        color: #d50505 !important;
        font-weight: 700 !important;
    }
    
    /* CTA Button Zalo on Mobile */
    .lapque-output a[href*="zalo.me"] {
        padding: 11px 16px !important;
        font-size: 0.8rem !important;
        letter-spacing: 0.5px !important;
        width: 100% !important;
        display: flex !important;
    }
}
