:root {
  --brand: #f48e1c;
  --brand-deep: #e67e00;
  --blue: #00aeef;
  --blue-deep: #0798d4;
  --ink: #333333;
  --text: #333333;
  --muted: #999999;
  --hint: #c8c8cc;
  --line: #eeeeee;
  --surface: #ffffff;
  --canvas: #f5f6fa;
  --background: #f5f6fa;
  --danger: #ff4d4f;
  --success: #52c41a;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
  font-family: Roboto, "Noto Sans CJK SC", "Noto Sans SC", Arial, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--canvas); color: var(--ink); }
body { overscroll-behavior-y: none; font-size: 14px; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { width: 100%; min-height: 100dvh; }
.view { min-height: 100dvh; padding-bottom: calc(68px + var(--safe-bottom)); }
.view.detail-open { padding-bottom: var(--safe-bottom); }
.page { min-height: calc(100dvh - 68px - var(--safe-bottom)); background: var(--canvas); }
.page.white { background: var(--surface); }
.page-scroll { padding-bottom: 18px; }
.hidden { display: none !important; }

.toolbar {
  position: sticky; top: 0; z-index: 20; height: calc(56px + var(--safe-top)); padding: var(--safe-top) 16px 0;
  display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--line);
}
.toolbar.blue { background: var(--blue); color: white; border: 0; }
.toolbar.orange { background: var(--brand); color: white; border: 0; }
.toolbar.gradient { background: linear-gradient(135deg, #ffad5f, #ffd2ad); border: 0; }
.toolbar-title { position: absolute; left: 50%; transform: translateX(-50%); max-width: 65%; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar .icon-button svg { width: 22px; height: 22px; }
.issue-label svg { width: 13px; height: 13px; vertical-align: -2px; }
.toolbar-brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.toolbar-logo { width: 32px; height: 28px; display: block; object-fit: contain; }
.brand-mark { width: 32px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #ffb836, #f06c21); box-shadow: inset 0 0 0 1px #ffffff66; font-weight: 900; font-size: 13px; }
.icon-button { width: 38px; height: 38px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; border-radius: 50%; }
.back-button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; }
.back-button svg { width: 24px; height: 24px; }
.pill-button { height: 32px; padding: 0 11px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #ffb864; border-radius: 16px; color: var(--brand); background: #fff; font-size: 12px; }
.pill-button svg { width: 16px; height: 16px; }

.bottom-nav {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(68px + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid #ececf0; box-shadow: 0 -2px 10px #0000000b;
}
.bottom-nav button { min-width: 0; padding: 7px 0 5px; border: 0; background: transparent; color: #8e8e93; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; }
.bottom-nav button.active { color: #333; font-weight: 700; }
.bottom-nav button.active svg { color: var(--brand); }
.bottom-nav svg { width: 24px; height: 24px; stroke-width: 1.5; }
.support-fab { position: fixed; z-index: 45; right: 18px; bottom: calc(82px + var(--safe-bottom)); width: 50px; height: 50px; border: 0; border-radius: 50%; color: white; background: #ff7a2f; box-shadow: 0 5px 15px #d96b2880; display: grid; place-items: center; }
.support-fab svg { width: 25px; height: 25px; }

.banner { position: relative; margin: 8px 12px 0; height: 140px; border-radius: 4px; overflow: hidden; background: linear-gradient(135deg, #00aeef, #96def8); }
.banner-slide { width: 100%; height: 100%; border: 0; padding: 0; background: transparent; position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-fallback { height: 100%; background: transparent; }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 2; display: flex; justify-content: center; gap: 5px; }
.banner-dots i { width: 6px; height: 6px; border-radius: 50%; background: #ffffff80; }
.banner-dots i.active { width: 15px; border-radius: 5px; background: white; }
.marquee { margin: 4px 12px; min-height: 32px; padding: 0 10px; display: flex; align-items: center; gap: 7px; border-radius: 6px; background: #fff9e6; overflow: hidden; color: #555; font-size: 12px; }
.marquee svg { width: 15px; height: 15px; color: var(--brand); flex: 0 0 auto; }
.marquee span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.account-strip { min-height: 80px; background: white; padding: 10px 15px; display: flex; align-items: center; justify-content: space-between; }
.guest-prompt small { display: block; color: #7e88ad; font-size: 12px; margin-bottom: 7px; }
.button-pair { display: flex; gap: 5px; }
.mini-button { height: 27px; min-width: 56px; padding: 0 12px; border: 1px solid var(--brand); border-radius: 14px; background: white; color: var(--brand); font-weight: 700; }
.mini-button.primary { color: white; background: var(--brand); }
.member-summary .nickname { font-size: 12px; color: #4a5c95; }
.balance-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.balance-row strong { color: #0b1028; font-size: 18px; font-weight: 500; }
.refresh { padding: 2px; border: 0; background: none; color: #7e88ad; }
.refresh svg, .refresh img { width: 18px; height: 18px; object-fit: contain; }
.shortcuts { display: flex; gap: 6px; }
.shortcut { width: 34px; border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #424653; }
.shortcut .round-icon { width: 34px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: white; }
.shortcut .round-icon img { width: 34px; height: 36px; display: block; object-fit: contain; }

.category-tabs { margin-top: 16px; height: 30px; padding: 0 12px; display: flex; gap: 0; overflow-x: auto; background: transparent; border: 0; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button { position: relative; flex: 0 0 56px; width: 56px; height: 30px; padding: 0; border: 0; background: transparent; color: #424653; display: grid; place-items: center; font-size: 12px; font-family: sans-serif; font-weight: 500; }
.category-tabs button > span:last-child { display: none; }
.category-tabs button.active { color: white; font-weight: 500; }
.category-symbol { width: 49px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: inherit; font-size: 12px; font-weight: 500; background: transparent; }
.category-tabs button:first-child .category-symbol { font-size: 13px; font-weight: 600; }
.category-tabs button:last-child .category-symbol { font-size: 11px; }
.category-tabs button.active .category-symbol { color: white; background: var(--brand); box-shadow: 0 2px 4px #f48e1c40; }
.category-divider { height: 2px; margin: 6px 12px 8px; background: var(--brand); }

.section { margin-top: 8px; padding: 12px; background: white; }
.home-games-section { margin-top: 0; padding: 0 12px 18px; background: transparent; }
.section-title { margin: 0 0 11px; display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.section-title small { color: var(--muted); font-size: 12px; font-weight: 400; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.lottery-list { display: grid; gap: 12px; }
.lottery-card { position: relative; width: 100%; height: auto; aspect-ratio: 3 / 1; padding: 16px 18px; overflow: hidden; border: 0; border-radius: 16px; color: white; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; box-shadow: 0 1px 4px #0000001a; }
.lottery-card .lottery-image { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.lottery-canada28 { background: linear-gradient(90deg, #64b5f6, #1e88e5); }
.lottery-hash28 { background: linear-gradient(90deg, #e57373, #d32f2f); }
.lottery-miaomiao28 { background: linear-gradient(90deg, #ffd700, #a67c00); }
.live-list { display: grid; gap: 12px; }
.live-card { position: relative; width: 100%; aspect-ratio: 3 / 1; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: white; box-shadow: 0 1px 4px #0000001a; }
.live-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.game-card { min-width: 0; height: 132px; margin: 0 4px 10px; padding: 0; border: 0; overflow: hidden; background: transparent; text-align: center; }
.game-cover { width: 100%; height: 105px; border-radius: 8px; overflow: hidden; background: #f3f4f7; display: grid; place-items: center; color: #8190a6; font-weight: 800; font-size: 18px; box-shadow: 0 1px 2px #00000018; }
.game-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.game-name { display: block; margin-top: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; font-size: 12px; font-weight: 700; color: #424653; }
.provider-list { height: 40px; display: flex; gap: 2px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.provider-list::-webkit-scrollbar { display: none; }
.provider-chip { width: 46px; height: 34px; flex: 0 0 46px; padding: 2px; border: 1px solid transparent; border-radius: 6px; background: transparent; display: grid; place-items: center; color: #5a5e69; font-size: 8px; font-weight: 700; overflow: hidden; }
.provider-chip.active { border-color: var(--brand); color: var(--brand); background: #fff9f0; }
.provider-chip img { width: 42px; height: 26px; object-fit: contain; border-radius: 4px; background: white; }
.provider-chip:has(img) span { display: none; }

.empty { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.empty.compact { min-height: 100px; }
.empty-symbol { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #f0f2f6; color: #b1b7c3; font-size: 23px; }
.loading { min-height: 150px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid #e8e8ed; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.list { background: white; }
.list-item { width: 100%; min-height: 67px; padding: 11px 15px; border: 0; border-bottom: 1px solid var(--line); background: white; display: flex; align-items: center; gap: 12px; text-align: left; }
.list-item:last-child { border-bottom: 0; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-size: 15px; color: #333; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.list-subtitle { margin-top: 5px; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.list-time { color: #aaa; font-size: 11px; white-space: nowrap; }
.avatar, .list-thumb { flex: 0 0 auto; width: 46px; height: 46px; object-fit: cover; border-radius: 50%; background: #edf0f5; }
.list-thumb { width: 56px; height: 48px; border-radius: 6px; }
.avatar-placeholder { display: grid; place-items: center; color: white; background: linear-gradient(145deg, #ffc06f, #ff8151); font-weight: 800; }
.badge { display: inline-block; min-width: 18px; padding: 2px 5px; border-radius: 9px; color: white; background: var(--danger); text-align: center; font-size: 10px; }

.promo-tabs { position: sticky; top: calc(56px + var(--safe-top)); z-index: 18; height: 48px; display: flex; gap: 12px; align-items: center; overflow-x: auto; padding: 8px 16px; background: white; border-bottom: 0; scrollbar-width: none; }
.promo-tabs button { flex: 0 0 auto; height: 32px; padding: 0 16px; border: 0; border-radius: 16px; background: #f5f6fa; }
.promo-tabs button.active { color: white; background: var(--brand); }
.promo-list { padding: 12px; display: grid; gap: 16px; }
.promo-card { padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: white; text-align: left; box-shadow: 0 1px 4px #00000022; }
.promo-image { width: 100%; min-height: 0; aspect-ratio: 16 / 7; background: var(--line); }
.promo-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

.chat-list-page { background: #f5f6fa; }
.chat-topbar { height: calc(44px + var(--safe-top)); padding: var(--safe-top) 16px 0; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); background: white; }
.chat-topbar .chat-logo, .chat-logo-fallback { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; object-fit: cover; border-radius: 5px; }
.chat-logo-fallback { color: white; background: var(--brand); font-size: 10px; font-weight: 800; }
.chat-topbar strong { color: var(--text); font-size: 15px; }
.chat-top-menu, .chat-session-list { background: white; }
.chat-session-list { margin-top: 0; background: #f5f6fa; }
.chat-list-row { position: relative; width: 100%; height: 70px; padding: 0 15px; border: 0; background: white; display: flex; align-items: center; text-align: left; }
.chat-list-row::after { content: ''; position: absolute; left: 68px; right: 0; bottom: 0; height: 1px; background: #eef0f5; }
.chat-list-avatar { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: var(--brand); background: #fff7ea; }
.chat-list-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.chat-list-avatar svg { width: 23px; height: 23px; }
.chat-list-copy { min-width: 0; flex: 1; margin-left: 13px; display: flex; flex-direction: column; }
.chat-list-copy strong { overflow: hidden; color: #424653; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.chat-verified { width: 15px; height: 15px; margin-left: 3px; object-fit: contain; vertical-align: -2px; }
.chat-list-copy small { margin-top: 6px; overflow: hidden; color: #7e88ad; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.chat-list-row > .badge { min-width: 20px; height: 20px; padding: 2px 5px; border-radius: 10px; }

.discover-list { background: white; }
.discover-row { position: relative; width: 100%; height: 72px; padding: 0 16px; border: 0; background: white; display: flex; align-items: center; text-align: left; }
.discover-row::after { content: ''; position: absolute; left: 76px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.discover-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: var(--brand); background: #fff1e2; }
.discover-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.discover-icon svg { width: 24px; height: 24px; }
.discover-row > strong { margin-left: 16px; color: var(--text); font-size: 17px; }
.discover-row > .badge { height: 18px; margin-left: 8px; padding: 1px 6px; border-radius: 4px; font-size: 11px; }
.discover-preview { width: 70px; height: 35px; margin-left: auto; overflow: hidden; }
.discover-preview:empty { width: 0; }
.discover-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.discover-row > svg { width: 16px; height: 16px; margin-left: 8px; color: #d0d0d0; }

.announcement-page { min-height: 100dvh; padding-bottom: 0; background: white; }
.announcement-header { position: relative; width: 100%; aspect-ratio: 25 / 17; overflow: hidden; background: linear-gradient(145deg, #f4b266, #ffe0ba); }
.announcement-header-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.announcement-header > button { position: absolute; top: var(--safe-top); left: 0; width: 42px; height: 44px; padding: 13px 16px; border: 0; color: white; background: transparent; }
.announcement-header > button svg, .announcement-header > button img { width: 10px; height: 18px; object-fit: contain; }
.announcement-list { background: white; }
.announcement-row { padding: 10px 10px 0; display: flex; align-items: flex-start; border-bottom: 1px solid var(--line); background: white; }
.announcement-avatar { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: white; background: #586b96; }
.announcement-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.announcement-avatar svg { width: 17px; height: 17px; }
.announcement-main { min-width: 0; flex: 1; margin-left: 6px; }
.announcement-title { display: block; color: #586b96; font-size: 14px; font-weight: 400; line-height: 18px; }
.announcement-copy { margin-top: 4px; overflow: hidden; display: -webkit-box; color: #222; font-size: 12px; line-height: 17px; white-space: pre-wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.announcement-copy.expanded { display: block; overflow: visible; -webkit-line-clamp: unset; }
.announcement-expand { height: 26px; padding: 0; border: 0; color: #586b96; background: transparent; font-size: 12px; }
.announcement-meta { position: relative; height: 32px; display: flex; align-items: center; }
.announcement-meta time { color: #999; font-size: 10px; }
.announcement-more { width: 30px; height: 32px; margin-left: auto; padding: 0; border: 0; color: #586b96; background: transparent; font-size: 15px; font-weight: 700; letter-spacing: -2px; }
.announcement-more img { width: 16px; height: 5px; object-fit: contain; }
.announcement-actions { position: absolute; z-index: 2; right: 30px; top: 0; width: 120px; height: 32px; border-radius: 5px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: #4b5159; }
.announcement-actions button { padding: 0; border: 0; color: white; background: transparent; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; }
.announcement-actions button + button { border-left: 1px solid #6d737b; }
.announcement-actions svg, .announcement-actions img { width: 13px; height: 13px; object-fit: contain; }
.announcement-social { margin-bottom: 8px; padding: 4px 7px; color: #222; background: #f4f5f8; font-size: 11px; }
.announcement-like-summary { display: flex; align-items: center; gap: 5px; color: #586b96; }
.announcement-like-summary svg, .announcement-like-summary img { width: 13px; height: 13px; object-fit: contain; }
.announcement-social p { margin: 3px 0; line-height: 16px; }
.announcement-social p strong { color: #586b96; font-weight: 400; }
.announcement-composer { position: fixed; z-index: 45; left: 0; right: 0; bottom: var(--safe-bottom); height: 58px; padding: 9px 12px; display: flex; align-items: center; background: white; box-shadow: 0 -3px 12px #00000012; }
.announcement-composer input { min-width: 0; height: 40px; flex: 1; padding: 0 12px; border: 0; border-radius: 7px; outline: 0; color: #222; background: #f2f3f6; font-size: 14px; }
.announcement-composer button { width: 58px; height: 40px; padding: 0; border: 0; color: #586b96; background: transparent; font-size: 15px; }

.profile-page { background: #f3f4fa; }
.profile-hero { position: relative; height: calc(210px + var(--safe-top)); overflow: hidden; background: linear-gradient(135deg, #ffb469, #ffd2ad); }
.profile-background { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-heading { position: absolute; z-index: 1; top: var(--safe-top); left: 0; right: 0; height: 77px; display: grid; place-items: center; color: white; font-size: 18px; font-weight: 400; }
.profile-user { position: absolute; z-index: 1; top: calc(77px + var(--safe-top)); left: 14px; right: 14px; height: 65px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; text-align: left; }
.profile-user .avatar { width: 58px; height: 58px; flex: 0 0 58px; border: 0; color: white; background: #161a24; }
.profile-user .avatar svg { width: 30px; height: 30px; }
.profile-user-info { min-width: 0; flex: 1; margin-left: 16px; display: flex; flex-direction: column; align-items: flex-start; }
.profile-user-info strong { max-width: 100%; overflow: hidden; color: #252638; font-size: 17px; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-user-info small { margin-top: 5px; color: #7e88ad; font-size: 11px; }
.profile-user > svg { width: 12px; height: 20px; flex: 0 0 12px; color: #2d2e36; }
.uid-chip { display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: 10px; color: white; background: #ff7e58; font-size: 10px; font-style: normal; line-height: 14px; }
.profile-content { position: relative; z-index: 2; padding: 11px 0 28px; border-radius: 12px 12px 0 0; background: white; }
.asset-card { min-height: 94px; padding: 18px; border-radius: 12px; background: white; box-shadow: 0 7px 20px #94622a17; }
.asset-card small { color: #7e88ad; }
.asset-card strong { display: block; margin-top: 8px; color: #25283a; font-size: 23px; font-weight: 400; }
.profile-asset-card { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 0; width: auto; height: 47px; min-height: 47px; padding: 0 16px; overflow: hidden; border-radius: 0; box-shadow: none; display: flex; align-items: center; justify-content: space-between; }
.profile-asset-background, .profile-promo-background { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: fill; pointer-events: none; }
.profile-asset-link { position: relative; z-index: 1; min-width: 0; padding: 0; border: 0; background: transparent; display: flex; align-items: center; gap: 14px; color: #343541; font-size: 12.5px; }
.profile-art { position: relative; z-index: 1; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; color: #f48e1c; }
.profile-art img { width: 100%; height: 100%; display: block; object-fit: contain; }
.profile-total-assets { width: 23px; height: 23px; }
.profile-total-assets svg { width: 20px; height: 20px; }
.profile-asset-balance { position: relative; z-index: 1; display: flex; align-items: center; }
.profile-asset-card .profile-asset-balance > strong { display: block; margin: 0; color: #22232d; font-size: 23px; font-weight: 400; }
.profile-asset-balance button { width: 23px; height: 23px; margin-left: 8px; padding: 0; border: 0; color: #7e88ad; background: transparent; }
.profile-asset-balance svg, .profile-asset-balance img { width: 23px; height: 23px; object-fit: contain; }
.profile-promos { height: 84px; display: grid; grid-template-columns: 1fr 1fr; }
.profile-promo { position: relative; height: 84px; min-width: 0; padding: 0 5px 0 9px; overflow: hidden; border: 0; border-radius: 0; text-align: left; color: #2b2f3b; background: linear-gradient(135deg, #fff7e9, #fff); display: flex; align-items: center; }
.profile-promo:nth-child(2) { background: linear-gradient(135deg, #eef8ff, #fff); }
.profile-promo > span:last-child { position: relative; z-index: 1; min-width: 0; margin-left: 6px; }
.profile-promo strong { display: block; font-size: 17px; }
.profile-promo small { display: block; margin-top: 2px; color: #7e88ad; font-size: 11px; }
.profile-promo-art { width: 54px; height: 64px; }
.profile-promo-art svg { width: 34px; height: 34px; }
.profile-quick-grid { height: 86px; display: grid; grid-template-columns: repeat(4, 1fr); background: white; }
.profile-quick-grid button { min-width: 0; padding: 0; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.profile-quick-art { width: 43px; height: 43px; color: #f48e1c; }
.profile-quick-art svg { width: 25px; height: 25px; }
.profile-quick-grid small { color: #26282e; font-size: 10.5px; }
.security-mark { width: 66px; height: 66px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, #06bce9, #5f7cf6); }
.security-mark svg { width: 34px; height: 34px; }
.profile-menu { margin-top: 10px; padding: 0; border-radius: 0; background: white; overflow: hidden; }
.profile-menu .list-item { position: relative; height: 53px; min-height: 53px; padding: 0 14px; gap: 12px; border-bottom: 0; }
.profile-menu .list-item::after { content: ''; position: absolute; left: 52px; right: 0; bottom: 0; height: 1px; background: var(--line); transform: scaleY(.5); transform-origin: bottom; }
.profile-menu .list-item:last-child::after { display: none; }
.profile-menu .list-title { color: #26282e; font-size: 13.5px; }
.profile-menu .list-item > svg { width: 12px; height: 20px; margin-right: 0; color: var(--hint); }
.profile-menu-art { width: 25px; height: 25px; }
.profile-menu-art svg { width: 19px; height: 19px; }
.menu-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #fff4e8; color: var(--brand); }
.menu-icon svg { width: 18px; height: 18px; }
.logout { width: calc(100% - 40px); height: 50px; margin: 22px 20px 28px; border: 0; border-radius: 12px; color: var(--danger); background: white; font-size: 15px; }

.auth-page { min-height: 100dvh; padding: calc(45px + var(--safe-top)) 20px 30px; color: white; background: radial-gradient(circle at 20% 5%, #1aa9e4, transparent 32%), linear-gradient(150deg, #07162c, #102c4d 55%, #050a13); }
.auth-logo { width: 88px; height: 88px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(145deg, #ffba4b, #ed6c23); box-shadow: 0 12px 28px #0006; font-size: 29px; font-weight: 900; }
.auth-card { margin-top: 30px; padding: 24px; border-radius: 12px; background: #000000b3; }
.auth-card h1 { margin: 0 0 28px; font-size: 20px; font-weight: 500; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { color: #666; font-size: 12px; }
.field input, .field textarea, .field select { width: 100%; height: 48px; border: 1px solid #e2e5eb; border-radius: 8px; padding: 0 14px; outline: none; background: white; color: #222; }
.field textarea { height: 100px; padding: 12px 14px; resize: vertical; }
.auth-card .field input { border: 0; border-radius: 7px; color: white; background: #ffffff25; }
.auth-card .field input::placeholder { color: #ffffff9b; }
.auth-card .primary-button { margin-top: 20px; font-size: 16px; }
.form-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.link-button { padding: 3px; border: 0; background: transparent; color: inherit; }
.primary-button, .secondary-button, .danger-button { width: 100%; min-height: 46px; padding: 0 18px; border: 0; border-radius: 24px; color: white; background: var(--brand); font-weight: 700; }
.secondary-button { color: var(--blue); background: #eef9ff; border: 1px solid #bdeaff; }
.danger-button { color: var(--danger); background: #fff1f0; }
.primary-button:disabled, .secondary-button:disabled { opacity: .48; }
.auth-links { display: flex; justify-content: center; gap: 20px; margin-top: 18px; }

.detail-body { padding: 12px; }
.invite-page { height: 100dvh; min-height: 0; overflow: hidden; padding-bottom: calc(76px + var(--safe-bottom)); background: #fff; }
.invite-page .toolbar { border-bottom: 0; }
.invite-page .toolbar-title { font-size: 19px; }
.invite-page .invite-exit { width: auto; padding: 0 16px; border-radius: 0; font-size: 16px; justify-content: flex-start; }
.invite-content { height: calc(100dvh - 56px - 76px - var(--safe-top) - var(--safe-bottom)); min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 54px; justify-items: center; row-gap: 18px; padding-bottom: 18px; }
.invite-banner { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: top center; }
.invite-banner-empty { width: 100%; height: 100%; }
.invite-now { width: 108px; height: 54px; margin: 0; padding: 0; border: 0; border-radius: 5px; color: #fff; background: linear-gradient(90deg, #ff873b, #ffbc56); font-size: 14px; }
.invite-now:active { filter: brightness(.92); }
.invite-bottom-nav { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; height: calc(76px + var(--safe-bottom)); overflow: hidden; padding-bottom: var(--safe-bottom); display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px 14px 0 0; background: #fff; box-shadow: 0 -3px 10px #00000018; }
.invite-bottom-nav button { border: 0; background: transparent; color: #6d7683; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.invite-bottom-nav button.active { color: #ff8439; }
.invite-bottom-nav button:first-child span { font-size: 29px; line-height: 1; }
.invite-bottom-nav button:last-child span { font-size: 27px; line-height: 1; }
.invite-bottom-nav button small { font-size: 12px; }
.invite-records-page { background: var(--background); }
.invite-records-body { padding: 16px; }
.invite-records-body > h2 { margin: 0; color: var(--text); font-size: 17px; }
.invite-metrics { margin-top: 12px; display: grid; gap: 12px; }
.invite-metrics.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.invite-metrics.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.invite-metric { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.invite-metric small { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.invite-metric strong { display: block; margin-top: 6px; overflow: hidden; color: var(--text); font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.invite-metric strong.primary { color: var(--brand); font-size: 18px; }
.invite-member-panel { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.invite-member-panel > h3 { margin: 0; color: var(--text); font-size: 16px; }
.invite-member-panel > small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.invite-member-list { margin-top: 12px; }
.invite-member-card { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.invite-member-card + .invite-member-card { margin-top: 8px; }
.invite-member-card header { display: flex; align-items: center; gap: 10px; }
.invite-member-card header > strong { min-width: 0; flex: 1; overflow: hidden; color: var(--text); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.invite-ratio { min-width: 0; padding: 7px 14px; border: 0; border-radius: 8px; color: var(--blue); background: #eef9ff; font-size: 12px; font-weight: 700; }
.invite-member-tags { padding-top: 7px; display: flex; align-items: center; gap: 6px; }
.invite-member-tags i { padding: 4px 8px; border-radius: 5px; color: var(--blue); background: #eef9ff; font-size: 11px; font-style: normal; }
.invite-member-tags i.active { color: var(--success); background: #f1faed; }
.invite-member-tags i.valid { color: white; background: var(--brand); }
.invite-member-card p, .invite-member-card b { display: block; margin: 0; padding-top: 8px; }
.invite-member-card p { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 18px; }
.invite-member-card b { color: var(--brand); font-size: 14px; }
.invite-member-empty { padding: 36px 0; color: var(--muted); font-size: 14px; text-align: center; }
.invite-ratio-form { display: grid; gap: 4px; }
.invite-ratio-row { min-height: 42px; padding: 2px 8px; display: grid; grid-template-columns: minmax(52px, 1fr) 64px 70px; align-items: center; gap: 6px; background: #f8fbfd; }
.invite-ratio-row strong { font-size: 12px; }
.invite-ratio-row small { color: var(--muted); font-size: 10px; }
.invite-ratio-row input { width: 70px; height: 32px; padding: 0 4px; border: 1px solid var(--line); border-radius: 5px; background: white; font-size: 13px; }
.invite-ratio-form .primary-button { margin-top: 10px; }
.content-card { padding: 16px; border-radius: 9px; background: white; }
.content-card h1 { margin: 0 0 8px; font-size: 20px; }
.content-card .meta { color: var(--muted); font-size: 12px; }
.invite-link { margin: 0 0 14px; padding: 10px 12px; overflow-wrap: anywhere; border-radius: 8px; background: var(--background); color: var(--blue); font-size: 12px; line-height: 1.5; }
.rich-content { margin-top: 16px; line-height: 1.8; color: #444; white-space: pre-wrap; word-break: break-word; }
.detail-media { width: 100%; margin-top: 14px; display: block; border-radius: 7px; object-fit: contain; background: #f4f5f7; }
.comments { margin-top: 10px; border-radius: 9px; overflow: hidden; background: white; }
.comments h3 { margin: 0; padding: 14px; border-bottom: 1px solid var(--line); }
.comment-compose { padding: 10px 12px; display: flex; gap: 8px; }
.comment-compose input { flex: 1; min-width: 0; height: 38px; border: 1px solid #e1e3e8; border-radius: 19px; padding: 0 13px; }
.comment-compose button { width: 62px; border: 0; border-radius: 19px; background: var(--blue); color: white; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 14px; border-radius: 8px; background: #f7f8fb; }
.stat span { color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin-top: 6px; font-size: 17px; }
.wallet-page { background: #f5f6fa; }
.wallet-balance-card { height: 160px; margin: 16px; border-radius: 16px; color: white; background: var(--blue); box-shadow: 0 4px 8px #00000022; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wallet-balance-card small { color: #ccffffff; font-size: 14px; }
.wallet-balance-card strong { margin-top: 8px; font-size: 36px; }
.user-info-page { background: #f5f6fa; }
.user-info-list { margin-top: 12px; background: white; }
.user-info-row { position: relative; width: 100%; height: 56px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); background: white; display: flex; align-items: center; text-align: left; }
.user-info-row.avatar-row { height: 80px; }
.user-info-row > span:first-child { min-width: 0; flex: 1; color: var(--text); font-size: 15px; }
.user-info-row > strong { max-width: 52%; margin-right: 8px; overflow: hidden; color: var(--muted); font-size: 15px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.user-info-row > strong.hint { color: var(--hint); }
.user-info-row > svg { width: 16px; height: 16px; color: var(--hint); }
.user-info-avatar { width: 56px; height: 56px; margin-right: 8px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; object-fit: cover; }
.user-info-avatar-fallback { color: var(--muted); background: #edf0f5; }
.user-info-avatar-fallback svg { width: 30px; height: 30px; }
.avatar-action-list { display: grid; }
.avatar-action-list button { height: 50px; border: 0; border-bottom: 1px solid var(--line); background: white; font-size: 15px; text-align: left; }
.avatar-action-list button:last-child { border-bottom: 0; }
.avatar-picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.avatar-picker-grid button { aspect-ratio: 1; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 50%; background: #edf0f5; }
.avatar-picker-grid img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ledger-amount { font-size: 16px; font-weight: 700; color: var(--success); }
.ledger-amount.debit { color: var(--danger); }
.ledger-page { background: var(--background); }
.ledger-shell { padding: 16px; }
.ledger-card { padding: 18px; overflow: hidden; border-radius: 16px; background: white; }
.ledger-row { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.ledger-row:last-child { margin-bottom: 0; }
.ledger-row header { display: flex; align-items: center; gap: 12px; }
.ledger-row header strong { min-width: 0; flex: 1; overflow: hidden; color: var(--text); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.ledger-row header b { font-size: 15px; }
.ledger-row p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 15px; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.ledger-row footer { margin-top: 10px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.ledger-row footer time { min-width: 0; flex: 1; }
.ledger-row footer span { flex: 0 0 auto; }
.ledger-row .credit, .today-row .credit, .today-details .credit { color: var(--success); }
.ledger-row .debit, .today-row .debit, .today-details .debit { color: var(--danger); }
.ledger-empty { margin-top: 20px; padding: 28px 0; color: var(--muted); font-size: 13px; text-align: center; }

.vip-page { min-height: 100dvh; background: #f3f3f6; }
.vip-toolbar { position: sticky; top: 0; z-index: 20; height: calc(48px + var(--safe-top)); padding-top: var(--safe-top); display: flex; align-items: center; background: white; }
.vip-toolbar > button:first-child { width: 50px; height: 48px; padding: 12px 13px; border: 0; background: transparent; }
.vip-toolbar > button:first-child svg { width: 24px; height: 24px; }
.vip-toolbar > strong { position: absolute; left: 50%; transform: translateX(-50%); font-size: 19px; font-weight: 400; }
.vip-toolbar > button:last-child { width: auto; height: 48px; margin-left: auto; padding: 0 18px 0 16px; border: 0; color: #333; background: transparent; font-size: 14px; }
.vip-scroll { background: #f3f3f6; }
.vip-hero { position: relative; min-height: 355px; padding: 29px 15px 14px; overflow: hidden; display: flex; flex-direction: column; align-items: center; color: #424653; background: white; }
.vip-reference-background { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.vip-hero > :not(.vip-reference-background) { position: relative; z-index: 1; }
.vip-avatar { width: 68px; height: 68px; padding: 17px; overflow: hidden; border-radius: 50%; color: #8b6745; background: #f4e3c9; display: grid; place-items: center; }
.vip-avatar img { width: calc(100% + 34px); height: calc(100% + 34px); margin: -17px; object-fit: cover; }
.vip-avatar svg { width: 34px; height: 34px; }
.vip-hero > strong { margin-top: 12px; font-size: 14px; }
.vip-progress-legend { margin-top: 14px; display: flex; align-items: center; gap: 26px; font-size: 12px; }
.vip-progress-legend span { display: flex; align-items: center; gap: 5px; }
.vip-progress-legend i { width: 10px; height: 10px; border-radius: 50%; background: #f39a3e; }
.vip-progress-legend span:last-child i { background: #58bc8a; }
.vip-progress-row { width: 100%; margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.vip-progress-row b { flex: 0 0 auto; font-size: 15px; }
.vip-progress-row > span { position: relative; height: 15px; flex: 1; }
.vip-progress-row > span::before, .vip-progress-row > span::after { content: ''; position: absolute; left: 0; right: 0; height: 5px; border-radius: 3px; background: #ffffff45; }
.vip-progress-row > span::before { top: 0; }
.vip-progress-row > span::after { bottom: 0; }
.vip-progress-row i { position: absolute; left: 0; z-index: 1; height: 5px; border-radius: 3px; }
.vip-progress-row .deposit { top: 0; background: #f39a3e; }
.vip-progress-row .bet { bottom: 0; background: #58bc8a; }
.vip-hero > small { margin-top: 14px; font-size: 11px; }
.vip-current-card { position: relative; width: 259px; height: 134px; margin-top: 16px; padding: 0; overflow: hidden; border: 0; border-radius: 12px; color: #f4e5d7; background: transparent; text-align: left; }
.vip-card-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.vip-current-card > span { position: absolute; left: 19px; width: 220px; overflow: hidden; font-size: 10px; line-height: 18px; white-space: nowrap; }
.vip-card-deposit { top: 70px; }
.vip-card-bet { top: 89px; }
.vip-card-retain { top: 107px; color: white; }
.vip-reference-section { margin-top: 10px; padding: 15px 0 5px; background: white; }
.vip-reference-section:first-of-type { margin-top: 0; }
.vip-reference-section h2 { margin: 0; display: flex; align-items: center; justify-content: center; gap: 20px; font-size: 15px; }
.vip-reference-section h2 i { color: #c89b58; font-size: 12px; font-style: normal; }
.vip-privilege-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 1px 1fr; }
.vip-privilege-grid .vip-benefit-row:nth-of-type(3) { grid-column: 1 / 4; }
.vip-split { width: 1px; height: 52px; align-self: center; background: #ececf1; }
.vip-benefit-row { min-height: 72px; padding: 0 14px 0 24px; display: flex; align-items: center; }
.vip-benefit-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; }
.vip-benefit-icon img { width: 34px; height: 34px; object-fit: contain; }
.vip-benefit-row > span:nth-child(2) { min-width: 0; margin-left: 10px; flex: 1; }
.vip-benefit-row strong, .vip-benefit-row small { display: block; }
.vip-benefit-row strong { font-size: 14px; }
.vip-benefit-row small { margin-top: 5px; color: #777; font-size: 11px; }
.vip-benefit-row > button { width: 78px; height: 32px; border: 0; border-radius: 16px; color: white; background: linear-gradient(90deg, #e9bc72, #b9843e); font-size: 13px; }
.vip-welfare { padding-top: 20px; padding-bottom: 14px; }
.vip-welfare h2 { margin-bottom: 10px; }
.vip-welfare .vip-benefit-row { min-height: 58px; }
.vip-banner { padding: 24px 18px; color: white; background: linear-gradient(145deg, #6f4d29, #d8a85c); }
.vip-banner h2 { margin: 0; font-size: 23px; }
.vip-banner p { margin: 8px 0 0; opacity: .84; }
.progress-line { height: 7px; margin-top: 16px; border-radius: 5px; background: #ffffff36; overflow: hidden; }
.progress-line i { display: block; height: 100%; border-radius: inherit; background: #ffe299; }
.tier-row { margin: 10px 12px; padding: 14px; border-radius: 9px; background: white; }
.tier-head { display: flex; justify-content: space-between; align-items: center; gap: 7px; flex-wrap: wrap; }
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.tier-grid strong { display: block; margin-bottom: 3px; color: #555; }
.vip-detail-head strong { font-size: 20px; color: var(--blue); }
.vip-detail-head p { margin: 9px 0 0; color: var(--muted); line-height: 1.6; font-size: 12px; }
.vip-rebate-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.vip-rebate-table > div { min-height: 39px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 12px; }
.vip-rebate-table > div:last-child { border-bottom: 0; }
.vip-rebate-table strong { color: var(--blue); }
.vip-actions { margin: 10px 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vip-actions button { min-height: 68px; padding: 10px 5px; border: 0; border-radius: 9px; background: white; }
.vip-actions strong, .vip-actions small { display: block; }
.vip-actions small { margin-top: 5px; color: var(--muted); }
.benefit-list { overflow: hidden; border-radius: 9px; background: white; }
.benefit-row { min-height: 72px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.benefit-row:last-child { border-bottom: 0; }
.benefit-row span { min-width: 0; }
.benefit-row strong, .benefit-row small { display: block; }
.benefit-row small { margin-top: 5px; color: var(--muted); }
.benefit-row i { color: var(--muted); font-style: normal; font-size: 12px; white-space: nowrap; }
.member-cards { margin-top: 10px; display: grid; gap: 8px; }
.member-card { width: 100%; padding: 13px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--muted); text-align: left; }
.member-card-head { display: flex; align-items: center; justify-content: space-between; color: var(--text); }
.member-card-head i { padding: 3px 8px; border-radius: 10px; color: var(--blue); background: #eaf8ff; font-size: 11px; font-style: normal; }
.member-detail-head { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.member-detail-head strong, .member-detail-head p, .member-detail-head small { display: block; }
.member-detail-head p { margin: 5px 0; color: var(--muted); font-size: 12px; }
.member-detail-head small { color: var(--muted); font-size: 11px; }
.member-status { color: var(--success); }
.agent-page { padding-bottom: calc(68px + var(--safe-bottom)); }
.agent-nav { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; height: calc(60px + var(--safe-bottom)); padding-bottom: var(--safe-bottom); display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: white; }
.agent-nav button { border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.agent-nav button.active { color: var(--brand); font-weight: 700; }
.agent-report-links { margin-top: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.agent-report-links button { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: white; }
.report-table { margin-top: 10px; border-radius: 9px; overflow: hidden; background: white; }
.report-row { min-height: 52px; padding: 8px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.report-row:last-child { border-bottom: 0; }
.report-row strong, .report-row small { display: block; }
.report-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.report-row b.credit { color: var(--success); }
.report-row b.debit { color: #e46b57; }
.bet-history-page { background: var(--background); }
.bet-history-list { padding: 8px; background: var(--background); }
.bet-history-card { margin: 6px 0; padding: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.bet-history-card header { display: flex; align-items: center; gap: 10px; }
.bet-history-card header strong { min-width: 0; flex: 1; color: var(--text); font-size: 14px; }
.bet-history-card header i { padding: 3px 8px; border-radius: 5px; color: var(--muted); background: #f4f4f4; font-size: 11px; font-style: normal; }
.bet-history-card header i.pending { color: var(--brand); background: #fff6e9; }
.bet-history-card header i.win { color: var(--success); background: #f1faed; }
.bet-history-card header i.lose { color: var(--danger); background: #fff1f0; }
.bet-history-meta { margin-top: 8px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.bet-history-meta span { min-width: 0; flex: 1; }
.bet-history-meta time { flex: 0 0 auto; }
.bet-history-card hr { height: 1px; margin: 8px 0; border: 0; background: #eee; }
.bet-history-detail { display: flex; align-items: flex-start; gap: 12px; }
.bet-history-detail > span { min-width: 0; flex: 1; }
.bet-history-detail > span:last-child { flex: 0 0 auto; text-align: right; }
.bet-history-detail small, .bet-history-detail strong, .bet-history-detail b, .bet-history-detail button { display: block; }
.bet-history-detail small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.bet-history-detail > span > small:first-child { margin-top: 0; font-size: 10px; }
.bet-history-detail strong { margin-top: 4px; color: var(--text); font-size: 13px; font-weight: 400; }
.bet-history-detail b { margin-top: 4px; color: var(--brand); font-size: 14px; }
.bet-history-detail b.debit { color: var(--danger); }
.bet-history-detail b.credit { color: var(--brand); }
.bet-history-detail button { margin-top: 4px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; }

.today-page { background: var(--background); }
.today-body { padding: 16px; }
.today-date-button { min-height: 36px; padding: 7px 12px; border: 1px solid #dedfe3; border-radius: 9px; color: var(--muted); background: transparent; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.today-date-button svg { width: 14px; height: 14px; }
.today-card { margin-top: 12px; padding: 6px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.today-row { border-bottom: .5px solid var(--line); }
.today-row:last-child { border-bottom: 0; }
.today-row > button { width: 100%; height: 58px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; text-align: left; }
.today-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; color: var(--brand); }
.today-icon svg { width: 27px; height: 27px; }
.today-row > button > span:nth-child(2) { min-width: 0; flex: 1; margin-left: 12px; color: var(--text); font-size: 14px; }
.today-row > button > strong { color: var(--text); font-size: 16px; }
.today-row > button > svg { width: 18px; height: 18px; margin-left: 8px; transition: transform .16s; }
.today-row:has(.today-details) > button > svg { transform: rotate(90deg); }
.today-details { padding: 8px 12px; background: var(--background); }
.today-details > div { min-height: 34px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.today-details > div:last-child { border-bottom: 0; }
.today-details span { min-width: 0; flex: 1; color: var(--muted); font-size: 13px; }
.today-details strong { flex: 0 0 auto; font-size: 13px; }
.today-hint { margin: 14px 0 0; color: var(--hint); font-size: 12px; line-height: 18px; text-align: center; }

.room-list { padding: 12px; display: grid; gap: 10px; }
.room-card { width: 100%; min-height: 82px; padding: 14px; border: 0; border-radius: 9px; background: white; display: flex; align-items: center; gap: 13px; text-align: left; }
.room-logo { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg, #00c4f4, #1587d1); color: white; font-size: 18px; font-weight: 900; }
.room-info { flex: 1; }
.room-info strong { font-size: 16px; }
.room-info small { display: block; color: var(--muted); margin-top: 6px; }
.toolbar-actions { display: flex; align-items: center; justify-content: flex-end; }
.toolbar.blue .toolbar-actions { gap: 12px; }
.toolbar.blue .toolbar-actions .icon-button { width: 24px; height: 24px; border-radius: 0; }
.toolbar.blue .toolbar-actions .icon-button svg { width: 24px; height: 24px; }
.room-member-preview { min-height: 48px; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; overflow: hidden; }
.room-member-preview .avatar { width: 38px; height: 38px; flex: 0 0 38px; }
.room-setting-link { width: 100%; margin: 0; padding-inline: 0; border-top: 1px solid var(--line); }
.room-setting-menu { margin-top: 10px; overflow: hidden; border-radius: 9px; }
.period-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.period-buttons button { height: 38px; border: 1px solid #dfe2e8; border-radius: 7px; background: white; color: var(--muted); }
.period-buttons button.active { border-color: var(--blue); color: white; background: var(--blue); }
.segment { padding: 3px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 9px; background: #eef0f4; }
.segment button { height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.segment button.active { color: var(--blue); background: white; box-shadow: 0 2px 8px #3c496418; font-weight: 700; }
.date-filter { margin: 10px 0; padding: 10px; display: flex; align-items: end; gap: 6px; border-radius: 9px; background: white; }
.date-filter label { min-width: 0; flex: 1; color: var(--muted); font-size: 11px; }
.date-filter input { width: 100%; height: 34px; margin-top: 3px; padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.date-filter button { height: 34px; padding: 0 10px; border: 0; border-radius: 6px; color: white; background: var(--blue); }
.draw-history-list { display: grid; gap: 8px; }
.draw-history-card { padding: 13px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.draw-history-card div:first-child small, .draw-history-card > small { display: block; margin-top: 4px; color: var(--muted); }
.draw-balls { display: flex; align-items: center; gap: 4px; }
.trend-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: white; }
.trend-row { min-width: 350px; min-height: 44px; display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); align-items: center; text-align: center; border-top: 1px solid var(--line); }
.trend-row.head { border-top: 0; color: var(--muted); background: #f2f4f7; font-size: 12px; font-weight: 700; }
.trend-row .ball { margin: auto; }
.omission-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.omission-grid > div { min-height: 78px; padding: 9px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); font-size: 10px; }
.omission-grid .ball { grid-row: 1 / span 3; width: 31px; height: 31px; }
.roadmap-grid { min-height: 180px; overflow: auto; display: grid; grid-auto-columns: 30px; grid-auto-rows: 30px; gap: 4px; }
.roadmap-grid i { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: white; font-size: 10px; font-style: normal; }
.roadmap-grid i.blue { color: #5f7cf6; }
.roadmap-grid i.red { color: #e56d6d; }

.view.detail-open:has(.bet-page:not(.miao-page)) { padding-bottom: 0; }
.bet-page:not(.miao-page) { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #f5f6fa; }
.bet-page:not(.miao-page) > :not(.room-content) { flex-shrink: 0; }
.room-content { flex: 1; min-height: 0; overflow: hidden; }
.room-bottom { padding-bottom: var(--safe-bottom); background: #ecebf5; }
.bet-page .room-tools { position: static; width: 100%; height: 60px; max-width: none; transform: none; padding-bottom: 0; }
.bet-page .room-chat-compose { position: static; width: 100%; max-width: none; transform: none; }
.bet-page .room-more-panel { position: static; box-shadow: none; }
.room-bottom button:active:not(:disabled) { background-color: #dce2ec; }
.issue-top { height: 64px; display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; background: white; text-align: center; }
.issue-top .divider { width: 1px; height: 32px; background: #e5e5e5; }
.issue-label { font-size: 12px; }
.timer-pill { display: inline-block; min-width: 64px; margin-top: 4px; padding: 4px 12px; border-radius: 6px; color: white; background: #565873; font-size: 14px; font-weight: 700; }
.issue-balance { margin-top: 4px; color: #ff5a5f; font-size: 16px; font-weight: 700; }
.close-notice { padding: 10px 14px; display: grid; gap: 3px; color: #8d5a13; background: #fff6df; border-bottom: 1px solid #f2dfb4; font-size: 11px; }
.close-notice strong { font-size: 12px; }
.miao-page { min-height: 100dvh; padding-bottom: calc(64px + var(--safe-bottom)); color: #fff; background: #1e1e2e; }
.miao-page .toolbar { background: var(--blue); border: 0; }
.miao-page .empty { color: #a0a0b0; }
.miao-page .empty-symbol { background: #2a2a3e; color: #a0a0b0; }
.miao-hero { height: 140px; display: grid; place-items: center; color: white; background: #2a2a3e; overflow: hidden; }
.miao-hero strong { font-size: 18px; font-weight: 700; }
.miao-hero .miao-banner { width: 100%; height: 140px; display: block; object-fit: cover; border-radius: 0; }
.miao-result { min-height: 68px; margin: 6px 8px 2px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 8px; background: #2a2a3e; color: #fff; }
.miao-result-main { min-width: 0; flex: 1; display: grid; align-content: center; gap: 3px; }
.miao-result-main > span, .miao-result-main > small { color: #a0a0b0; font-size: 12px; }
.miao-result-main > small { font-size: 10px; }
.miao-result-balance { flex: 0 0 auto; min-width: 62px; display: grid; justify-items: end; gap: 4px; }
.miao-result-balance span { display: inline-flex; align-items: center; gap: 3px; color: #a0a0b0; font-size: 12px; }
.miao-result-balance svg { width: 14px; height: 14px; }
.miao-result-balance strong { color: #ffd700; font-size: 16px; font-weight: 700; }
.miao-result .draw-balls { gap: 4px; }
.miao-result .draw-balls > b { color: #a0a0b0; font-size: 15px; font-weight: 400; }
.miao-result .ball { width: 28px; height: 28px; font-size: 14px; }
.miao-result .draw-summary { color: #ff4d4f; font-size: 10px; font-weight: 400; }
.miao-result .hash-line { max-width: 100%; overflow: hidden; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.miao-result .link-button { color: var(--blue); font-size: 11px; font-weight: 700; }
.miao-groups { margin: 0 8px 6px; padding: 3px 0; background: #1e1e2e; border: 0; }
.miao-groups button { color: #a0a0b0; background: #2a2a3e; }
.miao-groups button.active { color: #fff; background: var(--blue); }
.miao-options { margin: 0 8px 2px; padding: 0; background: transparent; }
.miao-options .option-grid { grid-template-columns: repeat(4, 1fr); gap: 2px; }
.miao-options .bet-option.miao-option { min-height: 62px; margin: 1px; padding: 5px 3px; border: 0; border-radius: 6px; color: #fff; background: #2a2a3e; }
.miao-option.miao-wide { grid-column: span 2; }
.miao-options .miao-option strong { color: #fff; font-size: 14px; }
.miao-options .miao-option small { margin-top: 1px; color: #a0a0b0; font-size: 10px; }
.miao-option em { display: block; margin-top: 1px; color: #ffd700; font-size: 10px; font-style: normal; }
.miao-options .bet-option.miao-option.selected { border: 2px dashed var(--blue); color: #fff; background: #3d3d5e; }
.miao-chips { overflow-x: auto; display: flex; gap: 8px; padding: 2px 10px 4px; background: #1e1e2e; scrollbar-width: none; }
.miao-chips::-webkit-scrollbar { display: none; }
.miao-chip { flex: 0 0 auto; min-width: 52px; height: 38px; padding: 0 12px; border: 0; border-radius: 8px; color: #fff; background: #2a2a3e; font-size: 12px; }
.miao-chip.active { color: #fff; background: #3d3d5e; outline: 1px solid var(--blue); }
.miao-selected { margin: 0 8px 4px; padding: 8px 10px; border-radius: 8px; color: #fff; background: #2a2a3e; }
.miao-page .miao-selected { display: none; }
.miao-selected > div:not(.current-orders-head) { display: flex; justify-content: space-between; padding-top: 6px; color: #a0a0b0; font-size: 12px; }
.miao-selected strong { color: #fff; }
.miao-selected .remove-selected { color: #a0a0b0; background: transparent; }
.miao-repeat-actions { min-height: 30px; padding: 0 10px; display: flex; align-items: center; gap: 6px; background: #1e1e2e; border-bottom: 0; }
.miao-repeat-actions span { margin-right: auto; color: #a0a0b0; font-size: 10px; }
.miao-repeat-actions button { flex: 1 1 0; min-width: 0; height: 30px; padding: 0 3px; border: 0; border-radius: 8px; color: #fff; background: #2a2a3e; font-size: 10px; }
.miao-bottom { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(64px + var(--safe-bottom)); padding: 0 16px var(--safe-bottom); display: flex; align-items: center; gap: 6px; border-top: 0; background: #2a2a3e; }
.miao-bottom > span { min-width: 0; flex: 1; color: #fff; font-size: 12px; text-align: center; white-space: nowrap; }
.miao-bottom button { min-width: 60px; height: 36px; padding: 0; border: 0; border-radius: 4px; color: #fff; background: var(--blue); font-size: 10px; }
.miao-bottom .miao-play-switch { min-width: 88px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--blue); background: transparent; font-size: 12px; }
.miao-bottom .miao-play-switch svg { width: 14px; height: 14px; }
.miao-bottom .miao-clear { min-width: 60px; }
.miao-bottom .miao-draw { min-width: 86px; margin-left: 0; }
.miao-result-dialog p { margin: 0; display: grid; gap: 8px; color: var(--muted); line-height: 1.4; }
.miao-result-dialog .button-pair { margin-top: 14px; }
.toolbar-link { border: 0; color: white; background: transparent; font-size: 13px; }
.draw-row { height: 44px; min-height: 44px; padding: 0 10px; display: flex; align-items: center; gap: 0; background: #f8f9fa; }
.draw-row .issue-no { margin-right: 3px; color: var(--muted); font-size: 11px; }
.draw-row .issue-no { margin-right: 6px; }
.draw-row .ball { width: 18px; height: 18px; font-size: 10px; }
.draw-row > b { margin-inline: 1px; color: var(--muted); font-size: 10px; font-weight: 400; }
.draw-row .draw-summary { margin-left: 6px; font-size: 12px; font-weight: 700; }
.draw-toggle { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; border: 0; padding: 0; background: transparent; }
.draw-toggle > b { margin-inline: 1px; color: var(--muted); font-size: 10px; font-weight: 400; }
.draw-arrow { width: 14px; height: 14px; padding: 0; border: 0; background: transparent; color: var(--hint); }
.draw-arrow svg { width: 14px; height: 14px; }
.draw-arrow.expanded, .orders-arrow.expanded { transform: rotate(180deg); }
.draw-verify { margin-right: 8px; padding: 0 4px; border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 700; }
.room-recent-history { padding: 4px 16px 8px; background: white; max-height: 30dvh; overflow: auto; }
.room-history-row { display: grid; grid-template-columns: 1.1fr 1fr 1.55fr 30px; gap: 8px; align-items: center; min-height: 30px; color: var(--muted); font-size: 11px; }
.room-history-row > span:nth-child(2) { text-align: center; }
.room-history-row .draw-balls { gap: 2px; justify-content: end; }
.room-history-row .ball { width: 16px; height: 16px; font-size: 9px; }
.room-history-row .link-button { color: var(--blue); font-size: 11px; }
.history-heading { margin-top: 4px; padding-bottom: 4px; min-height: 22px; }
.history-more { width: 100%; padding: 10px 0 6px; border: 0; background: white; color: var(--blue); font-size: 13px; font-weight: 700; }
.recent-history, .room-feed { border-bottom: 1px solid var(--line); background: white; }
.recent-history summary, .room-feed summary { min-height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); cursor: pointer; list-style: none; }
.recent-history summary span, .room-feed summary span { font-size: 11px; }
.recent-history > div { min-height: 39px; padding: 5px 12px; display: grid; grid-template-columns: 1fr auto 48px; align-items: center; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.recent-history .draw-balls { gap: 3px; }
.recent-history .ball { width: 20px; height: 20px; font-size: 9px; }
.room-feed > div { min-height: 49px; padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.room-feed > div span, .room-feed > div small { display: block; }
.room-feed > div small { margin-top: 4px; color: var(--muted); }
.room-feed > div button { padding: 5px 12px; border: 1px solid var(--blue); border-radius: 15px; color: var(--blue); background: white; }
.room-tools { position: fixed; z-index: 31; left: 0; right: 0; bottom: 0; height: calc(60px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 12px var(--safe-bottom); border-top: 0; border-bottom: 0; background: #ecebf5; }
.room-tools button { border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; }
.room-tools button svg { width: 18px; height: 18px; }
.room-tools button.active { color: var(--blue); font-weight: 700; border-radius: 14px; background: white; }
.room-tools button.active svg { color: var(--blue); }
.room-chat-panel { height: 100%; overflow-y: auto; background: #ecebf5; }
.room-chat-messages { min-height: 100%; padding: 10px 12px 8px; }
.room-chat-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.room-chat-row .avatar { width: 34px; height: 34px; flex: 0 0 34px; }
.room-chat-row > div { max-width: 82%; }
.room-chat-row small { display: block; margin: 0; color: var(--muted); font-size: 11px; }
.room-chat-bubble { padding: 10px 16px 12px; border-radius: 8px; background: white; color: var(--text); font-size: 14px; line-height: 1.3; word-break: break-word; }
.room-chat-bubble.followable { display: block; width: 100%; border: 0; text-align: left; cursor: pointer; font: inherit; }
.room-chat-bubble.followable:active { background: #edf4ff; }
.room-chat-system { margin: 4px auto 12px; width: fit-content; padding: 5px 10px; border-radius: 12px; color: var(--muted); background: #dfe3ee; font-size: 10px; }
.room-chat-empty { padding: 42px 14px; text-align: center; color: var(--muted); font-size: 12px; }
.room-chat-hint { margin: 0; padding: 0 14px 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.room-more-panel { position: fixed; z-index: 30; left: 0; right: 0; bottom: calc(60px + var(--safe-bottom)); padding: 20px 0 15px; background: white; box-shadow: 0 -2px 8px #0000000b; }
.room-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 66px); }
.room-more-grid button { min-height: 66px; padding: 0 2px 16px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; border: 0; background: transparent; color: #333; font-size: 12px; }
.room-more-service { grid-column: 1; grid-row: 1; }
.room-more-trend { grid-column: 4; grid-row: 1; }
.room-more-roadmap { grid-column: 1; grid-row: 2; }
.room-more-omission { grid-column: 2; grid-row: 2; }
.room-more-desk { grid-column: 3; grid-row: 2; }
.room-more-fast { grid-column: 4; grid-row: 2; }
.room-more-grid button svg { width: 28px; height: 28px; color: #333; }
.room-more-service svg { color: #f59a23; }
.room-more-desk svg { color: #4d96ff; }
.room-more-fast svg { color: #ff9f1a; }
.ball { width: 23px; height: 23px; border-radius: 50%; display: inline-grid; place-items: center; color: white; background: var(--blue); font-size: 11px; font-weight: 700; font-style: normal; }
.ball.sum { background: #e75c6f; }
.draw-summary { margin-left: 7px; font-size: 12px; font-weight: 400; }
.scratch-card { height: 118px; padding: 8px 10px; display: flex; align-items: stretch; gap: 8px; background: white; }
.scratch-current, .scratch-result { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.scratch-current { flex: 1; }
.scratch-result { flex: 1.2; }
.scratch-current { gap: 8px; text-align: center; }
.scratch-current span, .scratch-result small { color: var(--text); font-size: 11px; }
.scratch-current strong { min-width: 86px; padding: 8px 20px; border-radius: 6px; color: white; background: #565873; font-size: 18px; }
.scratch-current .link-button { color: var(--blue); font-size: 12px; font-weight: 700; }
.scratch-result { gap: 8px; }
.scratch-result-head { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.scratch-result-head .link-button { color: var(--blue); font-size: 11px; font-weight: 700; }
.scratch-result-stage { position: relative; width: 100%; height: 56px; }
.scratch-balls { display: flex; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 0 8px; border-radius: 6px; background: #fff; }
.scratch-balls .ball { width: 22px; height: 22px; font-size: 10px; }
.scratch-balls > b { color: var(--muted); font-size: 10px; font-weight: 400; }
.scratch-balls .draw-summary { margin-left: 6px; color: var(--text); font-size: 12px; }
.scratch-mask { position: absolute; inset: 0; width: 100%; height: 56px; border-radius: 6px; touch-action: none; }
.current-orders { padding: 11px 14px; background: white; border-bottom: 1px solid var(--line); }
.current-orders-head { display: flex; justify-content: space-between; color: #777; }
.current-order-chip { margin-top: 8px; padding: 7px 9px; border-radius: 6px; background: #f0f2f7; display: flex; justify-content: space-between; }
.live-orders { padding: 0; border-bottom: 1px solid var(--line); background: white; }
.live-orders .current-orders-head { align-items: center; gap: 8px; }
.live-orders .current-orders-head { width: 100%; height: 44px; padding: 0 16px; border: 0; background: white; font-size: 14px; color: var(--muted); }
.live-orders .current-orders-head span { margin-left: auto; font-size: 12px; }
.orders-arrow { display: flex; }
.orders-arrow svg { width: 18px; height: 18px; color: var(--hint); }
.live-orders-list { max-height: 25dvh; overflow: auto; }
.live-orders-total { height: 38px; padding: 0 16px; display: flex; align-items: center; justify-content: end; background: #f7f8fb; font-size: 13px; font-weight: 700; }
.live-order-row { height: 44px; margin: 0; padding: 0 12px 0 16px; display: flex; align-items: center; border: 1px solid #eef0f4; background: white; }
.live-order-row > span { padding: 3px 9px; border-radius: 4px; color: white; background: #27bceb; font-size: 12px; }
.live-order-row > small { color: var(--muted); }
.live-order-row > strong { flex: 1; text-align: right; color: #e46b57; font-size: 13px; font-weight: 400; }
.live-order-row > button { width: 28px; height: 28px; padding: 0; margin-left: 10px; border: 0; border-radius: 50%; color: white; background: #c9cdd7; font-size: 22px; line-height: 28px; }
.live-order-row > button:disabled { opacity: .45; }
.bet-options { padding: 12px 10px 235px; }
.odds-group { margin-bottom: 10px; padding: 12px; border-radius: 8px; background: white; }
.odds-title { margin-bottom: 10px; font-weight: 700; }
.option-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bet-option { min-height: 58px; padding: 6px 3px; border: 1px solid #eceef3; border-radius: 7px; background: white; text-align: center; }
.bet-option.wide { grid-column: span 2; }
.bet-option strong { display: block; font-size: 13px; }
.bet-option small { display: block; margin-top: 1px; color: var(--brand); font-size: 10px; }
.bet-option em { display: block; margin-top: 2px; color: #9ba0ac; font-size: 9px; font-style: normal; }
.bet-option-stats { width: 100%; margin-top: 3px; padding: 0 6px; display: flex; align-items: center; justify-content: space-between; color: var(--hint); }
.bet-option-stats > span { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.bet-option-stats svg { width: 8px; height: 8px; color: var(--hint); stroke-width: 1.5; }
.bet-option-stats small { margin: 0; color: var(--hint); font-size: 9px; line-height: 10px; }
.bet-option.selected .bet-option-stats, .bet-option.selected .bet-option-stats svg, .bet-option.selected .bet-option-stats small { color: white; }
.bet-option.selected { border-color: var(--blue); color: var(--blue); background: #effaff; }
.desk-panel { height: 100%; min-height: 0; display: flex; flex-direction: column; background: white; box-shadow: 0 0 8px #00000018; }
.desk-header { height: 48px; flex: 0 0 48px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; background: white; }
.desk-collapse, .desk-guide { height: 48px; padding: 0; display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--blue); font-size: 14px; }
.desk-collapse svg { width: 12px; height: 12px; transform: rotate(90deg); }
.desk-guide { color: var(--text); font-size: 13px; }
.desk-guide svg { width: 16px; height: 16px; color: var(--muted); }
.desk-tabs { height: 36px; padding: 3px; display: flex; align-items: stretch; background: #f2f3f7; }
.desk-tabs button { min-width: 84px; padding: 0 20px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.desk-tabs button.active { color: var(--blue); background: white; font-weight: 700; }
.desk-options { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 4px; background: #f5f6fa; }
.desk-options .odds-group { margin: 0; padding: 0; border-radius: 0; background: transparent; }
.desk-options .option-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-content: start; }
.desk-options .bet-option { min-height: 58px; margin: 1.5px; padding: 6px 0; border-radius: 4px; border-color: var(--line); }
.desk-options .bet-option.selected { border-color: var(--blue); color: white; background: var(--blue); }
.desk-options .bet-option.selected small { color: white; }
.desk-options .bet-option.selected .bet-option-stats svg { color: var(--hint); }
.desk-options .bet-option:disabled { opacity: .55; }
.desk-options .bet-option:active:not(:disabled) { filter: brightness(.93); }
.desk-options .bet-option strong { font-size: 13px; }
.desk-options .bet-option > small { color: var(--blue); font-size: 10px; }
.desk-options .bet-option.selected > small { color: white; }
.desk-options .bet-option-stats small { font-size: 9px; }
.desk-options .bet-option em { font-size: 9px; }
.desk-chips { height: 50px; flex: 0 0 50px; display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 0 12px; background: #f8f9fa; scrollbar-width: none; }
.desk-chips::-webkit-scrollbar { display: none; }
.desk-chip { width: 64px; height: 36px; flex: 0 0 64px; border: 1px solid var(--blue); border-radius: 4px; color: var(--blue); background: white; font-size: 14px; }
.desk-chip.active { color: white; background: var(--blue); }
.desk-submit { height: 64px; flex: 0 0 64px; padding: 0 16px; display: flex; align-items: center; gap: 10px; background: white; }
.desk-submit .submit-summary { flex: 1; color: var(--text); font-size: 14px; }
.desk-clear, .desk-submit-button { height: 44px; border: 0; border-radius: 6px; font-size: 14px; }
.desk-clear { width: 84px; color: var(--text); background: #f0f0f0; }
.desk-submit-button { width: 110px; color: white; background: var(--blue); }
.desk-submit-button:disabled { opacity: .5; font-size: 12px; }
.desk-chip:active, .desk-submit button:active:not(:disabled) { filter: brightness(.93); }
.bet-composer { position: fixed; z-index: 30; left: 0; right: 0; bottom: calc(60px + var(--safe-bottom)); padding: 9px 10px 10px; border-top: 1px solid #e5e5e8; background: white; }
.bet-page:not(:has(.room-tools)) .bet-composer { bottom: 0; padding-bottom: calc(10px + var(--safe-bottom)); }
.stake-row { display: flex; gap: 7px; }
.stake-row input { flex: 1; min-width: 0; height: 42px; border: 1px solid #dfe2e8; border-radius: 21px; padding: 0 14px; }
.stake-preset { width: 47px; border: 1px solid #e1e4e9; border-radius: 21px; background: #f7f8fa; }
.submit-row { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.submit-summary { flex: 1; color: #666; font-size: 14px; }
.submit-bet { min-width: 118px; height: 42px; border: 0; border-radius: 21px; color: white; background: var(--blue); font-weight: 700; }
.order-confirm-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; padding: 10px; border-radius: 8px; background: #f5f7fb; color: var(--muted); font-size: 12px; }
.order-confirm-meta strong { color: var(--text); text-align: right; }
.order-confirm-meta .amount { color: #e46b57; font-size: 16px; }
.order-confirm-list { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.order-confirm-row { min-height: 48px; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.order-confirm-row:last-child { border-bottom: 0; }
.order-confirm-row strong, .order-confirm-row small { display: block; }
.order-confirm-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.order-confirm-row b { color: #e46b57; }

.chat-page { min-height: 100dvh; background: #f2f3f8; }
.messages { padding: 14px 12px 92px; }
.messages.with-quick-replies { padding-bottom: 142px; }
.message { margin-bottom: 14px; display: flex; align-items: flex-start; gap: 8px; }
.message.mine { flex-direction: row-reverse; }
.message .avatar { width: 36px; height: 36px; }
.bubble { max-width: 74%; padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: white; line-height: 1.5; word-break: break-word; }
.mine .bubble { color: white; background: var(--blue); border-radius: 14px 4px 14px 14px; }
.bubble img { display: block; max-width: 100%; border-radius: 6px; }
.chat-compose { position: fixed; z-index: 30; left: 0; right: 0; bottom: var(--safe-bottom); min-height: 64px; padding: 9px 10px; display: flex; align-items: center; gap: 8px; border-top: 1px solid #e4e4e6; background: white; }
.room-chat-compose { bottom: calc(60px + var(--safe-bottom)); min-height: 62px; padding: 10px 12px; gap: 10px; background: #ecebf5; }
.chat-image-button { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid #dfe2e8; border-radius: 50%; color: var(--blue); font-size: 24px; line-height: 1; cursor: pointer; }
.chat-compose input { flex: 1; min-width: 0; height: 42px; border: 0; border-radius: 22px; padding: 0 15px; background: #f5f6f8; }
.chat-compose button { width: 62px; height: 42px; border: 0; border-radius: 21px; color: white; background: var(--blue); }
.support-compose { min-height: 60px; padding: 8px; gap: 0; }
.support-compose input { height: 44px; margin-left: 0; border-radius: 7px; padding: 0 14px; font-size: 15px; }
.support-compose > button:last-child { width: auto; min-width: 58px; height: 44px; margin-left: 8px; border-radius: 5px; }
.chat-emoji-button { width: 44px !important; min-width: 44px; height: 44px !important; padding: 0; border-radius: 0 !important; color: inherit !important; background: transparent !important; font-size: 24px; }
.support-compose .chat-image-button { width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 0; color: var(--text); }
.support-compose .chat-image-button svg { width: 24px; height: 24px; }
.quick-reply-panel { position: fixed; z-index: 31; left: 0; right: 0; bottom: calc(60px + var(--safe-bottom)); height: 50px; padding: 8px 10px; overflow-x: auto; display: flex; align-items: center; gap: 8px; background: var(--canvas); scrollbar-width: none; }
.quick-reply-panel::-webkit-scrollbar, .emoji-panel::-webkit-scrollbar { display: none; }
.quick-reply-panel button { flex: 0 0 auto; height: 34px; padding: 0 15px; border: 1px solid var(--brand); border-radius: 17px; color: var(--brand); background: white; font-size: 13px; }
.emoji-panel { position: fixed; z-index: 32; left: 0; right: 0; bottom: calc(60px + var(--safe-bottom)); height: 52px; padding: 0 10px; overflow-x: auto; display: flex; align-items: center; background: white; }
.emoji-panel button { width: 48px; height: 52px; flex: 0 0 48px; padding: 0; border: 0; background: transparent; font-size: 25px; }
.room-chat-compose input { padding: 0 14px; border: 1px solid #e0e0e0; border-radius: 16px; background: white; font-size: 14px; }
.room-chat-compose button { width: 72px; flex: 0 0 72px; font-size: 14px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding: 20px; display: grid; place-items: center; background: #0007; }
.modal { width: min(100%, 420px); max-height: min(85dvh, 720px); overflow: auto; border-radius: 14px; background: white; box-shadow: 0 20px 60px #0004; }
.modal-header { position: sticky; top: 0; z-index: 2; height: 54px; padding: 0 14px 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: white; font-size: 17px; font-weight: 700; }
.modal-body { padding: 16px; }
.modal-actions { padding: 0 16px 16px; display: flex; gap: 9px; }
.modal-actions button { flex: 1; }
.modal-subtitle { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.game-selection-backdrop { padding: 0; place-items: end stretch; }
.game-selection-modal { width: 100%; max-width: none; height: 55dvh; max-height: none; border-radius: 20px 20px 0 0; box-shadow: 0 -4px 18px #0002; }
.game-selection-modal .modal-header { height: 50px; padding: 4px 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 400; }
.game-selection-modal .modal-header .icon-button { width: 22px; height: 22px; color: var(--muted); }
.game-selection-modal .modal-header .icon-button svg { width: 22px; height: 22px; }
.game-selection-modal .modal-body { padding: 0 0 4px; }
.game-selection-modal .modal-subtitle { margin: 4px 0 0; padding: 0 14px; color: var(--muted); font-size: 11px; line-height: 15px; }
.fast-bet-backdrop { padding: 0; place-items: end center; background: #0005; }
.fast-bet-sheet { width: 100%; max-width: 520px; max-height: none; overflow: hidden; border-radius: 0; background: #dad9e6; padding: 6px 0 calc(8px + var(--safe-bottom)); }
.fast-input-wrap { position: relative; height: 38px; margin: 0 8px; }
.fast-input { width: 100%; height: 38px; padding: 0 44px 0 14px; border: 0; border-radius: 21px; color: var(--text); background: #f7f7f7; font-size: 14px; outline: none; }
.fast-input::placeholder { color: var(--muted); }
.fast-input.empty { color: var(--muted); }
.fast-input-clear { position: absolute; top: 7px; right: 10px; width: 24px; height: 24px; padding: 5px; border: 0; border-radius: 50%; color: white; background: #b6b6c0; display: grid; place-items: center; }
.fast-input-clear svg { width: 14px; height: 14px; stroke-width: 2; }
.fast-top-row { height: 46px; margin-top: 6px; padding: 0 6px; display: flex; align-items: center; }
.fast-scroll { width: 24px; height: 24px; flex: 0 0 24px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.fast-top-scroll { min-width: 0; flex: 1; height: 46px; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.fast-top-scroll::-webkit-scrollbar { display: none; }
.fast-top-empty { width: 100%; color: var(--muted); font-size: 12px; text-align: center; }
.fast-top-key { width: 46px; height: 46px; flex: 0 0 46px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #cfcfdb; border-radius: 4px; background: #f8f8fb; }
.fast-top-key.active { border-color: var(--blue); background: #e8f7ff; }
.fast-top-key strong { color: var(--blue); font-size: 15px; line-height: 18px; }
.fast-top-key small { color: var(--muted); font-size: 7px; line-height: 10px; }
.fast-keyboard { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 2px 4px 0; }
.fast-key { min-width: 0; height: 46px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #cfcfdb; border-radius: 4px; color: var(--text); background: #f8f8fb; }
.fast-key:disabled { opacity: .45; }
.fast-key strong { font-size: 12px; line-height: 17px; font-weight: 400; }
.fast-key small { color: var(--muted); font-size: 8px; line-height: 11px; }
.fast-key[data-action="fast-digit"] strong { color: var(--blue); font-size: 16px; font-weight: 700; }
.fast-key.special { border-color: #c9c8d7; background: #e1e1ea; }
.fast-key.confirm { border-color: #54b3ff; color: white; background: #54b3ff; }
.fast-key.confirm strong { font-weight: 700; }
.fast-key svg { width: 22px; height: 22px; }
.fast-key:active:not(:disabled), .fast-top-key:active:not(:disabled) { filter: brightness(.9); }
.selection-list { margin: 4px 0 2px; display: grid; }
.selection-row { width: 100%; height: 46px; padding: 0 8px; display: flex; align-items: center; border: 0; color: var(--text); background: white; text-align: left; }
.selection-game-icon { width: 32px; height: 32px; flex: 0 0 32px; overflow: hidden; border-radius: 50%; display: grid; place-items: center; color: white; background: linear-gradient(45deg, #4fc3f7, #00aeef); }
.selection-game-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.selection-game-icon svg { width: 22px; height: 22px; }
.selection-game-icon b { font-size: 13px; }
.selection-row > strong { min-width: 0; flex: 1; margin-left: 6px; overflow: hidden; font-size: 13px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.selection-online { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.selection-online i { color: var(--brand); font-style: normal; }
.guide-copy { color: var(--muted); font-size: 12px; line-height: 1.75; }
.guide-copy p { margin: 0 0 10px; }
.guide-copy p:last-child { margin-bottom: 0; }
.guide-copy strong { color: var(--text); }
.guide-copy code { padding: 2px 4px; border-radius: 4px; color: var(--blue); background: #eef5ff; }
.private-key { margin: 12px 0; padding: 12px; border-radius: 7px; background: #fff7e8; color: #8b5c12; word-break: break-all; user-select: all; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(90px + var(--safe-bottom)); max-width: calc(100% - 42px); padding: 10px 15px; border-radius: 20px; color: white; background: #222d; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; transition: .2s; text-align: center; font-size: 13px; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 560px) {
  body { background: #e9edf3; }
  .app-shell, .bottom-nav, .support-fab, .bet-composer, .chat-compose, .announcement-composer, .agent-nav, .room-tools, .miao-bottom, .invite-bottom-nav, .quick-reply-panel, .emoji-panel { max-width: 520px; }
  .app-shell { margin: 0 auto; box-shadow: 0 0 35px #30425a18; }
  .bottom-nav, .bet-composer, .chat-compose, .announcement-composer, .agent-nav, .room-tools, .miao-bottom, .invite-bottom-nav, .quick-reply-panel, .emoji-panel { left: 50%; right: auto; width: 520px; transform: translateX(-50%); }
  .support-fab { right: calc(50% - 242px); }
}

@media (max-width: 350px) {
  .shortcuts { gap: 4px; }
  .account-strip { padding-inline: 10px; }
  .game-grid { gap: 8px 6px; }
  .option-grid { grid-template-columns: repeat(3, 1fr); }
}
