@media screen and (max-width: 800px) {
    .live-express .tab-bar-v2 .header-intro {
        font-size: 1.1rem;
        padding: 10px 75px
    }

    .live-express .tab-bar-v2 .tab-bar-inner {
        margin-top: 0;
        border-radius: 0;
        background-color: var(--DarkTextColor);
        padding: 60px 10px 20px;
        max-width: 980px
    }

    .live-express .tab-bar-v2 .tab-bar-inner a {
        margin: 0 auto;
        font-size: 12px
    }

    .live-express .tab-bar-v2 .tab-bar-inner a::after {
        width: 40px !important;
        height: 40px !important
    }
}

.footer {
    color: #9c9c9c;
    background-color: #f6f6f6
}

.footer>.container {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    max-width: 1200px
}

.footer .logo {
    height: 80px
}

.footer .logo-text {
    color: #cbcbcb;
    font-size: 40px;
    font-weight: bold
}

.footer .info {
    text-align: right
}

.footer-item {
    color: inherit;
    padding: 0 5px
}

.footer-item:hover {
    color: #0897ee;
    text-decoration: underline
}

.mobile .topbar-left {
    flex-direction: column
}

.mobile .topbar .btn-topbar {
    padding: 10px 0
}

.mobile .header .container {
    padding: 0 10px
}

.mobile .header img {
    max-width: 100%
}

.mobile .header>.btn {
    margin-left: auto
}

.mobile .header .nav-list {
    display: flex;
    flex-direction: column;
    margin: 0 0 10px
}

.mobile .header .nav-list .nav-item {
    color: #fff;
    padding: 5px 10px
}

.mobile .footer {
    padding-bottom: 20px
}

.mobile .footer>.container {
    flex-direction: column;
    text-align: center
}

.message-loading {
    margin-top: 5px
}

.jumping-dots span {
    position: relative;
    margin-left: auto;
    margin-right: auto;
    animation: jump 1s infinite;
    display: inline-block
}

.jumping-dots .dot-1 {
    background-color: #b7b072;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 3px;
    animation-delay: 200ms
}

.jumping-dots .dot-2 {
    background-color: #b7b072;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 3px;
    animation-delay: 400ms
}

.jumping-dots .dot-3 {
    background-color: #b7b072;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 3px;
    animation-delay: 600ms
}

@keyframes jump {
    0% {
        bottom: 0px
    }

    20% {
        bottom: 5px
    }

    40% {
        bottom: 0px
    }
}

#pdf-print:not(.guest) .palaces .palace-item .heavenly-plate,
#pdf-print:not(.guest) .palaces .palace-item .earth-plate,
#pdf-print:not(.guest) .palaces .palace-item .star,
#pdf-print:not(.guest) .palaces .palace-item .deity,
#pdf-print:not(.guest) .palaces .palace-item .formation,
#pdf-print:not(.guest) .palaces .palace-item .door,
#pdf-print:not(.guest) .palaces .palace-item .hexagram,
#pdf-print:not(.guest) .palaces .palace-item .constellation,
#pdf-print:not(.guest) .palaces .palace-item .palace-de,
#pdf-print:not(.guest) .palaces .palace-item .palace-hs,
#pdf-print:not(.guest) .palaces .palace-item .star-level,
#pdf-print:not(.guest) .palaces .palace-item .star-level-live,
#pdf-print:not(.guest) .palaces .palace-item .palace-name,
#pdf-print-hour:not(.guest) .palaces .palace-item .heavenly-plate,
#pdf-print-hour:not(.guest) .palaces .palace-item .earth-plate,
#pdf-print-hour:not(.guest) .palaces .palace-item .star,
#pdf-print-hour:not(.guest) .palaces .palace-item .deity,
#pdf-print-hour:not(.guest) .palaces .palace-item .formation,
#pdf-print-hour:not(.guest) .palaces .palace-item .door,
#pdf-print-hour:not(.guest) .palaces .palace-item .hexagram,
#pdf-print-hour:not(.guest) .palaces .palace-item .constellation,
#pdf-print-hour:not(.guest) .palaces .palace-item .palace-de,
#pdf-print-hour:not(.guest) .palaces .palace-item .palace-hs,
#pdf-print-hour:not(.guest) .palaces .palace-item .star-level,
#pdf-print-hour:not(.guest) .palaces .palace-item .star-level-live,
#pdf-print-hour:not(.guest) .palaces .palace-item .palace-name,
#pdf-print-day:not(.guest) .palaces .palace-item .heavenly-plate,
#pdf-print-day:not(.guest) .palaces .palace-item .earth-plate,
#pdf-print-day:not(.guest) .palaces .palace-item .star,
#pdf-print-day:not(.guest) .palaces .palace-item .deity,
#pdf-print-day:not(.guest) .palaces .palace-item .formation,
#pdf-print-day:not(.guest) .palaces .palace-item .door,
#pdf-print-day:not(.guest) .palaces .palace-item .hexagram,
#pdf-print-day:not(.guest) .palaces .palace-item .constellation,
#pdf-print-day:not(.guest) .palaces .palace-item .palace-de,
#pdf-print-day:not(.guest) .palaces .palace-item .palace-hs,
#pdf-print-day:not(.guest) .palaces .palace-item .star-level,
#pdf-print-day:not(.guest) .palaces .palace-item .star-level-live,
#pdf-print-day:not(.guest) .palaces .palace-item .palace-name,
#pdf-print-month:not(.guest) .palaces .palace-item .heavenly-plate,
#pdf-print-month:not(.guest) .palaces .palace-item .earth-plate,
#pdf-print-month:not(.guest) .palaces .palace-item .star,
#pdf-print-month:not(.guest) .palaces .palace-item .deity,
#pdf-print-month:not(.guest) .palaces .palace-item .formation,
#pdf-print-month:not(.guest) .palaces .palace-item .door,
#pdf-print-month:not(.guest) .palaces .palace-item .hexagram,
#pdf-print-month:not(.guest) .palaces .palace-item .constellation,
#pdf-print-month:not(.guest) .palaces .palace-item .palace-de,
#pdf-print-month:not(.guest) .palaces .palace-item .palace-hs,
#pdf-print-month:not(.guest) .palaces .palace-item .star-level,
#pdf-print-month:not(.guest) .palaces .palace-item .star-level-live,
#pdf-print-month:not(.guest) .palaces .palace-item .palace-name,
#pdf-print-year:not(.guest) .palaces .palace-item .heavenly-plate,
#pdf-print-year:not(.guest) .palaces .palace-item .earth-plate,
#pdf-print-year:not(.guest) .palaces .palace-item .star,
#pdf-print-year:not(.guest) .palaces .palace-item .deity,
#pdf-print-year:not(.guest) .palaces .palace-item .formation,
#pdf-print-year:not(.guest) .palaces .palace-item .door,
#pdf-print-year:not(.guest) .palaces .palace-item .hexagram,
#pdf-print-year:not(.guest) .palaces .palace-item .constellation,
#pdf-print-year:not(.guest) .palaces .palace-item .palace-de,
#pdf-print-year:not(.guest) .palaces .palace-item .palace-hs,
#pdf-print-year:not(.guest) .palaces .palace-item .star-level,
#pdf-print-year:not(.guest) .palaces .palace-item .star-level-live,
#pdf-print-year:not(.guest) .palaces .palace-item .palace-name {
    cursor: zoom-in
}

.detail-table:not(.limited) .heavenly-plate,
.detail-table:not(.limited) .earth-plate,
.detail-table:not(.limited) .star,
.detail-table:not(.limited) .deity,
.detail-table:not(.limited) .formation,
.detail-table:not(.limited) .door,
.detail-table:not(.limited) .hexagram,
.detail-table:not(.limited) .constellation,
.detail-table:not(.limited) .palace-de,
.detail-table:not(.limited) .palace-hs,
.detail-table:not(.limited) .star-level,
.detail-table:not(.limited) .star-level-live,
.detail-table:not(.limited) .palace-name {
    cursor: zoom-in
}

.qimen-chart-wrapper {
    position: relative;
    padding-top: 57px
}

.qimen-chart-wrapper .chart-label {
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    font-size: 18px;
    font-weight: bold
}

.qimen-chart-wrapper .chart-label p {
    max-width: 200px;
    word-wrap: break-word;
    margin: 0
}

@media screen and (max-width: 800px) {
    .qimen-chart-wrapper .chart-label {
        left: 50%;
        position: absolute;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
        font-size: 5px;
        font-weight: bold
    }

    .qimen-chart-wrapper .chart-label p {
        max-width: 200px;
        word-wrap: break-word;
        margin: 0
    }

    .qimen-fengshui {
        min-height: 49%;
        padding-top: 0
    }

    .qimen-fengshui .qimen-fengshui-label {
        left: 50%;
        position: absolute;
        top: 42% !important;
        transform: translate(-50%, -50%);
        z-index: 1;
        font-size: 5px;
        font-weight: bold
    }

    .qimen-strategic-live-page .qimen-chart-wrapper:nth-child(2),
    .qimen-strategic-live-page .qimen-chart-wrapper:nth-child(3),
    .qimen-strategic-live-page .qimen-chart-wrapper:nth-child(4) {
        margin-top: 32px
    }

    .qimen-strategic-live-page .qimen-chart-wrapper .qimen-hour,
    .qimen-strategic-live-page .qimen-chart-wrapper .qimen-day,
    .qimen-strategic-live-page .qimen-chart-wrapper .qimen-month,
    .qimen-strategic-live-page .qimen-chart-wrapper .qimen-year {
        top: 58% !important
    }

    .qimen-strategic-live-page .qimen-chart-wrapper .palace-wrapper-6 {
        margin: -43px auto 10px !important;
        padding: 0
    }

    .qimen-strategic-live-page .qimen-chart-wrapper .chart-label {
        font-size: .5rem;
        top: 50%;
        width: 100px
    }

    .qimen-strategic-live-page .qimen-chart-wrapper .chart-label p {
        font-size: 5px
    }

    .qimen-fengshui-wrapper .express .palaces {
        background-color: #fff;
        display: grid;
        font-size: 5px;
        grid-auto-rows: 1fr;
        grid-template-columns: repeat(3, 1fr);
        height: 200px;
        position: relative;
        user-select: none
    }

    .qimen-page .qimen-chart-wrapper {
        overflow: hidden;
        padding-top: 24px
    }

    .qimen-page .qimen-chart-wrapper .chart-label {
        font-size: .5rem
    }

    .qimen-page .qimen-chart-wrapper .chart-label p {
        font-size: 5px;
        width: 60px
    }

    .qimen-page .palaces {
        height: 180px;
        width: 180px
    }

    .qimen-destiny .qimen-chart-wrapper {
        width: 100%;
        overflow-x: scroll
    }

    .qimen-destiny .qimen-chart-wrapper .chart-label {
        font-size: .5rem;
        top: 50%
    }
}

.destiny-islayout .chart-panel .layout-icon {
    right: 41px
}

.qimen-destiny .chart-panel .layout-icon {
    right: 41px
}

.qimen-destiny .chart-panel .ai-icon {
    right: -80px;
    position: relative
}

.qimen-destiny .chart-panel .ai-icon p {
    font-size: 10px;
    margin: -10px
}

.qimen-destiny .chart-panel .ai-icon img {
    width: 100%
}

.qimen-destiny .chart-panel .ai-icon .btn_dropdown {
    position: absolute;
    right: 100%;
    top: -10px;
    width: 250px;
    display: none;
    padding-right: 20px;
    text-align: left
}

.qimen-destiny .chart-panel .ai-icon .btn_dropdown p {
    background-color: #fff;
    padding: 10px;
    margin: 0;
    font-size: 1rem;
    border: 1px solid #b7b072
}

.qimen-destiny .chart-panel .ai-icon .btn_dropdown p i {
    padding-right: 5px
}

.qimen-destiny .chart-panel .ai-icon .btn_dropdown p:hover {
    position: relative
}

.qimen-destiny .chart-panel .ai-icon .btn_dropdown p:hover::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    background-color: #b7b072;
    opacity: .25;
    left: 0;
    top: 0
}

.qimen-destiny .chart-panel .ai-icon .btn_dropdown p:first-child {
    border-bottom: 0
}

.qimen-destiny .chart-panel .ai-icon .btn_dropdown.active {
    display: block !important
}

.qimen-destiny .destiny-ai {
    margin: 20px
}

.qimen-destiny .destiny-ai h3 {
    background-color: #b7b072;
    color: #fff;
    padding: 5px 0
}

.qimen-destiny .destiny-ai .destiny-chat {
    width: 100%;
    display: flex;
    justify-content: space-between
}

