:root {
    --fixed-header-height: 130px;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 固定头部由实际内容撑开，公告占位高度由 ResizeObserver 同步。 */
.site-header.index-header {
    height: auto;
    min-height: 130px;
}

.anchor-nav {
    height: auto;
    min-height: 64px;
    grid-auto-rows: minmax(32px, auto);
}

.anchor-nav button {
    height: auto;
    min-height: 32px;
    overflow: hidden;
    padding: 6px 2px;
    line-height: 1.15;
    text-overflow: ellipsis;
}

.header-space {
    height: var(--fixed-header-height);
}

.data-section,
.forum-section {
    scroll-margin-top: calc(var(--fixed-header-height) + 6px);
}

/* 子页面内容随实际数据自然收高，避免只有一两条数据时留下整块白色空区。 */
.detail-card {
    min-height: 0 !important;
}

.detail-main .detail-back {
    display: none;
}

/* 子页面返回按钮始终固定在右上角，滚动后仍可直接回首页。 */
.site-header:not(.index-header) .home-link {
    position: fixed;
    z-index: 10020;
    top: calc(env(safe-area-inset-top) + 7px);
    right: max(8px, env(safe-area-inset-right));
    margin: 0;
    border-radius: 9px;
    background: rgba(0, 75, 58, .94);
    box-shadow: 0 4px 13px rgba(0, 35, 27, .24);
}

/* 竖屏中的横向直播画面下方使用完整主题背景，不再像未加载的空白页。 */
.seamless-live-body,
.seamless-shell,
.seamless-main {
    background-color: #f8f1df;
    background-image:
        radial-gradient(circle at 18% 22%, rgba(0, 113, 88, .09), transparent 28%),
        radial-gradient(circle at 82% 78%, rgba(226, 190, 100, .17), transparent 30%);
}

.seamless-main {
    min-height: calc(100vh - 66px);
}

.seamless-main::after {
    content: "新新彩 · 公平 · 公正 · 公开";
    display: block;
    padding: 38px 12px 22px;
    color: rgba(0, 75, 58, .42);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .28em;
    text-align: center;
}

@media (max-width: 450px) {
    .anchor-nav button {
        font-size: clamp(10px, 2.9vw, 12px);
    }
}

@media (max-width: 360px) {
    .anchor-nav button {
        padding-inline: 1px;
        font-size: 10px;
    }
}
