/* Keep old WebKit layouts usable when newer viewport/selector features are absent. */
[hidden]{display:none!important}
dialog[data-dialog-compat]{max-height:calc(100vh - 24px);max-height:calc(var(--xby-visible-height,100vh) - 24px);overflow:auto;-webkit-overflow-scrolling:touch}
.academy-player-screen[open]{height:100vh;height:var(--xby-visible-height,100vh);max-height:100vh;max-height:var(--xby-visible-height,100vh)}
.academy-player-screen video{max-height:70vh!important;max-height:calc(var(--xby-visible-height,100vh)*.7)!important}
.academy-watermarked-frame[hidden],.academy-player-screen video[hidden]{display:none!important}
.academy-playback-retry{display:block;width:100%;min-height:44px;margin:12px 0}
@supports not (aspect-ratio:16/9){.academy-entry-frame{height:auto!important}.academy-video-thumbnail img{height:auto;min-height:100px}.academy-watermarked-frame video{min-height:180px}}
@supports not (max-height:100dvh){.online-payment-dialog,.moments-dialog,.chart-edit-dialog,.shop-buddha-picker,.birth-date-dialog,.birth-time-dialog{max-height:calc(100vh - 24px)!important;overflow:auto!important}}

@supports not (width:min(1px,2px)){dialog[data-dialog-compat]{width:calc(100vw - 24px);max-width:720px}#accountDialog{max-width:430px}}

html.xby-no-has[data-xby-page="home"] .miniapp>.wx-bar{height:49.4px!important;pointer-events:none}
html.xby-no-has[data-xby-page="home"] .miniapp>.pages{top:49.4px!important}
html.xby-no-has[data-xby-page="home"] .miniapp>.wx-bar .wx-time{transform:scale(.8);transform-origin:left center}
html.xby-no-has[data-xby-page="home"] [data-page="home"]>.content{padding-top:13px!important}
html.xby-no-has[data-xby-page="chart"] #pageTitle,html.xby-no-has[data-xby-page="numberEnergy"] #pageTitle{visibility:hidden}
html.xby-no-has [data-page="home"] .feature-card.xby-wuxing-card{display:none!important}
/* Old WebKit ignores :has(): paint the same continuous home surface there. */
html.ui-theme-goldsand.xby-no-has[data-xby-page="home"] body,html.ui-theme-goldsand.xby-no-has[data-xby-page="home"] .miniapp{background-color:#f5e8e4!important;background-image:repeating-linear-gradient(92deg,#ffffff19 0px,#ffffff19 1px,#a3a6a008 1px,transparent 3px),radial-gradient(ellipse at 24% 64%,#f5d87c99 0,transparent 56%),radial-gradient(ellipse at 88% 94%,#ead4aa80 0,transparent 52%),linear-gradient(120deg,#e5ebeb 0%,#f5ecd4 48%,#cfdfeb 100%)!important;background-size:auto;background-position:center;background-repeat:repeat}
html.ui-theme-goldsand.xby-no-has[data-xby-page="home"] .miniapp>.wx-bar,html.ui-theme-goldsand.xby-no-has[data-xby-page="home"] .miniapp>.pages,html.ui-theme-goldsand.xby-no-has[data-xby-page="home"] [data-page="home"],html.ui-theme-goldsand.xby-no-has[data-xby-page="home"] [data-page="home"] .home-hero,html.ui-theme-goldsand.xby-no-has[data-xby-page="home"] [data-page="home"]>.content{background:transparent!important}
/* iOS before container units needs explicit image dimensions. */
@supports not (width:1cqi){.profile-services-entry .profile-brain-icon{display:block;width:29px;height:29px;max-width:29px;max-height:29px;object-fit:contain;flex:none}}
/* Use the measured visible viewport while old Safari toolbars are expanded. */
@supports not (height:100dvh){html body .miniapp{height:var(--xby-visible-height,100vh)!important;max-height:var(--xby-visible-height,100vh)!important}}
