/* 对齐参考站 /lottery：统一绿色、灰色筛选栏及无红框列表。 */
.history-shell .history-lottery-tabs{display:flex;height:44px;overflow-x:auto;border-bottom:1px solid #eee;background:#fff;scrollbar-width:none}
.history-shell .history-lottery-tabs::-webkit-scrollbar{display:none}
.history-shell .history-lottery-tabs button{flex:0 0 auto;min-width:72px;height:44px;padding:0 12px;border:0;border-radius:0;background:#fff;color:#555;font-size:0.26rem}
.history-shell .history-lottery-tabs button.active{position:relative;color:#07c160;font-weight:600}
.history-shell .history-lottery-tabs button.active:after{content:"";position:absolute;left:22%;right:22%;bottom:0;height:2px;background:#07c160}
.history-body,.history-shell{background:#fff}.history-shell .red-head{height:46px;grid-template-columns:74px 1fr 48px;background:#07c160}.history-shell .red-head h1{font-size:0.36rem;font-weight:500}.history-shell .red-head a,.history-shell .red-head button{font-size:0.3rem}.history-shell .history-tabs{height:48px;gap:0;padding:0;background:#fff;border-bottom:1px solid #eee}.history-shell .history-tabs button{position:relative;height:48px;border:0;border-radius:0;background:#fff;color:#222;font-size:0.3rem}.history-shell .history-tabs button.active{background:#fff;color:#07c160}.history-shell .history-tabs button.active:after{content:"";position:absolute;left:34%;right:34%;bottom:0;height:2px;background:#07c160}.history-filter{min-height:52px;display:flex;align-items:center;padding:12px 10px;background:#eee;font-size:0.26rem}.history-filter strong{flex:1;font-size:0.28rem}.history-filter span{margin-left:10px;padding:4px 10px;border-radius:14px;background:#fff;color:#555}.history-filter span.active{background:#07c160;color:#fff}.history-shell .history-entry{margin:0;padding:15px 10px 9px;border-top:0;border-bottom:1px solid #eee}.history-shell .entry-title{padding:0 1px;font-size:0.3rem}.history-shell .entry-title time{color:#999;font-size:0.24rem}.history-shell .entry-balls{margin-top:8px;padding:5px 0 4px;border:0;border-radius:0;background:#fff}.history-shell .entry-balls .draw-ball{width:44px;flex-basis:44px}.history-shell .entry-balls .ball{width:44px;height:44px}.history-shell .entry-balls small{color:#444;font-size:0.22rem}.history-shell .entry-balls .plus{margin:0 3px;color:#333;font-size:0.46rem}@media(max-width:390px){.history-shell .history-entry{padding-left:6px;padding-right:6px}.history-shell .entry-balls{gap:1px}.history-shell .entry-balls .draw-ball{width:39px;flex-basis:39px}.history-shell .entry-balls .ball{width:39px;height:39px}}

/* 历史开奖触底分页状态 */
.history-shell .history-load-more{display:flex;min-height:54px;align-items:center;justify-content:center;gap:8px;padding:14px 12px 22px;color:#999;font-size:0.24rem;text-align:center}
.history-shell .history-load-more button{border:0;background:transparent;color:#07c160;font-size:0.26rem;cursor:pointer}
.history-shell .history-load-more.is-error button{color:#e5484d}
.history-shell .history-spinner{width:16px;height:16px;border:2px solid #d8f3e6;border-top-color:#07c160;border-radius:50%;animation:history-spin .7s linear infinite}
@keyframes history-spin{to{transform:rotate(360deg)}}

/* History tabs must stay compact even when the shared reference stylesheet is injected later. */
.history-shell #historyTabs {
    position: relative !important;
    z-index: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}

.history-shell #historyTabs button {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    line-height: 48px !important;
    font-size:0.3rem !important;
}

.history-shell .history-panel,
.history-shell .history-filter {
    position: relative;
    z-index: 1;
    clear: both;
}

.history-shell .history-filter {
    margin-top: 0 !important;
}

/* 开奖记录标题右侧操作区：与参考页保持单行、等高、右对齐。 */
.history-shell .history-filter {
    overflow: visible !important;
    padding: 10px 12px !important;
}

.history-shell .history-filter > strong {
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 28px;
}

.history-shell .history-tools {
    position: relative;
    z-index: 8;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: 8px;
}

.history-shell .history-tools button {
    box-sizing: border-box;
    min-width: 44px;
    height: 28px;
    margin: 0 !important;
    padding: 0 11px !important;
    border: 1px solid #e8e8e8;
    border-radius: 15px;
    background: #fff;
    color: #333;
    font-size:0.24rem;
    line-height: 26px;
    white-space: nowrap;
}

.history-shell .history-sort {
    position: relative;
}

.history-shell .history-sort-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    width: 128px;
    padding: 6px 0;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.13);
}

.history-shell .history-sort-menu[hidden] {
    display: none !important;
}

.history-shell .history-sort-menu button {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 16px !important;
    border: 0;
    border-radius: 0;
    background: #fff;
    text-align: center;
    font-size:0.26rem;
    line-height: 44px;
}

.history-shell .history-sort-menu button + button {
    border-top: 1px solid #f2f2f2;
}

@media (max-width: 390px) {
    .history-shell .history-filter { padding-left: 8px !important; padding-right: 8px !important; }
    .history-shell .history-tools { gap: 6px; margin-left: 5px; }
    .history-shell .history-tools button { min-width: 40px; padding: 0 8px !important; }
}
