* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #fff;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #333;
    overflow: hidden;
}

.kj-bar {
    width: 100%;
    background: #fff;
    border: 1px solid #4aa3ff;
    border-radius: 6px;
    overflow: hidden;
}

.kj-stack {
    display: flex;
    flex-direction: column;
    background: #fff;
}

.kj-panel {
    background: #fff;
}

.kj-panel + .kj-panel {
    border-top: 1px dashed #cfd8dc;
}

.kj-panel[data-type="hk_daily"] .issue {
    color: #e60012;
}

.kj-panel[data-type="macau"] .issue,
.kj-panel[data-type="hongkong"] .issue {
    color: #333;
}

.kj-panel-loading {
    padding: 20px 0;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.kj-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    padding: 0 8px;
    background: #f3f3f3;
    color: #111;
    font-size: 12px;
    font-weight: 700;
}

.kj-topline-title {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.kj-topline-action {
    min-width: 46px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #36a5ff 0%, #0a7be8 100%);
}

.kj-brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: linear-gradient(180deg, #83caf8 0%, #57b0eb 100%);
}

.kj-brand-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kj-brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    background: radial-gradient(circle at 30% 30%, #2f9c42 0%, #146f22 100%);
    border: 2px solid rgba(255,255,255,0.88);
}

.kj-brand-domain {
    color: #f00;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.kj-brand-badge {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
    background: linear-gradient(180deg, #ef3b39 0%, #b90f0e 100%);
    border: 2px solid rgba(255,255,255,0.78);
}

.kj-switch-row {
    display: flex;
    gap: 8px;
    padding: 6px 8px;
    background: #68b9f0;
}

.kj-switch-pill {
    flex: 1;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 999px;
    background: #ededed;
    color: #d91f11;
    font-size: 14px;
    font-weight: 900;
}

.kj-switch-pill.active {
    background: #2f9de5;
    color: #fff;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12);
}

.kj-date-strip {
    padding: 8px 10px;
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    background: linear-gradient(180deg, #5eb6ef 0%, #39a0e3 100%);
}

.kj-notice-strip {
    margin: 4px 6px 6px;
    padding: 8px 10px;
    text-align: center;
    color: #f00;
    font-size: 14px;
    font-weight: 900;
    background: #ffef00;
    border: 2px solid #f1c400;
    border-radius: 4px;
}

.kj-hero-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: linear-gradient(180deg, #2a88ff 0%, #0e66df 100%);
}

.kj-hero-badge {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #744400;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
    background: radial-gradient(circle at 30% 30%, #fff9dd 0%, #f7db85 60%, #c98c1a 100%);
    border: 3px solid rgba(255,255,255,0.88);
}

.kj-hero-title {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 40px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 2px;
    text-shadow: 0 2px 0 rgba(0,0,0,0.12);
}

.kj-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px 4px;
    font-size: 12px;
    background: #fff;
    border-bottom: 0;
    white-space: nowrap;
}

.kj-headline .issue {
    flex: 0 0 auto;
    color: #333;
    font-size: 13px;
}

.kj-headline .issue em,
.kj-nextline em {
    font-style: normal;
    font-weight: 700;
}

.kj-headline .countdown {
    flex: 1;
    text-align: center;
    color: #222;
    font-weight: 700;
}

.kj-headline .countdown b {
    font-size: 16px;
    letter-spacing: 0;
}

.kj-headline .history {
    color: #e60012;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
}

.kj-balls-wrap {
    background: #ffffff;
}

.kj-balls-wrap.is-live-stage {
    background: linear-gradient(180deg, #d3cccc 0%, #c8c1c1 100%);
}

.kj-balls {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    padding: 8px 1px 2px;
    min-height: 72px;
}

.kj-live-board {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
    padding: 8px 1px 2px;
    min-height: 82px;
}

.kj-live-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 48px;
    min-height: 72px;
}

.kj-live-char {
    color: rgba(255,255,255,0.9);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 2px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.kj-live-slash {
    display: block;
    margin-top: 8px;
    color: rgba(255,255,255,0.95);
    font-size: 22px;
    line-height: 1;
}

.kj-live-ball {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 48px;
    height: 66px;
    margin: 0 auto;
    padding: 4px 2px 2px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    border-radius: 4px;
    background-image: none;
    background-size: auto;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.18);
}

.kj-live-ball i {
    display: block;
    font-style: normal;
    margin: 0;
    color: #fff;
    font-size: 40px;
    line-height: 1;
}

.kj-live-ball small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 32px;
    min-height: 28px;
    margin-top: 2px;
    padding: 0 6px;
    color: #000;
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
    background: #fff;
    border-radius: 2px;
}

.kj-live-ball.red {
    background: #ee1e13;
}

.kj-live-ball.blue {
    background: #3f92eb;
}

.kj-live-ball.green {
    background: #25b93a;
}

.kj-live-sub {
    display: none;
}

.kj-live-plus {
    width: 10px;
    padding-bottom: 34px;
    color: #333;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-shadow: none;
}

.kj-empty-balls {
    align-items: center;
    color: #888;
    font-size: 13px;
    min-height: 60px;
}

.kj-tile {
    width: 48px;
    text-align: center;
}

.kj-tile-placeholder {
    opacity: 0.78;
}

.kj-tile-ball {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 48px;
    height: 66px;
    margin: 0 auto;
    padding: 4px 2px 2px;
    box-sizing: border-box;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    border-radius: 4px;
    background-image: none;
    background-size: auto;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.18);
}

.kj-tile-ball i {
    display: block;
    font-style: normal;
    margin: 0;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    text-shadow: none;
}

.kj-tile-ball small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 32px;
    min-height: 28px;
    margin-top: 2px;
    padding: 0 6px;
    color: #000;
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
    background: #fff;
    border-radius: 2px;
}

