    /* ========== 全局重置与基础 ========== */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
    body {
        background: #f2f4f7;
        font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Segoe UI, Roboto, Helvetica, Arial, sans-serif;
        color: #222;
        -webkit-tap-highlight-color: transparent;
    }
    input, textarea, select {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }

    /* ========== 主容器 Flex 布局（底部固定方案） ========== */
    .c28-container {
        max-width: 600px;
        margin: 0 auto;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #e8eaed;
        overflow: hidden;
        position: relative;
    }

    /* ========== 顶部栏 ========== */
    .topbar {
        height: 54px;
        background: -webkit-linear-gradient(left, #01d1ff, #0aabff);
        color: #fff;
        display: flex;
        align-items: center;
        padding: 0 12px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    }
    .topbar .left, .topbar .right {
        width: 72px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .topbar .left { justify-content: flex-start; }
    .topbar .right { justify-content: flex-end; }
    .topbar .title {
        flex: 1;
        text-align: center;
        font-size: 17px;
        font-weight: 500;
    }
    .tb-ico {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        background: rgba(255,255,255,0.15);
        cursor: pointer;
        user-select: none;
    }
    .tb-ico svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .tb-ico:active { opacity: .75; }
    .tb-back { font-size: 22px; transform: translateY(-1px); }
    .tb-sun { font-size: 18px; cursor: pointer; }
    .tb-sun img {
        height: 15px;
        display: block;
        width: auto;
        margin-right: .37333rem;
    }
    .tb-menu { font-size: 20px; }

    /* ========== 状态栏 ========== */
    .statusline {
        background: #fff;
        border-bottom: 1px solid #e9edf2;
        display: flex;
        align-items: center;
        padding: 10px 12px;
        gap: 12px;
        flex-shrink: 0;
        position: sticky;
        top: 54px;
        z-index: 999;
    }
    .sl-left {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        min-width: 0;
    }
    .sl-period {
        transform: translateX(30px);
        font-size: 14px;
        color: #222;
        white-space: nowrap;
    }
    .sl-period .p { color: #68a6f7; }
    .sl-timer {
        background: #3b4351;
        color: #fff;
        font-size: 14px;
        padding: 4px 10px;
        border-radius: 6px;
        min-width: 62px;
        transform: translateX(56px);
        text-align: center;
    }
    .sl-mid-sep {
        width: 2px;
        height: 36px;
        background: #e9edf2;
    }
    .sl-right {
        width: 130px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        text-align: left;
    }
    .sl-right .lab { font-size: 12px; color: #666; }
    .sl-right .bal {
        font-size: 14px;
        color: #ff3b30;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .sl-right .bal img {
        width: 15px;
        height: 15px;
        cursor: pointer;
    }

    /* ========== 上一期开奖行 ========== */
    .lastrow {
        background: #fff;
        border-bottom: 1px solid #e9edf2;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
        position: sticky;
        top: 108px;
        z-index: 998;
    }
    .lr-period {
        font-size: 14px;
        color: #222;
        white-space: nowrap;
    }
    .lr-period .p { color: #2d7cff; }
    .lr-res {
        flex: 1;
        display: flex;
        align-items: center;
        min-width: 0;
        white-space: nowrap;
    }
    .ball, .sum {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        aspect-ratio: 1;
        line-height: 1;
        flex: 0 0 auto;
        font-variant-numeric: tabular-nums;
    }
    .ball {
        width: 20px;
        height: 20px;
        color: #fff;
        font-size: 13px;
    }
    .b-blue { background: #0aabff; }
    .sum {
        width: 20px;
        height: 20px;
        background: #ff4d4f;
        color: #fff;
        font-weight: 900;
        font-size: 13px;
    }
    .lr-tag {
        font-size: 14px;
        color: #111;
        white-space: nowrap;
        transform: translateX(6px);
    }
    .lr-toggle {
        width: 34px;
        height: 34px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        user-select: none;
        color: #7b8794;
    }
    .lr-toggle:active { opacity: .7; }
    .tri {
        width: 0;
        height: 0;
        border-left: 7px solid transparent;
        border-right: 7px solid transparent;
        border-bottom: 10px solid #7b8794;
        transition: transform .18s ease;
    }
    .tri.down { transform: rotate(180deg); }

    /* ========== 历史表格 ========== */
    .historyWrap {
        background: #fff;
        display: none;
        border-bottom: 1px solid #e9edf2;
        flex-shrink: 0;
    }
    .historyWrap.show { display: block; }
    .his-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
        text-align: center;
        table-layout: auto;
    }
    .his-table thead th {
        background: #eef1f5;
        color: #666;
        font-weight: 600;
        padding: 10px 6px;
        border-bottom: 1px solid #eef2f6;
    }
    .his-table tbody td {
        padding: 10px 6px;
        border-bottom: 1px solid #f0f2f5;
        color: #222;
        vertical-align: middle;
    }
    .his-period { color: #2d7cff; font-weight: 700; }
    .his-res {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        white-space: nowrap;
        line-height: 1;
    }
    .his-res .ball { width: 20px; height: 20px; font-size: 12px; }
    .his-res .sum { width: 22px; height: 22px; font-size: 12px; }
    .his-tag { margin-left: 6px; color: #111; }
    .his-more {
        padding: 12px 0;
        text-align: center;
        color: #2d7cff;
        font-size: 13px;
        cursor: pointer;
        border-top: 1px solid #e8eaed;
    }
    .his-more:active { opacity: .7; }

    /* ========== 刮奖面板 ========== */
    .scratchPanel {
        flex-shrink: 0;
        margin: 8px 16px;
    }
    .scratchBox {
        background: #fff;
        border-radius: 10px;
        padding: 10px 12px;
        box-shadow: 0 1px 3px rgba(15,23,42,.08);
    }
    .scratchRow {
        display: flex;
        gap: 12px;
        align-items: stretch;
    }
    .scratchCol { flex: 1; min-width: 0; }
    .scratchTitle {
        font-size: 13px;
        color: #333;
        margin-bottom: 10px;
        white-space: nowrap;
    }
    .scratchTitle b { color: #68a6f7; }
    .scratchLeftMid {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        height: 70px;
    }
    .scratchStatusPill {
        background: #3b4351;
        color: #fff;
        transform: translateX(18px);
        font-size: 14px;
        padding: 8px 16px;
        border-radius: 8px;
        line-height: 1;
    }
    .scratchRefresh {
        margin-top: 10px;
        font-size: 12px;
        color: #2d7cff;
        transform: translateX(23px);
        cursor: pointer;
        user-select: none;
    }
    .scratchRefresh:active { opacity: .7; }
    .scratchCard {
        position: relative;
        height: 68px;
        width: 225px;
        border-radius: 9px;
        background: #f2f3f7;
        overflow: hidden;
        transform: translateX(-50px);
    }
    .scratchInner {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }
    .scratchCanvas {
        position: absolute;
        inset: 0;
        touch-action: none;
    }
    .scratchTip {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #777;
        font-size: 14px;
        letter-spacing: 1px;
        pointer-events: none;
    }

    /* ========== 聊天区域 ========== */
    .c28-chat-container {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        margin: 0 16px 16px;
        background: transparent;
        display: block;
    }
    .c28-chat {
        width: 100% !important;
        padding: 16px 0 0 0 !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .c28-message {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        gap: 10px;
        margin: 0 !important;
        padding: 0 !important;
        width: 100%;
    }
    .c28-message-avatar {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        margin: 0 !important;
        border-radius: 12px;
        overflow: hidden;
        background: #ddd;
    }
    .c28-message-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        margin: 0;
    }
    .c28-message-avatar.system {
        background: #12b0e7;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .c28-message-body {
        flex: 1;
        margin: 0 !important;
        min-width: 0;
    }
    .c28-message-username {
        font-size: 12px;
        color: #999;
        margin-bottom: 4px;
        text-align: left;
    }
    .c28-message-content {
        background: white;
        padding: 10px 14px;
        border-radius: 0 16px 16px 16px;
        font-size: 14px;
        line-height: 1.5;
        color: #333;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        display: inline-block;
        max-width: 100%;
        word-wrap: break-word;
    }

    /* ========== 底部导航（统一 Flex 方案，无 fixed） ========== */
    .c28-footer {
        flex-shrink: 0;
        width: 100%;
        background: #e8eaed;
        padding: 10px 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(0,0,0,0.06);
        box-sizing: border-box;
        position: relative;
        z-index: 10;
    }
    .footer-row-top {
        display: flex;
        gap: 8px;
        align-items: center;
        margin-bottom: 12px;
    }
    .bet-input-wrapper {
        flex: 1;
        background: #f5f7fa;
        border-radius: 30px;
        border: 1px solid #e2e6ea;
        padding: 0 15px;
        height: 44px;
        display: flex;
        align-items: center;
    }
    .bet-input-wrapper input {
        width: 100%;
        background: transparent;
        border: none;
        outline: none;
        font-size: 14px;
        color: #333;
        font-family: inherit;
    }
    .bet-input-wrapper input::placeholder {
        color: #aaa;
        font-size: 13px;
    }
    .c28-send-btn {
        width: 60px;
        height: 40px;
        background: #4da8ff;
        color: #fff;
        border: none;
        border-radius: 20px;
        font-size: 15px;
        font-weight: 500;
        flex-shrink: 0;
        cursor: pointer;
        transition: background 0.2s;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .c28-send-btn:active { background: #3a8bdd; }
    .footer-row-bottom {
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 8px;
    }
    .action-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        padding: 0;
        cursor: pointer;
        width: 56px;
        border-radius: 12px;
        transition: opacity 0.2s;
    }
    .action-btn:active { opacity: 0.7; }
    .action-btn img {
        width: 28px;
        height: 28px;
        display: block;
        margin-bottom: 4px;
    }
    .action-btn span {
        font-size: 11px;
        color: #555;
        font-weight: 500;
    }
    @media (max-width: 420px) {
        .action-btn { width: 48px; }
        .action-btn img { width: 24px; height: 24px; }
        .action-btn span { font-size: 10px; }
    }

    /* ========== 弹窗通用样式 ========== */
    .c28-keyboard-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        align-items: flex-end;
        justify-content: center;
    }
    .c28-keyboard-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
    }
    .c28-keyboard-container {
        position: relative;
        width: 100%;
        max-width: 500px;
        background: #fff;
        border-radius: 16px 16px 0 0;
        overflow: hidden;
        animation: slideUp 0.3s ease;
        max-height: 85vh;
    }
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    .c28-kb-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    .c28-kb-close {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: #666;
        cursor: pointer;
        border-radius: 50%;
        transition: background 0.2s;
    }
    .c28-kb-close:active { background: #f5f5f5; }
    .c28-kb-title {
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }
    .c28-kb-tab-content {
        display: block;
        padding: 16px;
    }
    .c28-kb-bet-types {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-bottom: 10px;
    }
    .c28-kb-type-btn {
        padding: 8px 4px;
        background: #f5f7fa;
        border: 1px solid #e2e6ea;
        border-radius: 8px;
        font-size: 12px;
        color: #333;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .c28-kb-type-btn:active {
        background: #e8f4ff;
        border-color: #12b0e7;
        color: #12b0e7;
    }
    .c28-kb-type-btn.selected {
        background: #e8f4ff;
        border-color: #12b0e7;
        color: #12b0e7;
    }
    .btn-name { font-weight: 500; }
    .odds {
        font-size: 12px;
        color: #999;
        margin-top: 2px;
    }
    .bet-amount {
        font-size: 12px;
        color: #12b0e7;
        margin-top: 2px;
        display: none;
    }
    .c28-kb-num-grid-full {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }
    .c28-kb-num-btn-full {
        padding: 8px 4px;
        background: #f5f7fa;
        border: 1px solid #e2e6ea;
        border-radius: 8px;
        font-size: 10px;
        color: #333;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .c28-kb-num-btn-full:active {
        background: #e8f4ff;
        border-color: #12b0e7;
        color: #12b0e7;
    }
    .c28-kb-num-btn-full.selected {
        background: #e8f4ff;
        border-color: #12b0e7;
        color: #12b0e7;
    }
    .num { font-weight: 500; }
    .odds-num {
        font-size: 12px;
        color: #999;
        margin-top: 2px;
    }
    .quick-amount-bar {
        display: flex;
        gap: 8px;
        padding: 10px 16px;
        background: #fff;
        border-top: 1px solid #f0f0f0;
        align-items: center;
    }
    .quick-amount-btn {
        flex: 1;
        padding: 10px;
        background: #f5f7fa;
        border: 1px solid #e2e6ea;
        border-radius: 8px;
        font-size: 14px;
        text-align: center;
        cursor: pointer;
    }
    .quick-amount-btn.active {
        background: #4da8ff;
        color: #fff;
        border-color: #4da8ff;
    }
    .quick-amount-setting {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: #f5f7fa;
        border: 1px solid #e2e6ea;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .bet-bottom-bar {
        display: flex;
        align-items: center;
        padding: 10px 16px;
        background: #fff;
        border-top: 1px solid #f0f0f0;
        gap: 10px;
    }
    .bet-status {
        flex: 1;
        padding: 10px;
        background: #f5f7fa;
        border-radius: 8px;
        font-size: 14px;
        color: #333;
    }
    .bet-clear {
        padding: 10px 20px;
        background: #f5f7fa;
        border: 1px solid #e2e6ea;
        border-radius: 8px;
        color: #666;
        cursor: pointer;
    }
    .bet-confirm {
        padding: 10px 20px;
        background: #4da8ff;
        border: none;
        border-radius: 8px;
        color: #fff;
        cursor: pointer;
        font-weight: 500;
    }

    /* ========== Toast 提示 ========== */
    .c28-toast {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0,0,0,0.7);
        color: #fff;
        padding: 12px 20px;
        border-radius: 8px;
        font-size: 14px;
        z-index: 9999;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }
    .c28-toast.show {
        opacity: 1;
    }

   /* ========== 赞助商卡片 ========== */
.sponsor-card-container {
    margin-top: 12px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sponsor-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-left: 4px;
    border-left: 3px solid #12b0e7;
}
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.sponsor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: transparent; /* 去掉背景包裹 */
    border-radius: 0;
    padding: 8px 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
}
.sponsor-item:active {
    background: transparent;
    transform: scale(0.96);
}
.sponsor-logo {
    width: 64px; /* Logo放大 */
    height: 64px;
    object-fit: contain;
    margin-bottom: 8px;
    border-radius: 12px;
}
.sponsor-name {
    font-size: 14px; /* 文字放大 */
    font-weight: 500;
    color: #222;
}

    /* ========== 下注记录折叠区域 ========== */
    .bet-record-container {
        margin-top: 8px;
        background: #f0f4f9;
        border-radius: 12px;
        overflow: hidden;
    }
    .bet-record-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        background: #4da8ff;
        color: white;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
    }
    .bet-record-header .tri {
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid white;
        transition: transform 0.2s;
    }
    .bet-record-header .tri.down {
        transform: rotate(180deg);
    }
    .bet-record-content {
        display: none;
        padding: 10px 12px;
        background: white;
        font-size: 12px;
        color: #333;
        border-top: 1px solid #e0e4e8;
    }
    .bet-record-content.show {
        display: block;
    }
    .bet-record-item {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .bet-record-item:last-child {
        border-bottom: none;
    }

    /* ========== 场馆选择弹窗美化 ========== */
    .venue-option {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #fff;
        margin: 12px 16px;
        padding: 14px 16px;
        border-radius: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        cursor: pointer;
        transition: all 0.2s;
    }
    .venue-option:active {
        background: #f5f7fa;
        transform: scale(0.98);
    }
    .venue-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .venue-name {
        font-size: 18px;
        font-weight: 600;
        color: #222;
    }
    .venue-players {
        font-size: 13px;
        color: #888;
    }
    .venue-arrow {
        font-size: 20px;
        color: #ccc;
    }

    /* ========== 中奖弹窗 ========== */
    .zjlcpt {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        z-index: 2000;
        display: none;
        align-items: center;
        justify-content: center;
    }
    .zjlcpt.show {
        display: flex;
    }
    .win-bg {
        position: relative;
        width: 90%;
        max-width: 500px;
        background: url('../zj/zj.png') no-repeat center center;
        background-size: contain;
        aspect-ratio: 750 / 887;
    }
    .win-amount {
        position: absolute;
        left: 15%;
        top: 55%;
        width: 70%;
        bottom: 30%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: clamp(30px, 7vw, 46px);
        font-weight: bold;
        color: #ffd700;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        font-family: 'Courier New', monospace;
        letter-spacing: 1px;
        white-space: nowrap;
    }
    .win-amount span {
        font-size: clamp(18px, 4vw, 26px);
        margin-left: 4px;
    }
    .win-close-btn {
        position: absolute;
        top: 3%;
        right: 6%;
        width: 38px;
        height: 38px;
        background: rgba(0,0,0,0.6);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        color: #fff;
        cursor: pointer;
        z-index: 10;
    }