.qimen-destiny .destiny-ai .destiny-chat input {
    width: 90%
}

.qimen-destiny .destiny-ai .destiny-chat .btn {
    width: 8%
}

.qimen-destiny .destiny-ai .destiny-airesult {
    width: 100%;
    height: 150px;
    overflow-y: scroll;
    padding: 5px;
    margin-top: 20px;
    text-align: left;
    border: 1px solid #333
}

.qimen-destiny .destiny-ai .destiny-airesult strong {
    margin-right: 10px
}

.qimen-destiny .palaces .palace-item:nth-child(1) .hexagram {
    left: -199px
}

.qimen-destiny .palaces .palace-item:nth-child(1) .soulring {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    writing-mode: vertical-lr;
    left: -125px
}

.qimen-destiny .palaces .palace-item:nth-child(1) .soulring-name {
    border-width: 1px 0;
    margin: .4em 0
}

.qimen-destiny .palaces .palace-item:nth-child(1) .soulring-img {
    margin-left: 1px
}

.qimen-destiny .palaces .palace-item:nth-child(2) .hexagram {
    top: -185px
}

.qimen-destiny .palaces .palace-item:nth-child(2) .soulring {
    margin: 0 .4em;
    padding: 0 .4em;
    top: -125px;
    width: calc(100% - .4em)
}

.qimen-destiny .palaces .palace-item:nth-child(2) .soulring-name {
    border-width: 0 1px;
    margin: 0 .4em
}

.qimen-destiny .palaces .palace-item:nth-child(2) .soulring-img {
    margin-top: 1px
}

.qimen-destiny .palaces .palace-item:nth-child(3) .hexagram {
    right: -199px
}

.qimen-destiny .palaces .palace-item:nth-child(3) .soulring {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    right: -125px;
    writing-mode: vertical-lr
}

.qimen-destiny .palaces .palace-item:nth-child(3) .soulring-img {
    margin-left: 1px
}

.qimen-destiny .palaces .palace-item:nth-child(4) .hexagram {
    left: -199px
}

.qimen-destiny .palaces .palace-item:nth-child(4) .soulring {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    writing-mode: vertical-lr;
    left: -125px
}

.qimen-destiny .palaces .palace-item:nth-child(4) .soulring-name {
    border-width: 1px 0;
    margin: .4em 0
}

.qimen-destiny .palaces .palace-item:nth-child(4) .soulring-img {
    margin-left: 1px
}

.qimen-destiny .palaces .palace-item:nth-child(6) .hexagram {
    right: -199px
}

.qimen-destiny .palaces .palace-item:nth-child(6) .soulring {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    right: -125px;
    writing-mode: vertical-lr
}

.qimen-destiny .palaces .palace-item:nth-child(6) .soulring-img {
    margin-left: 1px
}

.qimen-destiny .palaces .palace-item:nth-child(7) .hexagram {
    left: -199px
}

.qimen-destiny .palaces .palace-item:nth-child(7) .soulring {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    writing-mode: vertical-lr;
    left: -125px
}

.qimen-destiny .palaces .palace-item:nth-child(7) .soulring-name {
    border-width: 1px 0;
    margin: .4em 0
}

.qimen-destiny .palaces .palace-item:nth-child(7) .soulring-img {
    margin-left: 1px
}

.qimen-destiny .palaces .palace-item:nth-child(8) .hexagram {
    bottom: -185px
}

.qimen-destiny .palaces .palace-item:nth-child(8) .soulring {
    margin: 0 .4em;
    padding: 0 .4em;
    bottom: -125px;
    width: calc(100% - .4em)
}

.qimen-destiny .palaces .palace-item:nth-child(8) .soulring-name {
    border-width: 0 1px;
    margin: 0 .4em
}

.qimen-destiny .palaces .palace-item:nth-child(8) .soulring-img {
    margin-top: 1px
}

.qimen-destiny .palaces .palace-item:nth-child(9) .hexagram {
    right: -199px
}

.qimen-destiny .palaces .palace-item:nth-child(9) .soulring {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    right: -125px;
    writing-mode: vertical-lr
}

.qimen-destiny .palaces .palace-item:nth-child(9) .soulring-img {
    margin-left: 1px
}

.qimen-destiny .btn-exportPdf {
    margin-top: 100px
}

@media screen and (max-width: 800px) {
    .qimen-destiny .palace-wrapper {
        overflow-x: scroll;
        overflow-y: hidden;
        padding: 55px;
        margin-top: 26px;
        min-width: 100%
    }

    .qimen-destiny .palaces {
        height: 200px;
        width: 200px
    }

    .qimen-destiny .palaces .palace-item:nth-child(1) .hexagram {
        left: -76px
    }

    .qimen-destiny .palaces .palace-item:nth-child(1) .soulring {
        left: -50px
    }

    .qimen-destiny .palaces .palace-item:nth-child(2) .hexagram {
        top: -70px
    }

    .qimen-destiny .palaces .palace-item:nth-child(2) .soulring {
        top: -50px
    }

    .qimen-destiny .palaces .palace-item:nth-child(3) .hexagram {
        right: -76px
    }

    .qimen-destiny .palaces .palace-item:nth-child(3) .soulring {
        right: -50px
    }

    .qimen-destiny .palaces .palace-item:nth-child(4) .hexagram {
        left: -76px
    }

    .qimen-destiny .palaces .palace-item:nth-child(4) .soulring {
        left: -50px
    }

    .qimen-destiny .palaces .palace-item:nth-child(6) .hexagram {
        right: -76px
    }

    .qimen-destiny .palaces .palace-item:nth-child(6) .soulring {
        right: -50px
    }

    .qimen-destiny .palaces .palace-item:nth-child(7) .hexagram {
        left: -76px
    }

    .qimen-destiny .palaces .palace-item:nth-child(7) .soulring {
        left: -50px
    }

    .qimen-destiny .palaces .palace-item:nth-child(8) .hexagram {
        bottom: -70px
    }

    .qimen-destiny .palaces .palace-item:nth-child(8) .soulring {
        bottom: -50px
    }

    .qimen-destiny .palaces .palace-item:nth-child(9) .hexagram {
        right: -76px
    }

    .qimen-destiny .palaces .palace-item:nth-child(9) .soulring {
        right: -50px
    }

    .qimen-destiny .btn-exportPdf {
        margin-top: 20px;
        position: relative;
        z-index: 99
    }
}

.palace-wrapper {
    background: #e2dfc6;
    margin: 20px auto;
    padding: 36px;
    position: relative;
    transform-origin: 50% 0
}

.palace-rings {
    bottom: 36px;
    left: 36px;
    position: absolute;
    right: 36px;
    top: 36px
}

.palace-rings::before {
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: 0
}

.layout-active {
    background: #fff !important
}

.palaces {
    background-color: #fff;
    display: grid;
    font-size: 10px;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(3, 1fr);
    height: 400px;
    margin: 24px;
    position: relative;
    user-select: none;
    width: auto
}

.palaces::before {
    background-image: var(--background-calendar);
    background-size: cover;
    bottom: 0;
    content: "";
    left: 0;
    opacity: .05;
    position: absolute;
    right: 0;
    top: 0
}

.palaces.backhome::before {
    background-image: url(/dist/fe2923e633ae57c7ea603c2cc1cf33f5.png);
    opacity: .15
}

.palaces .palace-item.center .earth-plate-oracle {
    width: 55px !important;
    height: 50px !important;
    margin: 10px 0
}

