
        :root {
            color-scheme: light;
            --primary: #185bc4;
            --bg: #f5f7fa;
            --card: #fff;
            --text: #333;
            --muted: #888;
            --line: #eee;
            --line-soft: #f5f5f5;
            --panel-soft: #fafafa;
            --panel-cool: #fafcfd;
            --model-bg: #eef3fc;
            --model-text: #185bc4;
            --update-bg: #e3f2fd;
            --shadow: rgba(0,0,0,0.04);
        }
        html[data-theme="dark"] {
            color-scheme: dark;
            --primary: #75a7ff;
            --bg: #0f141d;
            --card: #171e2a;
            --text: #e8edf5;
            --muted: #9ba8ba;
            --line: #303a49;
            --line-soft: #252e3b;
            --panel-soft: #1c2532;
            --panel-cool: #192431;
            --model-bg: #24344d;
            --model-text: #9bc1ff;
            --update-bg: #20364d;
            --shadow: rgba(0,0,0,0.28);
        }
        body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 15px; transition: background-color .2s ease, color .2s ease; }
        .container { max-width: 600px; margin: 0 auto; }
        .header { position: relative; text-align: center; margin-bottom: 25px; }
        .header h2 {
            position: relative;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            box-sizing: border-box;
            padding: 0 60px;
            margin: 0;
            color: var(--primary);
            font-size: 22px;
            white-space: nowrap;
        }
        .header-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .header-realtime {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            flex: 0 0 auto;
            white-space: nowrap;
        }
        .header-theme {
            position: absolute;
            top: 50%;
            right: 0;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-left: 0;
            transform: translateY(-50%);
            white-space: nowrap;
            vertical-align: middle;
        }
        .refresh-tips { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
        .refresh-tips #timer { color: var(--primary); font-weight: bold; }
        
        .overview { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 15px; margin-bottom: 25px; }
        .card { grid-column: span 2; background: var(--card); padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px var(--shadow); text-align: center; }
        .card.full-width { grid-column: 1 / -1; display: flex; justify-content: space-around; align-items: center; }
        .totals-item { flex: 1; min-width: 0; padding: 20px 8px; }
        .card h3 { margin: 0 0 8px 0; font-size: 14px; color: var(--muted); font-weight: normal; }
        .card .num { margin: 0; font-size: 28px; font-weight: bold; color: var(--primary); }
        
        .c-install { border-color: #28a745; border-bottom: 3px solid #28a745; }
        .c-install .num { color: #28a745; }
        .c-update { border-color: #1565c0; border-bottom: 3px solid #1565c0; }
        .c-update .num { color: #1565c0; }
        .c-accessibility { border-bottom: 3px solid #00897b; }
        .c-accessibility .num { color: #00897b; }
        .c-normal { border-bottom: 3px solid var(--line); }
        .card-divider { width: 1px; height: 50px; background: var(--line); flex-shrink: 0; }

        .box { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px var(--shadow); margin-bottom: 20px;}
        .box-title { padding: 15px 20px; background: var(--panel-soft); border-bottom: 1px solid var(--line); font-weight: bold; margin: 0; font-size: 16px;}
        
        /* 表格核心布局修改：采用固定宽度防撑破，并允许长文本折行 */
        table { width: 100%; border-collapse: collapse; table-layout: fixed; }
        th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 14px; word-wrap: break-word; word-break: break-all; }
        th { color: var(--muted); font-weight: normal; font-size: 13px; white-space: nowrap; background: var(--panel-soft); word-break: normal; }
        
        .tag-model { background: var(--model-bg); color: var(--model-text); padding: 2px 6px; border-radius: 4px; font-size: 12px; display: inline-block;}
        .ip-info { color: var(--muted); font-size: 12px; margin-top: 4px; }
        
        .b-status-yes { color: #28a745; font-weight: bold; font-size: 12px; margin-bottom: 3px; display: inline-block;}
        .b-status-no { color: #aaa; font-size: 12px; }
        .b-app-tag { font-size: 11px; color: var(--model-text); background: var(--update-bg); display: inline-block; padding: 2px 6px; border-radius: 4px; font-weight:bold;}
        .accessibility-duration { max-width: 100%; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
        .b-column { background: var(--panel-cool); border-left: 1px solid var(--line); }
        .install-time-column { width: 75px; }
        .device-info-column { white-space: normal; }
        .install-time-cell span { white-space: nowrap; }
        .install-b-column { width: 95px; }
        .accessibility-column { width: 110px; text-align: center; border-left: 1px solid var(--line); background: var(--panel-soft); }
        .history-date-column { width: 30%; }

        .extra-row { display: none; }
        .toggle-btn { width: 100%; padding: 12px; background: var(--panel-soft); border: none; border-top: 1px solid var(--line); color: var(--primary); font-size: 14px; cursor: pointer; text-align: center; }
        .toggle-btn:active { filter: brightness(.95); }

        .theme-switch {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            vertical-align: middle;
            margin-left: 0;
            margin-bottom: 2px;
            user-select: none;
        }
        .theme-switch input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }
        .theme-icon {
            font-size: 13px;
            line-height: 1;
        }
        .theme-icon::before { content: '☀️'; }
        html[data-theme="dark"] .theme-icon::before { content: '🌙'; }
        .theme-slider {
            position: relative;
            width: 38px;
            height: 20px;
            box-sizing: border-box;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: #cbd3df;
            transition: background .2s ease, border-color .2s ease;
        }
        .theme-slider::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 1px 4px rgba(0,0,0,.25);
            transition: transform .2s ease;
        }
        .theme-switch input:checked + .theme-slider {
            background: #456da9;
            border-color: #6287bf;
        }
        .theme-switch input:checked + .theme-slider::after {
            transform: translateX(18px);
        }
        .theme-switch input:focus-visible + .theme-slider {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }
        html[data-theme="dark"] td[style*="color:#666"],
        html[data-theme="dark"] td[style*="color:#555"],
        html[data-theme="dark"] .c-normal .num { color: var(--text) !important; }

        /* 手机端完美自适应：避免B包栏错位 */
        @media screen and (max-width: 480px) {
            body { padding: 10px; }
            th, td { padding: 10px 5px; font-size: 13px; }
            .overview { gap: 10px; margin-bottom: 20px;}
            .card { padding: 15px 10px; }
            .card h3 { font-size: 12px; }
            .metric-card { padding: 15px 5px; }
            .metric-card h3, .totals-item h3 { font-size: 11px; line-height: 1.5; min-height: 33px; }
            .totals-item { padding: 15px 5px; }
            .card .num { font-size: 22px; }
            .tag-model { font-size: 11px; padding: 2px 4px; }
            .ip-info { font-size: 11px; }
            .b-status-yes, .b-status-no { font-size: 11px; }
            .b-app-tag { font-size: 10px; padding: 2px 4px; }
            .install-time-column { width: 48px; }
            .install-time-cell span { display: block; }
            .install-b-column { width: 64px; }
            .accessibility-column { width: 78px; }
            .history-table th, .history-table td { padding: 10px 4px; font-size: 11px; }
            .header h2 { gap: 2px; padding: 0 56px; font-size: clamp(12px, 4vw, 18px); }
            .header-realtime { gap: 2px; }
            .header-theme { gap: 2px; }
            .theme-switch { margin-left: 0; }
            .theme-icon { font-size: 12px; }
            .refresh-tips { font-size: 11px; gap: 4px; }
            .box-title { padding: 12px 15px; font-size: 15px; }
        }
    