        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            background: #eef2f5;
            color: #1f2937;
            font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            padding-top: 96px;
            padding-bottom: calc(72px + env(safe-area-inset-bottom));
        }

        .brand-tool {
            max-width: 1320px;
            margin: 0 auto;
            padding: 16px;
        }

        .model-header {
            position: fixed;
            left: 0;
            right: 0;
            top: 0;
            z-index: 40;
            background:
                linear-gradient(90deg, rgba(185, 28, 28, .95), rgba(217, 119, 6, .92)) left bottom / 100% 3px no-repeat,
                linear-gradient(180deg, rgba(255, 251, 235, .98) 0%, rgba(255, 247, 237, .96) 100%);
            border-bottom: 1px solid rgba(180, 83, 9, .28);
            box-shadow: 0 14px 34px rgba(83, 39, 16, .18);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        .model-header-inner {
            width: min(1320px, calc(100% - 32px));
            min-height: 78px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 22px;
        }

        .model-brand {
            min-width: 180px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .model-logo {
            width: 42px;
            height: 42px;
            flex: 0 0 42px;
            display: block;
            border-radius: 12px;
            object-fit: cover;
            box-shadow: 0 7px 16px rgba(127, 29, 29, .22);
        }

        .model-brand-copy {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .model-brand-main {
            color: #7c160f;
            font-size: 18px;
            font-weight: 950;
            letter-spacing: .03em;
        }

        .model-brand-sub {
            color: #9a5b28;
            font-size: 12px;
            font-weight: 700;
        }

        .header-tools {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 14px;
            min-width: 0;
        }

        .theme-control,
        .action-control {
            display: flex;
            align-items: center;
            gap: 8px;
            border-radius: 12px;
        }

        .theme-control {
            padding: 5px;
            border: 1px solid rgba(180, 128, 46, .34);
            background: linear-gradient(180deg, rgba(255, 253, 244, .96), rgba(255, 247, 237, .92));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 5px 14px rgba(120, 53, 15, .07);
        }

        .action-control {
            padding: 4px;
            border: 1px solid rgba(180, 128, 46, .18);
            background: rgba(255, 253, 244, .68);
        }

        .theme-btn {
            height: 36px;
            min-width: 58px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            border: 1px solid transparent;
            border-radius: 9px;
            background: transparent;
            color: #64748b;
            font-size: 13px;
            font-weight: 900;
            cursor: pointer;
            white-space: nowrap;
        }

        .theme-btn::before {
            content: "";
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: linear-gradient(135deg, #e5d0a1, #7ea48f);
            box-shadow: 0 0 0 2px rgba(255, 255, 255, .8);
        }

        .theme-btn[data-theme="crimson"]::before {
            background: linear-gradient(135deg, #ffd66b, #d71920);
        }

        .theme-btn[data-theme="emerald"]::before {
            background: linear-gradient(135deg, #f3e6b0, #16824b);
        }

        .theme-btn[data-theme="midnight"]::before {
            background: linear-gradient(135deg, #ffd36b, #1f2937);
        }

        .theme-btn.active {
            border-color: rgba(185, 28, 28, .18);
            background: #fff;
            color: #7f1d1d;
            box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
        }

        .qr-header-field {
            width: auto;
        }

        .qr-header-field input[type="file"] {
            display: none;
        }

        .qr-upload-btn,
        .qr-clear-btn {
            height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 900;
            cursor: pointer;
            white-space: nowrap;
        }

        .qr-upload-btn {
            min-width: 116px;
            padding: 0 16px;
            color: #6f3511;
            border: 1px solid rgba(180, 128, 46, .42);
            background: linear-gradient(180deg, #fff4cf 0%, #f6cf75 52%, #d69a2d 100%);
            box-shadow: 0 8px 18px rgba(180, 128, 46, .18);
        }

        .qr-clear-btn {
            min-width: 72px;
            padding: 0 14px;
            color: #475569;
            border: 1px solid rgba(148, 163, 184, .55);
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            box-shadow: 0 6px 14px rgba(15, 23, 42, .06);
        }

        .qr-clear-btn:hover,
        .qr-upload-btn:hover {
            filter: brightness(.98);
        }

        .qr-header-field input:focus,
        .qr-clear-btn:focus-visible,
        .qr-upload-btn:focus-visible,
        .theme-btn:focus-visible {
            outline: none;
            border-color: #dc2626;
            box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
        }

        .model-tabs {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0;
            overflow-x: auto;
            scrollbar-width: none;
            border: 1px solid rgba(180, 128, 46, .34);
            border-radius: 12px;
            background: linear-gradient(180deg, #fffefa 0%, #fff7ed 100%);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96), 0 8px 18px rgba(120, 53, 15, .08);
        }

        .model-tabs::-webkit-scrollbar {
            display: none;
        }

        .model-tab {
            flex: 0 0 auto;
            min-width: 112px;
            min-height: 48px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            border: 0;
            border-right: 1px solid rgba(180, 128, 46, .2);
            border-radius: 0;
            padding: 0 16px;
            background: transparent;
            color: #6b4a2b;
            font-size: 14px;
            font-weight: 900;
            text-decoration: none;
            box-shadow: none;
            position: relative;
        }

        .model-tab:first-child {
            border-top-left-radius: 11px;
            border-bottom-left-radius: 11px;
        }

        .model-tab:last-child {
            border-right: 0;
            border-top-right-radius: 11px;
            border-bottom-right-radius: 11px;
        }

        .model-tab svg {
            width: 18px;
            height: 18px;
            flex: 0 0 18px;
            fill: currentColor;
            opacity: .82;
        }

        .model-tab.active {
            background: linear-gradient(180deg, #fff1d6 0%, #fee2e2 100%);
            color: #991b1b;
            box-shadow: inset 0 3px 0 #dc2626;
        }

        .model-tab.active svg {
            opacity: 1;
        }

        .model-tab:hover {
            background: rgba(255, 247, 237, .72);
            color: #991b1b;
        }

        .tool-panel {
            position: sticky;
            top: 0;
            z-index: 10;
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 10px;
            margin-bottom: 16px;
            padding: 12px;
            border: 1px solid #dbe3ec;
            border-radius: 8px;
            background: rgba(255, 255, 255, .96);
            box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
            backdrop-filter: blur(12px);
        }

        .tool-field {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .tool-field label {
            color: #53606f;
            font-size: 12px;
            font-weight: 700;
        }

        .tool-field input {
            width: 100%;
            height: 36px;
            border: 1px solid #ccd6e1;
            border-radius: 6px;
            padding: 0 10px;
            color: #111827;
            background: #fff;
            font-size: 13px;
            outline: none;
        }

        .tool-field input:focus {
            border-color: #2fa66a;
            box-shadow: 0 0 0 3px rgba(47, 166, 106, .12);
        }

        .tool-actions {
            display: flex;
            align-items: end;
            gap: 8px;
        }

        .tool-btn {
            height: 36px;
            border: 1px solid #cfd8e3;
            border-radius: 6px;
            padding: 0 12px;
            background: #fff;
            color: #334155;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
        }

        .tool-btn.primary {
            border-color: #2f8f5e;
            background: #2fa66a;
            color: #fff;
        }

        .tool-btn:hover {
            filter: brightness(.98);
        }

        .poster-stage {
            width: 100%;
            overflow-x: auto;
            overflow-y: visible;
            padding-bottom: 18px;
            -webkit-overflow-scrolling: touch;
        }

        .export-tabbar {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 30;
            padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
            background:
                linear-gradient(90deg, rgba(185, 28, 28, .95), rgba(217, 119, 6, .9)) left top / 100% 3px no-repeat,
                linear-gradient(180deg, rgba(255, 253, 244, .96), rgba(255, 247, 237, .98));
            border-top: 1px solid rgba(180, 83, 9, .28);
            box-shadow: 0 -16px 34px rgba(83, 39, 16, .16);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        .export-tabbar-inner {
            max-width: 980px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .tabbar-btn {
            height: 44px;
            border: 1px solid #d4dde8;
            border-radius: 8px;
            background: #fff;
            color: #334155;
            font-size: 14px;
            font-weight: 900;
            cursor: pointer;
        }

        .tabbar-btn.primary {
            border-color: #b91c1c;
            background: linear-gradient(180deg, #ef4444 0%, #dc2626 48%, #b91c1c 100%);
            color: #fff;
            box-shadow: 0 10px 20px rgba(185, 28, 28, .24);
        }

        .tabbar-btn:disabled {
            cursor: wait;
            filter: grayscale(.12);
            opacity: .78;
        }

        #poster {
            margin: 0 auto;
            padding: 0;
            background: url('https://hehe.ssdp168.com/image/poster-paper.png') repeat;
            font-family: 'Microsoft YaHei', sans-serif;
            width: 1080px;
            color: #333;
        }

        #poster.theme-crimson {
            background-color: #fff6e6;
        }

#poster.theme-crimson .header-container {
    background: url('https://hehe.ssdp168.com/image/poster-header-wave.png') top center no-repeat, linear-gradient(120deg, #ffe7a3 0%, #e24a2a 46%, #9f1216 100%);
    background-size: contain;
}

        #poster.theme-crimson .header-title {
            color: #7c0a02;
            text-shadow: 4px 4px 8px rgba(84, 25, 8, .28);
        }

        #poster.theme-crimson .header-title .sub-title {
            color: #7f1d1d;
        }

        #poster.theme-crimson .header-qrcode {
            border-color: #d6a237;
            background: #fffdf2;
        }

#poster.theme-crimson .excel-header {
    background: url('https://hehe.ssdp168.com/image/excel-header-ink.png') bottom center no-repeat, linear-gradient(100deg, #9f1216, #d71920 50%, #c9851f);
    background-size: cover;
}

        #poster.theme-crimson .excel-table th {
            background-color: #f7d98f;
            color: #65110c;
        }

        #poster.theme-crimson .excel-table tr:nth-child(even) {
            background-color: #fff8e8;
        }

        #poster.theme-crimson .excel-table tr:nth-child(odd) {
            background-color: #ffefcf;
        }

        #poster.theme-emerald {
            background-color: #f6fbf1;
        }

#poster.theme-emerald .header-container {
    background: url('https://hehe.ssdp168.com/image/poster-header-wave.png') top center no-repeat, linear-gradient(120deg, #f6e8aa 0%, #7bbf73 45%, #11623e 100%);
    background-size: contain;
}

        #poster.theme-emerald .header-title {
            color: #174831;
            text-shadow: 4px 4px 8px rgba(20, 83, 45, .2);
        }

        #poster.theme-emerald .header-title .sub-title {
            color: #166534;
        }

        #poster.theme-emerald .header-qrcode {
            border-color: #c9a34c;
            background: #fffef3;
        }

#poster.theme-emerald .excel-header {
    background: url('https://hehe.ssdp168.com/image/excel-header-ink.png') bottom center no-repeat, linear-gradient(100deg, #0f5132, #16824b 56%, #c39b3c);
    background-size: cover;
}

        #poster.theme-emerald .excel-table th {
            background-color: #d8ead0;
            color: #0f5132;
        }

        #poster.theme-emerald .excel-table tr:nth-child(even) {
            background-color: #f8fbf4;
        }

        #poster.theme-emerald .excel-table tr:nth-child(odd) {
            background-color: #edf5e8;
        }

        #poster.theme-midnight {
            background-color: #141820;
            color: #f3f4f6;
        }