.palaces .palace-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr 1fr;
    gap: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.palaces .palace-item:hover {
    background-color: rgba(37, 99, 235, 0.05);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.palaces .palace-item:active {
    transform: scale(0.98);
}

.palaces .palace-item::before {
    bottom: 0;
    content: "";
    left: 0;
    margin: -1px;
    position: absolute;
    right: 0;
    top: 0
}

.palaces .palace-item .palace-counsel,
.palaces .palace-item .palace-strategy,
.palaces .palace-item .palace-tactic {
    color: #fff;
    font-weight: bold;
    padding-top: 2px;
    position: absolute;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px
}

.palaces .palace-item .palace-counsel .layer-name,
.palaces .palace-item .palace-strategy .layer-name,
.palaces .palace-item .palace-tactic .layer-name {
    font-size: 20px;
    font-weight: normal;
    display: block;
    padding-top: 5px;
    color: rgba(255, 255, 255, .7)
}

@media screen and (max-width: 800px) {

    .palaces .palace-item .palace-counsel,
    .palaces .palace-item .palace-strategy,
    .palaces .palace-item .palace-tactic {
        font-size: 5px
    }

    .palaces .palace-item .palace-counsel .layer-name,
    .palaces .palace-item .palace-strategy .layer-name,
    .palaces .palace-item .palace-tactic .layer-name {
        font-size: 9px
    }
}

.palaces .palace-item .palace-counsel[tooltip]::after {
    background: #32343b;
    border: 1px solid #fff
}

.palaces .palace-item .palace-counsel[tooltip]:not([flow])::before,
.palaces .palace-item .palace-counsel[tooltip][flow^=up]::before {
    border-top-color: #fff
}

.palaces .palace-item .palace-strategy[tooltip]::after {
    background: #094567;
    border: 1px solid #fff
}

.palaces .palace-item .palace-strategy[tooltip]:not([flow])::before,
.palaces .palace-item .palace-strategy[tooltip][flow^=up]::before {
    border-top-color: #fff
}

.palaces .palace-item .palace-tactic[tooltip]::after {
    background: #4a372c;
    border: 1px solid #fff
}

.palaces .palace-item .palace-tactic[tooltip]:not([flow])::before,
.palaces .palace-item .palace-tactic[tooltip][flow^=up]::before {
    border-top-color: #fff
}

.palaces .palace-item:nth-child(1)::before {
    border: 1px solid #b7b072
}

.palaces .palace-item:nth-child(1) .earthly-branches>:nth-child(1) {
    left: -12px;
    top: 0;
    width: 12px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(1) .earthly-branches>:nth-child(1) .star-level {
    margin-top: 4px
}

.palaces .palace-item:nth-child(1) .earthly-branches>:nth-child(1) .nobleman-type {
    margin-bottom: 4px;
    display: none
}

.palaces .palace-item:nth-child(1) .earthly-branches>:nth-child(2) {
    height: 12px;
    top: -12px
}

.palaces .palace-item:nth-child(1) .earthly-branches>:nth-child(2) .star-level {
    display: none
}

.palaces .palace-item:nth-child(1) .earthly-branches>:nth-child(2) .nobleman-type {
    margin-right: 4px
}

.palaces .palace-item:nth-child(1) .palace-colors>:nth-child(1) {
    height: calc(100% + 24px);
    left: -24px;
    top: -24px;
    width: 23px;
}

.palaces .palace-item:nth-child(1) .palace-colors>:nth-child(2) {
    height: 23px;
    left: -12px;
    top: -24px;
    width: calc(100% + 12px)
}

.palaces .palace-item:nth-child(1) .palace-counsels>:nth-child(1) {
    height: calc(100% + 61px);
    left: -100px;
    top: -61px;
    width: 40px;
    z-index: 3;
    border-right: 1px solid #fff;
    align-items: flex-start !important
}

.palaces .palace-item:nth-child(1) .palace-counsels>:nth-child(1) span {
    writing-mode: vertical-rl
}

.palaces .palace-item:nth-child(1) .palace-counsels>:nth-child(2) {
    width: calc(100% + 100px);
    height: 40px;
    top: -100px;
    left: -100px;
    border-bottom: 1px solid #fff;
    justify-content: flex-start !important
}

@media screen and (max-width: 800px) {
    .palaces .palace-item:nth-child(1) .palace-counsels>:nth-child(1) {
        height: calc(100% + 25px);
        left: -40px;
        top: -25px;
        width: 16px
    }

    .palaces .palace-item:nth-child(1) .palace-counsels>:nth-child(2) {
        width: calc(100% + 40px);
        height: 16px;
        top: -40px;
        left: -40px
    }

    .palaces .palace-item:nth-child(1) .palace-strategys>:nth-child(1) {
        height: calc(100% + 41px) !important;
        left: -56px !important;
        top: -41px !important;
        width: 16px !important
    }

    .palaces .palace-item:nth-child(1) .palace-strategys>:nth-child(2) {
        width: calc(100% + 56px) !important;
        height: 16px !important;
        top: -56px !important;
        left: -56px !important
    }

    .palaces .palace-item:nth-child(1) .palace-tactics>:nth-child(1) {
        height: calc(100% + 57px) !important;
        left: -76px !important;
        top: -57px !important;
        width: 20px !important
    }

    .palaces .palace-item:nth-child(1) .palace-tactics>:nth-child(2) {
        width: calc(100% + 72px) !important;
        height: 20px !important;
        top: -76px !important;
        left: -72px !important
    }
}

.palaces .palace-item:nth-child(1) .palace-strategys>:nth-child(1) {
    height: calc(100% + 101px);
    left: -140px;
    top: -101px;
    width: 40px;
    z-index: 2;
    border-right: 1px solid #fff;
    align-items: flex-start !important
}

.palaces .palace-item:nth-child(1) .palace-strategys>:nth-child(1) span {
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(1) .palace-strategys>:nth-child(2) {
    top: -140px;
    width: calc(100% + 140px);
    height: 40px;
    left: -140px;
    border-bottom: 1px solid #fff;
    justify-content: flex-start !important
}

.palaces .palace-item:nth-child(1) .palace-tactics>:nth-child(1) {
    height: calc(100% + 141px);
    left: -190px;
    top: -141px;
    width: 50px;
    z-index: 1;
    border-right: 1px solid #fff;
    align-items: flex-start !important
}

.palaces .palace-item:nth-child(1) .palace-tactics>:nth-child(1) span {
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(1) .palace-tactics>:nth-child(2) {
    width: calc(100% + 190px);
    height: 50px;
    top: -190px;
    left: -190px;
    text-align: left;
    border-bottom: 1px solid #fff;
    justify-content: flex-start !important
}

.palaces .palace-item:nth-child(1) .hexagram {
    left: -60px;
    top: 50%;
    transform: translateY(-50%)
}

.palaces .palace-item:nth-child(1) .palace-direction {
    left: -22px;
    top: -24px
}

.palaces .palace-item:nth-child(1) .constellation {
    height: calc(100% - .4em);
    left: -36px;
    margin: .4em 0;
    padding: .4em 0;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(1) .constellation-name {
    border-width: 1px 0;
    margin: .4em 0
}

.palaces .palace-item:nth-child(2)::before {
    border-top: 1px solid #b7b072
}

.palaces .palace-item:nth-child(2) .earthly-branches>:nth-child(1) {
    height: 12px;
    top: -12px
}

.palaces .palace-item:nth-child(2) .earthly-branches>:nth-child(1) .star-level {
    margin-left: 4px
}

.palaces .palace-item:nth-child(2) .earthly-branches>:nth-child(1) .nobleman-type {
    margin-right: 4px
}

.palaces .palace-item:nth-child(2) .palace-colors>:nth-child(1) {
    height: 23px;
    top: -24px
}

.palaces .palace-item:nth-child(2) .palace-counsels>:nth-child(1) {
    top: -100px;
    width: 100%;
    height: 40px;
    border-bottom: 1px solid #fff
}
.view-toggle-container {
    position: absolute;
    bottom: 0;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
}
@media screen and (max-width: 800px) {
    .palaces .palace-item:nth-child(2) .palace-counsels>:nth-child(1) {
        top: -40px;
        width: 100%;
        height: 16px
    }

    .palaces .palace-item:nth-child(2) .palace-strategys>:nth-child(1) {
        top: -56px !important;
        width: 100% !important;
        height: 16px !important
    }

    .palaces .palace-item:nth-child(2) .palace-tactics>:nth-child(1) {
        width: 100%;
        right: 0 !important;
        top: -76px !important;
        height: 20px
    }
}

.palaces .palace-item:nth-child(2) .palace-counsels>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(2) .palace-strategys>:nth-child(1) {
    top: -140px;
    width: 100%;
    height: 40px;
    border-bottom: 1px solid #fff
}

.palaces .palace-item:nth-child(2) .palace-strategys>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(2) .palace-tactics>:nth-child(1) {
    width: 100%;
    right: 0;
    top: -190px;
    border-bottom: 1px solid #fff
}

.palaces .palace-item:nth-child(2) .palace-tactics>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(2) .hexagram {
    left: 50%;
    top: -56px;
    transform: translateX(-50%);
    width: unset
}

.palaces .palace-item:nth-child(2) .hexagram-desc {
    left: calc(100% + 2px);
    position: absolute;
    top: 50%;
    transform: translateY(-50%)
}

.palaces .palace-item:nth-child(2) .hexagram-upper {
    position: absolute;
    right: calc(100% + 2px);
    top: 0
}

.palaces .palace-item:nth-child(2) .hexagram-lower {
    bottom: 0;
    position: absolute;
    right: calc(100% + 2px)
}

.palaces .palace-item:nth-child(2) .palace-direction {
    justify-content: center;
    left: 50%;
    top: -24px;
    transform: translateX(-50%);
    width: 100%;
}

.palaces .palace-item:nth-child(2) .constellation {
    margin: 0 .4em;
    padding: 0 .4em;
    top: -36px;
    width: calc(100% - .4em)
}

.palaces .palace-item:nth-child(2) .constellation-name {
    border-width: 0 1px;
    margin: 0 .4em
}

.palaces .palace-item:nth-child(3)::before {
    border: 1px solid #b7b072
}

.palaces .palace-item:nth-child(3) .earthly-branches>:nth-child(1) {
    height: 12px;
    top: -12px
}

.palaces .palace-item:nth-child(3) .earthly-branches>:nth-child(1) .star-level {
    display: none
}

.palaces .palace-item:nth-child(3) .earthly-branches>:nth-child(1) .nobleman-type {
    margin-right: 4px
}

.palaces .palace-item:nth-child(3) .earthly-branches>:nth-child(2) {
    right: -12px;
    top: 0;
    width: 12px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(3) .earthly-branches>:nth-child(2) .star-level {
    margin-top: 4px
}

.palaces .palace-item:nth-child(3) .earthly-branches>:nth-child(2) .nobleman-type {
    margin-bottom: 4px;
    display: none
}

.palaces .palace-item:nth-child(3) .palace-colors>:nth-child(1) {
    height: 23px;
    top: -24px;
    width: calc(100% + 12px)
}

.palaces .palace-item:nth-child(3) .palace-counsels>:nth-child(1) {
    right: -100px;
    width: calc(100% + 100px);
    height: 40px;
    top: -100px;
    border-bottom: 1px solid #fff;
    justify-content: flex-end;
    padding-right: 10px;
    text-align: right
}

@media screen and (max-width: 800px) {
    .palaces .palace-item:nth-child(3) .palace-counsels>:nth-child(1) {
        right: -40px;
        width: calc(100% + 40px);
        height: 16px;
        top: -40px
    }

    .palaces .palace-item:nth-child(3) .palace-counsels>:nth-child(2) {
        height: calc(100% + 25px) !important;
        right: -40px !important;
        top: -25px !important;
        width: 16px !important
    }

    .palaces .palace-item:nth-child(3) .palace-strategys>:nth-child(1) {
        right: -57px !important;
        width: calc(100% + 57px) !important;
        height: 16px !important;
        top: -56px !important
    }

    .palaces .palace-item:nth-child(3) .palace-strategys>:nth-child(2) {
        right: -56px !important;
        height: calc(100% + 41px) !important;
        top: -41px !important;
        width: 16px !important
    }

    .palaces .palace-item:nth-child(3) .palace-tactics>:nth-child(1) {
        right: -77px !important;
        width: calc(100% + 77px) !important;
        height: 20px !important;
        top: -76px !important
    }

    .palaces .palace-item:nth-child(3) .palace-tactics>:nth-child(2) {
        height: calc(100% + 57px) !important;
        right: -76px !important;
        top: -57px !important;
        width: 20px !important
    }
}

.palaces .palace-item:nth-child(3) .palace-counsels>:nth-child(2) {
    height: calc(100% + 100px);
    right: -100px;
    top: -61px;
    width: 40px;
    border-left: 1px solid #fff;
    z-index: 3
}

.palaces .palace-item:nth-child(3) .palace-counsels>:nth-child(2) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(3) .palace-strategys>:nth-child(1) {
    right: -140px;
    width: calc(100% + 140px);
    height: 40px;
    top: -140px;
    border-bottom: 1px solid #fff;
    justify-content: flex-end;
    padding-right: 10px;
    text-align: right
}

.palaces .palace-item:nth-child(3) .palace-strategys>:nth-child(2) {
    right: -140px;
    height: calc(100% + 140px);
    top: -101px;
    width: 40px;
    border-left: 1px solid #fff;
    z-index: 2
}

.palaces .palace-item:nth-child(3) .palace-strategys>:nth-child(2) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(3) .palace-tactics>:nth-child(1) {
    right: -190px;
    width: calc(100% + 190px);
    height: 50px;
    top: -190px;
    border-bottom: 1px solid #fff;
    justify-content: flex-end;
    padding-right: 10px;
    text-align: right
}

.palaces .palace-item:nth-child(3) .palace-tactics>:nth-child(2) {
    height: calc(100% + 190px);
    right: -190px;
    top: -141px;
    width: 50px;
    border-left: 1px solid #fff;
    z-index: 1
}

.palaces .palace-item:nth-child(3) .palace-tactics>:nth-child(2) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(3) .palace-colors>:nth-child(2) {
    height: calc(100% + 24px);
    right: -24px;
    top: -24px;
    width: 23px;
}

.palaces .palace-item:nth-child(3) .hexagram {
    right: -60px;
    top: 50%;
    transform: translateY(-50%)
}

.palaces .palace-item:nth-child(3) .palace-direction {
    flex-direction: row-reverse;
    right: -22px;
    top: -24px
}

.palaces .palace-item:nth-child(3) .constellation {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    right: -36px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(3) .constellation-name {
    border-width: 1px 0;
    margin: .4em 0
}

.palaces .palace-item:nth-child(4)::before {
    border-left: 1px #b7b072
}

.palaces .palace-item:nth-child(4) .earthly-branches>:nth-child(1) {
    left: -12px;
    top: 0;
    width: 12px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(4) .earthly-branches>:nth-child(1) .star-level {
    margin-top: 4px
}

.palaces .palace-item:nth-child(4) .earthly-branches>:nth-child(1) .nobleman-type {
    margin-bottom: 4px
}

.palaces .palace-item:nth-child(4) .palace-colors>:nth-child(1) {
    left: -24px;
    width: 23px;
}

.palaces .palace-item:nth-child(4) .palace-counsels>:nth-child(1) {
    height: 100%;
    left: -100px;
    top: 0;
    width: 40px;
    z-index: 3;
    border-right: 1px solid #fff
}

.palaces .palace-item:nth-child(4) .palace-counsels>:nth-child(1) span {
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(4) .palace-counsels>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(4) .palace-strategys>:nth-child(1) {
    height: 100%;
    left: -140px;
    top: 0;
    width: 40px;
    z-index: 3;
    border-right: 1px solid #fff
}

.palaces .palace-item:nth-child(4) .palace-strategys>:nth-child(1) span {
    writing-mode: vertical-rl
}

.palaces .palace-item:nth-child(4) .palace-strategys>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(4) .palace-tactics>:nth-child(1) {
    height: 100%;
    left: -190px;
    top: 0;
    width: 50px;
    z-index: 3;
    border-right: 1px solid #fff
}

.palaces .palace-item:nth-child(4) .palace-tactics>:nth-child(1) span {
    writing-mode: vertical-rl
}

.palaces .palace-item:nth-child(4) .palace-tactics>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(4) .hexagram {
    left: -60px;
    top: 50%;
    transform: translateY(-50%)
}

.palaces .palace-item:nth-child(4) .palace-direction {
    flex-direction: column;
    left: -24px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 23px;
}

.palaces .palace-item:nth-child(4) .palace-direction>* {
    display: inline-block;
    margin: 1px 0 !important
}

.palaces .palace-item:nth-child(4) .palace-direction .palace-name {
    display: flex;
    flex-direction: column
}

.palaces .palace-item:nth-child(4) .constellation {
    height: calc(100% - .4em);
    left: -36px;
    margin: .4em 0;
    padding: .4em 0;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(4) .constellation-name {
    border-width: 1px 0;
    margin: .4em 0
}

@media screen and (max-width: 800px) {
    .palaces .palace-item:nth-child(4) .palace-counsels>:nth-child(1) {
        height: 100%;
        left: -40px;
        top: 0;
        width: 16px
    }

    .palaces .palace-item:nth-child(4) .palace-strategys>:nth-child(1) {
        height: 100%;
        left: -56px;
        top: 0;
        width: 16px
    }

    .palaces .palace-item:nth-child(4) .palace-tactics>:nth-child(1) {
        height: 100%;
        left: -76px;
        top: 0;
        width: 20px
    }
}

.palaces .palace-item:nth-child(5)::before {
    border: 1px solid #b7b072;
    margin: .25px
}

.palaces .palace-item:nth-child(6)::before {
    border-right: 1px solid #b7b072
}

.palaces .palace-item:nth-child(6) .earthly-branches>:nth-child(1) {
    right: -12px;
    top: 0;
    width: 12px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(6) .earthly-branches>:nth-child(1) .star-level {
    margin-top: 4px
}

.palaces .palace-item:nth-child(6) .earthly-branches>:nth-child(1) .nobleman-type {
    margin-bottom: 4px
}

.palaces .palace-item:nth-child(6) .palace-colors>:nth-child(1) {
    right: -24px;
    width: 23px;
}

.palaces .palace-item:nth-child(6) .palace-counsels>:nth-child(1) {
    height: 100%;
    right: -100px;
    top: 0;
    width: 40px;
    z-index: 3;
    border-left: 1px solid #fff
}

.palaces .palace-item:nth-child(6) .palace-counsels>:nth-child(1) span {
    writing-mode: vertical-rl
}

.palaces .palace-item:nth-child(6) .palace-counsels>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(6) .palace-strategys>:nth-child(1) {
    height: 100%;
    right: -140px;
    top: 0;
    width: 40px;
    z-index: 3;
    border-left: 1px solid #fff
}

.palaces .palace-item:nth-child(6) .palace-strategys>:nth-child(1) span {
    writing-mode: vertical-rl
}

.palaces .palace-item:nth-child(6) .palace-strategys>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(6) .palace-tactics>:nth-child(1) {
    height: 100%;
    right: -190px;
    top: 0;
    width: 50px;
    z-index: 3;
    border-left: 1px solid #fff
}

.palaces .palace-item:nth-child(6) .palace-tactics>:nth-child(1) span {
    writing-mode: vertical-rl
}

.palaces .palace-item:nth-child(6) .palace-tactics>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(6) .hexagram {
    right: -60px;
    top: 50%;
    transform: translateY(-50%)
}

.palaces .palace-item:nth-child(6) .palace-direction {
    flex-direction: column;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 23px;
}

.palaces .palace-item:nth-child(6) .palace-direction>* {
    display: inline-block;
    margin: 1px 0 !important
}

.palaces .palace-item:nth-child(6) .palace-direction .palace-name {
    display: flex;
    flex-direction: column
}

.palaces .palace-item:nth-child(6) .constellation {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    right: -36px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(6) .constellation-name {
    border-width: 1px 0;
    margin: .4em 0
}

@media screen and (max-width: 800px) {
    .palaces .palace-item:nth-child(6) .palace-counsels>:nth-child(1) {
        height: 100%;
        right: -40px;
        top: 0;
        width: 16px
    }

    .palaces .palace-item:nth-child(6) .palace-strategys>:nth-child(1) {
        height: 100%;
        right: -56px;
        top: 0;
        width: 16px
    }

    .palaces .palace-item:nth-child(6) .palace-tactics>:nth-child(1) {
        height: 100%;
        right: -76px;
        top: 0;
        width: 20px
    }
}

.palaces .palace-item:nth-child(7)::before {
    border: 1px solid #b7b072
}

.palaces .palace-item:nth-child(7) .earthly-branches>:nth-child(1) {
    bottom: -12px;
    height: 12px
}

.palaces .palace-item:nth-child(7) .earthly-branches>:nth-child(1) .star-level {
    display: none
}

.palaces .palace-item:nth-child(7) .earthly-branches>:nth-child(1) .nobleman-type {
    margin-right: 4px
}

.palaces .palace-item:nth-child(7) .earthly-branches>:nth-child(2) {
    bottom: 0;
    left: -12px;
    width: 12px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(7) .earthly-branches>:nth-child(2) .star-level {
    margin-top: 4px
}

.palaces .palace-item:nth-child(7) .earthly-branches>:nth-child(2) .nobleman-type {
    margin-bottom: 4px;
    display: none
}

.palaces .palace-item:nth-child(7) .palace-colors>:nth-child(1) {
    bottom: -24px;
    height: 23px;
    left: -12px;
    width: calc(100% + 12px)
}

.palaces .palace-item:nth-child(7) .palace-counsels>:nth-child(1) {
    height: calc(100% + 100px);
    left: -100px;
    bottom: -100px;
    width: 40px;
    z-index: 4;
    border-right: 1px solid #fff
}

.palaces .palace-item:nth-child(7) .palace-counsels>:nth-child(1) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(7) .palace-counsels>:nth-child(2) {
    bottom: -100px;
    width: calc(100% + 61px);
    height: 40px;
    left: -61px;
    z-index: 4;
    border-top: 1px solid #fff;
    justify-content: flex-start
}

.palaces .palace-item:nth-child(7) .palace-counsels>:nth-child(2) span {
    margin-left: -30px !important
}

.palaces .palace-item:nth-child(7) .palace-strategys>:nth-child(1) {
    height: calc(100% + 140px);
    left: -140px;
    bottom: -140px;
    width: 40px;
    z-index: 5;
    border-right: 1px solid #fff
}

.palaces .palace-item:nth-child(7) .palace-strategys>:nth-child(1) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(7) .palace-strategys>:nth-child(2) {
    bottom: -140px;
    width: calc(100% + 101px);
    height: 40px;
    left: -101px;
    z-index: 5;
    border-top: 1px solid #fff;
    justify-content: flex-start
}

.palaces .palace-item:nth-child(7) .palace-strategys>:nth-child(2) span {
    margin-left: -30px !important
}

.palaces .palace-item:nth-child(7) .palace-tactics>:nth-child(1) {
    height: calc(100% + 190px);
    left: -190px;
    bottom: -190px;
    width: 50px;
    z-index: 6;
    border-right: 1px solid #fff
}

.palaces .palace-item:nth-child(7) .palace-tactics>:nth-child(1) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(7) .palace-tactics>:nth-child(2) {
    bottom: -190px;
    width: calc(100% + 141px);
    height: 50px;
    left: -141px;
    z-index: 6;
    border-top: 1px solid #fff;
    justify-content: flex-start;
    text-align: left
}

.palaces .palace-item:nth-child(7) .palace-tactics>:nth-child(2) span {
    margin-left: -40px !important
}

.palaces .palace-item:nth-child(7) .palace-colors>:nth-child(2) {
    bottom: -24px;
    height: calc(100% + 24px);
    left: -24px;
    width: 23px;
}

.palaces .palace-item:nth-child(7) .hexagram {
    left: -60px;
    top: 50%;
    transform: translateY(-50%)
}

.palaces .palace-item:nth-child(7) .palace-direction {
    bottom: -24px;
    left: -22px
}

.palaces .palace-item:nth-child(7) .constellation {
    height: calc(100% - .4em);
    left: -36px;
    margin: .4em 0;
    padding: .4em 0;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(7) .constellation-name {
    border-width: 1px 0;
    margin: .4em 0
}

@media screen and (max-width: 800px) {
    .palaces .palace-item:nth-child(7) .palace-counsels>:nth-child(1) {
        height: calc(100% + 40px);
        left: -40px;
        bottom: -40px;
        width: 16px
    }

    .palaces .palace-item:nth-child(7) .palace-counsels>:nth-child(2) {
        width: calc(100% + 25px);
        height: 16px;
        bottom: -40px;
        left: -25px
    }

    .palaces .palace-item:nth-child(7) .palace-counsels>:nth-child(2) span {
        margin-left: -10px !important
    }

    .palaces .palace-item:nth-child(7) .palace-strategys>:nth-child(1) {
        height: calc(100% + 56px) !important;
        left: -56px !important;
        bottom: -56px !important;
        width: 16px !important
    }

    .palaces .palace-item:nth-child(7) .palace-strategys>:nth-child(2) {
        width: calc(100% + 41px) !important;
        height: 16px !important;
        bottom: -56px !important;
        left: -41px !important
    }

    .palaces .palace-item:nth-child(7) .palace-strategys>:nth-child(2) span {
        margin-left: -10px !important
    }

    .palaces .palace-item:nth-child(7) .palace-tactics>:nth-child(1) {
        height: calc(100% + 70px) !important;
        left: -76px !important;
        bottom: -70px !important;
        width: 20px !important
    }

    .palaces .palace-item:nth-child(7) .palace-tactics>:nth-child(2) {
        width: calc(100% + 57px) !important;
        height: 20px !important;
        bottom: -76px !important;
        left: -57px !important
    }
}

.palaces .palace-item:nth-child(8)::before {
    border-bottom: 1px solid #b7b072
}

.palaces .palace-item:nth-child(8) .earthly-branches>:nth-child(1) {
    bottom: -12px;
    height: 12px
}

.palaces .palace-item:nth-child(8) .earthly-branches>:nth-child(1) .star-level {
    margin-left: 4px
}

.palaces .palace-item:nth-child(8) .earthly-branches>:nth-child(1) .nobleman-type {
    margin-right: 4px
}

.palaces .palace-item:nth-child(8) .palace-colors>:nth-child(1) {
    bottom: -24px;
    height: 23px;
}

.palaces .palace-item:nth-child(8) .palace-counsels>:nth-child(1) {
    bottom: -100px;
    width: 100%;
    height: 40px;
    border-top: 1px solid #fff
}

.palaces .palace-item:nth-child(8) .palace-counsels>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(8) .palace-strategys>:nth-child(1) {
    bottom: -140px;
    width: 100%;
    height: 40px;
    border-top: 1px solid #fff
}

.palaces .palace-item:nth-child(8) .palace-strategys>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(8) .palace-tactics>:nth-child(1) {
    bottom: -190px;
    width: 100%;
    height: 50px;
    border-top: 1px solid #fff
}

.palaces .palace-item:nth-child(8) .palace-tactics>:nth-child(2) {
    display: none
}

.palaces .palace-item:nth-child(8) .hexagram {
    bottom: -56px;
    left: 50%;
    transform: translateX(-50%);
    width: unset
}

.palaces .palace-item:nth-child(8) .hexagram-desc {
    left: calc(100% + 2px);
    position: absolute;
    top: 50%;
    transform: translateY(-50%)
}

.palaces .palace-item:nth-child(8) .hexagram-upper {
    position: absolute;
    right: calc(100% + 2px);
    top: 0
}

.palaces .palace-item:nth-child(8) .hexagram-lower {
    bottom: 0;
    position: absolute;
    right: calc(100% + 2px)
}

.palaces .palace-item:nth-child(8) .palace-direction {
    bottom: -24px;
    justify-content: center;
    left: 50%;
    transform: translateX(-50%);
    width: 100%
}

.palaces .palace-item:nth-child(8) .constellation {
    bottom: -36px;
    margin: 0 .4em;
    padding: 0 .4em;
    width: calc(100% - .4em)
}

.palaces .palace-item:nth-child(8) .constellation-name {
    border-width: 0 1px;
    margin: 0 .4em
}

@media screen and (max-width: 800px) {
    .palaces .palace-item:nth-child(8) .palace-counsels>:nth-child(1) {
        bottom: -40px;
        width: 100%;
        height: 16px
    }

    .palaces .palace-item:nth-child(8) .palace-strategys>:nth-child(1) {
        bottom: -56px !important;
        width: 100% !important;
        height: 16px !important
    }

    .palaces .palace-item:nth-child(8) .palace-tactics>:nth-child(1) {
        width: 100%;
        right: 0 !important;
        bottom: -76px !important;
        height: 20px
    }
}

.palaces .palace-item:nth-child(9)::before {
    border: 1px solid #b7b072
}

.palaces .palace-item:nth-child(9) .earthly-branches>:nth-child(1) {
    bottom: 0;
    right: -12px;
    width: 12px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(9) .earthly-branches>:nth-child(1) .star-level {
    margin-top: 4px
}

.palaces .palace-item:nth-child(9) .earthly-branches>:nth-child(1) .nobleman-type {
    margin-bottom: 4px;
    display: none
}

.palaces .palace-item:nth-child(9) .earthly-branches>:nth-child(2) {
    bottom: -12px;
    height: 12px
}

.palaces .palace-item:nth-child(9) .earthly-branches>:nth-child(2) .star-level {
    display: none
}

.palaces .palace-item:nth-child(9) .earthly-branches>:nth-child(2) .nobleman-type {
    margin-right: 4px
}

.palaces .palace-item:nth-child(9) .palace-colors>:nth-child(1) {
    bottom: -24px;
    height: calc(100% + 24px);
    right: -24px;
    width: 23px;
}

.palaces .palace-item:nth-child(9) .palace-colors>:nth-child(2) {
    bottom: -24px;
    height: 23px;
    width: calc(100% + 12px)
}

.palaces .palace-item:nth-child(9) .palace-counsels>:nth-child(1) {
    right: -100px;
    width: calc(100% + 100px);
    height: 40px;
    bottom: -100px;
    z-index: 3;
    border-top: 1px solid #fff;
    justify-content: flex-end;
    padding-right: 10px;
    text-align: right
}

.palaces .palace-item:nth-child(9) .palace-counsels>:nth-child(2) {
    height: calc(100% + 61px);
    right: -100px;
    bottom: -61px;
    width: 40px;
    border-left: 1px solid #fff;
    z-index: 3
}

.palaces .palace-item:nth-child(9) .palace-counsels>:nth-child(2) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(9) .palace-strategys>:nth-child(1) {
    right: -140px;
    width: calc(100% + 140px);
    height: 40px;
    bottom: -140px;
    border-top: 1px solid #fff;
    z-index: 3;
    justify-content: flex-end;
    padding-right: 10px;
    text-align: right
}

.palaces .palace-item:nth-child(9) .palace-strategys>:nth-child(2) {
    height: calc(100% + 101px);
    right: -140px;
    bottom: -101px;
    width: 40px;
    border-left: 1px solid #fff;
    z-index: 3
}

.palaces .palace-item:nth-child(9) .palace-strategys>:nth-child(2) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(9) .palace-tactics>:nth-child(1) {
    right: -190px;
    width: calc(100% + 190px);
    height: 50px;
    bottom: -190px;
    border-top: 1px solid #fff;
    justify-content: flex-end;
    padding-right: 10px;
    text-align: right
}

.palaces .palace-item:nth-child(9) .palace-tactics>:nth-child(2) {
    height: calc(100% + 141px);
    right: -190px;
    bottom: -141px;
    width: 50px;
    border-left: 1px solid #fff
}

.palaces .palace-item:nth-child(9) .palace-tactics>:nth-child(2) span {
    writing-mode: vertical-rl;
    display: none
}

.palaces .palace-item:nth-child(9) .hexagram {
    right: -60px;
    top: 50%;
    transform: translateY(-50%)
}

.palaces .palace-item:nth-child(9) .palace-direction {
    bottom: -24px;
    flex-direction: row-reverse;
    right: -22px
}

.palaces .palace-item:nth-child(9) .constellation {
    height: calc(100% - .4em);
    margin: .4em 0;
    padding: .4em 0;
    right: -36px;
    writing-mode: vertical-lr
}

.palaces .palace-item:nth-child(9) .constellation-name {
    border-width: 1px 0;
    margin: .4em 0
}

@media screen and (max-width: 800px) {
    .palaces .palace-item:nth-child(9) .palace-counsels>:nth-child(1) {
        right: -40px;
        width: calc(100% + 40px);
        height: 16px;
        bottom: -40px
    }

    .palaces .palace-item:nth-child(9) .palace-counsels>:nth-child(2) {
        height: calc(100% + 25px) !important;
        right: -40px !important;
        bottom: -25px !important;
        width: 16px !important
    }

    .palaces .palace-item:nth-child(9) .palace-strategys>:nth-child(1) {
        right: -57px !important;
        width: calc(100% + 57px) !important;
        height: 16px !important;
        bottom: -56px !important
    }

    .palaces .palace-item:nth-child(9) .palace-strategys>:nth-child(2) {
        right: -56px !important;
        height: calc(100% + 41px) !important;
        bottom: -41px !important;
        width: 16px !important
    }

    .palaces .palace-item:nth-child(9) .palace-tactics>:nth-child(1) {
        right: -77px !important;
        width: calc(100% + 77px) !important;
        height: 20px !important;
        bottom: -76px !important
    }

    .palaces .palace-item:nth-child(9) .palace-tactics>:nth-child(2) {
        height: calc(100% + 57px) !important;
        right: -76px !important;
        bottom: -57px !important;
        width: 20px !important
    }
}

.palaces .palace-item-meta {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0
}

.palaces .palace-item.no-internal {
    background: rgba(183, 176, 114, .1)
}

.palaces .palace-item.center {
    display: flex;
    padding: 5px;
    align-items: center;
    justify-content: center;
}

.palaces .palace-item .heavenly-plate,
.palaces .palace-item .earth-plate,
.palaces .palace-item .star,
.palaces .palace-item .deity,
.palaces .palace-item .formation,
.palaces .palace-item .door,
.palaces .palace-item .information,
.palaces .palace-item .structure-number {
    align-items: center;
    display: flex;
    font-size: .8em;
    justify-content: center;
    position: relative;
    text-align: center
}

.palaces .palace-item .heavenly-plate .main,
.palaces .palace-item .earth-plate .main,
.palaces .palace-item .star .main,
.palaces .palace-item .deity .main,
.palaces .palace-item .formation .main,
.palaces .palace-item .door .main,
.palaces .palace-item .information .main,
.palaces .palace-item .structure-number .main {
    margin: 0
}

.palaces .palace-item .heavenly-plate .main .title,
.palaces .palace-item .earth-plate .main .title,
.palaces .palace-item .star .main .title,
.palaces .palace-item .deity .main .title,
.palaces .palace-item .formation .main .title,
.palaces .palace-item .door .main .title,
.palaces .palace-item .information .main .title,
.palaces .palace-item .structure-number .main .title {
    color: inherit;
    font-family: "Noto Serif SC", serif;
    font-size: 2.5em;
    white-space: nowrap;

}

.palaces .palace-item .heavenly-plate .star-level-live,
.palaces .palace-item .earth-plate .star-level-live,
.palaces .palace-item .star .star-level-live,
.palaces .palace-item .deity .star-level-live,
.palaces .palace-item .formation .star-level-live,
.palaces .palace-item .door .star-level-live,
.palaces .palace-item .information .star-level-live,
.palaces .palace-item .structure-number .star-level-live {
    position: absolute;
    top: 0;
    right: 0px;
    width: 25px;
    height: 25px;
    background-size: contain !important;
    background-repeat: no-repeat !important
}

.palaces .palace-item .qimen-oracle {
    align-items: center;
    display: flex;
    font-size: .7em;
    justify-content: center;
    position: relative;
    text-align: center
}

.palaces .palace-item .qimen-oracle .main {
    margin: 0
}

.palaces .palace-item .qimen-oracle .main .title {
    color: inherit;
    font-family: "Noto Serif SC", serif;
    font-size: 2.5em;
    white-space: nowrap
}

.palaces .palace-item .qimen-oracle .star-level-live {
    position: absolute;
    top: 0;
    right: 0px;
    width: 25px;
    height: 25px;
    background-size: contain !important;
    background-repeat: no-repeat !important
}

.palaces .palace-item .qimen-oracle.star-oracle,
.palaces .palace-item .qimen-oracle.heavenly-plate-oracle {
    width: 55px;
    height: 50px;
    margin: 10px
}

.palaces .palace-item .qimen-oracle.stars-oracle {
    width: 55px;
    height: 50px;
    margin: 10px
}

@media screen and (max-width: 800px) {

    .palaces .palace-item .qimen-oracle.star-oracle,
    .palaces .palace-item .qimen-oracle.stars-oracle {
        width: 16px;
        height: 16px;
        margin: 2px
    }

    .palaces .palace-item .qimen-oracle {
        font-size: .7em
    }
}

.palaces .palace-item .formation {
    flex: 0;
    font-size: 1em;
    justify-content: center;
    padding: 0 2px
}

.palaces .palace-item .formation .main .title {
    font-size: 1em;
    font-weight: normal
}

.palaces .palace-item .formation .main .description {
    font-size: .8em;
    word-spacing: 100vw
}

.palaces .palace-item .formation.highlight {
    color: #dd2e21
}

.palaces .palace-item .information {
    cursor: pointer
}

.palaces .palace-item .earthly-branch-item {
    align-items: center;
    display: flex;
    font-weight: bold;
    height: 100%;
    justify-content: center;
    position: absolute;
    text-transform: uppercase;
    width: 100%
}

.palaces .palace-item .palace-color {
    height: 100%;
    position: absolute;
    width: 100%
}

.palaces .palace-item .palace-warcraft {
    height: 100%;
    position: absolute;
    width: 100%
}

.palaces .palace-item .aspect {
    border: 1px solid #333;
    font-size: .8em;
    margin: 0 2px 1px 0;
    margin-right: 5px;
    padding: 1px;
    writing-mode: vertical-lr;
    height: 70px
}

@media screen and (max-width: 800px) {
    .palaces .palace-item .aspect {
        height: 3%
    }
}

.palaces .palace-item .line-separator {
    flex-basis: 100%;
    height: 0
}

.palaces .palace-item .separator {
    flex: 1;
    min-width: 1px;
    justify-content: center;
    align-items: center;
}

.palaces .palace-item .hexagram {
    align-items: center;
    display: flex;
    flex-direction: column;
    position: absolute;
    text-align: center;
    width: 5em
}

.palaces .palace-item .hexagram>img {
    width: 2em
}

.palaces .palace-item .palace-direction {
    align-items: center;
    color: #fff;
    display: flex;
    position: absolute;
    text-align: center;
    word-spacing: -0.2em
}

.palaces .palace-item .star-level {
    height: 2em;
    width: 2em;
    background-size: contain !important;
    background-repeat: no-repeat
}

.palaces .palace-item .nobleman-type {
    height: 1.6em;
    width: 1.6em;
    background-size: contain !important;
    background-repeat: no-repeat !important
}

.palaces .palace-item .copyright {
    bottom: 2px;
    position: absolute;
    right: 2px;
    padding: 8px
}

.palaces .palace-item .copyright-oracle {
    bottom: 2px;
    position: absolute;
    left: 2px
}

.palaces .palace-item .constellation {
    border: 1px solid #9c9c9c;
    display: flex;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.5em;
    position: absolute;
    text-align: center
}

.palaces .palace-item .constellation-name {
    border: 0 solid #9c9c9c;
    border-width: 0 1px;
    flex: 1
}

.palaces .palace-item .constellation img {
    height: 1.5em;
    width: 1.5em
}

.palaces .palace-item .constellation .constellation-img {
    height: 1.5em;
    width: 1.5em;
    background-size: contain !important;
    background-repeat: no-repeat !important
}

.palaces .palace-item .soulring {
    border: 1px solid #9c9c9c;
    display: flex;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.7em;
    position: absolute;
    text-align: center;
    background: #fafacf
}

.palaces .palace-item .soulring-name {
    flex: 1
}

.palaces .palace-item .soulring img {
    height: 1.5em;
    width: 1.5em
}

.palaces .palace-item .soulring .soulring-img {
    height: 1.5em;
    width: 1.5em;
    background-size: contain !important;
    background-repeat: no-repeat !important
}

.palaces .palace-item .envoy {
    background: #b70f0a;
    color: #fff;
    font-weight: bold;
    left: 50%;
    padding: 0 2px;
    position: absolute;
    top: 2px;
    transform: translate(-50%, -7px);
    white-space: nowrap;
    display: none;
}

.palaces .palace-item .chart-description {
    text-align: center
}

.palaces .palace-item .luck-range {
    background-color: #b7b072;
    width: 30px;
    height: 30px;
    font-weight: bold;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 5px;
    border-radius: 5px
}

.palaces .palace-item .aspect-wrapper {
    display: flex
}

.palaces .palace-de,
.palaces .palace-hs {
    height: 2em;
    width: 2em
}

.palaces .khong-vong {
    background: url(/dist/0016aed69f30b9417a6a5d48c718fed0.png);
    background-size: contain;
    background-repeat: no-repeat
}

.palaces .dich-ma {
    background: url(/dist/5f435c8bd3a11ce58d39f3c68991fbdd.png);
    background-size: contain;
    background-repeat: no-repeat
}

.palaces .palace-day,
.palaces .palace-hour {
    background: #6b6b6b;
    border-radius: 50%;
    color: #ebebeb;
    display: inline-block;
    font-size: .7em;
    font-weight: bold;
    line-height: 2.5em;
    text-align: center;
    width: 2.5em;
    margin-bottom: 1px
}

.palaces .palace-hour {
    background: #b7b072;
    color: #fff
}

.palaces .palace-icon {
    font-size: .9em;
    left: 0;
    margin-top: -4px;
    position: absolute;
    display: none;
}

.palaces .hexagon {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #991511;
    display: block;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)
}

.palaces .icon-jap {
    color: #fff;
    position: absolute;
    left: 0;
    top: 2px !important;
    font-size: .6rem;
    padding: 3px;
    transform: none !important;
    left: 0 !important;
    background-color: #991511
}

.palaces .icon-jap span {
    display: block
}

.palaces .icon-jap.iconvn {
    font-size: .4rem !important;
    padding-top: 3px !important
}

@media screen and (max-width: 800px) {

    .palace .palace-item .palace-strategy,
    .palace .palace-item .palaces .palace-item .palace-tactic {
        font-size: 6px;
        display: none
    }

    .palace .palace-item:nth-child(1) .palace-counsels>:nth-child(2) {
        width: calc(100% + 40px);
        height: 16px;
        top: -40px;
        left: -40px
    }
}

.fengshui .palace-wrapper {
    background: #868ea6;
    padding: 0
}

.fengshui .palace-rings {
    bottom: 0;
    left: 0;
    right: 0;
    top: 0
}

.fengshui .palace-rings::before {
    border-color: #2d3859
}

.fengshui .palaces {
    margin: 12px
}

.fengshui .palaces .palace-item::before {
    border-color: #2d3859
}

.fengshui .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(1) {
    height: calc(100% + 12px);
    left: -12px;
    top: -12px
}

.fengshui .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(2) {
    top: -12px
}

.fengshui .palaces .palace-item:nth-child(2) .palace-colors>:nth-child(1) {
    top: -12px
}

.fengshui .palaces .palace-item:nth-child(2) .palace-direction {
    margin: 12px 0
}

.fengshui .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(1) {
    top: -12px;
    width: 100%
}

.fengshui .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(2) {
    height: calc(100% + 12px);
    right: -12px;
    top: -12px
}

.fengshui .palaces .palace-item:nth-child(4) .palace-colors>:nth-child(1) {
    left: -12px
}

.fengshui .palaces .palace-item:nth-child(4) .palace-direction {
    margin: 0 12px
}

.fengshui .palaces .palace-item:nth-child(6) .palace-colors>:nth-child(1) {
    right: -12px
}

.fengshui .palaces .palace-item:nth-child(6) .palace-direction {
    margin: 0 12px
}

.fengshui .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(1) {
    bottom: -12px;
    left: 0;
    width: 100%
}

.fengshui .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(2) {
    bottom: -12px;
    height: calc(100% + 12px);
    left: -12px
}

.fengshui .palaces .palace-item:nth-child(8) .palace-colors>:nth-child(1) {
    bottom: -12px
}

.fengshui .palaces .palace-item:nth-child(8) .palace-direction {
    margin: 12px 0
}

.fengshui .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(1) {
    bottom: -12px;
    height: calc(100% + 12px);
    right: -12px
}

.fengshui .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(2) {
    bottom: -12px;
    width: 100%
}

.fengshui .palaces .palace-item.no-internal {
    background: rgba(45, 56, 89, .1)
}

.fengshui .palaces .palace-item .hexagram {
    display: none
}

.fengshui .palaces .palace-item .palace-direction {
    margin: 12px
}

.fengshui .palaces .palace-item .formation {
    color: #1f559f
}

.fengshui .palaces .palace-item .envoy {
    background: #1f559f
}

.fengshui .palaces .palace-item .text-fengshui {
    color: #1f559f
}

.fengshui-tab .palaces .palace-item.no-internal {
    background: rgba(183, 176, 114, .1)
}

.fengshui-tab .palaces .palace-item .envoy {
    background-color: #b70f0a
}

.fengshui-tab .palaces .palace-item .text-fengshui {
    color: #dd2e21
}

.fengshui-tab .palaces .palace-item::before {
    border-color: #b7b072 !important
}

.fengshui-tab .palaces .palace-item .formation {
    color: #333
}

.fengshui-tab .palaces .palace-item .formation.highlight {
    color: #dd2e21
}

.express .palace-wrapper {
    padding: 0
}

.express .palace-rings {
    bottom: 0;
    left: 0;
    right: 0;
    top: 0
}

.express .palaces {
    margin: 12px
}

.express .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(1) {
    height: calc(100% + 12px);
    left: -12px;
    top: -12px
}

.express .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(2) {
    top: -12px
}

.express .palaces .palace-item:nth-child(2) .palace-colors>:nth-child(1) {
    top: -12px
}

.express .palaces .palace-item:nth-child(2) .palace-direction {
    margin: 12px 0
}

.express .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(1) {
    top: -12px;
    width: 100%
}

.express .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(2) {
    height: calc(100% + 12px);
    right: -12px;
    top: -12px
}

.express .palaces .palace-item:nth-child(4) .palace-colors>:nth-child(1) {
    left: -12px
}

.express .palaces .palace-item:nth-child(4) .palace-direction {
    margin: 0 12px
}

.express .palaces .palace-item:nth-child(6) .palace-colors>:nth-child(1) {
    right: -12px
}

.express .palaces .palace-item:nth-child(6) .palace-direction {
    margin: 0 12px
}

.express .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(1) {
    bottom: -12px;
    left: 0;
    width: 100%
}

.express .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(2) {
    bottom: -12px;
    height: calc(100% + 12px);
    left: -12px
}

.express .palaces .palace-item:nth-child(8) .palace-colors>:nth-child(1) {
    bottom: -12px
}

.express .palaces .palace-item:nth-child(8) .palace-direction {
    margin: 12px 0
}

.express .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(1) {
    bottom: -12px;
    height: calc(100% + 12px);
    right: -12px
}

.express .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(2) {
    bottom: -12px;
    width: 100%
}

.express .palaces .palace-item .hexagram {
    display: none
}

.express .palaces .palace-item .palace-direction {
    margin: 12px
}

@media screen and (max-width: 768px) {
    .mobile .palaces .copyright {
        bottom: 2px;
        position: absolute;
        right: 2px;
        padding: 1px
    }

    .qimen-strategic-live-page .qimen-info {
        flex-direction: column
    }

    .qimen-strategic-live-page .ai-mobile {
        width: 100%;
        flex-direction: unset
    }

    .qimen-strategic-live-page .data-table.table-tu-tru {
        margin-left: 0;
        margin-top: 20px;
        margin: 20px 0 0 0
    }

    .palaces .palace-item .luck-range {
        width: 10px;
        height: 10px;
        margin-left: 2px;
        border-radius: 2px
    }

    .palaces .palace-item .hexagon {
        width: 8px;
        height: 8px
    }

    .palaces .palace-item .icon-jap {
        left: -2px;
        top: 2px;
        font-size: .2rem;
        padding: 2px 0 0 0
    }

    .palaces .palace-item .icon-jap.iconvn {
        font-size: .15rem !important;
        padding-top: 3px !important
    }

    .qimen-strategic-page select {
        border: thin solid gray;
        color: #333
    }

    .qimen-strategic-page .qimen-select-list {
        flex-direction: row;
        flex-wrap: wrap
    }

    .qimen-strategic-page .qimen-select-list .qimen-select-item {
        width: 27.5%;
        height: 80px;
        margin: 2px 2.5%;
        flex-wrap: wrap;
        align-items: self-end
    }

    .qimen-strategic-page .qimen-select-list .qimen-select-item .label {
        margin: 0 0 5px 0;
        font-size: 13px
    }

    .qimen-strategic-page .qimen-select-list .qimen-select-item select,
    .qimen-strategic-page .qimen-select-list .qimen-select-item .react-daterange-picker {
        height: 35px;
        width: 100%
    }

    .qimen-strategic-page .qimen-select-list .width-100 {
        width: 100%
    }

    .qimen-strategic-page .qimen-select-list .width-100 .label,
    .qimen-strategic-page .qimen-select-list .width-100 .react-daterange-picker {
        width: 100%
    }

    .qimen-strategic-page .qimen-select-list .width-100 .react-daterange-picker__wrapper {
        border-radius: 5px
    }

    .qimen-strategic-page .star-level-live {
        width: 8px !important
    }

    .live-express {
        overflow-x: visible;
        margin-bottom: 150px
    }

    .live-express .star-level-live {
        width: 8px !important
    }

    .live-express .qimen-calendar .content-item .item-data {
        font-size: 6px
    }

    .qimen-strategic-live-page select {
        width: 40px
    }

    .qimen-strategic-live-page .palaces .palace-item:nth-child(1) .constellation,
    .qimen-strategic-live-page .palaces .palace-item:nth-child(4) .constellation,
    .qimen-strategic-live-page .palaces .palace-item:nth-child(7) .constellation {
        left: -25px !important
    }

    .qimen-strategic-live-page .palaces .palace-item:nth-child(2) .constellation {
        top: -25px !important
    }

    .qimen-strategic-live-page .palaces .palace-item:nth-child(3) .constellation,
    .qimen-strategic-live-page .palaces .palace-item:nth-child(6) .constellation,
    .qimen-strategic-live-page .palaces .palace-item:nth-child(9) .constellation {
        right: -25px !important
    }

    .qimen-strategic-live-page .palaces .palace-item:nth-child(8) .constellation {
        bottom: -25px !important
    }
    
}

@media screen and (min-width: 801px) {
    .qimen-chart-wrapper #pdf-print {
        transform: unset !important;
        zoom: unset !important
    }

    .palace-wrapper {
        padding: 130px
    }

    .palace-rings {
        bottom: 130px;
        left: 130px;
        right: 130px;
        top: 130px
    }

    .palace-rings::before {
        border: 30px solid #b7b072
    }

    .palaces {
        font-size: 14px;
        height: 640px;
        margin: 60px auto;
        width: 640px
    }

    .palaces.backhome::before {
        margin: 100px
    }

    .palaces .palace-item:nth-child(1) .earthly-branches>:nth-child(1) {
        left: -30px;
        width: 30px
    }

    .palaces .palace-item:nth-child(1) .earthly-branches>:nth-child(2) {
        height: 30px;
        top: -30px
    }

    .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(1) {
        height: calc(100% + 60px);
        left: -60px;
        top: -60px;
        width: 30px
    }

    .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(2) {
        height: 30px;
        left: -30px;
        top: -60px;
        width: calc(100% + 30px)
    }

    .palaces .palace-item:nth-child(1) .palace-direction {
        left: -55px;
        top: -60px
    }

    .palaces .palace-item:nth-child(1) .constellation {
        left: -90px
    }

    .palaces .palace-item:nth-child(1) .constellation-name {
        border-width: 2px 0
    }

    .palaces .palace-item:nth-child(1) .hexagram {
        left: -160px
    }

    .palaces .palace-item:nth-child(1) .constellation-live {
        left: -65px
    }

    .palaces .palace-item:nth-child(2) .earthly-branches>:nth-child(1) {
        height: 30px;
        top: -30px
    }

    .palaces .palace-item:nth-child(2) .palace-colors>:nth-child(1) {
        height: 30px;
        top: -60px
    }

    .palaces .palace-item:nth-child(2) .palace-direction {
        top: -60px
    }

    .palaces .palace-item:nth-child(2) .hexagram {
        top: -160px
    }

    .palaces .palace-item:nth-child(2) .constellation {
        top: -90px
    }

    .palaces .palace-item:nth-child(2) .constellation-name {
        border-width: 0 2px
    }

    .palaces .palace-item:nth-child(2) .constellation-live {
        top: -65px
    }

    .palaces .palace-item:nth-child(2) .constellation-live-name {
        border-width: 0 2px
    }

    .palaces .palace-item:nth-child(3) .earthly-branches>:nth-child(1) {
        height: 30px;
        top: -30px
    }

    .palaces .palace-item:nth-child(3) .earthly-branches>:nth-child(2) {
        right: -30px;
        width: 30px
    }

    .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(1) {
        height: 30px;
        top: -60px;
        width: calc(100% + 30px)
    }

    .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(2) {
        height: calc(100% + 60px);
        right: -60px;
        top: -60px;
        width: 30px
    }

    .palaces .palace-item:nth-child(3) .hexagram {
        right: -160px
    }

    .palaces .palace-item:nth-child(3) .palace-direction {
        right: -55px;
        top: -60px
    }

    .palaces .palace-item:nth-child(3) .constellation {
        right: -90px
    }

    .palaces .palace-item:nth-child(3) .constellation-name {
        border-width: 2px 0
    }

    .palaces .palace-item:nth-child(3) .constellation-live {
        right: -65px
    }

    .palaces .palace-item:nth-child(4) .earthly-branches>:nth-child(1) {
        left: -30px;
        width: 30px
    }

    .palaces .palace-item:nth-child(4) .palace-colors>:nth-child(1) {
        left: -60px;
        width: 30px
    }

    .palaces .palace-item:nth-child(4) .hexagram {
        left: -160px
    }

    .palaces .palace-item:nth-child(4) .palace-direction {
        left: -60px;
        width: 30px
    }

    .palaces .palace-item:nth-child(4) .constellation {
        left: -90px
    }

    .palaces .palace-item:nth-child(4) .constellation-name {
        border-width: 2px 0
    }

    .palaces .palace-item:nth-child(4) .constellation-live {
        left: -65px
    }

    .palaces .palace-item:nth-child(6) .earthly-branches>:nth-child(1) {
        right: -30px;
        width: 30px
    }

    .palaces .palace-item:nth-child(6) .palace-colors>:nth-child(1) {
        right: -60px;
        width: 30px
    }

    .palaces .palace-item:nth-child(6) .hexagram {
        right: -160px
    }

    .palaces .palace-item:nth-child(6) .palace-direction {
        right: -60px;
        width: 30px
    }

    .palaces .palace-item:nth-child(6) .constellation {
        right: -90px
    }

    .palaces .palace-item:nth-child(6) .constellation-name {
        border-width: 2px 0
    }

    .palaces .palace-item:nth-child(6) .constellation-live {
        right: -65px
    }

    .palaces .palace-item:nth-child(7) .earthly-branches>:nth-child(1) {
        bottom: -30px;
        height: 30px
    }

    .palaces .palace-item:nth-child(7) .earthly-branches>:nth-child(2) {
        left: -30px;
        width: 30px
    }

    .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(1) {
        bottom: -60px;
        height: 30px;
        left: -30px;
        width: calc(100% + 30px)
    }

    .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(2) {
        bottom: -60px;
        height: calc(100% + 60px);
        left: -60px;
        width: 30px
    }

    .palaces .palace-item:nth-child(7) .hexagram {
        left: -160px
    }

    .palaces .palace-item:nth-child(7) .palace-direction {
        bottom: -60px;
        left: -55px
    }

    .palaces .palace-item:nth-child(7) .constellation {
        left: -90px
    }

    .palaces .palace-item:nth-child(7) .constellation-name {
        border-width: 2px 0
    }

    .palaces .palace-item:nth-child(7) .constellation-live {
        left: -65px
    }

    .palaces .palace-item:nth-child(8) .earthly-branches>:nth-child(1) {
        bottom: -30px;
        height: 30px
    }

    .palaces .palace-item:nth-child(8) .palace-colors>:nth-child(1) {
        bottom: -60px;
        height: 30px
    }

    .palaces .palace-item:nth-child(8) .hexagram {
        bottom: -160px
    }

    .palaces .palace-item:nth-child(8) .palace-direction {
        bottom: -60px
    }

    .palaces .palace-item:nth-child(8) .constellation {
        bottom: -90px
    }

    .palaces .palace-item:nth-child(8) .constellation-name {
        border-width: 0 2px
    }

    .palaces .palace-item:nth-child(8) .constellation-live {
        bottom: -65px
    }

    .palaces .palace-item:nth-child(9) .earthly-branches>:nth-child(1) {
        right: -30px;
        width: 30px
    }

    .palaces .palace-item:nth-child(9) .earthly-branches>:nth-child(2) {
        bottom: -30px;
        height: 30px
    }

    .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(1) {
        bottom: -60px;
        height: calc(100% + 60px);
        right: -60px;
        width: 30px
    }

    .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(2) {
        bottom: -60px;
        height: 30px;
        width: calc(100% + 30px)
    }

    .palaces .palace-item:nth-child(9) .hexagram {
        right: -160px
    }

    .palaces .palace-item:nth-child(9) .palace-direction {
        bottom: -60px;
        right: -55px
    }

    .palaces .palace-item:nth-child(9) .constellation {
        right: -90px
    }

    .palaces .palace-item:nth-child(9) .constellation-name {
        border-width: 2px 0
    }

    .palaces .palace-item:nth-child(9) .constellation-live {
        right: -65px
    }

    .palaces .palace-item .constellation {
        border-width: 2px
    }

    .palaces .palace-item .constellation-name {
        border-width: 0 2px
    }

    .fengshui .palaces,
    .express .palaces {
        margin: 30px
    }

    .fengshui .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(1),
    .express .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(1) {
        height: calc(100% + 30px);
        left: -30px;
        top: -30px
    }

    .fengshui .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(2),
    .express .palaces .palace-item:nth-child(1) .palace-colors>:nth-child(2) {
        left: 0;
        top: -30px;
        width: 100%
    }

    .fengshui .palaces .palace-item:nth-child(2) .palace-colors>:nth-child(1),
    .express .palaces .palace-item:nth-child(2) .palace-colors>:nth-child(1) {
        top: -30px
    }

    .fengshui .palaces .palace-item:nth-child(2) .palace-direction,
    .express .palaces .palace-item:nth-child(2) .palace-direction {
        margin: 30px 0
    }

    .fengshui .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(1),
    .express .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(1) {
        top: -30px;
        width: 100%
    }

    .fengshui .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(2),
    .express .palaces .palace-item:nth-child(3) .palace-colors>:nth-child(2) {
        height: calc(100% + 30px);
        right: -30px;
        top: -30px
    }

    .fengshui .palaces .palace-item:nth-child(4) .palace-colors>:nth-child(1),
    .express .palaces .palace-item:nth-child(4) .palace-colors>:nth-child(1) {
        left: -30px
    }

    .fengshui .palaces .palace-item:nth-child(4) .palace-direction,
    .express .palaces .palace-item:nth-child(4) .palace-direction {
        margin: 0 30px
    }

    .fengshui .palaces .palace-item:nth-child(6) .palace-colors>:nth-child(1),
    .express .palaces .palace-item:nth-child(6) .palace-colors>:nth-child(1) {
        right: -30px
    }

    .fengshui .palaces .palace-item:nth-child(6) .palace-direction,
    .express .palaces .palace-item:nth-child(6) .palace-direction {
        margin: 0 30px
    }

    .fengshui .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(1),
    .express .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(1) {
        bottom: -30px;
        left: 0;
        width: 100%
    }

    .fengshui .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(2),
    .express .palaces .palace-item:nth-child(7) .palace-colors>:nth-child(2) {
        bottom: -30px;
        height: calc(100% + 30px);
        left: -30px
    }

    .fengshui .palaces .palace-item:nth-child(8) .palace-colors>:nth-child(1),
    .express .palaces .palace-item:nth-child(8) .palace-colors>:nth-child(1) {
        bottom: -30px
    }

    .fengshui .palaces .palace-item:nth-child(8) .palace-direction,
    .express .palaces .palace-item:nth-child(8) .palace-direction {
        margin: 30px 0
    }

    .fengshui .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(1),
    .express .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(1) {
        bottom: -30px;
        height: calc(100% + 30px);
        right: -30px
    }

    .fengshui .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(2),
    .express .palaces .palace-item:nth-child(9) .palace-colors>:nth-child(2) {
        bottom: -30px;
        width: 100%
    }

    .fengshui .palaces .palace-item .palace-direction,
    .express .palaces .palace-item .palace-direction {
        margin: 30px
    }

    .fengshui .palaces .palace-item .pc-hidden,
    .express .palaces .palace-item .pc-hidden {
        display: none
    }
}

@media screen and (max-width: 800px) {
    .qimen-chart-wrapper .chart-label {
        left: 50%;
        position: absolute;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
        font-size: 5px;
        font-weight: bold
    }

    .qimen-chart-wrapper .chart-label p {
        max-width: 200px;
        word-wrap: break-word;
        margin: 0
    }

    .qimen-fengshui {
        min-height: 49%;
        padding-top: 0
    }

    .qimen-fengshui .qimen-fengshui-label {
        left: 50%;
        position: absolute;
        top: 42% !important;
        transform: translate(-50%, -50%);
        z-index: 1;
        font-size: 5px;
        font-weight: bold
    }

    .qimen-strategic-live-page .qimen-chart-wrapper:nth-child(2),
    .qimen-strategic-live-page .qimen-chart-wrapper:nth-child(3),
    .qimen-strategic-live-page .qimen-chart-wrapper:nth-child(4) {
        margin-top: 32px
    }

    .qimen-strategic-live-page .qimen-chart-wrapper .qimen-hour,
    .qimen-strategic-live-page .qimen-chart-wrapper .qimen-day,
    .qimen-strategic-live-page .qimen-chart-wrapper .qimen-month,
    .qimen-strategic-live-page .qimen-chart-wrapper .qimen-year {
        top: 58% !important
    }

    .qimen-strategic-live-page .qimen-chart-wrapper .palace-wrapper-6 {
        margin: -43px auto 10px !important;
        padding: 0
    }

    .qimen-strategic-live-page .qimen-chart-wrapper .chart-label {
        font-size: .5rem;
        top: 50%;
        width: 100px
    }

    .qimen-strategic-live-page .qimen-chart-wrapper .chart-label p {
        font-size: 5px
    }

    .qimen-fengshui-wrapper .express .palaces {
        background-color: #fff;
        display: grid;
        font-size: 5px;
        grid-auto-rows: 1fr;
        grid-template-columns: repeat(3, 1fr);
        height: 200px;
        position: relative;
        user-select: none
    }

    .qimen-page .qimen-chart-wrapper {
        overflow: hidden;
        padding-top: 24px
    }

    .qimen-page .qimen-chart-wrapper .chart-label {
        font-size: .5rem
    }

    .qimen-page .qimen-chart-wrapper .chart-label p {
        font-size: 5px;
        width: 60px
    }

    .qimen-page .palaces {
        height: 180px;
        width: 180px
    }

    .qimen-destiny .qimen-chart-wrapper {
        width: 100%;
        overflow-x: scroll
    }

    .qimen-destiny .qimen-chart-wrapper .chart-label {
        font-size: .5rem;
        top: 50%
    }
}
.palace-item.cachcuc {
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
    padding:5px;

}

/* ===== VERSION 2 STYLES ===== */
/* Modern layout improvements for KMDG v2 */

/* Enhanced container with better spacing */
.palaces.v2 {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 32px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Improved palace items with modern styling */
.palaces.v2 .palace-item {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 3px;
    padding: 2px;
}

.palaces.v2 .palace-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

/* Enhanced palace meta with better typography */
.palaces.v2 .palace-item-meta {
    border-radius: 8px;
    padding: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
}

/* Improved palace colors with subtle gradients */
.palaces.v2 .palace-color {
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.palaces.v2 .palace-color:hover {
    transform: scale(1.05);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Better palace direction styling */
.palaces.v2 .palace-direction {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* Enhanced center palace */
.palaces.v2 .palace-item.center {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.palaces.v2 .palace-item.center .chart-description {
    text-align: center;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Improved toggle buttons for v2 */
.view-toggle-container.v2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: none;
}

.view-toggle-container.v2 .toggle-btn {
    border-radius: 25px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.view-toggle-container.v2 .toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.view-toggle-container.v2 .toggle-btn:hover::before {
    left: 100%;
}

.view-toggle-container.v2 .toggle-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.view-toggle-container.v2 .toggle-btn:not(.active) {
    background: transparent;
    color: white;
}

/* Enhanced separator styling */
.palaces.v2 .separator {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Improved text elements */
.palaces.v2 .main .title {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* Better structure number styling */
.palaces.v2 .structure-number {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.palaces.v2 .structure-number .title {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Enhanced no-internal styling */
.palaces.v2 .palace-item.no-internal {
    background: linear-gradient(135deg, rgba(183, 176, 114, 0.15), rgba(183, 176, 114, 0.05));
    border: 1px solid rgba(183, 176, 114, 0.2);
}

/* Responsive improvements for v2 */
@media screen and (max-width: 800px) {
    .palaces.v2 {
        margin: 16px;
        border-radius: 12px;
    }
    
    .palaces.v2 .palace-item {
        border-radius: 8px;
        gap: 2px;
    }
    
    .view-toggle-container.v2 {
        margin: 16px;
        border-radius: 30px;
    }
    
    .view-toggle-container.v2 .toggle-btn {
        font-size: 14px;
        padding: 10px 16px;
    }
}

/* ===== VERSION 2 TYPOGRAPHY & COLOR IMPROVEMENTS ===== */

/* Modern font stack for v2 */
.palaces.v2 {
    font-family: 'Noto Sans SC', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-feature-settings: 'liga' 1, 'kern' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced typography hierarchy */
.palaces.v2 .palace-direction {
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    font-size: 1.1em;
    line-height: 1.2;
    color: #2c3e50;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.8px;
}

.palaces.v2 .palace-name {
    font-family: 'Noto Serif SC', serif;
    font-weight: 600;
    font-size: 0.9em;
    color: #34495e;
    letter-spacing: 0.5px;
}

/* Improved Chinese character styling */
.palaces.v2 .main .title {
    font-family: 'Noto Serif SC', serif;
    font-weight: 800;
    font-size: 2.2em;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: 1px;
    color: inherit;
}

/* Enhanced color scheme for different elements */
.palaces.v2 .star .main {
    color: #3498db !important;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.05));
    border-radius: 6px;
    padding: 2px;
}

.palaces.v2 .deity .main {
    color: #e74c3c !important;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
    border-radius: 6px;
    padding: 2px;
}

.palaces.v2 .heavenly-plate .main {
    color: #f39c12 !important;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(243, 156, 18, 0.05));
    border-radius: 6px;
    padding: 2px;
}

.palaces.v2 .door .main {
    color: #27ae60 !important;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(39, 174, 96, 0.05));
    border-radius: 6px;
    padding: 2px;
}

.palaces.v2 .earth-plate .main {
    color: #8e44ad !important;
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.1), rgba(142, 68, 173, 0.05));
    border-radius: 6px;
    padding: 2px;
}

/* Enhanced palace colors with semantic meaning */
.palaces.v2 .palace-color[style*="#428f4c"] {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.palaces.v2 .palace-color[style*="#B53E3C"] {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.palaces.v2 .palace-color[style*="#7F6539"] {
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.palaces.v2 .palace-color[style*="#396E9A"] {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.palaces.v2 .palace-color[style*="#A9A89E"] {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

/* Improved description text */
.palaces.v2 .description {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.75em;
    font-weight: 500;
    color: #7f8c8d;
    line-height: 1.3;
    text-shadow: none;
    letter-spacing: 0.3px;
}

/* Enhanced structure number with better contrast */
.palaces.v2 .structure-number {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.palaces.v2 .structure-number .title {
    color: white !important;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    font-size: 1.8em;
}

/* Better envoy styling */
.palaces.v2 .envoy {
    font-family: 'Noto Serif SC', serif;
    font-weight: 600;
    font-size: 0.8em;
    color: #e67e22;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1), rgba(230, 126, 34, 0.05));
    border-radius: 4px;
    padding: 1px 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Enhanced palace icon styling */
.palaces.v2 .palace-icon {
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 600;
    font-size: 0.7em;
    color: #34495e;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    padding: 1px 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Improved chart description */
.palaces.v2 .chart-description {
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    font-size: 0.85em;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
}

/* Enhanced earth plate sub elements */
.palaces.v2 .earth-plate-sub {
    font-family: 'Noto Serif SC', serif;
    font-weight: 600;
    font-size: 0.7em;
    color: #27ae60;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background: rgba(39, 174, 96, 0.1);
    border-radius: 3px;
    padding: 1px 2px;
}

/* Better khong-vong styling */
.palaces.v2 .khong-vong {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.2), rgba(155, 89, 182, 0.1));
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 4px;
    padding: 2px;
}

/* Enhanced palace day/hour indicators */
.palaces.v2 .palace-day,
.palaces.v2 .palace-hour {
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 600;
    font-size: 0.65em;
    color: #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.05));
    border-radius: 3px;
    padding: 1px 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Improved responsive typography */
@media screen and (max-width: 800px) {
    .palaces.v2 .main .title {
        font-size: 1.8em;
        letter-spacing: 0.5px;
    }
    
    .palaces.v2 .palace-direction {
        font-size: 1em;
        letter-spacing: 0.5px;
    }
    
    .palaces.v2 .description {
        font-size: 0.7em;
    }
    
    .palaces.v2 .structure-number .title {
        font-size: 1.5em;
    }
}

/* ===== VERSION 2 INTERACTIVE ELEMENTS & ANIMATIONS ===== */

/* Enhanced hover effects for palace items */
.palaces.v2 .palace-item {
    position: relative;
    overflow: hidden;
}

.palaces.v2 .palace-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.palaces.v2 .palace-item:hover::before {
    left: 100%;
}

/* Improved click animations */
.palaces.v2 .palace-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Enhanced palace colors with hover states */
.palaces.v2 .palace-item[data-color="1"]:hover {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.palaces.v2 .palace-item[data-color="2"]:hover {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.3);
}

.palaces.v2 .palace-item[data-color="3"]:hover {
    background: linear-gradient(135deg, #45b7d1, #96c93d);
    box-shadow: 0 4px 20px rgba(69, 183, 209, 0.3);
}

.palaces.v2 .palace-item[data-color="4"]:hover {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
    box-shadow: 0 4px 20px rgba(249, 202, 36, 0.3);
}

.palaces.v2 .palace-item[data-color="5"]:hover {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.palaces.v2 .palace-item[data-color="6"]:hover {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    box-shadow: 0 4px 20px rgba(253, 121, 168, 0.3);
}

.palaces.v2 .palace-item[data-color="7"]:hover {
    background: linear-gradient(135deg, #00b894, #00cec9);
    box-shadow: 0 4px 20px rgba(0, 184, 148, 0.3);
}

.palaces.v2 .palace-item[data-color="8"]:hover {
    background: linear-gradient(135deg, #e17055, #d63031);
    box-shadow: 0 4px 20px rgba(225, 112, 85, 0.3);
}

.palaces.v2 .palace-item[data-color="9"]:hover {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    box-shadow: 0 4px 20px rgba(116, 185, 255, 0.3);
}

/* Smooth transitions for all interactive elements */
.palaces.v2 .palace-item,
.palaces.v2 .palace-item * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states for accessibility */
.palaces.v2 .palace-item:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Loading animation for palace items */
.palaces.v2 .palace-item.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Smooth entrance animations */
.palaces.v2 .palace-item {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.palaces.v2 .palace-item:nth-child(1) { animation-delay: 0.1s; }
.palaces.v2 .palace-item:nth-child(2) { animation-delay: 0.2s; }
.palaces.v2 .palace-item:nth-child(3) { animation-delay: 0.3s; }
.palaces.v2 .palace-item:nth-child(4) { animation-delay: 0.4s; }
.palaces.v2 .palace-item:nth-child(5) { animation-delay: 0.5s; }
.palaces.v2 .palace-item:nth-child(6) { animation-delay: 0.6s; }
.palaces.v2 .palace-item:nth-child(7) { animation-delay: 0.7s; }
.palaces.v2 .palace-item:nth-child(8) { animation-delay: 0.8s; }
.palaces.v2 .palace-item:nth-child(9) { animation-delay: 0.9s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced view toggle buttons */
.view-toggle-container.v2 .btn {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.view-toggle-container.v2 .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.view-toggle-container.v2 .btn:hover::before {
    left: 100%;
}

.view-toggle-container.v2 .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Active state for toggle buttons */
.view-toggle-container.v2 .btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ===== VERSION 2 RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS ===== */

/* Tablet breakpoint (768px - 1024px) */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .palaces.v2 {
        width: 500px;
        height: 500px;
        margin: 24px auto;
        gap: 2px;
    }
    
    .palaces.v2 .palace-item {
        gap: 1px;
        padding: 1px;
    }
    
    .palaces.v2 .main .title {
        font-size: 1.8em;
    }
    
    .palaces.v2 .palace-direction {
        font-size: 0.9em;
    }
    
    .palaces.v2 .description {
        font-size: 0.7em;
    }
}

/* Mobile breakpoint (480px - 768px) */
@media screen and (max-width: 768px) and (min-width: 481px) {
    .palaces.v2 {
        width: 400px;
        height: 400px;
        margin: 16px auto;
        gap: 1px;
        border-radius: 12px;
        padding: 4px;
    }
    
    .palaces.v2 .palace-item {
        gap: 1px;
        padding: 1px;
        border-radius: 8px;
    }
    
    .palaces.v2 .main .title {
        font-size: 1.5em;
        line-height: 1;
    }
    
    .palaces.v2 .palace-direction {
        font-size: 0.8em;
        letter-spacing: 0.3px;
    }
    
    .palaces.v2 .description {
        font-size: 0.65em;
        line-height: 1.2;
    }
    
    .palaces.v2 .structure-number .title {
        font-size: 1.4em;
    }
    
    .palaces.v2 .palace-item-meta {
        padding: 2px;
    }
    
    .palaces.v2 .palace-color {
        width: 8px;
        height: 8px;
    }
}

/* Small mobile breakpoint (320px - 480px) */
@media screen and (max-width: 480px) {
    .palaces.v2 {
        width: 320px;
        height: 320px;
        margin: 12px auto;
        gap: 1px;
        border-radius: 10px;
        padding: 3px;
    }
    
    .palaces.v2 .palace-item {
        gap: 1px;
        padding: 1px;
        border-radius: 6px;
    }
    
    .palaces.v2 .main .title {
        font-size: 1.2em;
        line-height: 1;
    }
    
    .palaces.v2 .palace-direction {
        font-size: 0.7em;
        letter-spacing: 0.2px;
    }
    
    .palaces.v2 .description {
        font-size: 0.6em;
        line-height: 1.1;
    }
    
    .palaces.v2 .structure-number .title {
        font-size: 1.1em;
    }
    
    .palaces.v2 .palace-item-meta {
        padding: 1px;
    }
    
    .palaces.v2 .palace-color {
        width: 6px;
        height: 6px;
    }
    
    .palaces.v2 .envoy {
        font-size: 0.6em;
        padding: 1px 2px;
    }
    
    .palaces.v2 .palace-icon {
        font-size: 0.6em;
        padding: 1px;
    }
}

/* Extra small mobile breakpoint (under 320px) */
@media screen and (max-width: 319px) {
    .palaces.v2 {
        width: 280px;
        height: 280px;
        margin: 8px auto;
        gap: 1px;
        border-radius: 8px;
        padding: 2px;
    }
    
    .palaces.v2 .palace-item {
        gap: 1px;
        padding: 1px;
        border-radius: 4px;
    }
    
    .palaces.v2 .main .title {
        font-size: 1em;
        line-height: 1;
    }
    
    .palaces.v2 .palace-direction {
        font-size: 0.6em;
        letter-spacing: 0.1px;
    }
    
    .palaces.v2 .description {
        font-size: 0.55em;
        line-height: 1;
    }
    
    .palaces.v2 .structure-number .title {
        font-size: 1em;
    }
    
    .palaces.v2 .palace-color {
        width: 4px;
        height: 4px;
    }
}

/* Landscape mobile optimization */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .palaces.v2 {
        width: 350px;
        height: 350px;
        margin: 8px auto;
    }
    
    .palaces.v2 .main .title {
        font-size: 1.3em;
    }
    
    .palaces.v2 .palace-direction {
        font-size: 0.75em;
    }
    
    .palaces.v2 .description {
        font-size: 0.6em;
    }
}

/* Enhanced touch interactions for mobile */
@media (hover: none) and (pointer: coarse) {
    .palaces.v2 .palace-item:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .palaces.v2 .palace-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .palaces.v2 .palace-color:hover {
        transform: none;
    }
    
    .palaces.v2 .palace-color:active {
        transform: scale(1.05);
    }
}

/* Improved toggle buttons for mobile */
@media screen and (max-width: 768px) {
    .view-toggle-container.v2 {
        margin: 16px auto;
        max-width: 300px;
        border-radius: 30px;
        padding: 3px;
    }
    
    .view-toggle-container.v2 .toggle-btn {
        font-size: 14px;
        padding: 10px 16px;
        border-radius: 25px;
    }
}

@media screen and (max-width: 480px) {
    .view-toggle-container.v2 {
        margin: 12px auto;
        max-width: 280px;
        border-radius: 25px;
        padding: 2px;
    }
    
    .view-toggle-container.v2 .toggle-btn {
        font-size: 12px;
        padding: 8px 12px;
        border-radius: 20px;
    }
}

/* Performance optimizations for mobile */
@media screen and (max-width: 768px) {
    .palaces.v2 .palace-item {
        /* Reduce animations on mobile for better performance */
        animation: none;
        animation-delay: 0s;
    }
    
    .palaces.v2 .palace-item::before {
        /* Disable shimmer effect on mobile */
        display: none;
    }
    
    .palaces.v2 .palace-item:hover::before {
        display: none;
    }
    
    /* Simplify transitions for better performance */
    .palaces.v2 .palace-item,
    .palaces.v2 .palace-item * {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .palaces.v2 {
        /* Ensure crisp rendering on high DPI displays */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .palaces.v2 .palace-color {
        /* Prevent blurry edges on high DPI */
        transform: translateZ(0);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .palaces.v2 .palace-item,
    .palaces.v2 .palace-item *,
    .view-toggle-container.v2 .toggle-btn {
        animation: none !important;
        transition: none !important;
    }
    
    .palaces.v2 .palace-item::before {
        display: none !important;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
    .palaces.v2 {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .palaces.v2 .palace-item {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .palaces.v2 .palace-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .palaces.v2 .palace-item-meta {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    }
}