.kj-tile-ball.red {
    background: #ee1e13;
}

.kj-tile-ball.blue {
    background: #3f92eb;
}

.kj-tile-ball.green {
    background: #25b93a;
}

.kj-tile-ball-placeholder {
    padding-right: 0;
    color: #9ca3af;
    background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    box-shadow: none;
}

.kj-tile-ball-placeholder i,
.kj-tile-ball-placeholder small {
    color: #9ca3af;
}

.kj-tile-sub {
    display: none;
}

.kj-plus,
.kj-live-plus {
    width: 18px;
    min-width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin: 0 2px;
    padding: 0;
    font-size: 36px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    text-align: center;
}

.kj-nextline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 8px 8px;
    color: #333;
    text-align: left;
    font-size: 12px;
    font-weight: 400;
    background: #fff;
    border-top: 0;
}

.kj-nextline-main {
    flex: 1;
    min-width: 0;
}

.kj-nextline .prefix {
    color: #333;
}

.kj-nextline .time {
    color: #333;
}

.kj-refresh {
    flex: 0 0 auto;
    min-width: 40px;
    height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffb52f 0%, #ff8d08 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    line-height: 24px;
}

@media (max-width: 480px) {
    .kj-headline {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 4px;
    }

    .kj-headline .issue {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        justify-self: start;
    }

    .kj-headline .countdown {
        min-width: 72px;
        justify-self: center;
        text-align: center;
        font-variant-numeric: tabular-nums;
    }

    .kj-headline .countdown b {
        display: inline-block;
        min-width: 8ch;
        text-align: center;
        font-variant-numeric: tabular-nums;
    }

    .kj-headline .history {
        justify-self: end;
        text-align: right;
        white-space: nowrap;
    }

    .kj-balls,
    .kj-live-board {
        gap: 1px;
        padding: 6px 1px 0;
        min-height: 86px;
    }

    .kj-tile,
    .kj-live-slot {
        width: 44px;
        min-width: 44px;
        padding-bottom: 0;
    }

    .kj-tile-ball,
    .kj-live-ball {
        width: 44px;
        height: 82px;
        padding: 4px 2px 2px;
        border-radius: 5px;
    }

    .kj-tile-ball i,
    .kj-live-ball i {
        font-size: 38px;
    }

    .kj-tile-ball small,
    .kj-live-ball small {
        width: auto;
        min-width: 28px;
        min-height: 24px;
        margin-top: 2px;
        padding: 0 5px;
        color: #000;
        font-size: 24px;
        font-weight: 800;
        background: #fff;
        border-radius: 2px;
        position: static;
        transform: none;
    }

    .kj-plus,
    .kj-live-plus {
        width: 16px;
        min-width: 16px;
        font-size: 30px;
        margin: 0 1px;
        padding: 0;
    }
}

@media screen and (max-width: 380px) {
    .kj-topline {
        font-size: 11px;
    }

    .kj-headline {
        gap: 3px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .kj-headline .countdown {
        min-width: 66px;
    }

    .kj-headline .countdown b {
        min-width: 8ch;
    }

    .kj-topline-action {
        min-width: 42px;
        height: 22px;
        line-height: 22px;
        font-size: 11px;
    }

    .kj-brand-logo {
        width: 42px;
        height: 42px;
        font-size: 12px;
    }

    .kj-brand-domain {
        font-size: 24px;
    }

    .kj-brand-badge {
        width: 42px;
        height: 42px;
        font-size: 11px;
    }

    .kj-switch-pill {
        min-height: 34px;
        font-size: 11px;
    }

    .kj-date-strip,
    .kj-notice-strip {
        font-size: 12px;
    }

    .kj-hero-badge {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        font-size: 11px;
    }

    .kj-hero-title {
        font-size: 26px;
        letter-spacing: 1px;
    }

    .kj-balls,
    .kj-live-board {
        gap: 1px;
        padding: 6px 1px 0;
        min-height: 82px;
    }

    .kj-plus,
    .kj-live-plus {
        width: 14px;
        min-width: 14px;
        font-size: 28px;
        margin: 0 1px;
        padding: 0;
    }

    .kj-tile,
    .kj-live-slot {
        width: 42px;
        min-width: 42px;
        padding-bottom: 0;
    }

    .kj-tile-ball,
    .kj-live-ball {
        width: 42px;
        height: 76px;
        padding: 4px 2px 2px;
    }

    .kj-tile-ball i,
    .kj-live-ball i {
        margin: 0;
        font-size: 34px;
    }

    .kj-tile-ball small,
    .kj-live-ball small {
        width: auto;
        min-width: 26px;
        min-height: 22px;
        margin-top: 2px;
        padding: 0 4px;
        color: #000;
        font-size: 22px;
        font-weight: 800;
        background: #fff;
        border-radius: 2px;
        position: static;
        transform: none;
    }

    .kj-live-char {
        font-size: 20px;
    }

    .kj-headline {
        gap: 6px;
        font-size: 11px;
    }

    .kj-headline .issue,
    .kj-headline .history,
    .kj-nextline {
        font-size: 12px;
    }

    .kj-headline .countdown b {
        font-size: 13px;
    }

    .kj-refresh {
        min-width: 36px;
        height: 22px;
        line-height: 22px;
        font-size: 11px;
        padding: 0 6px;
    }
}
