html,
body {
    min-height: 100%;
    margin: 0;
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

body {
    background: #f4f4f4;
    color: #222;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.mobile-page {
    min-height: 100vh;
    padding: 12px 10px 80px;
}

.page-shell {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.notice-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
}

.notice-modal.is-hidden {
    display: none;
}

.notice-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
}

.notice-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(100% - 96px);
    max-width: 270px;
    padding: 12px 9px 11px;
    border: 4px solid #ff4c57;
    border-radius: 12px;
    transform: translate(-50%, -50%);
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.notice-header {
    position: absolute;
    left: 50%;
    top: -20px;
    transform: translateX(-50%);
}

.notice-header span {
    display: inline-block;
    min-width: 118px;
    padding: 6px 14px;
    border-radius: 12px 12px 9px 9px;
    background: linear-gradient(180deg, #ff544f 0%, #ff2a2a 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 4px 10px rgba(255, 74, 74, 0.35);
}

.notice-close {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b8b8b8;
    font-size: 26px;
    line-height: 24px;
    cursor: pointer;
}

.notice-countdown {
    position: absolute;
    right: 28px;
    top: 13px;
    color: #ff3a3a;
    font-size: 18px;
    font-weight: 500;
}

.notice-content {
    margin-top: 10px;
    color: #2f2f2f;
}

.notice-brand {
    margin: 6px 0 8px;
    text-align: center;
}

.notice-brand img {
    width: 74%;
    max-width: 180px;
    margin: 0 auto;
}

.notice-content-inner p {
    max-width: 100%;
}

.notice-content-inner > p:first-child {
    margin-bottom: 6px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    font-weight: 600;
}

.notice-content-inner > p:nth-child(2) span {
    padding: 5px 16px !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #8e6f34 0%, #b9964d 100%) !important;
    color: #fff3ce !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

.notice-content-inner > p:nth-child(4) span {
    padding: 9px 24px !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, #a87d35 0%, #9a6f2c 100%) !important;
    color: #fff12b !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 2px 0 rgba(125,87,22,.18);
}

.notice-content-inner table {
    width: 100% !important;
    table-layout: fixed;
}

.notice-content-inner td {
    word-break: break-word;
    padding: 5px 3px !important;
    border: 1px solid #d7d7d7 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
}

.notice-content-inner table:first-of-type td:nth-child(-n+3) {
    background: #fff !important;
}

.notice-content-inner table:nth-of-type(2) td {
    font-weight: 700 !important;
}

.notice-content-inner table:nth-of-type(2) td:first-child {
    background: #fff141 !important;
}

.notice-content-inner table:nth-of-type(2) span[style*="font-size:26px"] {
    font-size: 17px !important;
}

.notice-content-inner > p:last-child {
    margin-top: 6px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    font-weight: 600;
}

.notice-hide-btn {
    display: block;
    margin: 10px auto 0;
    padding: 6px 16px;
    border: 2px solid #ff5252;
    border-radius: 16px;
    background: #fff;
    color: #ff2b2b;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

.hero-banner,
.quick-entry,
.tag-grid,
.feature-panels,
.switch-tabs,
.live-card,
.cta-banner,
.ad-card,
.brand-grid,
.black-cta,
.recommend-grid {
    margin-bottom: 10px;
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border: 2px solid #efad51;
    background: #fff;
}

.hero-swiper {
    position: relative;
    min-height: 118px;
}

.hero-slide {
    display: none;
    width: 100%;
}

.hero-slide.active {
    display: block;
}

.hero-banner img,
.ad-card img {
    width: 100%;
}

.quick-entry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.entry-btn {
    display: block;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    background: #fff;
    font-size: 24px;
    font-weight: 900;
    line-height: 60px;
    text-align: center;
}

.entry-green {
    background: linear-gradient(180deg, #1fd11d 0%, #10b611 100%);
    color: #fff;
}

.entry-orange {
    color: #ef6615;
}

.tag-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.tag-grid a {
    display: block;
    padding: 6px 4px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fe5d99 0%, #da0a50 100%);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.feature-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #dcdcdc;
}

.feature-card {
    position: relative;
    min-height: 80px;
    padding: 14px 10px 10px;
    background: linear-gradient(180deg, #121924 0%, #020202 100%);
    color: #fff;
    text-align: center;
}

.feature-card h3 {
    margin: 8px 0 6px;
    color: #2eb2ff;
    font-size: 18px;
    font-weight: 900;
}

.feature-card p {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.badge {
    position: absolute;
    left: 6px;
    top: 6px;
    width: 32px;
    height: 21px;
}

.switch-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #d9d9d9;
    background: #fff;
}

.switch-tabs a {
    padding: 8px 0;
    font-size: 19px;
    text-align: center;
}

.switch-tabs a.active {
    color: #5a1612;
    font-weight: 700;
}

.switch-tabs-compact a {
    padding: 6px 0;
    border-right: 1px solid #d9d9d9;
    font-size: 14px;
}

.switch-tabs-compact a:last-child {
    border-right: 0;
}

.switch-tabs-compact a.active {
    border-bottom: 1px solid #ff4d64;
    color: #d61d27;
}

.switch-tabs-three {
    grid-template-columns: repeat(3, 1fr);
}

.embedded-kj-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid #dadada;
    background: #fff;
}

.embedded-kj-frame {
    display: none;
    width: 100%;
    height: 0;
    border: 0;
    background: #fff;
}

.embedded-kj-frame.active {
    display: block;
}

.live-card {
    padding: 12px 10px 10px;
    border: 1px solid #dadada;
    background: #fff;
}

.live-card-reference {
    padding: 0;
}

.live-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.live-title {
    font-size: 15px;
}

.live-title span,
.live-link {
    color: #cb2626;
}

.live-time {
    font-size: 18px;
    font-weight: 900;
}

.live-link {
    font-size: 14px;
}

.live-header-reference {
    padding: 8px 0 6px;
    margin: 0 0 6px;
}

.live-header-reference .live-title {
    padding-left: 2px;
    font-size: 14px;
    font-weight: 700;
}

.live-time-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 34px;
    border: 2px solid #ff5a61;
    border-radius: 2px;
    background: #fff;
}

.live-header-reference .live-time {
    color: #2d2222;
    font-size: 17px;
    font-weight: 900;
}

.live-header-reference .live-link {
    padding-right: 2px;
    color: #dd3d3d;
}

.ball-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3px;
    margin-bottom: 12px;
}

.ball-item {
    min-width: 0;
    text-align: center;
}

.ball {
    width: 42px;
    height: 42px;
    margin: 0 auto 5px;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #232323;
    font-size: 22px;
    font-weight: 900;
    line-height: 42px;
}

.ball-blue {
    background-image: url("../ref-materials/material-17.png");
}

.ball-green {
    background-image: url("../ref-materials/material-4.png");
}

.ball-red {
    background-image: url("../ref-materials/material-8.png");
}

.ball-gold {
    border: 2px solid #ccbb7b;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.ball-text {
    font-size: 11px;
    white-space: nowrap;
}

.ball-row-reference {
    margin-bottom: 8px;
    padding: 0 6px;
}

.ball-row-reference .ball-item {
    min-width: 40px;
}

.ball-row-reference .ball-text {
    color: #202020;
    font-size: 12px;
}

.plus {
    padding-top: 4px;
    color: #f31e26;
    font-size: 30px;
    font-weight: 700;
}

.issue-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.issue-text {
    color: #4d3939;
    font-size: 14px;
}

.countdown-hidden {
    display: none;
}

.js-countdown {
    color: #cb2626;
    font-weight: 900;
}

.refresh-btn {
    display: inline-block;
    min-width: 46px;
    padding: 10px 6px;
    border-radius: 4px;
    background: linear-gradient(180deg, #f3302a 0%, #be0504 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.issue-row-reference {
    padding: 0 2px 0 0;
    align-items: center;
}

.issue-text-reference {
    color: #2f2323;
    font-size: 13px;
    white-space: nowrap;
}

.cta-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 55px;
    border-radius: 6px;
    background: linear-gradient(180deg, #5ad3ff 0%, #8d2fe3 100%);
    color: #ffcf9e;
    font-size: 16px;
    font-weight: 900;
}

.cta-hand {
    width: 49px;
    height: 23px;
    flex: none;
}

.ad-card {
    overflow: hidden;
    background: #fff;
}

.brand-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 2px 0 0;
    background: #fff;
}

.brand-item {
    padding: 0 2px 6px;
    text-align: center;
}

.brand-item img {
    width: 100%;
    max-width: 84px;
    margin: 0 auto 4px;
}

.brand-name {
    font-size: 13px;
}

.brand-seal {
    position: absolute;
    right: -4px;
    top: 14px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.black-cta {
    display: block;
    width: 62%;
    margin: 8px auto 12px;
    padding: 12px 10px;
    border-radius: 8px;
    background: #0e0e0e;
    color: #ffe126;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.recommend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
    border: 2px solid #ff5f73;
    background: #fff;
}

.recommend-card {
    display: block;
    overflow: hidden;
    border: 1px dashed #666;
    border-radius: 4px;
    background: #fff;
    text-align: center;
}

.recommend-card-top {
    padding: 7px 8px;
    background: linear-gradient(180deg, #ff2048 0%, #ec002a 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.recommend-card-name {
    padding: 14px 8px 8px;
    color: #f24424;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.recommend-card-link {
    padding: 0 8px 14px;
    color: #7fd2b0;
    font-size: 17px;
    line-height: 1.2;
}

.homepage-plan-section {
    margin-bottom: 10px;
}

.homepage-plan-section .plan-board {
    margin-top: 0;
}

.site-domain-panel {
    margin-bottom: 10px;
    border: 1px solid #d6d6d6;
    background: #fff;
}

.site-domain-panel-head {
    padding: 9px 8px 8px;
    background: #008614;
    color: #ffef22;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.site-domain-panel-body {
    background: #fff;
}

.site-domain-main {
    padding: 10px 8px 8px;
    border-top: 1px solid #d9d9d9;
    color: #111;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

.site-domain-main-icon {
    display: inline-block;
    margin-right: 4px;
    color: #ff4f4f;
    font-size: 30px;
    line-height: 0.8;
    vertical-align: middle;
    transform: skewX(-12deg);
}

.site-domain-list {
    display: flex;
    flex-direction: column;
}

.site-domain-link {
    display: block;
    padding: 8px 8px 9px;
    border-top: 1px solid #d9d9d9;
    color: #ff1212;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}

.home-sxbm-section {
    margin-bottom: 10px;
    border: 2px solid #ff4a4a;
    background: #fff;
}

.home-sxbm-head {
    padding: 10px 8px;
    border-bottom: 2px solid #ff4a4a;
    background: #e60000;
    color: #ffef3b;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.home-sxbm-body {
    background: #fff;
}

.home-sxbm-row {
    padding: 8px 8px 7px;
    border-bottom: 1px solid #ffc3c3;
    text-align: center;
}

.home-sxbm-row:last-child {
    border-bottom: 0;
}

.home-sxbm-meta {
    color: #111;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.home-sxbm-issue {
    margin-right: 3px;
}

.home-sxbm-type {
    margin-right: 5px;
    color: #8f30ff;
}

.home-sxbm-open {
    color: #ff8d23;
}

.home-sxbm-status {
    margin-left: 2px;
    font-weight: 900;
}

.home-sxbm-status.is-hit {
    color: #ff3030;
}

.home-sxbm-status.is-miss {
    color: #ff3030;
}

.home-sxbm-status.is-pending {
    color: #666;
}

.home-sxbm-groups {
    margin-top: 4px;
    color: #ff2020;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
}

.home-sxbm-chip {
    display: inline-block;
    margin: 0 2px;
}

.home-sxbm-zodiac.is-hit,
.home-sxbm-num.is-hit {
    background: #fff13b;
}

.home-sxbm-empty {
    padding: 14px 8px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.history-panel {
    background: #fff;
    border: 1px solid #d8d8d8;
}

.history-topbar {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 12px 10px;
    border-bottom: 1px solid #ededed;
    background: #fff;
}

.history-topbar h1 {
    margin: 8px 0 0;
    font-size: 20px;
    text-align: center;
}

.history-back {
    color: #c62727;
    font-size: 14px;
}

.history-item {
    padding: 12px 10px;
    border-bottom: 1px solid #efefef;
}

.history-item:last-child {
    border-bottom: 0;
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

.history-ball-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3px;
}

.bottom-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 430px;
    padding: 8px 10px;
    transform: translateX(-50%);
    background: rgba(28, 17, 19, 0.94);
    color: #faf3f3;
}

.close-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #452b2b;
    font-size: 20px;
    line-height: 24px;
    cursor: pointer;
}

.bottom-copy {
    flex: 1;
    font-size: 14px;
    white-space: nowrap;
}

.bottom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    white-space: nowrap;
}

.bottom-btn.danger {
    padding: 0 12px;
    border-radius: 4px;
    background: #e31f23;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.bottom-btn.warn img {
    width: 94px;
    height: 38px;
}

@media (min-width: 431px) {
    .page-shell {
        overflow: hidden;
        border-radius: 10px;
    }
}

@media (max-width: 390px) {
    .notice-dialog {
        width: calc(100% - 64px);
        padding: 12px 8px 11px;
    }

    .notice-header span {
        min-width: 110px;
        font-size: 15px;
    }

    .notice-countdown {
        right: 24px;
        top: 12px;
        font-size: 16px;
    }

    .notice-brand img {
        width: 78%;
    }

    .entry-btn {
        font-size: 21px;
    }

    .tag-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .live-header {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .live-time,
    .live-link {
        justify-self: start;
    }

    .ball {
        width: 38px;
        height: 38px;
        font-size: 20px;
        line-height: 38px;
    }

    .brand-seal {
        width: 60px;
        height: 60px;
    }
}
