/* ============================================================
 * 首页 - 1:1 还原设计稿（红色党政风 / 圆梦惠民创富通）
 * 设计基准：375 × 1700+px，1rem = min(100vw, 480px) / 37.5
 * ============================================================ */
html { font-size: calc(min(100vw, 480px) / 37.5); }
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #fdebd1;
    min-height: 100%;
}
body {
    min-height: 100vh;
    font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    color: #2a1308;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* ===== Phone 容器（顶部红 → 米黄渐变） ===== */
.phone {
    position: relative;
    width: 100%;
    max-width: 37.5rem;
    margin: 0 auto;
    min-height: 100vh;
    padding: 0 0 7rem;
    background:
        linear-gradient(180deg, #d8131c 0%, #e8424a 16%, #f49a4f 25%, #fde0b6 32%, #fdebd1 100%);
    overflow: hidden;
}

/* 顶部装饰背景（已包含红色 + 党徽 + 天安门 + 金光） */
.bg-decor {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    z-index: 0;
}

/* ===== Hero 标题（圆梦惠民创富通） ===== */
.hero {
    position: relative;
    width: 100%;
    height: 15.4rem;
    z-index: 1;
    padding-top: 1.05rem;
}
.hero__title-img {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 0 1.1rem;
    text-align: center;
}
.hero__title-img img {
    display: block;
    width: min(32rem, 92vw);
    max-width: none;
    height: auto;
    margin: 0 auto;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 0.25rem 0.35rem rgba(120, 0, 0, 0.22));
}
.hero__values {
    position: absolute;
    z-index: 2;
    left: 1.2rem;
    right: 1.2rem;
    top: 10.65rem;
    color: #ffe7a6;
    font-size: 1.16rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.03rem;
    text-align: center;
    white-space: normal;
    text-shadow: 0 0.12rem 0.3rem rgba(110, 0, 0, 0.38);
    pointer-events: none;
}

/* ===== 首页运营弹窗 ===== */
.home-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.6rem;
    background: rgba(43, 12, 6, 0.58);
    -webkit-backdrop-filter: blur(0.25rem);
    backdrop-filter: blur(0.25rem);
}
.home-popup.is-hide {
    opacity: 0;
    transition: opacity 0.18s ease;
}
.home-popup__panel {
    position: relative;
    width: min(36rem, 96vw);
    max-height: 86vh;
    padding: 2.4rem 1.8rem 1.8rem;
    overflow-y: auto;
    background: linear-gradient(180deg, #fffdf7, #fff2d8);
    border: 0.12rem solid #e9b35e;
    border-radius: 1.4rem;
    box-shadow: 0 1.2rem 3rem rgba(64, 12, 0, 0.36);
}
.home-popup__close {
    position: absolute;
    right: 0.8rem;
    top: 0.65rem;
    width: 2.8rem;
    height: 2.8rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9a3412;
    font-size: 2.4rem;
    line-height: 1;
}
.home-popup__badge {
    width: 7.4rem;
    height: 2.9rem;
    margin: 0 auto 1rem;
    border-radius: 999rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #d8131c, #a50710);
    color: #fff7d6;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: 0.12rem;
}
.home-popup__title {
    margin: 0 0 1.15rem;
    color: #b10d16;
    font-size: 2.25rem;
    line-height: 1.25;
    text-align: center;
    font-weight: 900;
}
.home-popup__content {
    color: #5d2b0b;
    font-size: 1.48rem;
    line-height: 1.95;
    text-align: left;
    letter-spacing: 0.02rem;
}
.home-popup__link {
    color: #c81222;
    font-weight: 700;
    word-break: break-all;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}
.home-popup__link:active { color: #8a0810; }

.home-popup__cs {
    margin-top: 1.4rem;
    padding: 1.4rem 1.2rem 1.2rem;
    background: linear-gradient(180deg, #fffaef 0%, #fff2d4 100%);
    border: 0.05rem solid #f1cf86;
    border-radius: 0.9rem;
    text-align: center;
}
.home-popup__cs-label {
    font-size: 1.45rem;
    font-weight: 800;
    color: #8a3905;
    letter-spacing: 0.12rem;
    margin-bottom: 1rem;
}
.home-popup__qr {
    width: 16.8rem;
    height: 16.8rem;
    margin: 0 auto 0.9rem;
    padding: 0.6rem;
    background: #fff;
    border: 0.1rem solid #e6cf94;
    border-radius: 0.6rem;
    box-shadow: 0 0.3rem 0.8rem rgba(180, 100, 20, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-popup__qr img,
.home-popup__qr canvas {
    display: block;
    width: 100%;
    height: 100%;
}
.home-popup__cs-link {
    display: inline-block;
    max-width: 100%;
    color: #c81222;
    font-weight: 700;
    font-size: 1.3rem;
    word-break: break-all;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
    padding: 0.2rem 0.4rem;
}
.home-popup__cs-link:active { color: #8a0810; }
.home-popup__cs-hint {
    margin-top: 0.5rem;
    color: #8a6e35;
    font-size: 1.1rem;
    letter-spacing: 0.02rem;
}
.home-popup__btn {
    width: 100%;
    height: 4.6rem;
    margin-top: 1.55rem;
    border: 0;
    border-radius: 999rem;
    background: linear-gradient(180deg, #e11d2a, #b40812);
    color: #fff;
    font-size: 1.62rem;
    font-weight: 900;
    box-shadow: 0 0.45rem 1rem rgba(180, 8, 18, 0.3);
}

/* ===== 资讯速报 大红卡（直接用设计稿原图） ===== */
.news-banner {
    margin: 0.6rem 1.2rem 0;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 0.6rem 1.4rem rgba(140, 8, 12, 0.28);
    line-height: 0;             /* 防止 img 下方多 4px 行间距 */
    z-index: 2;
    position: relative;
}
.news-banner__img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* ===== 2×2 入口卡片（直接用设计稿图 + 4 个透明可点击区） ===== */
.entry-grid {
    position: relative;
    margin: 1rem 1.2rem 0;
    z-index: 2;
    line-height: 0;            /* 消除 img 下方 4px gap */
}
.entry-grid__bg {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}
.entry-grid__title-cover {
    position: absolute;
    z-index: 2;
    background: #fff;
    color: #111;
    line-height: 1.2;
    pointer-events: none;
}
.entry-grid__title-cover--tl {
    left: 3.8%;
    top: 9.5%;
    width: 30%;
    height: 22%;
}
.entry-grid__title-cover--tr {
    left: 53.8%;
    top: 9.5%;
    width: 25%;
    height: 22%;
}
.entry-grid__title-cover--bl {
    left: 3.8%;
    top: 59.5%;
    width: 35%;
    height: 22%;
}
.entry-grid__title-main {
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.03rem;
    white-space: nowrap;
}
.entry-grid__title-sub {
    margin-top: 0.7rem;
    font-size: 1.2rem;
    color: #333;
    white-space: nowrap;
}
/* 4 个透明可点击区，按 2×2 网格平分覆盖 */
.entry-grid__hit {
    position: absolute;
    z-index: 3;
    width: 50%;
    height: 50%;
    -webkit-tap-highlight-color: transparent;
    /* 设计稿 4 张卡之间有 ~3% 的间隙，边缘处不要让 hit area 覆盖到外边 */
}
.entry-grid__hit:active {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.6rem;
}
.entry-grid__hit--tl { top: 0;   left: 0; }
.entry-grid__hit--tr { top: 0;   right: 0; }
.entry-grid__hit--bl { bottom: 0; left: 0; }
.entry-grid__hit--br { bottom: 0; right: 0; }

/* ===== 永远跟党走 横幅 ===== */
.party-banner {
    position: relative;
    margin: 1.2rem 1.2rem 0;
    padding: 0.95rem 1.2rem;
    background:
        linear-gradient(180deg, #ea1c25 0%, #b30c12 100%);
    border-radius: 0.4rem;
    color: #fff;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.25rem;
    box-shadow: 0 0.4rem 0.9rem rgba(140, 8, 12, 0.28);
    border-top: 0.15rem solid rgba(255, 215, 110, 0.5);
    border-bottom: 0.15rem solid rgba(255, 215, 110, 0.5);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.party-banner__text {
    text-shadow: 0 0.15rem 0.3rem rgba(80, 0, 0, 0.55);
    line-height: 1;
}
.party-banner__deco {
    color: #ffd75e;
    font-size: 1.4rem;
    line-height: 1;
}

/* ===== 红头文件 ===== */
.hf-doc {
    margin: 1.2rem 1.2rem 0;
    background: #fff8ef;
    border-radius: 0.4rem;
    box-shadow: 0 0.3rem 0.7rem rgba(140, 0, 0, 0.08);
    overflow: hidden;
    z-index: 2;
    position: relative;
}
.hf-doc--image {
    background: #ffffff;
    padding: 0;
    border-radius: 0.4rem;
    box-shadow: 0 0.3rem 0.7rem rgba(140, 0, 0, 0.1);
}
.hf-doc__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.4rem;
}
.hf-doc__paper {
    min-height: 54rem;
    padding: 2rem 1.65rem 1.8rem;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,253,248,.98)),
        #fff;
    border: 0.16rem solid #d7b58a;
    color: #23130b;
    font-family: SimSun, "Songti SC", "Noto Serif SC", serif;
    position: relative;
}
.hf-doc__paper::before {
    content: '';
    position: absolute;
    inset: 0.55rem;
    border: 0.05rem solid rgba(190, 28, 36, 0.16);
    pointer-events: none;
}
.hf-doc__org {
    color: #c50000;
    font-size: 2.05rem;
    line-height: 1.28;
    text-align: center;
    font-weight: 900;
    letter-spacing: 0.16rem;
    font-family: SimSun, "Songti SC", "Noto Serif SC", serif;
    text-shadow: 0 0.05rem 0 rgba(197, 0, 0, 0.12);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
}
.hf-doc__org-main {
    width: 25.6rem;
    text-align: left;
}
.hf-doc__org-line1 {
    line-height: 1.22;
    display: flex;
    justify-content: space-between;
    width: 100%;
    letter-spacing: 0;
    white-space: nowrap;
}
.hf-doc__org-line1 span {
    display: block;
    width: 100%;
    text-align: justify;
    text-align-last: justify;
}
.hf-doc__org-spread {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.15rem;
    line-height: 1.2;
    letter-spacing: 0;
}
.hf-doc__org-spread span {
    display: inline-block;
    min-width: 1em;
    text-align: center;
}
.hf-doc__org-file {
    margin-top: 2.1rem;
    font-size: 2.35rem;
    letter-spacing: 0.32rem;
    white-space: nowrap;
}
.hf-doc__code {
    margin-top: 0.55rem;
    text-align: center;
    color: #3a1b10;
    font-size: 1.25rem;
    font-weight: 700;
}
.hf-doc__redline {
    height: 0.18rem;
    margin: 1rem 0 1.25rem;
    background: #c50000;
    box-shadow: 0 0.22rem 0 #f3d4d4;
}
.hf-doc__title {
    margin: 0 0 1rem;
    color: #111;
    font-size: 1.48rem;
    line-height: 1.42;
    text-align: center;
    font-weight: 900;
}
.hf-doc__body {
    height: 36rem;
    overflow: hidden;
    font-size: 1.16rem;
    line-height: 1.74;
    color: #24150d;
    text-align: justify;
    font-weight: 600;
}
.hf-doc__body p {
    margin: 0 0 0.7rem;
}
.hf-doc__to {
    font-weight: 800;
}
.hf-doc__slogan {
    text-align: left;
    padding-left: 1.2rem;
    color: #111;
    font-weight: 900;
    font-size: 1.12em;
    margin-top: 0.8rem !important;
}

/* ===== Footer ===== */
.footer {
    margin: 1.2rem 1.2rem 0;
    padding: 1rem 0 1.4rem;
    text-align: center;
    color: #d8131c;
    font-size: 1rem;
    line-height: 1.8;
    border-top: 0.05rem solid rgba(216, 19, 28, 0.2);
    background: transparent;
}
.footer__line { display: block; }

/* ===== 底部 Tabbar ===== */
.tabbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 37.5rem;
    height: 5.8rem;
    display: flex;
    background: #fff;
    box-shadow: 0 -0.2rem 0.8rem rgba(0, 0, 0, 0.06);
    border-top: 0.05rem solid #f0e0c0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 20;
}
.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: #777;
    font-size: 1.05rem;
}
.tab__icon { width: 2.4rem; height: 2.4rem; color: inherit; }
.tab:not(.tab--active) .tab__icon--img { filter: grayscale(1) opacity(0.55); }
.tab__icon--img { transition: filter 0.15s ease; }
.tab--active { color: #d8131c; font-weight: 700; }
