/* Presentation overrides for the migrated U8 frontend. Business handlers stay in the app. */
:root { --page: #f5f7ff; --blue: #2185e8; --ink: #172433; --max-app: 500px; }
html, body { width: 100%; overflow-x: hidden; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .app-view::-webkit-scrollbar { display: none; }
body { font-family: Arial, "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid #2185e8; outline-offset: 2px; }
[hidden] { display: none !important; }
.page-with-tab { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.install-guide { display: none; }
.layout-icon { width: 24px; height: 24px; flex-shrink: 0; color: #2185e8; }
.layout-tabbar { position: fixed; z-index: 90; inset: auto 0 0; width: min(100%, 500px); height: calc(64px + env(safe-area-inset-bottom)); margin: auto; padding: 0 8px env(safe-area-inset-bottom); border: 0; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 -3px 12px #6581ab0b; box-sizing: border-box; overflow: visible; }
.layout-tabbar-items { display: grid; grid-template-columns: 1fr 1fr 64px 1fr 1fr; height: 64px; align-items: center; }
.layout-tabbar { pointer-events: auto; }
.layout-tabbar::after { display: none; }
.layout-tab { display: flex; min-width: 0; height: 60px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #68758a; background: none; border: 0; font-size: 12px; }
.layout-tab-icon { display: block; width: 25px; height: 25px; object-fit: contain; }
.layout-tab > svg.layout-tab-icon { width: 34px; height: 34px; }
.layout-tab.active { color: #12a6d8; }
.layout-tab-game { position: relative; align-self: start; height: 64px; width: 64px; border-radius: 50%; transform: translateY(-21px); background: #fff; box-shadow: 0 2px 9px #315b8d26; }
.layout-tab-game .layout-tab-icon { width: 64px; height: 64px; object-fit: contain; }
.layout-tab-game .layout-tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html[data-layout-game] .layout-tabbar { display: none; }
/* Home: header, banner, account, six categories, quick links. */
.home-page .hero-wrap { background: none !important; }
.home-page .top-logo { height: 47px; padding: 0 18px; box-sizing: border-box; }
.home-page .top-logo > img:first-child { width: 111px; max-height: 36px; object-fit: contain; }
.home-page .top-logo > img:nth-child(2) { display: none; }
.layout-notice { width: 36px; height: 36px; margin-left: auto; display: grid; place-items: center; border-radius: 50%; background: #edf4ff; }
.banner-swipe { height: 149px; margin: 5px 13px 0; padding: 0; border-radius: 6px; overflow: hidden; }
.banner-swipe .van-swipe__track, .banner-swipe .van-swipe-item, .banner-img { height: 149px; }
.banner-img { width: 100%; object-fit: cover; border-radius: 6px; }
.home-page .login-panel { margin: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.home-page .notice-bar { height: 32px; margin: 8px 13px 10px; padding: 0 9px; background: #fff; border: 0; border-radius: 8px; font-size: 11px; }
.home-page .notice-laba { width: 20px; height: 20px; margin-right: 6px; }
.home-page .login-row { display: flex; gap: 9px; height: 99px; margin: 0 13px 8px; padding: 0 12px; border: 0; border-radius: 12px; background: #fff; box-sizing: border-box; box-shadow: none; }
.home-page .login-copy { flex: 1; gap: 9px; }
.home-page .account-line { gap: 5px; font-size: 12px; white-space: nowrap; }
.home-page .account-line em { display: none; }
.home-page .balance-line { gap: 7px; }
.home-page .balance-line b { font-size: 15px; color: #111; }
.home-page .balance-line::before { content: '₮'; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; color: #fff; background: #48bda6; font-size: 12px; }
.home-page .quick-actions, .home-page .login-nav-bottom-wrap { display: none; }
.layout-avatar { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 51px; flex-shrink: 0; color: #fff; font-size: 10px; }
.layout-avatar img { width: 43px; height: 43px; border-radius: 50%; object-fit: cover; }
.layout-avatar span { min-width: 35px; text-align: center; border-radius: 10px; background: linear-gradient(110deg,#4d789f,#293c59); font-weight: bold; }
.layout-account-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; flex-shrink: 0; }
.layout-account-action { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #111; font-size: 12px; white-space: nowrap; }
.layout-account-action > img, .layout-account-action > svg { display: block; width: 38px; height: 38px; padding: 7px; border-radius: 50%; background: #f0f7fc; box-sizing: border-box; object-fit: contain; }
.layout-account-action:nth-child(2) > img { background: #edf9f5; }
.layout-account-action:nth-child(3) > img { background: #fff7ec; }
.game-lobby { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: 149px; gap: 8px; margin: 0; padding: 0 13px; }
.main-game-grid, .side-games, .other-grid { display: contents; }
.game-lobby .live-card, .game-lobby .wide-game, .game-lobby .small-game { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; width: auto; min-width: 0; min-height: 0; height: 149px; padding: 0 4px 12px; overflow: hidden; border: 0; border-radius: 12px; background: #fff !important; box-shadow: none; box-sizing: border-box; }
.game-lobby .wide-game:nth-child(1) { order: 1; }
.game-lobby .wide-game:nth-child(2) { order: 2; }
.game-lobby .live-card { order: 3; }
.game-lobby .small-game:nth-child(2) { order: 4; }
.game-lobby .small-game:nth-child(1) { order: 5; }
.game-lobby .small-game:nth-child(3) { order: 6; }
.game-lobby .small-game:last-child { display: none; }
.game-lobby .live-card > img, .game-lobby .wide-game > img, .game-lobby .small-game-img { position: absolute; inset: 6px 0 auto; width: 100%; height: 104px; margin: 0; object-fit: contain; }
.game-lobby .game-title, .game-lobby .game-title.centered, .game-lobby .game-title.small { position: relative; inset: auto; width: 100%; margin: 0; padding: 0; text-align: center; background: none; z-index: 1; }
.game-lobby .game-title strong { justify-content: center; color: #111; font-size: 16px; font-weight: 500; letter-spacing: 2px; }
.game-lobby .game-title i, .game-lobby .game-title .en, .game-lobby .game-title p, .game-lobby .badge { display: none; }
.layout-home-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 10px 13px 0; }
.layout-home-links button { display: flex; align-items: center; justify-content: center; gap: 5px; height: 60px; padding: 3px; border-radius: 12px; background: #fff; color: #111; font-size: 12px; font-weight: 600; }
.layout-home-links img { width: 28px; height: 28px; object-fit: contain; }
.layout-community { display: flex; align-items: center; gap: 9px; margin: 14px 13px; color: #78889b; font-size: 14px; }
.layout-community button { display: flex; align-items: center; gap: 7px; color: #78889b; }
.layout-community img { width: 36px; height: 36px; object-fit: contain; }
/* Game lobby. */
.origin-game-page { padding-bottom: 20px; }
.origin-game-page .origin-top { display: flex; align-items: center; gap: 10px; height: 47px; padding: 0 13px; background: #fff; box-sizing: border-box; }
.origin-game-page .origin-top > img { display: none; }
.origin-game-page .origin-top > strong { margin-left: auto; padding: 7px 10px; border: 1px solid #e1e8f4; border-radius: 6px; font-size: 13px; }
.origin-game-page .origin-top > strong::before { content: '₮ '; color: #3db8a4; }
.origin-game-page .origin-top > button { width: auto; }
.layout-lobby-back { display: flex !important; align-items: center; gap: 5px; color: #111; font-size: 16px; white-space: nowrap; }
.layout-lobby-back svg { width: 18px; height: 18px; color: #526b89; }
.origin-game-layout { display: block; height: auto; min-height: 0; }
.origin-game-cats { display: flex; height: 58px; padding: 0 5px; overflow-x: auto; background: #fff; scrollbar-width: none; }
.origin-game-cats button { display: flex; flex: 0 0 14.2857%; width: auto; min-height: 58px; flex-direction: column; justify-content: center; gap: 4px; color: #8997ae; font-size: 12px; }
.origin-game-cats button.active { color: #1989e9; background: none; }
.origin-game-cats button.active::before, .origin-game-cats button > span { display: none; }
.origin-game-cats img { width: 27px; height: 27px; object-fit: contain; }
.layout-lobby-tools { padding: 12px 13px 23px; }
.layout-filters { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 27px; scrollbar-width: none; }
.layout-filters button { flex: 0 0 94px; height: 34px; border-radius: 6px; background: #fff; color: #7f8eaa; font-size: 13px; }
.layout-filters button.active { color: #00a6ce; border: 1px solid #06b8d2; background: #eaf8fd; }
.layout-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 8px; background: #fff; }
.layout-search input { width: 100%; border: 0; outline: 0; background: none; color: #172433; font-size: 14px; }
.layout-search input::placeholder { color: #98a4b8; }
.origin-game-page .origin-game-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: auto; gap: 12px; min-height: 0; padding: 0 13px; overflow: visible; background: none; }
.origin-game-page .origin-game-card { height: 168px; min-height: 0; padding: 0; border: 0; border-radius: 6px; background: #fff !important; box-shadow: none; }
.origin-game-page .origin-game-card::after, .origin-game-page .origin-game-card__badge { display: none; }
.origin-game-page .origin-game-card__image-shell { position: static; width: 100%; height: 126px; min-height: 0; margin: 0; border-radius: 6px 6px 0 0; overflow: hidden; }
.origin-game-page .origin-game-card__image { position: static; width: 100%; height: 100%; object-fit: cover; }
.origin-game-page .origin-game-card__meta { display: grid; place-items: center; height: 42px; padding: 3px; background: #fff; box-sizing: border-box; }
.origin-game-page .origin-game-card__meta strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; font-size: 12px; line-height: 17px; }
.origin-game-list[data-local-lottery="ready"] > .origin-game-empty { display: none; }
.origin-game-empty { grid-column: 1 / -1; }
.layout-search-empty { padding: 30px 0; text-align: center; color: #8e9bb0; font-size: 14px; }
/* Wallet: preserve the existing payment fields and handlers. */
.recharge-page, .withdraw-page { background: var(--page); }
.recharge-page > .origin-page-nav, .withdraw-page > .origin-page-nav { display: flex; height: 47px; padding: 0 13px; gap: 10px; background: #fff; }
.recharge-page > .origin-page-nav > button:first-child, .recharge-page > .origin-page-nav > strong, .withdraw-page > .origin-page-nav > button:first-child, .withdraw-page > .origin-page-nav > strong { display: none; }
.recharge-page > .origin-page-nav > button:last-child, .withdraw-page > .origin-page-nav > button:last-child { margin-left: auto; color: #7f8fa9; font-size: 12px; }
.recharge-page > .origin-page-nav > button:first-of-type, .withdraw-page > .origin-page-nav > button:first-of-type { display: none; }
.layout-wallet-switch { display: flex; gap: 20px; height: 47px; align-items: center; }
.layout-wallet-switch button { position: relative; height: 47px; color: #93a0b4; font-size: 16px; }
.layout-wallet-switch button.active { color: #111; font-weight: 600; }
.layout-wallet-switch button.active::after { content: ''; position: absolute; bottom: 5px; width: 23px; height: 3px; left: calc(50% - 11px); background: #178ded; border-radius: 3px; }
.recharge-page .pay-tabs { margin: 12px 13px 0; padding: 0; }
.recharge-page .pay-tabs:empty { display: none; }
.recharge-page .deposit-panel { margin: 0; padding: 0 13px; border: 0; background: none; box-shadow: none; border-radius: 0; }
.deposit-panel h3 { margin: 15px 0 8px; font-size: 12px; color: #111; font-weight: 400; }
.deposit-panel .usdt-provider-row { margin: 0; }
.deposit-panel .usdt-provider-pill { width: 116px; height: 40px; min-height: 0; padding: 0 6px; border: 1px solid #20b4d7; border-radius: 6px; background: #ecfaff; color: #111; }
.deposit-panel .usdt-provider-pill strong { font-size: 12px; }
.deposit-panel .usdt-provider-pill i { display: none; }
.deposit-panel .usdt-provider-pill__icon { width: 20px; height: 20px; font-size: 15px; }
.deposit-panel .pill-row { display: flex; gap: 12px; margin: 0; min-height: 34px; }
.deposit-panel .pay-pill { width: 116px; min-width: 0; height: 34px; min-height: 0; padding: 5px; border-radius: 6px; background: #fff; font-size: 12px; }
.deposit-panel .pay-pill.active { border: 1px solid #21b4d3; background: #eaf9fe; color: #172433; }
.deposit-panel .pay-pill img { width: 19px; height: 19px; }
.deposit-panel .usdt-qr-layout { display: flex; align-items: center; gap: 18px; min-height: 162px; margin: 0; padding: 18px; border-radius: 12px; background: #fff; box-sizing: border-box; }
.deposit-panel .usdt-qr-card { width: 120px; height: 120px; padding: 0; flex-shrink: 0; border: 0; background: #f5f7fb; }
.deposit-panel .qr-image { width: 120px; height: 120px; object-fit: contain; }
.deposit-panel .qr-mock { display: grid; place-items: center; width: 120px; height: 120px; background: #f1f4f9; color: #8f9aad; font-size: 12px; }
.deposit-panel .qr-mock::before { content: '暂无收款二维码'; }
.deposit-panel .usdt-qr-meta { min-width: 0; }
.deposit-panel .usdt-qr-meta span { font-size: 12px; }
.deposit-panel .usdt-qr-meta strong { font-size: 14px; }
.recharge-page .address-copy { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff; font-size: 12px; }
.recharge-page .deposit-form { margin-top: 12px; }
.recharge-page .deposit-input { min-height: 48px; padding: 10px; border-radius: 8px; background: #fff; font-size: 12px; }
.recharge-page .deposit-input input { font-size: 12px; }
.recharge-page .recharge-submit-button { height: 44px; margin-top: 12px; border-radius: 6px; background: linear-gradient(90deg,#1688ea,#00b4eb); font-size: 15px; }
.recharge-page .tips-panel { margin: 12px 13px; padding: 0; background: none; box-shadow: none; font-size: 12px; }
.recharge-page .tips-panel h3 { font-size: 13px; }
.layout-support { display: flex; align-items: center; gap: 9px; width: calc(100% - 26px); min-height: 47px; margin: 13px; padding: 0 13px; border-radius: 8px; background: #fff; color: #7185a0; font-size: 12px; }
.layout-support span { margin-left: auto; color: #158ce8; }
/* Promotion list. */
.origin-promo-page { padding: 13px 13px 84px; }
.origin-promo-page > .origin-title-nav, .origin-promo-page > .promo-tabs, .origin-promo-card footer { display: none; }
.origin-promo-page .origin-promo-card { display: block; margin: 0 0 12px; overflow: hidden; border: 0; border-radius: 12px; background: #fff; box-shadow: none; cursor: pointer; }
.origin-promo-page .promo-art { height: auto; aspect-ratio: 1.82; background-size: cover; background-position: center; }
/* Profile: blue VIP header, balance, shortcuts, settings list. */
.origin-mine-page { position: relative; padding-top: 0; background: var(--page); }
.origin-mine-page::before { content: ''; position: absolute; z-index: 0; top: 0; width: 100%; height: 234px; border-radius: 0 0 4px 4px; background: repeating-radial-gradient(ellipse at -10% -15%, transparent 0 15px, #ffffff09 16px 17px, transparent 18px 31px),linear-gradient(125deg,#3cbdf4,#2183ed 70%,#229df1); }
.origin-mine-page > * { position: relative; }
.origin-mine-page .mine-actions { height: 40px; padding: 0 13px; }
.origin-mine-page .mine-actions button { color: #fff; }
.origin-mine-page .origin-profile { display: flex; align-items: center; gap: 11px; height: 70px; margin: 0; padding: 0 13px; width: 100%; text-align: left; }
.origin-mine-page .origin-profile > img { width: 58px; height: 58px; border: 0; }
.origin-mine-page .origin-profile strong { color: #fff; font-size: 20px; }
.origin-mine-page .origin-profile span { color: #fff; font-size: 14px; }
.origin-mine-page .origin-profile__name > span:first-child { font-size: 20px; }
.origin-mine-page .origin-profile__vip { display: none; }
.layout-vip-row { display: flex; align-items: center; justify-content: space-between; height: 66px; margin: 0 13px 15px; color: #fff; font-size: 12px; }
.layout-vip-row strong { font-size: 14px; }
.layout-vip-row button { color: #fff; font-size: 12px; }
.origin-mine-page .origin-wallet-card { display: flex; align-items: center; gap: 10px; height: 101px; margin: 0 13px 13px; padding: 13px; border-radius: 4px; background: #fff; box-shadow: none; box-sizing: border-box; }
.origin-wallet-card > header { display: none; }
.origin-mine-page .wallet-blue { flex: 1; justify-items: start; align-content: center; gap: 10px; height: auto; min-width: 0; padding: 0; border-radius: 0; background: none; color: #111; text-align: left; }
.origin-mine-page .wallet-blue > span { color: #71849d; font-size: 12px; }
.origin-mine-page .wallet-blue > strong { font-size: 16px; }
.origin-mine-page .wallet-blue > strong::before { content: '₮'; color: #3fbfa5; margin-right: 7px; }
.origin-mine-page .wallet-blue > strong .van-icon { display: none; }
.origin-mine-page .wallet-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; width: auto; margin: 0; }
.origin-mine-page .wallet-actions button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #111; }
.origin-mine-page .wallet-actions img { width: 38px; height: 38px; padding: 7px; border-radius: 50%; background: #f0f8fc; object-fit: contain; box-sizing: border-box; }
.origin-mine-page .income-card, .origin-mine-page .service-card { display: none; }
.layout-profile-shortcuts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 13px 13px; }
.layout-profile-shortcuts button { display: flex; height: 76px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; border-radius: 4px; background: #fff; color: #111; font-size: 12px; }
.layout-profile-shortcuts .layout-icon { width: 20px; height: 20px; color: #456e9d; }
.layout-profile-list { margin: 0 13px 13px; padding: 0 12px; border-radius: 5px; background: #fff; }
.layout-profile-list button { display: flex; align-items: center; gap: 14px; width: 100%; height: 52px; border-bottom: 1px solid #e7ebf1; color: #111; font-size: 14px; text-align: left; }
.layout-profile-list button:last-child { border-bottom: 0; }
.layout-profile-list button::after { content: '›'; margin-left: auto; border-radius: 4px; width: 17px; height: 17px; background: #91a6c7; color: #fff; text-align: center; font-size: 18px; line-height: 15px; }
.layout-profile-list .layout-icon { width: 21px; height: 21px; color: #80a6c9; }
/* Login uses the existing U8 form and Telegram authorization. */
.login-sheet { top: 0; bottom: 0; width: min(100vw,500px); max-height: 100dvh; padding: 28px 21px; border-radius: 0; background: var(--page); box-shadow: none; }
.login-sheet .sheet-close { top: 29px; right: 26px; width: 20px; height: 20px; border-radius: 3px; background: #91a4c5; color: #fff; font-size: 18px; }
.login-sheet.van-popup--round { border-radius: 0; }
.login-sheet-hero { display: block; justify-items: start; padding: 0 13px; margin-bottom: 35px; text-align: left; }
.login-sheet-hero::before, .login-sheet-hero > span { display: none; }
.login-sheet-hero img { width: 140px; height: 46px; margin: 0 0 19px; object-fit: contain; }
.login-sheet-hero h2 { margin: 0; color: #6d829b; font-size: 18px; font-weight: 600; }
.login-sheet .login-form { display: flex; flex-direction: column; gap: 13px; }
.login-sheet .login-form > label { height: 48px; padding: 0 15px; border: 1px solid #e4eaf2; border-radius: 4px; background: #fff; box-shadow: none; }
.login-sheet .login-form input { font-size: 14px; }
.login-sheet .login-form > label > .van-icon { color: #44b7d5; font-size: 23px; }
.login-sheet .sheet-primary { width: 100%; height: 46px; margin: 0; border-radius: 5px; background: linear-gradient(90deg,#1688eb,#04b7ed); box-shadow: none; color: #fff; font-size: 16px; font-weight: 400; }
.login-sheet .sheet-telegram-web { margin-top: 2px; }
.login-sheet .sheet-telegram-web__title { padding: 8px 0 14px; color: #8794a9; font-size: 13px; font-weight: 400; }
.login-sheet .sheet-telegram-web__title small { display: none; }
.login-sheet .sheet-telegram { height: 44px; margin: 4px 0; border-radius: 6px; background: #fff; color: #5b8ebc; }
.deposit-panel .recharge-protocol-row:empty::after { content: '暂无可用协议'; align-self: center; color: #8f9aad; font-size: 12px; }
@media (max-width: 375px) { .layout-account-actions { gap: 5px; } .home-page .login-row { gap: 6px; padding: 0 9px; } .layout-avatar { width: 42px; } .home-page .account-line { font-size: 11px; } .origin-mine-page .wallet-actions { gap: 10px; } }
