* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    background: #f2f4f7;
    color: #222222;
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    width: 100%;
    max-width: 800px;
    min-height: 100vh;
    margin: 0 auto;
    background: #f2f4f7;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
    height: 44px;
    background: #08c25e;
    color: #ffffff;
    text-align: center;
}

.topbar h1 {
    margin: 0;
    font-size: 18px;
}

.topbar-back {
    border: 0;
    background: none;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.topbar-home {
    font-size: 14px;
}

/* 分类目录：横向滚动的小标签，固定在顶栏下面 */
.dq-nav {
    position: sticky;
    top: 44px;
    z-index: 20;
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    overflow-x: auto;
    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;
    scrollbar-width: none;
}

.dq-nav::-webkit-scrollbar {
    display: none;
}

.dq-chip {
    flex: 0 0 auto;
    padding: 4px 12px;
    border: 1px solid #dcdfe4;
    border-radius: 14px;
    background: #f7f8fa;
    color: #444444;
    font-size: 14px;
    white-space: nowrap;
}

.dq-chip.is-active {
    border-color: #08c25e;
    background: #08c25e;
    color: #ffffff;
}

.dq-main {
    padding: 10px 10px 30px;
}

/* 分类卡片 */
.dq-card {
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    --accent: #e5262c;
    --accent2: #ff6b5e;
    --tint: #fff1f0;
}

.t-red {
    --accent: #e5262c;
    --accent2: #ff6b5e;
    --tint: #fff1f0;
}

.t-blue {
    --accent: #1e6fe8;
    --accent2: #4aa3ff;
    --tint: #eef5ff;
}

.t-green {
    --accent: #12a150;
    --accent2: #4cd081;
    --tint: #effaf3;
}

.t-orange {
    --accent: #f08c00;
    --accent2: #ffc247;
    --tint: #fff7e6;
}

.t-purple {
    --accent: #7c4dff;
    --accent2: #b39bff;
    --tint: #f4f0ff;
}

.t-teal {
    --accent: #0c9aa8;
    --accent2: #4fd1d9;
    --tint: #eafafb;
}

.t-pink {
    --accent: #d6336c;
    --accent2: #ff7fae;
    --tint: #fff0f6;
}

.t-gold {
    --accent: #b8860b;
    --accent2: #e8bf4d;
    --tint: #fffaea;
}

.dq-card-head {
    padding: 8px 14px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #ffffff;
}

.dq-card-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.dq-desc {
    margin: 0;
    padding: 5px 14px;
    background: var(--tint);
    color: #7a828c;
    font-size: 13px;
}

.dq-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    border-top: 1px solid #eef0f3;
}

.dq-row:first-child {
    border-top: 0;
}

.dq-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    background: var(--tint);
    border-right: 1px solid #eef0f3;
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

.dq-label img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.dq-label.l-red {
    color: #e5262c;
}

.dq-label.l-blue,
.dq-label.l-water {
    color: #1e6fe8;
}

.dq-label.l-green,
.dq-label.l-wood {
    color: #12a150;
}

.dq-label.l-gold {
    color: #d99a00;
}

.dq-label.l-fire {
    color: #ff4d00;
}

.dq-label.l-earth {
    color: #a67c00;
}

.dq-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
    padding: 8px 10px;
}

.dq-text {
    flex: 1 1 auto;
    font-size: 16px;
    line-height: 1.7;
    word-break: break-all;
}

.dq-count {
    margin-left: auto;
    color: #a0a6ae;
    font-size: 12px;
}

/* 生肖文字按红/蓝/绿肖上色 */
.zx {
    font-weight: 700;
}

.z-red {
    color: #e5262c;
}

.z-blue {
    color: #1e6fe8;
}

.z-green {
    color: #12a150;
}

/* 号码球：红/蓝/绿波 */
.dq-balls {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.dq-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.dq-ball.b-red {
    background: radial-gradient(circle at 35% 30%, #ff6a63, #e5262c);
}

.dq-ball.b-blue {
    background: radial-gradient(circle at 35% 30%, #5b9bff, #1e5fe0);
}

.dq-ball.b-green {
    background: radial-gradient(circle at 35% 30%, #4fd081, #109a47);
}

@media (max-width: 600px) {
    .dq-row {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .dq-label {
        font-size: 14px;
    }

    .dq-label img {
        width: 28px;
        height: 28px;
    }

    .dq-text {
        font-size: 14px;
    }

    .dq-ball {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .dq-balls {
        gap: 4px;
    }

    .dq-card-head h2 {
        font-size: 16px;
    }
}
