/* ========== 我为祖国大地插红旗 · 国庆 H5 ========== */
:root {
    --red:        #c1121f;
    --red-deep:   #8e0a15;
    --red-soft:   #e63946;
    --gold:       #f6c453;
    --gold-soft:  #ffe9b8;
    --paper:      #fff8e7;
    --ink:        #5a2a04;
    --green:      #1e6f3f;
    --shadow:     0 6px 18px rgba(120, 10, 10, .18);
    --radius:     16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", system-ui, sans-serif;
    background:
        radial-gradient(circle at 20% -5%, rgba(255, 224, 150, .5), transparent 45%),
        radial-gradient(circle at 85% 0%, rgba(255, 90, 90, .35), transparent 42%),
        linear-gradient(160deg, #a40d1a 0%, #c1121f 38%, #8e0a15 100%);
    color: var(--ink);
    min-height: 100vh;
    padding-bottom: 74px;
}
button { font-family: inherit; border: none; cursor: pointer; }

/* ---------- 通用图标(sprite) ---------- */
.ic {
    width: 1.15em; height: 1.15em;
    fill: none; stroke: currentColor;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
    vertical-align: -.14em;
    flex: none;
}

/* ---------- 顶部 hero ---------- */
.hero {
    position: relative;
    color: #fff;
    text-align: center;
    padding: 26px 18px 46px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 110%, rgba(255, 208, 116, .35), transparent 60%);
}
.hero-stars {
    position: absolute; top: 8px; left: 0; right: 0; height: 10px;
    background:
        radial-gradient(circle 2.5px, rgba(255, 224, 140, .95) 0 100%, transparent 0) 12% 40%/22px 12px no-repeat,
        radial-gradient(circle 2px, rgba(255, 224, 140, .8) 0 100%, transparent 0) 38% 0/30px 12px no-repeat,
        radial-gradient(circle 2.5px, rgba(255, 224, 140, .95) 0 100%, transparent 0) 62% 45%/24px 12px no-repeat,
        radial-gradient(circle 2px, rgba(255, 224, 140, .8) 0 100%, transparent 0) 86% 10%/26px 12px no-repeat;
    animation: twinkle 3.2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes twinkle { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.hero h1 {
    font-family: "STKaiti", "KaiTi", "楷体", serif;
    font-size: 27px; letter-spacing: 3px; font-weight: 700;
    text-shadow: 0 2px 10px rgba(90, 0, 0, .45);
    margin-top: 10px;
    display: flex; align-items: center; justify-content: center; gap: 7px;
}
.hero-flag { width: 1.15em; height: 1.15em; color: #ffd76e; }
.hero-sub { margin-top: 9px; font-size: 13px; color: rgba(255, 240, 220, .92); letter-spacing: 1px; }
.rules-link {
    position: absolute; top: 14px; right: 14px;
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #8f0b17;
    background: linear-gradient(180deg, #ffe08c, #f6c453);
    border-radius: 999px; padding: 5px 12px;
    box-shadow: 0 3px 8px rgba(80, 0, 0, .3);
    font-weight: 600;
}
.hero-wave {
    position: absolute; left: -12%; right: -12%; bottom: -34px; height: 64px;
    background: var(--paper);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    opacity: .97;
}

/* ---------- 首页广告位(1080×300,跑马灯上方) ---------- */
.ad-banner {
    display: block; margin: 0 12px;
    border-radius: 14px; overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(230, 205, 160, .8);
    background: #f6e6bf;
    cursor: pointer;
}
.ad-banner[href=""] { cursor: default; }
/* 未填跳转地址:不可点击、不跳转 */
.ad-banner.ad-plain { cursor: default; pointer-events: none; }
.ad-banner.ad-plain:hover { opacity: 1; }
.ad-banner[hidden] { display: none !important; }
.ad-banner img {
    display: block; width: 100%; height: auto;
    max-height: 360px;
    object-fit: contain;      /* 任意尺寸/比例都完整显示,不裁剪不变形 */
    background: #f6e6bf;
}

/* ---------- 跑马灯 ---------- */
.marquee {
    display: flex; align-items: center; gap: 8px;
    margin: -14px 12px 10px;
    background: linear-gradient(90deg, #b45309, #d97706, #b45309);
    color: #fff;
    border-radius: 10px; padding: 7px 10px;
    box-shadow: var(--shadow);
    position: relative; z-index: 2;
    overflow: hidden;
}
.marquee-ico { font-size: 15px; flex: none; }
.marquee-body { flex: 1; overflow: hidden; }
.marquee-track {
    display: inline-block;
    white-space: nowrap;
    font-size: 12px; letter-spacing: .5px;
    will-change: transform;
}
.marquee-track b { color: #ffe27a; font-weight: 700; }

/* ---------- 统计条 ---------- */
.statbar {
    display: flex; align-items: stretch;
    margin: 10px 12px;
    background: linear-gradient(135deg, #fffbee, #fff3d6);
    border: 1px solid #f0d9a6;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.stat { flex: 1; text-align: center; padding: 14px 6px 12px; }
.stat b {
    display: block; font-size: 24px; color: var(--red);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.15;
}
.stat b::after { content: '+'; color: var(--gold); font-size: 16px; }
.stat span { font-size: 11.5px; color: #8a6a3c; }
.stat-sep { width: 1px; background: linear-gradient(180deg, transparent, #e4c98d, transparent); margin: 12px 0; }

/* ---------- 战报(统计 + 地点榜) ---------- */
.report-panel { display: flex; gap: 12px; padding: 14px 12px; }
.report-hero { flex: 1.1; min-width: 0; }
.rh-line { font-size: 12px; color: #7c5a2e; line-height: 1.75; }
.rh-line b { color: var(--red); font-size: 15px; font-family: Georgia, serif; }
.rh-place {
    margin-top: 6px;
    font-size: 22px; font-weight: 800; letter-spacing: 1px;
    color: #8f6a33;
}
.rh-place.live {
    display: inline-block;
    color: #fff;
    background: linear-gradient(135deg, #c1121f, #920c18);
    padding: 4px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(150, 10, 10, .28);
}
.report-rank { flex: 1; min-width: 0; border-left: 1px dashed #e6cf9c; padding-left: 12px; }
.rr-title { font-size: 12px; font-weight: 700; color: var(--red-deep); margin-bottom: 6px; }
.rr-list { list-style: none; display: grid; gap: 6px; }
.rr-list li { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 2px; }
.rr-no {
    width: 18px; height: 18px; border-radius: 6px; flex: none;
    display: grid; place-items: center;
    font-size: 11px; font-weight: 800; color: #9a7a45;
    background: #f2e2bb;
}
.rr-no.rr1 { background: linear-gradient(180deg, #ffd968, #f0a62e); color: #6b3200; }
.rr-no.rr2 { background: linear-gradient(180deg, #e9e9e9, #b8b8b8); color: #464646; }
.rr-no.rr3 { background: linear-gradient(180deg, #f2c191, #cd7f3d); color: #5d2f06; }
.rr-name { flex: 1; font-size: 12px; font-weight: 600; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rr-num { flex: none; font-size: 10.5px; color: #8a6a3c; }
.rr-num b { color: var(--red); font-size: 13px; font-family: Georgia, serif; }
.rr-bar {
    position: absolute; left: 2px; right: 2px; bottom: -3px; height: 2.5px;
    background: linear-gradient(90deg, #f2c77d, #e9b457);
    border-radius: 3px; opacity: .55;
}
.rr-empty { color: #b6a07f; font-size: 12px; }

/* ---------- 面板通用 ---------- */
.panel {
    margin: 10px 12px;
    background: linear-gradient(170deg, #fffdf4, #fff3d8);
    border: 1px solid #efd9a4;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
}
.panel-title {
    font-size: 15px; font-weight: 700; color: var(--red-deep);
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 10px;
}
.panel-title::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, #e9c98a, transparent);
}

/* ---------- 我的 ---------- */
.me-panel { display: flex; align-items: center; gap: 11px; }
.me-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--red-soft), var(--red));
    display: grid; place-items: center;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 3px 8px rgba(150, 10, 10, .3);
}
.me-avatar .ic { width: 26px; height: 26px; color: #fff; stroke-width: 2; }
.me-info { flex: 1; min-width: 0; }
.me-name { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); font-size: 15px; }
.me-badge {
    font-size: 10px; color: #8f0b17;
    background: linear-gradient(180deg, #ffe08c, #f6c453);
    border-radius: 999px; padding: 1.5px 7px;
}
.me-meta { margin-top: 3px; font-size: 11.5px; color: #a07d4c; }
.me-flags { text-align: center; background: rgba(193, 18, 31, .08); border-radius: 12px; padding: 6px 10px; }
.me-flags b { display: block; font-size: 21px; color: var(--red); line-height: 1.1; }
.me-flags span { font-size: 10px; color: #a07d4c; }

/* ---------- 热门地区 ---------- */
.hot-card {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, #c1121f, #a50f1c 65%, #7f0b14);
    border-radius: 13px; padding: 12px 13px;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.hot-rank {
    font-family: Georgia, serif; font-size: 26px; font-weight: 700;
    color: #ffd980; text-shadow: 0 1px 0 rgba(90, 0, 0, .5);
    -webkit-text-stroke: .5px rgba(90, 0, 0, .4);
}
.hot-info { flex: 1; min-width: 0; }
.hot-name { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.hot-count { font-size: 12px; color: rgba(255, 235, 210, .95); margin-top: 2px; }
.hot-bar {
    height: 5px; background: rgba(0, 0, 0, .25);
    border-radius: 99px; margin-top: 6px; overflow: hidden;
}
.hot-bar i {
    display: block; height: 100%;
    background: linear-gradient(90deg, #ffe08c, #ffd166);
    border-radius: 99px; transition: width .6s ease;
}
.hot-btn {
    flex: none; font-size: 13px; font-weight: 700;
    color: #8f0b17; background: linear-gradient(180deg, #ffe9ad, #f7cd63);
    border-radius: 999px; padding: 9px 13px;
    box-shadow: 0 3px 8px rgba(70, 0, 0, .35);
    white-space: nowrap;
}

/* ---------- 整图插旗地图 ---------- */
.plot-wrap {
    position: relative;
    border-radius: 16px; overflow: hidden;
    border: 1.5px solid rgba(140, 100, 52, .5);
    box-shadow: var(--shadow);
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
    background: #f2f7f2;
    touch-action: manipulation;
    aspect-ratio: 1707 / 1280;   /* 与地图图原比例一致,加载中也不塌陷,保证坐标稳定 */
}
.plot-wrap img { display: block; width: 100%; height: auto; pointer-events: none; }
.plot-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.flag-pin {
    position: absolute;
    transform: translate(-50%, -96%) rotate(var(--rot, 0deg));
    width: 20px; height: 25px;
    filter: drop-shadow(0 2px 2px rgba(60, 10, 6, .35));
    transform-origin: 50% 100%;
    animation: pin-pop .28s ease;
}
@keyframes pin-pop { from { transform: translate(-50%, -96%) rotate(var(--rot, 0deg)) scale(.2); } to { transform: translate(-50%, -96%) rotate(var(--rot, 0deg)) scale(1); } }
.flag-pin img { width: 100%; height: auto; }
.plot-focus {
    position: absolute; z-index: 6;
    transform: translate(-50%, -100%);
    pointer-events: none;
}
.plot-focus i {
    display: block; width: 40px; height: 46px; margin: -10px 0 0 -20px;
    border: 2px dashed rgba(255, 236, 180, .95);
    border-radius: 50% 50% 6px 50%;
    animation: focus-bob .7s ease-in-out infinite alternate;
    box-shadow: 0 0 0 4000px rgba(40, 10, 5, .12);
}
@keyframes focus-bob { from { transform: translateY(2px) scale(1); } to { transform: translateY(-4px) scale(1.06); } }
.plot-note {
    position: absolute; left: 50%; bottom: 10px; z-index: 7;
    transform: translateX(-50%);
    background: rgba(58, 8, 4, .6);
    color: #ffe9c9; font-size: 11.5px; letter-spacing: .5px;
    padding: 6px 14px; border-radius: 999px;
    pointer-events: none; white-space: nowrap;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 220, 150, .35);
    transition: opacity .8s ease;
}
.plot-wrap.pulse { animation: plot-pulse .55s ease 2; }
@keyframes plot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(246, 196, 83, 0); }
    50% { box-shadow: 0 0 0 7px rgba(246, 196, 83, .55); }
}
.map-hint { margin-top: 8px; font-size: 11px; color: #b08b57; text-align: center; }

/* ---------- 人气网友榜 ---------- */
.top-hero { margin-bottom: 8px; }
.topuser-list { list-style: none; }
.topuser-list li {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 2px;
    border-bottom: 1px dashed #eed9ac;
    font-size: 13px; color: #6e4a14;
}
.topuser-list li:last-child { border-bottom: none; }
.topuser-list li.tu-more { animation: none; }
.tu-no {
    width: 20px; height: 20px; border-radius: 6px; flex: none;
    display: grid; place-items: center;
    font-size: 11px; font-weight: 800; color: #9a7a45;
    background: #f2e2bb;
}
.tu-no.tu1 { background: linear-gradient(180deg, #ffd968, #f0a62e); color: #6b3200; }
.tu-no.tu2 { background: linear-gradient(180deg, #e9e9e9, #b8b8b8); color: #464646; }
.tu-no.tu3 { background: linear-gradient(180deg, #f2c191, #cd7f3d); color: #5d2f06; }
.tu-name { flex: none; max-width: 38%; font-weight: 600; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tu-av { width: 20px; height: 20px; border-radius: 50%; vertical-align: -5px; margin-right: 5px; box-shadow: 0 0 0 1px rgba(180,120,40,.25); }
.tu-me {
    font-style: normal; font-size: 9px; color: #fff;
    background: var(--red); border-radius: 4px;
    padding: 0 5px; margin-left: 4px; vertical-align: 1px;
}
.tu-track {
    flex: 1; height: 5px; border-radius: 99px;
    background: #f1e2ba; overflow: hidden; min-width: 30px;
}
.tu-track i { display: block; height: 100%; background: linear-gradient(90deg, #f2c77d, #e0713c); border-radius: 99px; }
.tu-num { flex: none; font-size: 11.5px; color: var(--red); font-family: Georgia, serif; }
.tu-empty { justify-content: center; color: #b6a07f !important; }
.more-btn {
    display: block; width: 100%;
    margin-top: 9px;
    font-size: 12.5px; color: #8f6a33;
    background: #fdf3da;
    border: 1px solid #e6cf9c;
    border-radius: 10px;
    padding: 9px;
}
.more-btn:active { background: #f6e4b8; }

/* ---------- 登录墙 ---------- */
.login-modal { text-align: center; }
.lg-ico {
    width: 64px; height: 64px; margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #2bbf5f, #128a41);
    display: grid; place-items: center;
    color: #fff;
    box-shadow: 0 8px 20px rgba(20,120,60,.3);
}
.lg-ico .ic { width: 34px; height: 34px; stroke-width: 2; }
.lg-title { margin: 12px 0 6px; font-size: 19px; font-weight: 800; color: var(--ink); }
.lg-desc { font-size: 12.5px; color: #8a6a3c; line-height: 1.8; margin-bottom: 14px; }
.lg-btn { max-width: 240px; margin: 0 auto; background: linear-gradient(135deg, #2bbf5f, #128a41) !important; color: #fff !important; }
.lg-tip { margin-top: 10px; font-size: 11.5px; color: #b08b57; line-height: 1.7; }

/* ---------- 快速选择插旗地点 ---------- */
/* 弹层固定不动,只有地名列表可上下滑动;整体禁止左右滑动 */
body.no-scroll { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.place-modal {
    max-height: 86vh;
    display: flex; flex-direction: column;
    overflow: hidden;                 /* 面板本身不滚动 */
    text-align: left;
}
.pl-desc { font-size: 12.5px; color: #8a6a3c; line-height: 1.7; margin: 0 0 10px; text-align: center; flex: none; }
.pl-auto {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 15px; padding: 11px 10px; flex: none;
}
.pl-auto .ic { width: 17px; height: 17px; }
.pl-auto[disabled] { opacity: .5; }
.pl-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 14px 2px 8px; font-size: 12px; color: #a07d4c; flex: none;
}
.pl-head i { font-style: normal; color: var(--red); font-weight: 700; }
.pl-grid {
    flex: 1 1 auto; min-height: 0;
    display: grid;
    /* 自适应列数:窄屏自动变成 2 列,保证地名完整显示不被截断 */
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    overflow-y: auto; overflow-x: hidden;      /* 只允许上下滑 */
    overscroll-behavior: contain;              /* 滑到头不带动页面 */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;                       /* 触屏只识别纵向滑动 */
    padding: 10px 7px 2px 0;                   /* 给「热」角标留出空间,避免被裁切 */
    grid-auto-rows: minmax(52px, max-content); /* 行高足够且能随内容长高,保证两行都完整 */
    align-items: start;                        /* 按钮按自身内容撑高,不被压扁 */
}
.pl-chip {
    position: relative; border-radius: 12px; padding: 7px 3px 6px;
    background: linear-gradient(180deg, #fffbee, #fff3d6);
    border: 1px solid #f0d9a6; color: #8f0b17;
    font-weight: 700; font-size: 13px; line-height: 1.25; text-align: center;
    box-shadow: 0 1px 3px rgba(160, 120, 60, .12);
    transition: transform .12s ease;
    min-width: 0; overflow: hidden;
}
.pl-chip b {
    display: block; font-weight: 700;
    white-space: normal;            /* 地名过长时换行显示,不截断 */
    overflow-wrap: anywhere;
}
.pl-chip:active { transform: scale(.96); }
.pl-chip em {
    display: block; font-style: normal; font-size: 10.5px; font-weight: 600;
    color: #b08b57; margin-top: 2px;
    white-space: normal;            /* 不截断:空间不够就换行 */
    overflow: visible; text-overflow: clip;
}
.pl-chip.hot::after {
    content: '热'; position: absolute; top: -6px; right: -3px;
    background: var(--red); color: #fff; font-size: 9px;
    border-radius: 999px; padding: 1px 5px; line-height: 1.5;
}
.pl-chip[disabled] { opacity: .45; }
.pl-empty { grid-column: 1 / -1; text-align: center; font-size: 12px; color: #b6a07f; padding: 8px; }

/* ---------- 最近插旗 ---------- */
.flow-list { list-style: none; }
.flow-list li {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 2px;
    border-bottom: 1px dashed #eed9ac;
    font-size: 13px; color: #6e4a14;
}
.flow-list li:last-child { border-bottom: none; }
.flow-ico {
    width: 22px; height: 22px; flex: none;
    display: grid; place-items: center;
    background: rgba(193, 18, 31, .08); border-radius: 7px;
}
.flow-ico img { width: 13px; height: auto; }
.flow-txt { flex: 1; min-width: 0; line-height: 1.5; }
.flow-txt b { color: var(--red); }
.flow-txt .flow-place {
    font-style: normal; font-weight: 600;
    color: #9c5a12;
    background: #fbeecb;
    border-radius: 5px;
    padding: 0 5px;
}
.flow-time { font-size: 11px; color: #b6a07f; flex: none; }
.flow-empty { justify-content: center; color: #b6a07f !important; }

/* ---------- 排行榜 ---------- */
.rank-list { list-style: none; }
.rank-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 2px;
    border-bottom: 1px dashed #eed9ac;
}
.rank-list li:last-child { border-bottom: none; }
.rank-no {
    width: 22px; height: 22px; border-radius: 7px; flex: none;
    display: grid; place-items: center;
    font-size: 12px; font-weight: 700;
    background: #f2e2bb; color: #9a7a45;
}
.rank-no.r1 { background: linear-gradient(180deg, #ffd968, #f5a623); color: #6b3200; }
.rank-no.r2 { background: linear-gradient(180deg, #e8e8e8, #b9b9b9); color: #4a4a4a; }
.rank-no.r3 { background: linear-gradient(180deg, #f3c39a, #c97e3e); color: #5d2f06; }
.rank-body { flex: 1; min-width: 0; }
.rank-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rank-name i {
    font-style: normal; font-size: 10px; color: #fff;
    background: var(--red); border-radius: 999px;
    padding: 1px 6px; margin-left: 5px; vertical-align: 1px;
}
.rank-track { height: 4px; background: #f1e2ba; border-radius: 99px; margin-top: 5px; overflow: hidden; }
.rank-track i { display: block; height: 100%; border-radius: 99px; transition: width .7s ease; }
.rank-num { font-size: 12px; color: #8a6a3c; text-align: right; flex: none; }
.rank-num b { color: var(--red); font-size: 15px; font-family: Georgia, serif; }

/* ---------- 快捷省份 chips ---------- */
.prov-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    font-size: 12.5px; color: #6e4a14;
    background: #fff; border: 1px solid #ead9ac;
    border-radius: 999px; padding: 7px 13px;
    transition: all .15s;
}
.chip:active { transform: scale(.95); }
.chip.on {
    background: linear-gradient(180deg, #c1121f, #a50f1c);
    color: #fff; border-color: #a50f1c;
    box-shadow: 0 3px 8px rgba(150, 10, 10, .3);
}
.chip .chip-flag { display: inline-block; margin-right: 2px; font-size: 11px; }

/* ---------- 页脚 ---------- */
.foot { text-align: center; padding: 18px 22px 8px; }
.foot p { font-size: 11px; color: rgba(255, 235, 215, .8); line-height: 1.8; }

/* ---------- 微信登录错误提示条 ---------- */
.wx-err {
    position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
    width: min(92vw, 460px); z-index: 300;
    background: linear-gradient(180deg, #b3121f, #8e0a15);
    color: #fff; border-radius: 14px;
    box-shadow: 0 8px 26px rgba(120, 0, 10, .45);
    border: 1px solid rgba(255, 214, 120, .55);
    padding: 10px 12px 12px;
    animation: errDrop .3s ease;
}
@keyframes errDrop { from { transform: translate(-50%, -14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.wx-err-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.wx-err-h b { color: #ffe08c; }
.wx-err-x {
    background: rgba(255,255,255,.16); color: #fff; border: none; cursor: pointer;
    width: 24px; height: 24px; border-radius: 50%; font-size: 13px; line-height: 1; flex: none;
}
.wx-err-m {
    margin-top: 7px; font-size: 12px; line-height: 1.65; color: #ffece3;
    white-space: pre-line; word-break: break-all; max-height: 34vh; overflow-y: auto;
}

/* ---------- 底部操作栏 ---------- */
.dock-safe { height: 8px; }
.dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; gap: 9px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(142, 10, 21, .88), rgba(118, 6, 14, .95));
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 214, 120, .45);
}
.dock-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
    background: rgba(255, 255, 255, .10);
    border-radius: 13px; padding: 7px 4px 6px;
    color: #ffe9c9;
    border: 1px solid rgba(255, 220, 140, .25);
}
.dock-btn i { font-style: normal; line-height: 1.1; height: 22px; display: grid; place-items: center; }
.dock-btn .ic { width: 21px; height: 21px; color: #ffd76e; stroke-width: 1.8; }
.dock-btn span { font-size: 11px; }
.dock-btn em {
    font-style: normal; font-size: 10px; color: #ffd76e;
    background: rgba(120, 0, 8, .6);
    border-radius: 999px; padding: 0 7px; line-height: 15px;
    min-width: 22px;
}
.dock-btn:active { transform: scale(.96); }

/* ========== 弹窗 ========== */
.mask[hidden] { display: none !important; }
.mask {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(70, 0, 4, .62);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    overflow: hidden;                 /* 遮罩固定不滚动 */
    overscroll-behavior: contain;     /* 滑到头不带动背景页面 */
    width: 100%; max-width: 100%;
}
.modal {
    position: relative;
    width: 100%; max-width: 380px;
    background: linear-gradient(180deg, #fffdf4, #fff1d2);
    border: 2px solid #f3cf7e;
    border-radius: 20px;
    padding: 20px 18px 18px;
    box-shadow: 0 18px 50px rgba(60, 0, 0, .45);
    animation: pop .25s ease;
    max-height: 88vh;
    overflow-y: auto; overflow-x: hidden;   /* 只上下滚,不左右滚 */
    touch-action: pan-y;
    box-sizing: border-box;
}
@keyframes pop { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
    position: absolute; top: 10px; right: 10px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(120, 0, 8, .08); color: #8f0b17;
    font-size: 13px;
}

/* 选城 */
.pick-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.pick-flag {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, #c1121f, #8e0a15);
    display: grid; place-items: center; font-size: 26px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 4px 10px rgba(150, 10, 10, .3);
}
.pick-title b { display: block; font-size: 19px; color: var(--ink); }
.pick-title span { font-size: 11.5px; color: #a07d4c; }
.pick-cities { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pick-city {
    font-size: 13px; color: #6e4a14;
    background: #fff; border: 1.5px solid #e7d3a0;
    border-radius: 10px; padding: 8px 12px;
}
.pick-city.on { background: linear-gradient(180deg, #c1121f, #a50f1c); color: #fff; border-color: transparent; }
.pick-tip { font-size: 11px; color: #b08b57; margin-bottom: 11px; }
.cta {
    width: 100%;
    font-size: 16px; font-weight: 700; letter-spacing: 3px;
    color: #7c2d00;
    background: linear-gradient(180deg, #ffe9a8, #f7c858 55%, #f0b63c);
    border-radius: 999px; padding: 13px;
    box-shadow: 0 5px 14px rgba(160, 100, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.cta:disabled { opacity: .55; filter: grayscale(.4); }

/* 抽奖 */
.lottery-modal { text-align: center; }
.lottery-title { font-size: 18px; font-weight: 800; color: var(--red-deep); margin-bottom: 10px; }
.lottery-title em { font-style: normal; font-size: 11px; color: #fff; background: #b08b57; border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
#wheel { width: 250px; height: 250px; display: block; will-change: transform; }
.wheel-wrap { position: relative; width: 250px; margin: 0 auto 14px; }
.wheel-wrap::before {
    content: '';
    position: absolute; top: -6px; left: 50%;
    transform: translateX(-50%);
    border: 11px solid transparent;
    border-top: 15px solid #b30e1b;
    filter: drop-shadow(0 2px 2px rgba(120, 0, 0, .4));
    z-index: 3;
}
.wheel-wrap::after {
    content: '';
    position: absolute; inset: -2px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 5px #f6c453, inset 0 0 0 7px #e0a83c, 0 8px 22px rgba(120, 40, 0, .35);
    pointer-events: none;
}
.lottery-modal .cta { max-width: 240px; margin: 0 auto; }
#btnSpin span { font-size: 12px; color: #a05b12; font-weight: 600; margin-left: 6px; }
.lottery-note { margin-top: 9px; font-size: 11px; color: #b08b57; }

/* 抽奖:去插旗引导 + 中奖记录 */
.ghost-btn {
    display: block; margin: 10px auto 0; padding: 7px 14px;
    border: 1px dashed #d9a85e; border-radius: 999px;
    background: #fff9ec; color: #a05b12; font-size: 12px; cursor: pointer;
}
.my-awards { margin-top: 12px; border-top: 1px dashed #ecd9ae; padding-top: 9px; text-align: left; }
.ma-head { font-size: 12.5px; font-weight: 700; color: var(--red-deep); display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.ma-head svg { width: 13px; height: 13px; }
.ma-list { list-style: none; max-height: 148px; overflow-y: auto; }
.ma-list li {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #6b5636; padding: 5px 2px;
    border-bottom: 1px dashed #f0e2c3;
}
.ma-list li:last-child { border-bottom: none; }
.ma-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fdeed6; }
.ma-ico svg { width: 14px; height: 14px; }
.ma-time { margin-left: auto; font-size: 10.5px; color: #b6a07f; flex: none; }
.ma-empty { font-size: 12px; color: #b6a07f; padding: 4px 2px; }

/* 我的权益(虚拟奖品券码) */
.my-tickets { margin-top: 12px; border-top: 1px dashed #ecd9ae; padding-top: 9px; text-align: left; }
.mt-hint { font-style: normal; font-weight: 400; font-size: 10.5px; color: #b6a07f; margin-left: 6px; }
.mt-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-desc { font-style: normal; color: #b6a07f; font-size: 11px; margin-left: 5px; }
.mt-code {
    flex: none; margin-left: auto; cursor: pointer;
    border: 1px dashed #6a5acd; background: #f4f2ff; color: #4b3fa8;
    border-radius: 8px; padding: 3px 8px; font-size: 11.5px; font-weight: 700;
    font-family: ui-monospace, Consolas, monospace; letter-spacing: .3px;
}
.mt-code em { font-style: normal; font-size: 10px; color: #8a7fd6; font-weight: 400; }
.mt-code:active { background: #e9e6ff; }
.mt-wait {
    flex: none; margin-left: auto; font-size: 11px; color: #fff;
    background: #b08b57; border-radius: 999px; padding: 2px 10px;
}
.pr-tip { font-size: 11.5px; color: #6a5acd; background: #f4f2ff; border-radius: 8px; padding: 5px 10px; line-height: 1.6; }

/* 中奖记录:权益奖品「领取」按钮 */
.ma-list .ma-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-claim {
    flex: none; margin-left: 8px; cursor: pointer;
    border: none; border-radius: 999px; padding: 4px 13px;
    background: linear-gradient(135deg, #c1121f, #8e0a15); color: #fff;
    font-size: 11.5px; font-weight: 700;
    box-shadow: 0 2px 6px rgba(150, 10, 10, .3);
}
.ma-claim:active { opacity: .85; }

/* 领取弹层 */
.claim-modal { text-align: center; }
.cl-ico {
    width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%;
    background: linear-gradient(135deg, #7d6ff0, #4b3fa8);
    display: grid; place-items: center;
    box-shadow: 0 6px 16px rgba(80, 60, 180, .28);
}
.cl-ico .ic { width: 28px; height: 28px; color: #fff; stroke-width: 2; }
.cl-title { font-size: 17px; font-weight: 800; color: var(--red-deep); }
.cl-desc { margin-top: 4px; font-size: 12px; color: #8a6a3c; line-height: 1.7; }
.cl-codebox {
    margin: 12px 0 8px; padding: 12px 12px 14px; border-radius: 14px;
    background: #f6f4ff; border: 1px dashed #b9b0ef;
}
.cl-label { font-size: 11px; color: #8a7fd6; margin-bottom: 6px; }
.cl-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 19px; font-weight: 800; color: #3f34a0;
    letter-spacing: 1px; word-break: break-all; line-height: 1.5;
}
.cl-copy {
    margin-top: 10px; border: none; cursor: pointer;
    border-radius: 999px; padding: 7px 18px;
    background: linear-gradient(135deg, #7d6ff0, #4b3fa8); color: #fff;
    font-size: 12.5px; font-weight: 700;
}
.cl-status { font-size: 12px; color: #6b5636; }
.cl-tip { margin-top: 10px; font-size: 11px; color: #b6a07f; line-height: 1.7; }

/* 分享得旗弹层 */
.share-modal { text-align: center; }
.sh-desc { font-size: 12.5px; color: #6b5636; line-height: 1.75; margin: 2px 0 12px; }
.sh-desc b { color: var(--red); }
.sh-link-row { display: flex; gap: 8px; margin-bottom: 9px; }
.sh-link {
    flex: 1; min-width: 0; height: 38px; padding: 0 10px;
    border: 1px solid #e3cda0; border-radius: 10px; background: #fffdf6;
    color: #7a5c2e; font-size: 11.5px;
}
.sh-copy {
    flex: none; height: 38px; padding: 0 13px; border: none; cursor: pointer;
    border-radius: 10px; background: linear-gradient(135deg, #c1121f, #8e0a15);
    color: #fff; font-size: 12.5px;
}
.sh-copy-all {
    width: 100%; margin-bottom: 9px; padding: 10px; border: none; cursor: pointer;
    border-radius: 11px; background: #fff3d9; color: #8f0b17;
    font-size: 12.5px; font-weight: 600; border: 1px solid #efd6a4;
}
.sh-claim { margin: 0 auto; }
.sh-tip { margin-top: 10px; font-size: 11.5px; color: #a05b12; line-height: 1.7; }
.sh-left { margin-top: 6px; font-size: 11.5px; color: #b6a07f; }

/* 规则 */
.rules-modal { text-align: center; }
.rules-deco {
    width: 62px; height: 62px; margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff8b7a, #d3222f 70%);
    display: grid; place-items: center;
    color: #ffd76e;
    box-shadow: inset 0 0 0 2px rgba(255, 224, 160, .55), 0 6px 14px rgba(150, 10, 10, .25);
}
.rules-deco .ic { width: 34px; height: 34px; stroke-width: 2; }
.rules-title { font-size: 20px; font-weight: 800; color: var(--red-deep); margin: 2px 0 10px; }
.rules-list {
    text-align: left; list-style: none;
    counter-reset: r; display: grid; gap: 8px;
}
.rules-list li {
    counter-increment: r;
    position: relative; padding-left: 30px;
    font-size: 13px; line-height: 1.65; color: #6e4a14;
}
.rules-list li::before {
    content: counter(r);
    position: absolute; left: 0; top: 1px;
    width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(180deg, #ffe08c, #f6c453);
    color: #8f0b17; font-weight: 800; font-size: 12px;
    display: grid; place-items: center;
}
.rules-list b { color: var(--red); }
.rules-disclaim {
    text-align: left; margin: 12px 0;
    font-size: 11px; color: #a05b12;
    background: rgba(193, 18, 31, .07);
    border: 1px dashed #e3b45c; border-radius: 10px; padding: 9px 11px;
    line-height: 1.7;
}
.rules-cta { margin-top: 4px; }

/* 首次红旗手 */
.first-modal { text-align: center; }
.first-gain {
    margin: 8px auto 2px; font-size: 12.5px; font-weight: 700;
    color: #8f0b17; background: linear-gradient(180deg,#fff6dd,#ffe9b8);
    border: 1px dashed #e2b25f; border-radius: 10px; padding: 7px 12px; line-height: 1.6;
}
.first-medal {
    width: 76px; height: 76px; margin: 0 auto 2px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe9ad, #f2b53c 75%);
    display: grid; place-items: center;
    color: #9c1c10;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), 0 8px 18px rgba(150, 100, 0, .3);
    animation: medal 1.1s ease-in-out infinite alternate;
}
.first-medal .ic { width: 42px; height: 42px; stroke-width: 2; }
@keyframes medal { from { transform: rotate(-9deg) scale(1); } to { transform: rotate(9deg) scale(1.05); } }
.first-title { font-size: 21px; font-weight: 800; color: var(--red-deep); margin-top: 4px; }
.first-sub { margin: 5px 0 14px; font-size: 13px; color: #8a6a3c; }
.first-sub b { color: var(--red); }
.nick-label { display: block; text-align: left; font-size: 12px; color: #8a6a3c; margin-bottom: 6px; }
.nick-input {
    width: 100%; font-size: 15px; padding: 11px 13px;
    border: 1.5px solid #e7d3a0; border-radius: 12px;
    outline: none; background: #fff; color: var(--ink);
    margin-bottom: 12px;
}
.nick-input:focus { border-color: var(--gold); }

/* toast */
.toast {
    position: fixed; left: 50%; bottom: 92px; z-index: 200;
    transform: translateX(-50%);
    background: rgba(60, 0, 4, .9); color: #ffe9c9;
    font-size: 13.5px; border-radius: 999px;
    padding: 11px 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
    max-width: 86vw; text-align: center;
    animation: toastin .3s ease;
    border: 1px solid rgba(255, 220, 140, .4);
}
@keyframes toastin { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* 桌面适配 */
@media (min-width: 720px) {
    body { display: flex; flex-direction: column; align-items: center; }
    .hero, .marquee, .statbar, .panel, .foot { width: min(560px, 92vw); }
    #mapChart { height: 430px; }
    .dock { justify-content: center; }
    .dock .dock-btn { max-width: 190px; }
}
