@font-face {
  font-family: "Muyao Handwriting";
  src: url("fonts/muyao-xiyangyang.ttf?v=20260807") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg: #090e13;
  --panel: #171b21;
  --control: rgba(162, 174, 189, .12);
  --muted: #8993a3;
  --text: #f7f9fb;
  --blue: #006eff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--bg); }
body { min-width: 320px; min-height: 100svh; margin: 0; overflow-x: hidden; color: var(--text); background: var(--bg); -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.target-icon { width: 1em; height: 1em; flex: 0 0 auto; display: inline-block; background: currentColor; -webkit-mask: var(--target-icon) center / contain no-repeat; mask: var(--target-icon) center / contain no-repeat; }

.taobao-lobby { min-height: 100svh; padding-bottom: calc(96px + var(--safe-bottom)); background: var(--bg); }
.taobao-header { position: sticky; z-index: 45; top: 0; width: min(100%, 1180px); height: calc(71px + var(--safe-top)); display: flex; align-items: center; gap: 10px; margin: 0 auto; padding: calc(8px + var(--safe-top)) 16px 7px; background: var(--bg); }
.kgames-wordmark { min-width: 0; flex: 1 1 auto; overflow: hidden; display: flex; align-items: center; padding: 0; border: 0; color: #fff; background: transparent; cursor: pointer; }
.kgames-wordmark span { display: block; white-space: nowrap; font-family: "Muyao Handwriting", "KaiTi", cursive; font-size: 31px; font-weight: 400; line-height: 1; letter-spacing: 1px; }
.taobao-head-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.taobao-head-actions button { flex: 0 0 auto; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; transition: transform .16s ease, background-color .16s ease; }
.taobao-head-actions button:active, .taobao-bottom-nav button:active, .taobao-game-card:active { transform: scale(.95); }
.taobao-head-actions .head-square { width: 44px; color: #8c96a5; background: var(--control); font-size: 22px; }
.head-moon .target-icon { width: 23px; height: 23px; }
.currency-button { gap: 3px; min-width: 52px; color: #f7f8fa; font-size: 16px; font-weight: 760; }
.currency-button .target-icon { width: 16px; color: #7f8998; }
.header-balance { min-width: 60px; color: #f7f8fa; font-size: 16px; font-weight: 760; }
.taobao-head-actions .recharge-button { min-width: 50px; padding: 0 10px; color: #fff; background: var(--blue); font-size: 15px; font-weight: 760; }

.pg-only-grid { width: min(calc(100% - 32px), 1148px); display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px; margin: 0 auto; }
.taobao-game-card { position: relative; min-width: 0; display: block; overflow: hidden; aspect-ratio: .75; padding: 2px; border: 0; border-radius: 16px; background: var(--panel); cursor: pointer; transition: transform .18s ease; }
.taobao-game-card > img { width: 100%; height: 100%; display: block; border: 1px solid rgba(162,174,189,.12); border-radius: 15px; object-fit: cover; object-position: center center; filter: saturate(1.02) contrast(1.01); }
.taobao-game-card.state-maintenance > img { filter: grayscale(.75) brightness(.62); }
.game-state-badge { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 5px 9px; border-radius: 999px; color: #fff; background: rgba(12,18,25,.82); box-shadow: 0 4px 14px rgba(0,0,0,.24); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.taobao-game-card.state-test .game-state-badge { background: #1677ff; }

/* Functional pages cloned from the authenticated mobile WebApp. */
.feature-page, .home-page { width: min(calc(100% - 32px), 520px); margin: 0 auto; }
.feature-page { padding: 1px 0 24px; }
.feature-page h1 { margin: 4px 0 24px; font-size: 24px; line-height: 1.2; letter-spacing: -.5px; }
.home-carousel { position: relative; }
.home-banner { width: 100%; display: block; overflow: hidden; aspect-ratio: 1.78; padding: 0; border: 0; border-radius: 16px; background: #35110a; cursor: pointer; }
.home-banner img { width: 100%; height: 100%; display: block; object-fit: cover; }
.home-dots { position: absolute; z-index: 2; bottom: 13px; left: 17px; display: flex; gap: 4px; pointer-events: auto; }
.home-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.58); cursor: pointer; transition: width .2s ease, background-color .2s ease; }
.home-dots button.active { width: 27px; background: #fff; }
.home-promos { display: flex; gap: 8px; margin: 16px 0 18px; overflow: hidden; }
.home-promos button { position: relative; min-width: 108px; height: 60px; overflow: hidden; display: flex; align-items: center; gap: 6px; padding: 6px 9px; border: 2px solid #fff; border-radius: 12px; color: #fff; background: linear-gradient(135deg,#8149ff,#d752ec); cursor: pointer; }
.home-promos button:nth-child(2) { background: linear-gradient(135deg,#ff6a13,#ffb100); }
.home-promos button:nth-child(3) { background: linear-gradient(135deg,#28bff2,#3979ff); }
.home-promos button:nth-child(4) { background: linear-gradient(135deg,#f34956,#ff8b18); }
.home-promos img { width: 38px; height: 38px; margin-top: 8px; object-fit: contain; }
.home-promos span { align-self: flex-end; margin-left: auto; font-size: 12px; font-weight: 800; }
.home-promos small { position: absolute; z-index: 2; top: 2px; left: 3px; display: flex; align-items: center; gap: 2px; font-size: 9px; font-weight: 850; line-height: 1; }
.home-promos small .target-icon { width: 13px; height: 13px; }
.home-categories { height: 47px; display: flex; align-items: stretch; gap: 13px; overflow: hidden; border-bottom: 1px solid rgba(162,174,189,.14); color: var(--muted); white-space: nowrap; }
.home-categories > * { flex: 0 0 auto; }
.home-categories button, .home-categories > span { height: 46px; display: flex; align-items: center; gap: 6px; padding: 0; border: 0; color: inherit; background: transparent; font-size: 14px; font-weight: 650; }
.home-categories button { cursor: pointer; }
.home-categories .search-mini { width: 44px; height: 44px; justify-content: center; border-radius: 12px; color: #a5afbd; background: var(--control); }
.home-categories .search-mini .target-icon { width: 20px; height: 20px; }
.home-categories .active { position: relative; color: var(--text); }
.home-categories .active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: var(--blue); }
.home-categories .active .target-icon { width: 20px; height: 20px; color: var(--blue); }
.home-categories span img { width: 20px; height: 20px; object-fit: contain; }
.home-games-title { display: flex; align-items: center; justify-content: space-between; margin: 20px 4px 12px; }
.home-games-title h2 { margin: 0; font-size: 18px; }
.home-games-title button { padding: 8px 13px; border: 0; border-radius: 12px; color: var(--text); background: var(--control); cursor: pointer; font-size: 13px; }
.home-game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }

.activity-tabs { height: 88px; display: grid; grid-template-columns: repeat(4,1fr); padding: 4px; border-radius: 14px; background: #171c22; }
.activity-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; border-radius: 10px; color: #9aa4b2; background: transparent; cursor: pointer; }
.activity-tabs button.active { color: #fff; background: #303640; }
.activity-tabs img { width: 42px; height: 42px; object-fit: contain; }
.activity-tabs span { font-size: 13px; font-weight: 720; }
.bonus-list { display: grid; gap: 16px; margin-top: 24px; }
.bonus-card { min-height: 226px; padding: 18px 16px 16px; border-radius: 17px; color: #fff; background: linear-gradient(135deg,#7657ff,#d45edb); box-shadow: inset 0 1px rgba(255,255,255,.14); }
.bonus-card.cyan { background: linear-gradient(135deg,#19b4f2,#61d6dd); }
.bonus-card.blue { background: linear-gradient(135deg,#2788f8,#625fff); }
.bonus-card.orange { background: linear-gradient(135deg,#ff773d,#ffb049); }
.bonus-card.green { background: linear-gradient(135deg,#13b58e,#71d261); }
.bonus-heading { display: flex; align-items: center; gap: 10px; }
.bonus-heading > img { width: 58px; height: 58px; object-fit: contain; }
.bonus-heading > div { min-width: 0; flex: 1; }
.bonus-heading h2 { margin: 0 0 3px; font-size: 17px; }
.bonus-heading p { margin: 0; color: rgba(255,255,255,.76); font-size: 12px; }
.bonus-heading > button { width: 23px; height: 23px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: rgba(255,255,255,.88); background: transparent; cursor: pointer; }
.bonus-heading > button .target-icon { width: 20px; height: 20px; }
.bonus-rule { display: flex; align-items: center; gap: 4px; margin: 9px 0 12px; font-size: 12px; font-weight: 650; }
.bonus-rule .target-icon { width: 14px; height: 14px; }
.bonus-gifts { height: 46px; display: flex; align-items: center; justify-content: space-around; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.08); }
.bonus-gifts img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 4px 7px rgba(255,255,255,.46)); transform: scale(1.35); }
.bonus-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.bonus-card footer strong { font-size: 20px; }
.bonus-card footer button { padding: 9px 14px; border: 0; border-radius: 9px; color: rgba(255,255,255,.74); background: rgba(74,45,108,.5); cursor: pointer; font-weight: 760; }

.wallet-shell { padding: 16px; border-radius: 16px; background: #151a20; }
.wallet-title { height: 38px; display: flex; align-items: center; gap: 11px; }
.wallet-title h1 { flex: 1; margin: 0; font-size: 22px; }
.wallet-title button { height: 38px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 10px; color: var(--text); background: var(--control); cursor: pointer; font-weight: 720; }
.wallet-title button:first-child { min-width: 44px; padding: 0; }
.wallet-title button:first-child .target-icon { width: 20px; height: 20px; }
.wallet-switch { height: 44px; display: grid; grid-template-columns: 1fr 1fr; margin: 12px 0 25px; padding: 2px; border-radius: 12px; background: #282d35; }
.wallet-switch button { border: 0; border-radius: 10px; color: #8e97a5; background: transparent; cursor: pointer; font-weight: 750; }
.wallet-switch button.active { color: #fff; background: #3a404b; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.wallet-banner { width: 100%; display: block; margin-bottom: 20px; border-radius: 14px; }
.payment-methods { display: flex; gap: 7px; margin-bottom: 18px; }
.payment-methods button { min-width: 0; flex: 1; height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 7px; border: 0; border-radius: 10px; color: #9aa4b2; background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }
.payment-methods button.active { color: #fff; background: var(--blue); }
.payment-methods img { width: 28px; height: 28px; object-fit: contain; }
.deposit-panel { text-align: center; }
.deposit-panel > img { width: min(232px,80%); padding: 17px; border-radius: 10px; background: #fff; image-rendering: pixelated; }
.deposit-panel h2 { margin: 14px 0 7px; font-size: 16px; }
.deposit-panel code { display: block; overflow: hidden; margin: 0 auto 10px; color: #aeb7c4; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.copy-address, .primary-action { width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 11px; color: #fff; background: var(--blue); cursor: pointer; font-weight: 800; }
.copy-address .target-icon { width: 18px; height: 18px; }
.deposit-panel p, .withdraw-panel p { color: #7f8998; font-size: 11px; line-height: 1.6; }
.deposit-create > img, .telegram-required > img { width: 88px; height: 88px; padding: 9px; object-fit: contain; image-rendering: auto; }
.deposit-create label { display: grid; gap: 8px; margin: 18px 0 12px; color: #a5afbc; font-size: 13px; text-align: left; }
.deposit-create input { height: 50px; padding: 0 15px; border: 1px solid rgba(162,174,189,.18); border-radius: 12px; outline: 0; color: var(--text); background: #242a32; font-size: 18px; font-weight: 780; }
.deposit-presets { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 16px; }
.deposit-presets button { height: 38px; border: 1px solid rgba(144,156,173,.15); border-radius: 10px; color: #9ca7b6; background: var(--control); cursor: pointer; font-weight: 750; }
.deposit-presets button.active { border-color: var(--blue); color: var(--blue); background: rgba(0,123,255,.12); }
.deposit-panel .deposit-amount { display: block; margin: 9px 0 4px; color: var(--blue); font-size: 25px; }
.deposit-panel > small { display: block; margin-bottom: 12px; color: #8c96a4; }
.live-deposit > img { width: min(250px,82%); image-rendering: auto; }
.deposit-actions { display: grid; grid-template-columns: 1.7fr 1fr; gap: 8px; margin-top: 14px; }
.deposit-actions > button { height: 44px; border: 0; border-radius: 11px; color: #aab4c2; background: var(--control); cursor: pointer; font-weight: 800; }
.deposit-actions > .primary-action { color: #fff; background: var(--blue); }
.deposit-panel button:disabled { cursor: wait; opacity: .62; }
.payment-history-panel > h2 { margin: 0 0 12px; font-size: 17px; }
.payment-history-panel article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 2px; border-bottom: 1px solid rgba(144,156,173,.12); }
.payment-history-panel article div { display: grid; gap: 4px; }
.payment-history-panel article b { font-size: 14px; }
.payment-history-panel article small { color: #8791a0; font-size: 10px; }
.payment-history-panel article > span { padding: 5px 8px; border-radius: 8px; color: #f0a73a; background: rgba(240,167,58,.11); font-size: 11px; font-weight: 760; }
.payment-history-panel article > .status-paid { color: #18b86b; background: rgba(24,184,107,.11); }
.payment-history-panel article > .status-cancelled, .payment-history-panel article > .status-expired { color: #8b95a4; background: rgba(139,149,164,.11); }
.payment-history-panel > .primary-action { margin-top: 18px; }
.withdraw-panel { padding: 12px 4px 20px; }
.withdraw-panel h2 { margin: 4px 0 8px; color: #9da6b4; font-size: 14px; }
.withdraw-panel > strong { display: block; margin-bottom: 24px; font-size: 32px; }
.withdraw-panel label { display: grid; gap: 8px; margin-bottom: 16px; color: #a5afbc; font-size: 13px; }
.withdraw-panel input { height: 48px; padding: 0 14px; border: 1px solid rgba(162,174,189,.16); border-radius: 11px; outline: none; color: var(--text); background: #242a32; }
.empty-state { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > .target-icon { width: 48px; height: 48px; color: #87919f; }
.empty-state h2 { margin: 12px 0 4px; font-size: 18px; }
.empty-state p { margin: 0 0 20px; color: #77818f; font-size: 12px; }
.empty-state button { padding: 10px 18px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); cursor: pointer; }

.profile-page { display: grid; gap: 16px; }
.profile-hero { min-height: 120px; display: flex; align-items: center; gap: 15px; padding: 16px; border-radius: 17px; color: #fff; background: linear-gradient(135deg,#17b9e9,#2f93f4); box-shadow: 0 10px 24px rgba(22,148,230,.18); }
.profile-hero > img { width: 62px; height: 62px; border: 2px solid rgba(255,255,255,.7); border-radius: 12px; object-fit: cover; }
.profile-hero > div { min-width: 0; flex: 1; }
.profile-hero h1 { margin: 0 0 8px; font-size: 17px; }
.profile-hero p { display: flex; align-items: center; gap: 7px; margin: 4px 0; }
.profile-hero p span, .profile-hero p button, .profile-hero p b { padding: 4px 8px; border: 0; border-radius: 8px; color: #fff; background: rgba(255,255,255,.18); font-size: 12px; font-style: normal; font-weight: 750; }
.profile-hero p b { display: flex; align-items: center; gap: 4px; }
.profile-hero p b .target-icon { width: 14px; height: 14px; }
.profile-hero p button { cursor: pointer; }
.vip-card { position: relative; padding: 17px 16px; border-radius: 16px; color: #f7f9fc; background: linear-gradient(135deg,#121f33,#121920); box-shadow: 0 10px 24px rgba(7,15,28,.18); }
.vip-card header { display: flex; justify-content: space-between; }
.vip-card header b { font-size: 18px; }
.vip-card header button { padding: 0; border: 0; color: #929cab; background: transparent; cursor: pointer; font-weight: 750; }
.vip-card p { margin: 16px 0 8px; color: #8d96a4; font-size: 12px; }
.vip-card > div { height: 6px; overflow: hidden; border-radius: 5px; background: #262c36; }
.vip-card > div span { width: 2%; height: 100%; display: block; background: var(--blue); }
.vip-card small { display: block; margin-top: 9px; color: #939dab; text-align: right; }
.profile-actions { padding: 16px; border-radius: 16px; background: #151a20; }
.money-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-actions button { height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; color: #fff; background: var(--blue); cursor: pointer; font-weight: 800; }
.money-actions .target-icon { width: 18px; height: 18px; }
.profile-tools { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 16px; }
.profile-tools button { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; color: #8f99a7; background: transparent; cursor: pointer; }
.profile-tools i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: #f2f4f7; background: #2c3139; font-style: normal; }
.profile-tools i .target-icon { width: 21px; height: 21px; }
.profile-tools span { font-size: 11px; white-space: nowrap; }
.invite-row { height: 59px; display: flex; align-items: center; gap: 11px; padding: 0 16px; border: 0; border-radius: 13px; color: var(--text); background: #151a20; cursor: pointer; text-align: left; }
.invite-row > .target-icon { width: 27px; height: 27px; color: #eef2f5; }
.invite-row b { min-width: 0; flex: 1; font-size: 13px; }
.invite-row em { display: flex; align-items: center; gap: 4px; color: #9ca5b2; font-size: 12px; font-style: normal; }
.invite-row em .target-icon { width: 14px; height: 14px; }
.profile-menu { overflow: hidden; border-radius: 14px; background: #151a20; }
.profile-menu button { width: 100%; height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 0; border-bottom: 1px solid rgba(162,174,189,.08); color: var(--text); background: transparent; cursor: pointer; text-align: left; }
.profile-menu button:last-child { border-bottom: 0; }
.profile-menu button > .target-icon:first-child { width: 22px; height: 22px; color: #d9dde3; }
.profile-menu b { flex: 1; font-size: 13px; }
.profile-menu button > .target-icon:last-child { width: 18px; height: 18px; color: #737e8c; }

.kg-modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.76); backdrop-filter: blur(5px); }
.kg-modal { position: relative; width: min(100%,398px); max-height: 80svh; overflow: auto; padding: 24px 20px 20px; border: 1px solid rgba(162,174,189,.12); border-radius: 18px; color: var(--text); background: #232a33; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.kg-modal h2 { margin: 0 35px 18px 0; font-size: 21px; }
.kg-modal p { margin: 8px 0; color: #aab3bf; font-size: 13px; line-height: 1.6; }
.kg-modal .primary-action { margin-top: 18px; }
.kg-modal-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; color: #aeb7c3; background: var(--control); cursor: pointer; font-size: 24px; }

html.light-mode { --bg: #eef2f7; --panel: #fff; --control: rgba(48,60,76,.1); --muted: #647084; --text: #111722; color-scheme: light; }
html.light-mode .taobao-header, html.light-mode .taobao-lobby { background: var(--bg); }
html.light-mode .kgames-wordmark { color: #14233b; }
html.light-mode .currency-button, html.light-mode .header-balance { color: #111722; }
html.light-mode .activity-tabs, html.light-mode .wallet-shell, html.light-mode .profile-actions, html.light-mode .invite-row, html.light-mode .profile-menu { background: #fff; box-shadow: 0 4px 18px rgba(32,47,66,.07); }
html.light-mode .profile-actions { border: 1px solid rgba(47,65,88,.06); }
html.light-mode .vip-card { color: #f8fbff; }
html.light-mode .vip-card header button { color: #c7d0dc; }
html.light-mode .vip-card p, html.light-mode .vip-card small { color: #aeb9c7; }
html.light-mode .profile-tools button { color: #536174; }
html.light-mode .profile-tools i { color: #fff; background: #273140; box-shadow: 0 5px 12px rgba(25,39,58,.18); }
html.light-mode .invite-row > .target-icon { color: #2477e8; }
html.light-mode .profile-menu button > .target-icon:first-child { color: #526176; }
html.light-mode .profile-menu button > .target-icon:last-child { color: #7a8798; }
html.light-mode .taobao-bottom-nav { background: rgba(248,250,253,.96); }
html.light-mode .taobao-bottom-nav button.active { color: #111722; background: rgba(48,60,76,.08); }
html.light-mode .withdraw-panel input { background: #fff; }
html.light-mode .deposit-create input { background: #fff; }
html.light-mode .deposit-panel code { color: #5c6879; }

.floating-controls { position: fixed; z-index: 30; right: 16px; bottom: calc(99px + var(--safe-bottom)); left: 16px; display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; }
.floating-controls button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; color: #eef3f8; box-shadow: 0 9px 26px rgba(0,0,0,.34); pointer-events: auto; cursor: pointer; }
.scroll-top { visibility: hidden; opacity: 0; background: rgba(30,36,44,.98); transform: translateY(7px); transition: .2s ease; }
.scroll-top.show { visibility: visible; opacity: 1; transform: translateY(0); }
.scroll-top .target-icon { width: 21px; height: 21px; }
.support-button { margin-left: auto; color: #fff; background: var(--blue); }
.support-button .target-icon { width: 23px; height: 23px; }

.taobao-bottom-nav { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; height: calc(70px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 5px var(--safe-bottom); border-top: 1px solid rgba(162,174,189,.1); background: rgba(20,24,30,.97); box-shadow: 0 -5px 22px rgba(0,0,0,.16); backdrop-filter: blur(18px); }
.taobao-bottom-nav button { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; border: 0; border-radius: 16px; color: #8c96a5; background: transparent; cursor: pointer; transition: transform .16s ease, color .16s ease, background-color .16s ease; }
.taobao-bottom-nav button.active { color: #f2f5f8; background: rgba(162,174,189,.095); }
.taobao-bottom-nav .target-icon { width: 21px; height: 21px; }
.taobao-bottom-nav span { font-size: 12px; font-weight: 720; line-height: 1; }
.taobao-toast { position: fixed; z-index: 80; left: 50%; bottom: calc(126px + var(--safe-bottom)); max-width: calc(100% - 40px); padding: 10px 14px; border: 1px solid rgba(162,174,189,.16); border-radius: 10px; color: #edf1f5; background: rgba(30,36,44,.96); box-shadow: 0 14px 34px rgba(0,0,0,.36); opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: .2s ease; font-size: 12px; white-space: nowrap; }
.taobao-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Full-screen game container and PG launch sequence. */
.game-experience { --game-toolbar-offset: calc(52px + var(--safe-top)); position: fixed; inset: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; background: #000; }
.game-experience.telegram-mini-app { --game-toolbar-offset: 0px; }
.game-react-toolbar { z-index: 30; width: 100%; height: var(--game-toolbar-offset); flex: 0 0 auto; display: flex; align-items: center; padding: var(--safe-top) 8px 0; background: #171b21; }
.game-react-toolbar .game-back-pill { min-width: 74px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 0 13px 0 9px; border: 0; border-radius: 999px; color: #e8eaec; background: #293039; font-size: 13px; font-weight: 560; }
.game-react-toolbar .game-back-pill .target-icon { width: 13px; height: 13px; }
.game-react-stage { position: relative; min-height: 0; flex: 1; width: 100%; overflow: hidden; display: grid; place-items: center; background: #000; isolation: isolate; }
.game-react-stage::before { position: absolute; z-index: 0; inset: -34px; content: ""; background-image: var(--game-backdrop); background-position: center; background-size: cover; filter: blur(26px) brightness(.76) saturate(1.12); transform: scale(1.14); }
.game-react-stage iframe { position: relative; z-index: 1; width: min(100%, 56.18vh); height: min(100%, 177.99vw); border: 0; background: #000; box-shadow: 0 0 52px rgba(0,0,0,.48); }
.startup-layer { position: absolute; z-index: 50; top: var(--game-toolbar-offset); right: 0; bottom: 0; left: 0; overflow: hidden; display: grid; place-items: center; background: #000; }
.preflight-start { align-items: start; background: #000; }
.preflight-progress { width: 100%; height: 3px; overflow: hidden; background: #34381b; box-shadow: 0 1px 0 rgba(255,255,255,.035); }
.preflight-progress span { height: 100%; display: block; background: linear-gradient(90deg,#d9df55,#baf175); box-shadow: 0 0 7px rgba(198,238,100,.32); transition: width .12s linear; }
.brand-start, .brand-frame { background: #000; }
.brand-frame { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; }
.brand-original-animation { width: min(100%, 56.18vh); height: 100%; display: block; object-fit: contain; background: #000; }
.brand-exit-start { background: #000; }
.brand-exit-poster { filter: brightness(.38) saturate(.94); }
.brand-exit-logo { position: absolute; z-index: 3; inset: 0; width: min(100%, 56.18vh); height: 100%; margin: auto; object-fit: contain; mix-blend-mode: screen; }
.game-start { opacity: 1; transition: opacity .52s ease; }
.game-start.leaving { opacity: 0; }
.pg-verification-layer { position: absolute; z-index: 70; top: var(--game-toolbar-offset); bottom: 0; left: 50%; width: min(100%, 56.18vh); display: grid; place-items: center; background: rgba(19,8,2,.57); transform: translateX(-50%); }
.pg-verification-card { position: relative; width: min(78%, 450px); aspect-ratio: .88; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; box-sizing: border-box; padding: clamp(70px, 15.2vw, 105px) clamp(15px, 4vw, 28px) clamp(15px, 3.7vw, 28px); border-radius: clamp(8px, 1.8vw, 13px); color: #aeb0bc; background: #30313e; box-shadow: 0 4px 9px rgba(0,0,0,.5); text-align: center; }
.pg-verification-emblem { position: absolute; top: clamp(-91px, -15.2vw, -54px); left: 50%; width: 52%; aspect-ratio: 1.18; transform: translateX(-50%); pointer-events: none; }
.pg-verification-emblem img { display: block; }
.verify-shield-body { position: absolute; top: 0; left: 50%; width: 61%; aspect-ratio: 273 / 336; overflow: hidden; transform: translateX(-50%); }
.verify-shield-body > img { position: absolute; top: -107.143%; left: -293.773%; width: 394.505%; max-width: none; height: auto; }
.pg-verification-emblem .verify-shield-frame { position: absolute; top: 0; left: 50%; width: 61%; height: 91%; object-fit: contain; transform: translateX(-50%); }
.verify-magnifier { position: absolute; z-index: 3; top: 29%; left: 45%; width: 50%; aspect-ratio: 197 / 198; overflow: hidden; animation: pg-verify-scan 6s linear infinite; will-change: transform; }
.verify-magnifier > img { position: absolute; top: -404.04%; left: 0; width: 546.701%; max-width: none; height: auto; }
.pg-verification-emblem .verify-wordmark { position: absolute; z-index: 4; top: 27%; left: 0; width: 100%; height: 42%; object-fit: contain; }
.pg-verification-card h2, .pg-verification-card h3 { color: #ffbd55; text-shadow: 0 1px 1px rgba(71,39,0,.75); }
.pg-verification-card h2 { margin: 0; font-size: clamp(17px, 4.25vw, 27px); font-weight: 760; line-height: 1.22; }
.pg-verification-card h3 { margin: clamp(16px, 4vw, 25px) 0 0; font-size: clamp(16px, 3.95vw, 25px); font-weight: 730; line-height: 1.2; }
.pg-verify-url { width: clamp(177px, calc(44.6vw - 15px), 292px); height: clamp(25px, 6vw, 38px); display: flex; align-items: center; justify-content: center; gap: clamp(5px, 1.3vw, 9px); margin-top: clamp(10px, 2.45vw, 17px); border-radius: 999px; color: #f4f4f7; background: #595b68; font-size: clamp(10px, 2.5vw, 17px); line-height: 1; white-space: nowrap; }
.verify-lock { position: relative; width: clamp(11px, 2.7vw, 18px); aspect-ratio: 34 / 39; overflow: hidden; }
.verify-lock img { position: absolute; top: -492.308%; left: 0; width: 238.235%; max-width: none; height: auto; }
.pg-verification-card > p { margin: clamp(9px, 2.3vw, 16px) 0 0; color: #aeb0bb; font-size: clamp(10px, 2.55vw, 17px); line-height: 1.52; }
.pg-verification-card > p b { color: #ffb43f; font-weight: 620; }
.pg-verify-actions { width: clamp(218px, calc(43.4vw + 31px), 330px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(7px, 1.9vw, 13px); margin-top: clamp(27px, 6.5vw, 40px); }
.pg-verify-actions button { height: clamp(41px, 9.9vw, 62px); padding: 0; border: 1px solid #f7a92d; border-radius: 999px; font-size: clamp(13px, 3.2vw, 21px); cursor: pointer; }
.pg-verify-ignore { color: #ffb341; background: transparent; }
.pg-verify-accept { color: #fff; background: linear-gradient(180deg,#ffb74e,#ffa43a); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.pg-verify-actions button:active { transform: translateY(1px); }
.pg-verify-remember { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 13px); margin-top: clamp(24px, 5.8vw, 36px); padding: 0; border: 0; color: #8f919d; background: transparent; font-size: clamp(10px, 2.6vw, 17px); line-height: 1; cursor: pointer; }
.pg-verify-remember span { width: clamp(17px, 4.1vw, 27px); height: clamp(17px, 4.1vw, 27px); display: grid; place-items: center; border-radius: 4px; color: #f6a934; background: #272934; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); font-size: clamp(13px, 3.3vw, 21px); font-weight: 800; }
.pg-demo-verification-layer { position: absolute; z-index: 70; top: var(--game-toolbar-offset); bottom: 0; left: 50%; width: min(100%, 56.18vh); overflow: hidden; color: #fff; background: #30303c; transform: translateX(-50%); animation: pg-demo-sheet-in .16s cubic-bezier(.2,.78,.25,1) both; }
.pg-demo-result-close { position: absolute; z-index: 8; top: clamp(16px, 4vw, 25px); right: clamp(16px, 4vw, 25px); width: clamp(24px, 5.8vw, 36px); height: clamp(24px, 5.8vw, 36px); padding: 0; border: 0; background: transparent; cursor: pointer; opacity: .76; }
.pg-demo-result-close::before, .pg-demo-result-close::after { position: absolute; top: 50%; left: 50%; width: 82%; height: 1px; content: ""; background: #fff; transform: translate(-50%,-50%) rotate(45deg); }
.pg-demo-result-close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.pg-demo-verification-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #f7aa4e; }
.pg-demo-loading-dots { height: 20px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.pg-demo-loading-dots span { width: 6px; height: 6px; border-radius: 50%; background: #f7aa4e; animation: pg-demo-dot .7s ease-in-out infinite; }
.pg-demo-loading-dots span:nth-child(2) { animation-delay: .1s; }
.pg-demo-loading-dots span:nth-child(3) { animation-delay: .2s; }
.pg-demo-verification-loading b { margin-top: 7px; font-size: clamp(13px, 3.2vw, 20px); font-weight: 500; }
.pg-demo-verification-loading small { position: absolute; bottom: 6.5%; padding: 6px 12px; border: 1px solid rgba(255,196,107,.28); border-radius: 999px; color: rgba(255,220,168,.76); font-size: clamp(8px, 2vw, 12px); }
.pg-demo-success-page { position: absolute; inset: 0; overflow: hidden auto; box-sizing: border-box; padding: clamp(9px, 2.2vw, 14px) clamp(18px, 4.5vw, 29px) clamp(25px, 6vw, 40px); color: #fff; background: #30303c; animation: pg-demo-success-in .28s ease-out both; }
.pg-demo-success-page::before { position: absolute; z-index: 0; top: 10%; right: 0; bottom: 0; left: 0; content: ""; background: url("pg-verify-assets/official-success-background.png") center 20% / cover no-repeat; pointer-events: none; }
.pg-demo-success-page > * { position: relative; z-index: 1; }
.pg-demo-url-check { width: calc(100% - clamp(40px, 10vw, 65px)); height: clamp(26px, 6.1vw, 40px); display: flex; align-items: center; justify-content: center; gap: 3px; box-sizing: border-box; margin: 0 auto 0 0; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: rgba(255,255,255,.42); background: rgba(56,56,70,.8); font-size: clamp(9px, 2.15vw, 14px); white-space: nowrap; }
.pg-demo-url-check span { overflow: hidden; text-overflow: ellipsis; }
.pg-demo-url-check b { color: #6ff1a5; font-weight: 500; }
.pg-demo-url-check img { width: clamp(18px, 4.4vw, 28px); animation: pg-demo-hand-left 2s linear infinite; }
.pg-demo-url-check img:first-child { transform: rotate(90deg); }
.pg-demo-url-check img:last-child { transform: rotate(-90deg) scaleX(-1); animation-name: pg-demo-hand-right; }
.pg-demo-url-note { margin: clamp(4px, 1vw, 7px) 0 0; color: rgba(255,255,255,.48); font-size: clamp(6px, 1.4vw, 9px); text-align: center; }
.pg-demo-certification-head { display: grid; grid-template-columns: 35% 27% 38%; align-items: center; gap: 0; margin-top: clamp(18px, 4.3vw, 27px); }
.pg-demo-official-logo { width: 82%; height: auto; }
.pg-demo-license { min-width: 0; padding-left: clamp(5px, 1.2vw, 8px); border-left: 1px solid rgba(255,255,255,.12); }
.pg-demo-license > span { display: block; margin-bottom: clamp(6px, 1.4vw, 9px); color: rgba(255,255,255,.68); font-size: clamp(6px, 1.45vw, 9px); }
.pg-demo-license > img { width: 54%; height: auto; }
.pg-demo-fair > div { display: flex; align-items: center; gap: clamp(7px, 1.7vw, 11px); }
.pg-demo-fair > div img:first-child { width: 21%; }
.pg-demo-fair > div img:last-child { width: 66%; }
.pg-demo-certified-copy { margin: clamp(8px, 2vw, 13px) 0 0; color: rgba(255,255,255,.9); font-size: clamp(7px, 1.65vw, 11px); line-height: 1.45; text-align: justify; }
.pg-demo-success-shield { position: relative; width: clamp(154px, 38vw, 245px); aspect-ratio: 436 / 494; margin: clamp(13px, 3.2vw, 21px) auto 0; }
.pg-demo-shield-frame { position: absolute; display: block; background-repeat: no-repeat; }
.pg-demo-shield-frame.pop { inset: 0; background-image: url("pg-verify-assets/official-success-scale.png"); background-size: 400% 500%; }
.pg-demo-shield-frame.glow { top: 0; left: 50%; width: 89.45%; height: 90.69%; background-image: url("pg-verify-assets/official-success-glow.png"); background-size: 500% 500%; transform: translateX(-50%); }
.pg-demo-success-page h2 { margin: clamp(-19px, -3vw, -11px) 0 0; color: #fad171; font-size: clamp(21px, 5vw, 32px); font-weight: 660; line-height: 1.2; text-align: center; text-shadow: 0 3px 2px rgba(0,0,0,.5); }
.poster-blur { position: absolute; inset: -26px; background-position: center; background-size: cover; filter: blur(28px) brightness(.56) saturate(1.16); transform: scale(1.12); }
.startup-poster { position: absolute; z-index: 1; top: 0; left: 50%; width: min(86%, 430px); height: 100%; min-height: 0; object-fit: cover; object-position: center; filter: saturate(1.03); box-shadow: 0 0 70px rgba(0,0,0,.72); transform: translateX(-50%); }
.startup-vignette { position: absolute; z-index: 2; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.2), transparent 20%, transparent 80%, rgba(0,0,0,.2)); pointer-events: none; }
.startup-legal-shade { position: absolute; z-index: 2; bottom: 0; left: 50%; width: min(86%, 430px); height: 28%; background: linear-gradient(0deg, rgba(4,0,0,.98), rgba(38,5,1,.9) 62%, transparent); transform: translateX(-50%); pointer-events: none; }
.startup-action { position: absolute; z-index: 3; top: 78.2%; left: 50%; width: min(48%, 230px); text-align: center; transform: translate(-50%,-50%); }
.startup-action.ready { width: min(37%, 190px); }
.startup-progress { height: 15px; padding: 2px; overflow: hidden; border: 2px solid rgba(4,4,4,.94); border-radius: 5px; background: #090909; box-shadow: inset 0 0 0 1px rgba(255,255,255,.34), 0 2px 8px rgba(0,0,0,.45); }
.startup-progress span { height: 100%; display: block; border-radius: 2px; background: linear-gradient(90deg,#ff4e47 0%,#ff716b 72%,#ffe9e7 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.48); transition: width .12s linear; }
.startup-action > b { display: block; margin-top: 9px; color: #fff; font-size: 12px; font-weight: 620; text-shadow: 0 2px 5px #000; }
.startup-tip { position: absolute; z-index: 3; top: 83.2%; left: 50%; width: min(80%, 400px); margin: 0; color: rgba(255,255,255,.9); font-size: clamp(8px, 2.2vw, 12px); line-height: 1.35; text-align: center; text-shadow: 0 2px 4px #000; transform: translateX(-50%); }
.startup-play { width: 100%; height: 34px; border: 1px solid rgba(255,218,213,.86); border-radius: 6px; color: #fff; background: linear-gradient(#ff756f,#f0443e); box-shadow: 0 2px 0 #af2823, 0 7px 18px rgba(117,11,8,.36), inset 0 1px 0 rgba(255,255,255,.42); cursor: pointer; font-size: 14px; font-weight: 760; text-shadow: 0 1px 2px rgba(119,15,12,.58); animation: play-ready .42s cubic-bezier(.2,.9,.25,1.25) both; }
.startup-play:active { transform: translateY(1px); box-shadow: 0 1px 0 #b92d28, 0 4px 12px rgba(117,11,8,.32); }
.startup-legal { position: absolute; z-index: 3; bottom: .9%; left: 50%; width: min(84%, 420px); height: 15%; display: grid; grid-template-columns: 22% 78%; grid-template-rows: minmax(0,1fr) auto; align-items: center; transform: translateX(-50%); pointer-events: none; }
.legal-pg-mark { position: relative; width: 100%; min-width: 0; overflow: hidden; display: grid; place-items: center; background: #020000; isolation: isolate; }
.legal-pg-crisp { position: relative; z-index: 1; width: 100%; height: auto; display: block; object-fit: contain; animation: pg-legal-crisp-appear .62s steps(4,end) both; }
.legal-pg-mark::after { position: absolute; z-index: 2; inset: 0; content: ""; background: linear-gradient(90deg,#56efc7 0%,#51e7f5 42%,#9d9cff 72%,#e6a7ff 100%); -webkit-mask: url("splash-assets/pg-legal-original-crisp.png?v=20260807") center / contain no-repeat; mask: url("splash-assets/pg-legal-original-crisp.png?v=20260807") center / contain no-repeat; opacity: 0; pointer-events: none; animation: pg-legal-crisp-sweep 7.2s .7s linear infinite; }
.legal-cert-original { width: 108%; max-width: none; max-height: 100%; margin-left: -1.5%; display: block; object-fit: contain; }
.legal-footer-original { grid-column: 1 / -1; width: 108%; max-width: none; height: auto; margin: -1px 0 0 -4%; display: block; }

@keyframes play-ready { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes pg-legal-crisp-appear { 0% { opacity: 0; transform: scale(.94); } 42% { opacity: .35; } 72%, 100% { opacity: 1; transform: scale(1); } }
@keyframes pg-legal-crisp-sweep {
  0%, 10% { opacity: 0; clip-path: inset(0 100% 0 0); }
  12% { opacity: .92; clip-path: inset(0 100% 0 0); }
  30% { opacity: .92; clip-path: inset(0 0 0 0); }
  37%, 48% { opacity: 0; clip-path: inset(0 0 0 0); }
  50% { opacity: .78; clip-path: inset(0 100% 0 0); filter: hue-rotate(52deg); }
  68% { opacity: .78; clip-path: inset(0 0 0 0); filter: hue-rotate(52deg); }
  76%, 100% { opacity: 0; clip-path: inset(0 0 0 0); filter: hue-rotate(0); }
}
@keyframes pg-verify-scan {
  0%, 100% { transform: translate3d(14.2%, 21.8%, 0); }
  6.25% { transform: translate3d(4.7%, 25.6%, 0); }
  12.5% { transform: translate3d(-5.4%, 25.4%, 0); }
  18.75% { transform: translate3d(-14.7%, 21.4%, 0); }
  25% { transform: translate3d(-21.8%, 14.2%, 0); }
  31.25% { transform: translate3d(-25.6%, 4.7%, 0); }
  37.5% { transform: translate3d(-25.4%, -5.4%, 0); }
  43.75% { transform: translate3d(-21.4%, -14.7%, 0); }
  50% { transform: translate3d(-14.2%, -21.8%, 0); }
  56.25% { transform: translate3d(-4.7%, -25.6%, 0); }
  62.5% { transform: translate3d(5.4%, -25.4%, 0); }
  68.75% { transform: translate3d(14.7%, -21.4%, 0); }
  75% { transform: translate3d(21.8%, -14.2%, 0); }
  81.25% { transform: translate3d(25.6%, -4.7%, 0); }
  87.5% { transform: translate3d(25.4%, 5.4%, 0); }
  93.75% { transform: translate3d(21.4%, 14.7%, 0); }
}
@keyframes pg-demo-sheet-in { from { transform: translate(-50%,100%); } to { transform: translate(-50%,0); } }
@keyframes pg-demo-success-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pg-demo-dot { 0%, 100% { opacity: .5; transform: translateY(2px); } 50% { opacity: 1; transform: translateY(-5px); } }
@keyframes pg-demo-hand-left { 0%, 60%, 100% { translate: 0 0; } 15%, 45% { translate: 8px 0; } 30% { translate: 0 0; } }
@keyframes pg-demo-hand-right { 0%, 60%, 100% { translate: 0 0; } 15%, 45% { translate: -8px 0; } 30% { translate: 0 0; } }

@media (max-width: 1000px) { .pg-only-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 720px) {
  .taobao-header { max-width: 560px; }
  .pg-only-grid { width: calc(100% - 36px); max-width: 520px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 410px) {
  .taobao-header { gap: 5px; padding-right: 12px; padding-left: 12px; }
  .kgames-wordmark span { font-size: 29px; }
  .taobao-head-actions { gap: 5px; }
  .taobao-head-actions .head-square { width: 38px; height: 40px; border-radius: 11px; font-size: 19px; }
  .currency-button { min-width: 47px; font-size: 14px; }
  .currency-button .target-icon { width: 13px; }
  .header-balance { min-width: 55px; font-size: 14px; }
  .taobao-head-actions .recharge-button { min-width: 47px; height: 40px; padding: 0 9px; font-size: 14px; }
}
@media (max-width: 355px) {
  .head-expand { display: none !important; }
  .kgames-wordmark span { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .taobao-game-card, .taobao-head-actions button, .taobao-bottom-nav button { transition-duration: .01ms; }
}
