/* White surfaces with Biwan's purple accents. Loaded after each entry's styles. */
:root { color-scheme: light; --brand: #7b49ff; --pink: #d74195; --ink: #242039; --muted: #6c657b; --line: #e8e3ef; --surface: #fff; --page: #fff; --surface-raised: #fff; --cyan: #277fa6; --positive: #28724c; --warning: #8a6125; }
html, body { background: #fff; color: #242039; }
::selection { background: #e9dfff; color: #362252; }

/* Homepage */
html[data-biwan-theme="landing"] { --bg: #fff; --surface: #fff; --line: #e8e3ef; --text: #242039; --muted: #6c657b; --blue: #376fb2; --violet: #7b49ff; }
html[data-biwan-theme="landing"] .site-header { background: #fff; border-color: #e8e3ef; }
html[data-biwan-theme="landing"] .hero:before { background: none; }
html[data-biwan-theme="landing"] .brand-divider { background: #ded7e8; }
html[data-biwan-theme="landing"] :is(.brand small,.site-header nav a,.hero-description,.hero-footnote,.eyebrow,.scroll-cue,.section-heading>p,.download-copy p,.faq-list p,.site-footer p,.footer-signoff,.legal-footer) { color: #6c657b; }
html[data-biwan-theme="landing"] :is(.site-header nav a:hover,.legal-footer a:hover,.mobile-recharge-link) { color: #7340d4; }
html[data-biwan-theme="landing"] .hero h1>span { background-image: linear-gradient(100deg,#8a45df,#7752dd 50%,#366fad); }
html[data-biwan-theme="landing"] :is(.nav-cta,.apple-btn,.dialog-confirm,.mobile-download-button) { background: #7b49ff; border-color: #7b49ff; color: #fff; }
html[data-biwan-theme="landing"] :is(.nav-cta,.apple-btn,.dialog-confirm,.mobile-download-button):hover { background: #6938df; }
html[data-biwan-theme="landing"] .android-btn { background: #fff; color: #6739bc; border-color: #cfc0e5; }
html[data-biwan-theme="landing"] .android-btn:hover { background: #f7f2ff; border-color: #9468ce; }
html[data-biwan-theme="landing"] :is(.voice-float,.experience-stage,.download-panel,.stage-bubble,.mobile-download-bar,#download-dialog) { background: #fff; border-color: #e5dced; color: #332542; box-shadow: 0 12px 38px #5034790d; }
html[data-biwan-theme="landing"] :is(.voice-float div>span,.visual-caption,.stage-label,.stage-bottom,.section-kicker,.tab-index,.tab-topline,.experience-tab p,.faq-list summary>span,.dialog-eyebrow,#dialog-description,.mobile-download-bar small) { color: #756385; }
html[data-biwan-theme="landing"] :is(.voice-float-icon,.dialog-close) { color: #7543b7; background: #f1eafa; border-color: #dfd1ed; }
html[data-biwan-theme="landing"] .phone { box-shadow: 0 24px 50px #3c245c24,0 0 0 1px #bfb0d5; }
html[data-biwan-theme="landing"] .phone-back { filter: none; }
html[data-biwan-theme="landing"] :is(.games-intro h2,.experience-tab h3,.faq-list summary,#dialog-title) { color: #242039; }
html[data-biwan-theme="landing"] .tab-link { color: #7543b7; }
html[data-biwan-theme="landing"] .experience-tab { background: #fff; border-color: #e8e3ef; color: #242039; opacity: 1; }
html[data-biwan-theme="landing"] .experience-tab.active { border-color: #a07ad1; }
html[data-biwan-theme="landing"] .experience-tab.active .tab-topline { color: #7543b7; }
html[data-biwan-theme="landing"] .download-copy h2>span { color: #7b49ff; }
html[data-biwan-theme="landing"] :is(.games-section,.faq-list details,.site-footer) { border-color: #e8e3ef; }
html[data-biwan-theme="landing"] .stage-grid { opacity: .25; }
html[data-biwan-theme="landing"] .mascot-note { background: #fff; color: #7543b7; border-color: #e5dced; }
html[data-biwan-theme="landing"] #download-dialog::backdrop { background: #251a3c55; }

/* Account services, including lazy-loaded pages and teleported dialogs. */
html[data-biwan-theme="account"] :is(.site-header,.account-layout,.account-sidebar,.account-workspace,.account-panel,.account-login-gate,.account-gate-card,.account-overview-banner,.account-balance-card,.flow-identity,.modal-dialog,.agreement-dialog,.api-payment-stage,.payment-demo-stage,.service-footer) { background: #fff; border-color: #e8e3ef; }
html[data-biwan-theme="account"] :is(.account-sidebar,.account-panel,.account-gate-card,.account-overview-banner,.account-balance-card,.modal-dialog) { box-shadow: 0 8px 32px #50347908; }
html[data-biwan-theme="account"] :is(.brand>small,.desktop-nav a,.account-page-heading p,.account-eyebrow,.sidebar-label,.account-sidebar-profile span:not(.account-avatar span),.account-secure-note,.account-text-button,.service-footer,.flow-identity p,.account-inline-note,.flow-summary-note,.flow-summary-hint,.api-payment-stage p,.payment-demo-amount small,.payment-demo-amount p) { color: #70677d; }
html[data-biwan-theme="account"] :is(.desktop-nav a.active,.desktop-nav a:hover,.mobile-recharge-link,.account-link,.account-inline-link) { color: #7543b7; }
html[data-biwan-theme="account"] :is(.account-page-heading h1,.account-panel-title h2,.account-balance-number,.account-overview-banner h2,.flow-identity strong,.modal-dialog>h2,.api-payment-stage strong) { color: #2d233d; }
html[data-biwan-theme="account"] :is(.account-field input,.account-input-icon,.account-code-field,.api-bind-form input,.payment-method,.recharge-tier) { background: #fff; border-color: #dfd5eb; color: #3b2c4c; }
html[data-biwan-theme="account"] :is(.account-input-icon input,.account-code-field input) { background: transparent; border: 0; }
html[data-biwan-theme="account"] :is(.payment-method.selected,.recharge-tier.selected,.account-nav-item.active) { background: #f5efff; border-color: #ac85df; color: #6733b3; }
html[data-biwan-theme="account"] :is(.account-nav-item:hover,.btn-secondary:hover,.btn-white:hover) { background: #f7f2fc; color: #6733b3; }
html[data-biwan-theme="account"] .btn-dark { background: #7b49ff; border-color: #7b49ff; color: #fff; }
html[data-biwan-theme="account"] .btn-secondary { background: #fff; color: #6733b3; border-color: #d8c8eb; }
html[data-biwan-theme="account"] .payment-demo-amount strong { color: #7543b7; }
html[data-biwan-theme="account"] .modal-backdrop { background: #251a3c55; }
html[data-biwan-theme="account"] .account-gate-art { background: #fff; }
html[data-biwan-theme="account"] #root :is(.help-hero,.help-contact,.knowledge-search,.knowledge-card,.support-conversation,.support-messages,.mobile-preview,.review-header,.device iframe) { background: #fff; }
html[data-biwan-theme="account"] #root :is(.knowledge-answer,.support-message-bubble p) { color: #51445f; }

/* On-site withdrawal rules; keep print formatting and the current layout. */
html[data-biwan-theme="agreement"] { --ink: #30233f; --muted: #71617f; --purple: #7940c8; --line: #eadff5; --tint: #fff; }
html[data-biwan-theme="agreement"] :is(body,main,.hero,.fact,.example,.flow span,.note) { background: #fff; border-color: #e8e3ef; color: #51445f; }
html[data-biwan-theme="agreement"] :is(h1,h2) { color: #30233f; }
html[data-biwan-theme="agreement"] :is(.brand,.back,.fact dd,.example strong,a,.flow b) { color: #7543b7; }
html[data-biwan-theme="agreement"] :is(.lead,.eyebrow,.fact dt,.example .label,.footer) { color: #71617f; }
html[data-biwan-theme="agreement"] :is(.number) { color: #7543b7; background: #f5efff; }
/* Secondary labels stay readable on the white surfaces. */
html[data-biwan-theme="landing"] .games-list li { color: #6c657b; }
html[data-biwan-theme="account"] :is(.flow-summary,.withdraw-balance) { background: #fff; border-color: #e8e3ef; }
html[data-biwan-theme="account"] :is(.flow-summary dt,.tier-unit,.tier-price,.account-checkbox,.account-field,.account-notice-label,.flow-identity-badge,.withdraw-input-label,.withdraw-rule,.withdraw-settlement,.withdraw-frozen,.withdraw-arrival p,.account-service-row small,.account-overview-banner p,.record-main small,.record-amount small) { color: #70677d; }
html[data-biwan-theme="account"] :is(input,textarea)::placeholder { color: #82758f; }
html[data-biwan-theme="account"] .modal-close { color: #756385; background: #f5efff; }
html[data-biwan-theme="agreement"] main { box-shadow: 0 8px 32px #5034790a; }
html[data-biwan-theme="agreement"] section { border-color: #e8e3ef; }
@media (max-width: 360px) {
  html[data-biwan-theme="account"] .account-sidebar { margin-inline: -14px; padding-inline: 14px; }
  html[data-biwan-theme="account"] .account-side-nav { margin-inline: -14px; padding-inline: 14px; }
}

/* Shared header geometry for the landing and account applications. */
html[data-biwan-theme] .site-header { height: 92px; background: #fff; border-bottom: 1px solid #e8e3ef; }
html[data-biwan-theme] .site-header :is(.nav-shell,.header-inner) { width: min(1320px,calc(100% - 80px)); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
html[data-biwan-theme] .site-header .brand { display: flex; align-items: center; flex-shrink: 0; gap: 12px; white-space: nowrap; }
html[data-biwan-theme] .site-header .brand img { width: 42px; height: 42px; border-radius: 12px; }
html[data-biwan-theme] .site-header .brand>span:not(.brand-divider) { font-size: 25px; font-weight: 750; letter-spacing: 1px; line-height: 1.2; }
html[data-biwan-theme] .site-header .brand :is(i,.brand-divider) { display: block; width: 1px; height: 21px; margin-inline: 5px; background: #ded7e8; }
html[data-biwan-theme] .site-header .brand small { display: block; padding: 0; font-size: 12px; font-weight: 400; letter-spacing: 2px; line-height: 1.5; color: #6c657b; }
html[data-biwan-theme] .site-header nav[aria-label="主导航"] { display: flex; align-items: center; height: 100%; gap: 34px; margin-left: auto; margin-right: 28px; }
html[data-biwan-theme] .site-header nav[aria-label="主导航"] a { display: flex; align-items: center; height: 100%; position: relative; padding: 0; font-size: 13px; font-weight: 400; line-height: 1.5; white-space: nowrap; color: #6c657b; }
html[data-biwan-theme] .site-header nav[aria-label="主导航"] :is(a.active,a:hover) { color: #7543b7; }
html[data-biwan-theme] .site-header nav[aria-label="主导航"] a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 2px; transform: none; background: #7b49ff; }
html[data-biwan-theme] .site-header :is(.nav-cta,#auth-button) { flex: 0 0 130px; width: 130px; height: 42px; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; border: 1px solid #7b49ff; border-radius: 8px; font-size: 12px; line-height: 1.5; color: #fff; background: #7b49ff; }
html[data-biwan-theme] .site-header :is(.nav-cta,#auth-button) svg { width: 17px; height: 17px; }
html[data-biwan-theme] .site-header .mobile-recharge-link { display: none; }
@media (max-width: 1150px) {
  html[data-biwan-theme] .site-header .brand :is(small,i,.brand-divider) { display: none; }
  html[data-biwan-theme] .site-header :is(.nav-shell,.header-inner) { width: calc(100% - 48px); gap: 20px; }
  html[data-biwan-theme] .site-header nav[aria-label="主导航"] { gap: 22px; margin-right: 12px; }
}
@media (max-width: 900px) and (min-width: 701px) {
  html[data-biwan-theme] .site-header :is(.nav-shell,.header-inner) { width: calc(100% - 36px); gap: 14px; }
  html[data-biwan-theme] .site-header nav[aria-label="主导航"] { gap: 14px; margin-right: 0; }
  html[data-biwan-theme] .site-header nav[aria-label="主导航"] a { font-size: 11px; }
  html[data-biwan-theme] .site-header :is(.nav-cta,#auth-button) { flex-basis: 114px; width: 114px; padding-inline: 10px; }
}
@media (max-width: 700px) {
  html[data-biwan-theme] .site-header { height: 66px; }
  html[data-biwan-theme] .site-header :is(.nav-shell,.header-inner) { width: calc(100% - 36px); gap: 12px; }
  html[data-biwan-theme] .site-header .brand { gap: 9px; }
  html[data-biwan-theme] .site-header .brand img { width: 34px; height: 34px; border-radius: 10px; }
  html[data-biwan-theme] .site-header .brand>span:not(.brand-divider) { font-size: 21px; }
  html[data-biwan-theme] .site-header nav[aria-label="主导航"] { display: none; }
  html[data-biwan-theme] .site-header .mobile-recharge-link { display: block; margin-left: auto; color: #7543b7; font-size: 11px; white-space: nowrap; }
  html[data-biwan-theme] .site-header :is(.nav-cta,#auth-button) { flex-basis: 114px; width: 114px; height: 38px; min-height: 38px; padding: 8px 10px; gap: 7px; font-size: 11px; }
}