#poster.theme-midnight .header-container {
    background: url('https://hehe.ssdp168.com/image/poster-header-wave.png') top center no-repeat, linear-gradient(120deg, #111827 0%, #263042 48%, #c58d35 100%);
    background-size: contain;
}

        #poster.theme-midnight .header-title {
            padding: 12px 22px 16px;
            border-radius: 14px;
            background: linear-gradient(90deg, rgba(17, 24, 39, .86), rgba(17, 24, 39, .42));
            color: #ffd36b;
            text-shadow: 0 3px 0 rgba(0, 0, 0, .48), 0 8px 18px rgba(0, 0, 0, .5);
        }

        #poster.theme-midnight .header-title .sub-title {
            color: #f4c95d;
            text-shadow: 0 2px 8px rgba(0, 0, 0, .56);
        }

        #poster.theme-midnight .header-qrcode {
            border-color: #d4a13f;
            background: #fefce8;
        }

        #poster.theme-midnight .excel-container,
        #poster.theme-midnight .excel-table {
            background: #172033;
            color: #f8fafc;
        }

#poster.theme-midnight .excel-header {
    background: url('https://hehe.ssdp168.com/image/excel-header-ink.png') bottom center no-repeat, linear-gradient(100deg, #111827, #334155);
    background-size: cover;
}

        #poster.theme-midnight .excel-table th {
            background-color: #243044;
            color: #f8d98a;
            border-color: #3b4558;
        }

        #poster.theme-midnight .excel-table td {
            color: #f8fafc;
            border-color: #2d3748;
        }

        #poster.theme-midnight .excel-table tr:nth-child(even) {
            background-color: #182234;
        }

        #poster.theme-midnight .excel-table tr:nth-child(odd) {
            background-color: #202b3d;
        }

        #poster.theme-midnight .excel-footer {
            background-color: #172033;
            border-top-color: #334155;
            color: #cbd5e1;
        }

        #poster.theme-midnight .rowhited {
            color: #fff7ed !important;
            background: linear-gradient(90deg, rgba(185, 28, 28, .78), rgba(127, 29, 29, .58)) !important;
        }

        #poster.theme-midnight .highlight {
            color: #ffdf7b;
            background-color: rgba(250, 204, 21, .16);
        }

        #poster.theme-midnight .focus-stat-cell {
            color: #f8fafc;
            background: #202b3d;
        }

        #poster.theme-midnight .focus-stat-rate {
            color: #cbd5e1;
        }

        #poster.theme-midnight .focus-stat-rate.strong,
        #poster.theme-midnight .focus-stat-mark,
        #poster.theme-midnight .score-full {
            color: #ffd36b;
        }

        #poster.theme-midnight .score-half {
            color: #d1d5db;
        }

        .header-container {
            position: relative;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 220px;
            padding: 0 50px;
            background: url('https://hehe.ssdp168.com/image/poster-header-wave.png') top center no-repeat, linear-gradient(to right, #e8dac6, #e1cba2);
            background-size: contain;
            box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.1);
        }

        .header-title {
            font-family: 'STKaiti', 'KaiTi', serif;
            font-size: 80px;
            color: #7c0a02;
            letter-spacing: 4px;
            text-shadow: 4px 4px 8px rgba(0,0,0,0.2);
            position: relative;
            line-height: 1.2;
        }

        .header-title .sub-title {
            font-size: 30px;
            color: darkred;
            display: block;
            margin-bottom: 5px;
        }

        .header-title small {
            font-size: 48px;
            color: #ab3d20;
            margin-left: -20px;
            font-weight: bolder;
        }

        .header-qrcode {
            width: 160px;
            height: 160px;
            background: #fffdf7;
            border: 5px solid #b4884d;
            border-radius: 12px;
            padding: 10px;
            box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
        }

        .header-qrcode img,
        .header-qrcode canvas {
            width: 100% !important;
            height: 100% !important;
            object-fit: contain;
            display: block;
        }

        .qr-placeholder {
            width: 100%;
            height: 100%;
            display: grid;
            place-items: center;
            color: #8a3b18;
            font-size: 18px;
            font-weight: 900;
            text-align: center;
            line-height: 1.35;
            background: linear-gradient(135deg, #fffaf0, #f7e5c4);
            border-radius: 6px;
        }

        .excel-container {
            margin: 20px auto;
            background: #fff;
            border: 1px solid #eee;
            border-radius: 6px;
            overflow: hidden;
        }

        .excel-header {
            background: url('https://hehe.ssdp168.com/image/excel-header-ink.png') bottom center no-repeat, linear-gradient(to right, #4b6858, #7ea48f);
            background-size: cover;
            color: white;
            padding: 16px 25px;
            font-size: 40px;
            font-weight: bold;
            position: relative;
            text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
        }

        .excel-header .subtitle {
            font-size: 20px;
            font-weight: normal;
            margin-left: 20px;
            opacity: 0.9;
        }

        .play-hit-inline {
            display: block;
            margin-top: 6px;
            color: rgba(255, 255, 255, .92);
            font-size: 18px;
            font-weight: normal;
            line-height: 1.3;
            white-space: nowrap;
        }

        .play-hit-inline b {
            color: #fff7d6;
            font-weight: 800;
            white-space: nowrap;
        }

        .play-hit-rate {
            color: rgba(255, 255, 255, .76);
            font-weight: 800;
            white-space: nowrap;
        }

        .play-hit-rate.strong {
            color: #f6c26b;
            text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
        }

        .play-hit-rate.weak,
        .play-hit-rate.pending {
            color: rgba(255, 255, 255, .76);
        }

        .excel-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 22px;
        }

        .excel-table th {
            background-color: #dce5db;
            color: #333;
            padding: 12px;
            border: 1px solid #ccc;
        }

        .excel-table td {
            padding: 2px;
            border: 1px solid #eee;
            text-align: center;
            overflow: visible;
            line-height: 1.8;
        }

        .excel-table tr {
            overflow: visible;
        }

        .excel-table tr:nth-child(even) {
            background-color: #f9f9f9;
        }

        .excel-table tr:nth-child(odd) {
            background-color: #f1f5f1;
        }

        .highlight {
            background-color: #f4efe0;
            color: #a11d0b;
            font-weight: bold;
        }

        .excel-footer {
            padding: 12px 30px;
            background-color: #f7f7f0;
            border-top: 1px solid #ddd;
            font-size: 18px;
            text-align: right;
            color: #555;
        }

        .excel-footer span {
            font-weight: bold;
        }

        .rowhited {
            color: #333333 !important;
            background-color: rgba(255, 0, 0, 0.2) !important;
        }

        .pred {
            position: relative;
            display: inline-block;
            white-space: nowrap;
        }

        .pred.hit::after {
            content: "";
            position: absolute;
            width: 56px;
            height: 56px;
            left: 0;
            top: 50%;
            transform: translateY(-50%) rotate(-8deg);
            border: 6px solid #ff2b2b;
            border-radius: 50%;
            pointer-events: none;
            opacity: .95;
        }

        .pred .txt {
            position: relative;
            z-index: 1;
        }

        .focus-star {
            width: 18px;
            height: 18px;
            margin-left: 3px;
            vertical-align: -2px;
            fill: #d93025;
        }

        .focus-stat-cell {
            padding: 10px 18px !important;
            color: #555;
            font-size: 18px;
            font-weight: normal;
            line-height: 1.5;
            text-align: left !important;
            background: #fffaf0;
        }

        .focus-stat-mark {
            color: #d93025;
            font-size: 22px;
            font-weight: bold;
            vertical-align: -2px;
            margin-right: 4px;
        }

        .focus-stat-rate {
            margin-left: 4px;
            color: #777;
        }

        .focus-stat-rate.strong {
            color: #b42318;
        }

        .mono {
            font-family: ui-monospace, Menlo, Consolas, monospace;
        }

        .team-cell {
            min-width: 210px;
        }

        .team-line {
            line-height: 1.35;
            white-space: normal;
        }

        .score-full {
            margin: 0 4px;
            color: #9f1d12;
            font-weight: 900;
            white-space: nowrap;
        }

        .score-half {
            margin-right: 4px;
            color: #6b7280;
            font-size: .86em;
            font-weight: 700;
            white-space: nowrap;
        }

        @media (max-width: 900px) {
            body {
                padding-top: 158px;
                padding-bottom: calc(76px + env(safe-area-inset-bottom));
            }

            .model-header-inner {
                min-height: 142px;
                align-items: flex-start;
                flex-direction: column;
                justify-content: center;
                gap: 9px;
                padding: 10px 0;
            }

            .header-tools {
                width: 100%;
                align-items: stretch;
                flex-direction: column;
                gap: 8px;
            }

            .theme-control {
                width: 100%;
                overflow-x: auto;
                scrollbar-width: none;
            }

            .theme-control::-webkit-scrollbar {
                display: none;
            }

            .action-control {
                width: 100%;
                justify-content: flex-start;
                overflow-x: auto;
                scrollbar-width: none;
            }

            .action-control::-webkit-scrollbar {
                display: none;
            }

            .model-tabs {
                justify-content: flex-start;
            }

            .model-tab {
                min-width: 104px;
                min-height: 44px;
                padding: 0 12px;
                font-size: 13px;
                gap: 6px;
            }

            .model-tab svg {
                width: 17px;
                height: 17px;
            }

            .tool-panel {
                position: static;
                grid-template-columns: 1fr 1fr;
            }

            .tool-actions {
                grid-column: 1 / -1;
            }

            .tabbar-btn {
                min-height: 44px;
            }
        }
