/* Player home and navigation, after the shared player theme. */
html.fi:has(body.fi-body.fi-panel-player:not(.s33-guest-body)),
html.fi:has(body.fi-body.fi-panel-player:not(.s33-guest-body)) body.fi-body.fi-panel-player,
html.fi:has(body.fi-body.fi-panel-player:not(.s33-guest-body)) body.fi-body.fi-panel-player :is(.fi-layout, .fi-main-ctn, .fi-main) {
    color: #252b2a !important;
    background: #f5f7f6 !important;
}
html.fi body.fi-body.fi-panel-player :is(.fi-page, .fi-page-main, .fi-page-content) { color: #252b2a !important; background: transparent !important; }
html.fi body.fi-body.fi-panel-player :is(.fi-header-heading, .fi-header-subheading, .fi-page-header-heading, .fi-page-header-subheading) { color: #252b2a !important; text-shadow: none !important; }
html.fi body.fi-body.fi-panel-player :is(.fi-sidebar, .fi-main-sidebar) { color: #42544a !important; background: #fff !important; border-right: 1px solid #dce3df !important; box-shadow: none !important; }
html.fi body.fi-body.fi-panel-player :is(.fi-sidebar-header, .fi-sidebar-header-ctn, .fi-sidebar-header-logo-ctn, .fi-sidebar-nav, .fi-sidebar-nav-groups) { color: #42544a !important; background: transparent !important; box-shadow: none !important; }
html.fi body.fi-body.fi-panel-player :is(.fi-sidebar-header-ctn, .fi-sidebar-header-logo-ctn) { padding: 0 !important; border: 0 !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar-header { width: 100% !important; max-width: none !important; min-height: 78px !important; padding: 16px !important; border: 0 !important; border-bottom: 1px solid #e8eeea !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar :is(.fi-logo, .s33-brand-lockup) { width: 100% !important; max-width: none !important; height: auto !important; justify-content: flex-start !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .s33-brand-lockup { gap: 10px !important; padding: 0 !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .s33-brand-lockup__badge { flex: 0 0 42px !important; width: 42px !important; height: 42px !important; max-width: 42px !important; max-height: 42px !important; padding: 0 !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; box-shadow: none !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .s33-brand-lockup__badge img { width: 42px !important; height: 42px !important; max-width: 42px !important; max-height: 42px !important; object-fit: contain !important; transform: none !important; filter: none !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .s33-brand-lockup__text { display: block !important; min-width: 0 !important; color: #253d32 !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .s33-brand-lockup__text strong { display: block !important; max-width: none !important; overflow: visible !important; color: #253d32 !important; font-size: 16px !important; line-height: 1.5 !important; white-space: normal !important; text-overflow: clip !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-nav { padding: 16px 12px 24px !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-group-btn { color: #829087 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-group-btn .fi-sidebar-group-label { color: #829087 !important; font-size: 11px !important; font-weight: 600 !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar :is(.fi-sidebar-item-btn, .fi-sidebar-item-button),
html.fi body.fi-body.fi-panel-player .fi-sidebar :is(.fi-sidebar-item-btn, .fi-sidebar-item-button):not(:hover) { min-height: 42px !important; margin: 0 !important; padding: 9px 12px !important; color: #53635a !important; background: transparent !important; border: 1px solid transparent !important; border-radius: 6px !important; box-shadow: none !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar :is(.fi-sidebar-item-btn, .fi-sidebar-item-button):hover { color: #19765c !important; background: #f0f6f2 !important; border-color: transparent !important; box-shadow: none !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-item.fi-active > :is(.fi-sidebar-item-btn, .fi-sidebar-item-button),
html.fi body.fi-body.fi-panel-player .fi-sidebar :is(.fi-sidebar-item-btn, .fi-sidebar-item-button)[aria-current="page"] { color: #17664f !important; background: #e5f2eb !important; border-color: #d1e5d8 !important; box-shadow: inset 3px 0 #19765c !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-item-label { overflow: visible !important; white-space: normal !important; text-overflow: clip !important; font-weight: 600 !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar :is(svg.fi-icon, .fi-sidebar-item-icon),
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-item.fi-active :is(svg.fi-icon, .fi-sidebar-item-icon),
html.fi body.fi-body.fi-panel-player .fi-sidebar :is(.fi-sidebar-item-btn, .fi-sidebar-item-button):hover :is(svg.fi-icon, .fi-sidebar-item-icon) { color: currentColor !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-item:not(.fi-active) :is(.fi-sidebar-item-label, svg.fi-icon, .fi-sidebar-item-icon) { color: #53635a !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-item.fi-active :is(.fi-sidebar-item-label, svg.fi-icon, .fi-sidebar-item-icon),
html.fi body.fi-body.fi-panel-player .fi-sidebar .fi-sidebar-item :is(.fi-sidebar-item-btn, .fi-sidebar-item-button):hover :is(.fi-sidebar-item-label, svg.fi-icon, .fi-sidebar-item-icon) { color: #17664f !important; }

html.fi body.fi-body.fi-panel-player .wuxia-home {
    display: grid;
    gap: 24px;
    min-width: 0;
    color: #252b2a;
}
html.fi body.fi-body.fi-panel-player .fi-page:has(.wuxia-home) > .fi-page-header-main-ctn > .fi-header { display: none; }

.wuxia-home h1,
.wuxia-home h2,
.wuxia-home p,
.wuxia-home dl,
.wuxia-home dd { margin: 0; }
.wuxia-home svg { flex: 0 0 20px; width: 20px; height: 20px; }
.wuxia-home a { text-decoration: none !important; }
.wuxia-home a:focus-visible,
.wuxia-home button:focus-visible,
.wuxia-home [tabindex]:focus-visible { outline: 2px solid #19765c; outline-offset: 4px; }
.wuxia-home h2 { color: #252b2a; font-size: 18px; font-weight: 750; line-height: 1.5; }

html.fi body.fi-body.fi-panel-player .wuxia-home__welcome {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 190px;
    padding: 20px 26px;
    color: #203c38;
    background: #e9f2f8 url('/images/wuxia-background.jpg') center 43% / cover no-repeat;
    border: 0;
    border-radius: 0;
}
.wuxia-home__welcome > span { font-size: 13px; font-weight: 700; }
.wuxia-home__welcome h1 { margin-top: 3px; color: #203c38; font-family: "Noto Serif SC", "Songti SC", serif; font-size: 30px; font-weight: 900; line-height: 1.4; text-shadow: 0 1px 8px #fff; }
.wuxia-home__account { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; margin-top: -10px; }
.wuxia-home__identity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.wuxia-home__identity > svg { color: #19765c; }
.wuxia-home__identity strong { max-width: 100%; overflow-wrap: anywhere; font-size: 15px; }
.wuxia-home__identity > span { color: #68726e; font-size: 12px; }
.wuxia-home__account form { flex: 0 0 auto; }
html.fi body.fi-body.fi-panel-player .wuxia-home__account button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 11px; color: #4f5d56; background: #fff; border: 1px solid #dce3df; border-radius: 6px; font-size: 12px; cursor: pointer; }
.wuxia-home__account button:hover { color: #19765c; border-color: #19765c; }

.wuxia-home__wallet { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 18px 0; border-top: 1px solid #dce3df; border-bottom: 1px solid #dce3df; }
.wuxia-home__wallet dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.wuxia-home__wallet dl > div { min-width: 0; }
.wuxia-home__wallet dt { color: #68726e; font-size: 12px; }
.wuxia-home__wallet dd { margin-top: 5px; color: #27372e; font-size: 26px; font-weight: 750; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wuxia-home__wallet dl > div:first-child dd { color: #19765c; }
html.fi body.fi-body.fi-panel-player .wuxia-home__wallet-link { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 15px; color: #fff !important; background: #19765c; border: 1px solid #19765c; border-radius: 6px; font-size: 13px; font-weight: 700; }
.wuxia-home__wallet-link > svg:last-child { width: 14px; height: 14px; flex-basis: 14px; }
.wuxia-home__wallet-link:hover { background: #125b46; }

.wuxia-home__feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
html.fi body.fi-body.fi-panel-player .wuxia-home__feature { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; min-width: 0; min-height: 136px; padding: 12px 16px; overflow: visible; color: #243a32 !important; background: #fff; border: 1px solid #dce3df; border-radius: 8px; }
.wuxia-home__feature.is-red { border-top: 3px solid #b74a40 !important; }
.wuxia-home__feature.is-green { border-top: 3px solid #19765c !important; }
.wuxia-home__feature:hover { background: #f4f8f6 !important; border-color: #91b5a7 !important; }
.wuxia-home__feature img { display: block; flex: 0 0 72px; width: 72px; height: 72px; padding: 0; object-fit: contain; transform: none; filter: none; }
.wuxia-home__feature strong { font-size: 16px; line-height: 1.4; font-weight: 750; overflow-wrap: anywhere; }
.wuxia-home__feature > svg { position: absolute; top: 16px; right: 14px; width: 18px; height: 18px; color: #91a199; }
.wuxia-home__services { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 18px; padding-bottom: 10px; border-bottom: 1px solid #dce3df; }
html.fi body.fi-body.fi-panel-player .wuxia-home__services a { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 48px; color: #42544a !important; background: transparent; }
.wuxia-home__services a > svg:first-child { color: #19765c; }
.wuxia-home__services strong { min-width: 0; font-size: 13px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.wuxia-home__services a > svg:last-child { flex-basis: 13px; width: 13px; height: 13px; margin-left: auto; color: #8b9991; }
.wuxia-home__services a:hover strong { color: #19765c; }

.wuxia-home__records { display: grid; gap: 24px; min-width: 0; }
.wuxia-home__record-section { min-width: 0; }
.wuxia-home__record-section > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.wuxia-home__record-section > header a { display: flex; align-items: center; gap: 4px; color: #19765c; font-size: 12px; }
.wuxia-home__record-section > header svg { width: 14px; height: 14px; flex-basis: 14px; }
.wuxia-home__table-wrap { max-width: 100%; overflow-x: auto; }
.wuxia-home table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.wuxia-home th { padding: 10px 14px; color: #68726e; background: #edf2ef; font-weight: 600; white-space: nowrap; }
.wuxia-home td { padding: 12px 14px; color: #42544a; border-bottom: 1px solid #e6ebe8; white-space: nowrap; }
.wuxia-home__empty { display: flex; align-items: center; gap: 9px; min-height: 72px; padding: 10px 0; color: #78847d; font-size: 13px; }
.wuxia-home__empty > svg { color: #95a59a; }

html.fi body.fi-body.fi-panel-player .fi-sidebar-nav { padding-bottom: 24px !important; }
html.fi body.fi-body.fi-panel-player .fi-sidebar-item-label { overflow: visible !important; white-space: normal !important; text-overflow: clip !important; line-height: 1.5 !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-nav { background: #fff !important; border-color: #dce3df !important; box-shadow: 0 -3px 18px rgba(30, 50, 40, .07) !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-nav a,
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-nav button { color: #68726e !important; font-size: 12px !important; line-height: 1.3; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-nav .is-active { color: #19765c !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-nav .is-active::before { background: #19765c !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-nav span { overflow: visible; white-space: normal; text-overflow: clip; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-sheet { color: #252b2a !important; background: #fff !important; border-color: #dce3df !important; border-radius: 8px !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-sheet__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-sheet__grid a { grid-template-columns: 22px minmax(0, 1fr) 12px !important; gap: 6px !important; min-height: 58px !important; padding: 9px !important; color: #42544a !important; background: #f5f8f6 !important; border-color: #dce3df !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-sheet__grid a.is-active { border-color: #19765c !important; box-shadow: inset 3px 0 #19765c !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-sheet__grid strong { white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-sheet__grid a > svg:first-child { color: #19765c !important; }
html.fi body.fi-body.fi-panel-player .zxr-player-mobile-sheet > header { border-color: #dce3df; }

@media (max-width: 1180px) {
    .wuxia-home__services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
    /* Keep native document scrolling; Alpine owns the modal's HTML scroll lock. */
    html.fi body.fi-body.fi-panel-player:not(.s33-guest-body) {
        overflow-x: clip !important;
    }

    html.fi body.fi-body.fi-panel-player:not(.s33-guest-body) :is(.fi-layout, .fi-main-ctn, .fi-main, .fi-page, .fi-page-main, .fi-page-content) {
        overflow: visible !important;
    }

    html.fi body.fi-body.fi-panel-player:not(.s33-guest-body) .fi-main {
        padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 720px) {
    html.fi body.fi-body.fi-panel-player .wuxia-home { gap: 18px; }
    html.fi body.fi-body.fi-panel-player .wuxia-home__welcome { min-height: 164px; padding: 14px 17px; background-position: center 45%; }
    .wuxia-home__welcome h1 { font-size: 25px; }
    .wuxia-home__account { align-items: flex-start; gap: 10px; margin-top: -6px; }
    .wuxia-home__identity { gap: 5px 8px; }
    .wuxia-home__identity strong { font-size: 14px; }
    .wuxia-home__identity > span { font-size: 11px; }
    html.fi body.fi-body.fi-panel-player .wuxia-home__account button { width: 36px; min-height: 36px; padding: 0; }
    .wuxia-home__account button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .wuxia-home__wallet { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 0; }
    .wuxia-home__wallet dl { gap: 9px; }
    .wuxia-home__wallet dd { font-size: 22px; }
    .wuxia-home__wallet dt { font-size: 11px; }
    html.fi body.fi-body.fi-panel-player .wuxia-home__wallet-link { min-height: 38px; }
    .wuxia-home__feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    html.fi body.fi-body.fi-panel-player .wuxia-home__feature { min-height: 114px; padding: 10px 13px; gap: 4px; }
    .wuxia-home__feature img { flex-basis: 60px; width: 60px; height: 60px; }
    .wuxia-home__feature strong { font-size: 15px; }
    .wuxia-home__services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
    .wuxia-home h2 { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .zxr-sheet-enter,
    .zxr-sheet-leave { transition: none !important; }
}
