/* ============================================================
 * 抽奖活动 · 通用 UI 套件（深酒红 × 皇家金 · 唯美轻奢）
 * 覆盖：奖品展示 / 活动说明 / 中奖记录 / 我的奖品 / 结果弹窗 /
 *       撒花 / 轻提示 / 抽奖码弹窗
 * 由 index/common/actui.js 渲染，六套玩法模板共用
 * ============================================================ */
.ap-panels { max-width: 480px; margin: 0 auto; padding: 6px 14px 56px; }

/* ---------- 板块卡片（磨砂玻璃 · 暖金点缀 · 百搭舒雅） ---------- */
.ap-sec {
    position: relative;
    margin-top: 20px; padding: 16px 16px 14px; text-align: left;
    background: linear-gradient(168deg, rgba(255,255,255,.84) 0%, rgba(255,252,245,.68) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
    border: 1px solid rgba(255,255,255,.92); border-radius: 20px;
    box-shadow: 0 10px 30px rgba(96,56,20,.13), 0 2px 6px rgba(96,56,20,.06),
                inset 0 1px 0 rgba(255,255,255,.95);
}
.ap-sec-title {
    display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
    font-size: 15px; font-weight: 800; color: #6B4A26; letter-spacing: 2px;
}
.ap-sec-title::before {
    content: ''; width: 4px; height: 15px; border-radius: 2px; flex: 0 0 4px;
    background: linear-gradient(180deg, #EFBE6E, #C89040);
    box-shadow: 0 0 6px rgba(232,178,90,.55);
}
.ap-sec-title::after {
    content: ''; flex: 1; height: 1px; margin-left: 6px;
    background: linear-gradient(90deg, rgba(200,144,64,.38), transparent);
}
.ap-sec-title .ap-cnt { font-size: 12px; color: #B08F5E; font-weight: 500; letter-spacing: 0; }

/* ---------- 奖品展示（紧凑文字版：不用大图，省空间） ---------- */
.ap-prize-text { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ap-prize-t {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    padding: 9px 10px; border-radius: 13px;
    background: linear-gradient(150deg, #FFFFFF 0%, #FFF7E9 100%);
    border: 1px solid rgba(228,181,92,.5);
    box-shadow: 0 3px 10px rgba(96,56,20,.08), inset 0 1px 0 #FFFFFF;
}
.ap-prize-t-lv {
    flex: 0 0 auto; max-width: 76px; padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 700; color: #FFF3E0; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(135deg, #F04A32, #C2241C);
    box-shadow: 0 2px 6px rgba(194,36,28,.28);
}
.ap-prize-t-nm {
    flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: #5A3A22; line-height: 1.35;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ---------- 奖品展示 ---------- */
.ap-prize-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ap-prize-item {
    position: relative; overflow: hidden; padding: 12px 8px 10px; text-align: center;
    background: linear-gradient(150deg, #FFFFFF 0%, #FFF7E8 100%);
    border: 1px solid rgba(228,181,92,.55); border-radius: 16px;
    box-shadow: 0 4px 12px rgba(96,56,20,.10), inset 0 1px 0 #FFFFFF;
}
.ap-prize-item::after {   /* 微光扫过 */
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(120deg, transparent 34%, rgba(255,255,255,.5) 50%, transparent 66%);
    transform: translateX(-110%); animation: ap-shine 4.5s ease-in-out infinite;
}
.ap-prize-item:nth-child(2n)::after { animation-delay: 1.6s; }
.ap-prize-item:nth-child(3n)::after { animation-delay: .8s; }
@keyframes ap-shine { 0%, 62% { transform: translateX(-110%); } 92%, 100% { transform: translateX(110%); } }
.ap-prize-imgbox {
    height: 62px; display: flex; align-items: center; justify-content: center;
    font-size: 34px; line-height: 1;
}
.ap-prize-imgbox img {
    max-width: 78%; max-height: 100%; object-fit: contain;
    filter: drop-shadow(0 3px 5px rgba(90,42,18,.25));
}
.ap-prize-name {
    margin-top: 7px; font-size: 12.5px; font-weight: 700; color: #5A2A12; line-height: 1.3;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.ap-prize-level {
    display: inline-block; margin-top: 6px; padding: 1px 10px; font-size: 11px; color: #A9782F;
    background: rgba(255,255,255,.75); border: 1px solid rgba(217,169,76,.6); border-radius: 999px;
}

/* ---------- 活动说明 ---------- */
.ap-intro-body { font-size: 13.5px; line-height: 1.9; color: #6E5638; word-break: break-word; }
.ap-intro-body p { margin: 0 0 .5em; }
.ap-intro-body img { max-width: 100%; border-radius: 8px; }

/* ---------- 列表（中奖记录 / 我的奖品）· 面板内为浅底配色 ---------- */
.ap-list { list-style: none; margin: 0; padding: 0; max-height: 224px; overflow-y: auto; }
.ap-list::-webkit-scrollbar { width: 4px; }
.ap-list::-webkit-scrollbar-thumb { background: rgba(200,150,80,.38); border-radius: 2px; }
.ap-list li {
    display: flex; align-items: center; gap: 10px; padding: 9px 2px;
    border-bottom: 1px dashed rgba(242,206,126,.2); font-size: 13px; color: #FFE9C9;
}
.ap-list li:last-child { border-bottom: 0; }
.ap-av {
    width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px; object-fit: cover;
    border: 1px solid rgba(242,206,126,.5); background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.ap-thumb {
    width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px;
    background: linear-gradient(145deg, #FFFDF6, #FFE9C9); border: 1px solid rgba(228,181,92,.6);
    display: flex; align-items: center; justify-content: center; font-size: 18px; overflow: hidden;
}
.ap-thumb img { max-width: 84%; max-height: 84%; object-fit: contain; }
.ap-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-list .nm b { color: #FFD9A0; font-weight: 700; }
.ap-list .tm { font-size: 11px; color: #C9A06B; flex: 0 0 auto; }
.ap-list .st { font-size: 11px; padding: 1px 8px; border-radius: 9px; flex: 0 0 auto; }
.ap-list .st.no { color: #FFB4A2; border: 1px solid rgba(240,74,50,.5); }
.ap-list .st.ok { color: #A8E6C0; border: 1px solid rgba(80,200,120,.5); }
.ap-empty { padding: 16px 0; text-align: center; font-size: 12.5px; color: #9C7A52; letter-spacing: 1px; }

/* 浅色磨砂面板内的列表 / 空状态 / 头像 → 暖棕可读配色（深色弹窗内不受影响） */
.ap-panels .ap-list li { color: #6E5638; border-bottom-color: rgba(190,150,90,.28); }
.ap-panels .ap-list .nm b { color: #C2241C; }
.ap-panels .ap-list .tm { color: #B08F5E; }
.ap-panels .ap-list .st.no { color: #D0442E; border-color: rgba(208,68,46,.45); background: rgba(208,68,46,.06); }
.ap-panels .ap-list .st.ok { color: #2F8F5B; border-color: rgba(47,143,91,.45); background: rgba(47,143,91,.06); }
.ap-panels .ap-av { border-color: rgba(200,150,80,.5); background: rgba(255,255,255,.72); color: #B08F5E; }
.ap-panels .ap-empty { color: #B39C7E; }

/* ============================================================
 * 结果弹窗（中奖 / 未中奖）· 与大转盘同款：红缎带彩带 + 奖品卡 + 双按钮
 * 顶部飘带使用 index/common/images/img_10.png（恭喜抽中+彩带）
 *            index/common/images/img_9.png （很遗憾+彩带）
 * --mw 为弹窗宽度（与转盘 7.5rem 视觉比例一致：视口 75%，最大 480px）
 * ============================================================ */
.ap-modal {
    display: none; position: fixed; inset: 0; z-index: 99; padding: 24px;
    background: rgba(12,3,7,.55); backdrop-filter: blur(2px);
    align-items: center; justify-content: center;
}
.ap-modal.show { display: flex; }
.ap-modal-box {
    --mw: min(75vw, 480px);
    position: relative; width: var(--mw); max-width: 100%; text-align: center;
    background: #FFFFFF;
    border-radius: calc(var(--mw) * .032);
    padding: calc(var(--mw) * .17) calc(var(--mw) * .05) calc(var(--mw) * .055);
    box-shadow: 0 20px 52px rgba(0,0,0,.5);
    animation: ap-modal-in .34s cubic-bezier(.2,1.4,.4,1);
}
/* 顶部缎带飘带（含彩带丝带），与转盘 .zj_tit 同位置比例 */
.ap-ribbon {
    position: absolute; top: calc(var(--mw) * -.245); left: -5%; width: 110%;
    pointer-events: none; line-height: 0;
    filter: drop-shadow(0 6px 14px rgba(120,20,14,.3));
    animation: ap-ribbon-in .5s cubic-bezier(.2,1.5,.4,1) both;
}
.ap-ribbon img { width: 100%; height: auto; display: block; }
.ap-ribbon-txt { display: none; }
@keyframes ap-ribbon-in {
    from { transform: translateY(-24px) scale(.9); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes ap-modal-in { from { transform: scale(.84); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 奖品卡（直接展示奖品图，默认奖品图自带圆角与描边） */
.ap-modal-prize {
    position: relative; margin: 0 auto;
    width: calc(var(--mw) * .44); height: calc(var(--mw) * .44);
    border-radius: calc(var(--mw) * .045);
    display: flex; align-items: center; justify-content: center;
    font-size: calc(var(--mw) * .14); line-height: 1;
}
.ap-modal-prize img {
    width: 100%; height: 100%; object-fit: contain; border-radius: calc(var(--mw) * .045);
    filter: drop-shadow(0 6px 14px rgba(120,60,10,.2));
}
.ap-prize-ico {
    width: 100%; height: 100%; border-radius: calc(var(--mw) * .045);
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 38%, #FFF6DC 0%, #FFE0AE 70%, #F3C079 100%);
    box-shadow: 0 8px 20px rgba(180,90,20,.24), inset 0 0 0 4px rgba(255,255,255,.6);
}
.ap-prize-lv {
    position: absolute; left: 0; right: 0; bottom: calc(var(--mw) * -.06);
    font-size: calc(var(--mw) * .034); font-weight: 700; color: #B9832F; letter-spacing: 1px;
}
/* 文案：恭喜您，抽中 三等奖 · 幸运周边 */
.ap-modal-name {
    margin-top: calc(var(--mw) * .075); font-size: calc(var(--mw) * .046);
    font-weight: 600; color: #3A0C18; letter-spacing: .5px;
}
.ap-modal-name b { color: #E0342A; font-weight: 800; }
/* 按钮 */
.ap-modal-btns { margin-top: calc(var(--mw) * .055); display: flex; gap: calc(var(--mw) * .035); justify-content: center; }
.ap-modal-btns button {
    flex: 1; padding: calc(var(--mw) * .035) 6px; border-radius: 999px;
    font-size: calc(var(--mw) * .04); font-weight: 700; letter-spacing: 1px; cursor: pointer;
}
.ap-btn-ghost { background: #fff; color: #E0342A; border: 1.5px solid #E0342A; }
.ap-btn-solid {
    background: linear-gradient(180deg, #FF6A4D 0%, #E0342A 100%); color: #FFF; border: 0;
    box-shadow: 0 6px 14px rgba(224,52,42,.34);
}
.ap-modal-btns button:active { transform: translateY(1px); }

/* ---------- 撒花 ---------- */
.ap-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 98; display: none; }
.ap-confetti.show { display: block; }

/* ---------- 轻提示 ---------- */
.ap-toast {
    position: fixed; left: 50%; bottom: 12%; transform: translateX(-50%);
    background: rgba(28,5,11,.92); color: #FFE9C9; font-size: 13.5px;
    border: 1px solid rgba(242,206,126,.5); border-radius: 12px; padding: 10px 20px;
    z-index: 200; opacity: 0; transition: opacity .25s; pointer-events: none;
    max-width: 80vw; text-align: center;
}
.ap-toast.show { opacity: 1; }

/* ---------- 抽奖码弹窗（点击抽奖时弹出）· 高定质感版 ---------- */
.ap-cmask {
    position: fixed; inset: 0; z-index: 9999;
    background: radial-gradient(ellipse at 50% 45%, rgba(58,8,18,.58) 0%, rgba(16,2,6,.78) 100%);
    -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .34s ease, visibility .34s;
}
.ap-cmask.show { opacity: 1; visibility: visible; }

.ap-cmodal {
    position: relative; width: 86%; max-width: 372px; padding: 28px 24px 24px;
    border-radius: 24px; overflow: hidden;
    background: linear-gradient(165deg, #FFFDF9 0%, #FDF4E6 45%, #F9E8D4 100%);
    border: 1px solid rgba(217,169,76,.48);
    box-shadow: 0 28px 64px rgba(46,6,14,.46), 0 8px 20px rgba(46,6,14,.16),
                inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 46px rgba(255,214,110,.16);
    transform: translateY(24px) scale(.93); opacity: 0;
    transition: transform .46s cubic-bezier(.16,1.15,.3,1), opacity .3s ease;
}
.ap-cmask.show .ap-cmodal { transform: translateY(0) scale(1); opacity: 1; }

/* 斜向扫光：丝缎般的流动高光 */
.ap-cmodal::before {
    content: ''; position: absolute; left: -70%; top: -110%;
    width: 55%; height: 280%; pointer-events: none; z-index: 2;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
    transform: rotate(16deg);
    animation: apSheen 4.6s ease-in-out 1.2s infinite;
}
@keyframes apSheen { 0% { left: -70%; } 58%,100% { left: 135%; } }

/* 顶部金色徽标 */
.ap-c-emblem {
    position: relative; z-index: 3;
    width: 58px; height: 58px; margin: 0 auto 13px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 34% 28%, #FFFAEC 0%, #F2CE7E 52%, #C9922F 100%);
    box-shadow: 0 8px 22px rgba(201,146,47,.4), inset 0 1px 0 rgba(255,255,255,.75),
                inset 0 -3px 9px rgba(142,15,6,.16);
    animation: apFloat 3.6s ease-in-out infinite;
}
.ap-c-emblem svg { width: 27px; height: 27px; display: block; }
@keyframes apFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 徽标外圈柔光 */
.ap-c-emblem::after {
    content: ''; position: absolute; inset: -9px; border-radius: 50%;
    border: 1px solid rgba(217,169,76,.3);
    animation: apRing 2.8s ease-out infinite;
}
@keyframes apRing { 0% { transform: scale(.9); opacity: .75; } 100% { transform: scale(1.25); opacity: 0; } }

.ap-c-title {
    position: relative; z-index: 3;
    font-size: 20px; font-weight: 800; letter-spacing: 1.2px; text-align: center;
    color: #5A2A12; text-shadow: 0 1px 0 rgba(255,255,255,.7);
}
.ap-c-sub {
    position: relative; z-index: 3;
    font-size: 12.5px; color: #B9832F; text-align: center;
    margin: 7px 0 18px; letter-spacing: .6px;
}

.ap-cmodal input {
    position: relative; z-index: 3;
    width: 100%; box-sizing: border-box; height: 48px; padding: 0 16px;
    border: 1.5px solid rgba(217,169,76,.55); border-radius: 14px;
    background: rgba(255,255,255,.92);
    font-size: 16px; letter-spacing: 1.5px; text-align: center; color: #4A1A0E; outline: none;
    box-shadow: inset 0 2px 7px rgba(142,15,6,.06);
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.ap-cmodal input::placeholder { color: #C9A97A; letter-spacing: .6px; }
.ap-cmodal input:focus {
    border-color: #D9A94C; background: #fff;
    box-shadow: 0 0 0 4px rgba(217,169,76,.16), inset 0 2px 7px rgba(142,15,6,.06);
}

.ap-c-btns { position: relative; z-index: 3; display: flex; gap: 12px; margin-top: 18px; }
.ap-c-btns button {
    flex: 1; height: 46px; border-radius: 999px; font-size: 15px; font-weight: 700;
    letter-spacing: 2px; cursor: pointer;
    transition: transform .18s ease, box-shadow .25s ease, filter .2s ease;
}
.ap-c-cancel {
    background: #fff; color: #8A5A1E; border: 1px solid rgba(217,169,76,.55);
    box-shadow: 0 4px 12px rgba(142,15,6,.08);
}
.ap-c-cancel:active { transform: translateY(2px); box-shadow: 0 2px 6px rgba(142,15,6,.1); }
.ap-c-ok {
    background: linear-gradient(135deg, #F2CE7E 0%, #D9A94C 46%, #C2241C 100%);
    color: #fff; border: none;
    box-shadow: 0 8px 22px rgba(194,36,28,.4), inset 0 1px 0 rgba(255,255,255,.35);
}
.ap-c-ok:active { transform: translateY(2px); box-shadow: 0 3px 10px rgba(194,36,28,.34); }

/* 输入为空时的轻微震动反馈 */
@keyframes apShake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}
.ap-cmodal.shake { animation: apShake .42s ease; }

/* 主题联动：确定按钮与描边跟随后台所选配色（保证可读性的前提下更和谐） */
body[class*="theme-"] .ap-cmodal { border-color: var(--sk-line, rgba(217,169,76,.48)); }
body[class*="theme-"] .ap-c-ok {
    background: var(--sk-btn-bg, linear-gradient(135deg, #F2CE7E, #C2241C));
    color: var(--sk-btn-text, #fff);
    box-shadow: var(--sk-btn-sh, 0 8px 22px rgba(194,36,28,.4)), inset 0 1px 0 rgba(255,255,255,.32);
}

/* ============================================================
 * 中奖记录 · 弹幕轮播（后台 danmu=1）
 * 渲染在「抽奖区域」内，作为背景横向滚动（不占底部独立板块）
 * ============================================================ */
.ap-danmu-bg {
    position: absolute; left: 0; right: 0; top: 0; bottom: 0;
    z-index: 1; pointer-events: none; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 8px 0; gap: 8px;
    opacity: .96;
}
.ap-danmu-track {
    display: flex; gap: 10px; width: max-content; padding: 4px 0;
    animation: ap-danmu-scroll 30s linear infinite;
}
.ap-danmu-track-rev { animation-direction: reverse; animation-duration: 38s; }
.ap-danmu-item {
    display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
    padding: 4px 14px 4px 4px; border-radius: 999px;
    background: linear-gradient(135deg, rgba(66,16,27,.88), rgba(42,8,16,.88));
    border: 1px solid rgba(242,206,126,.55);
    box-shadow: 0 2px 10px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,246,220,.2);
    backdrop-filter: blur(2px);
}
.ap-danmu-av {
    width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
    background: radial-gradient(circle at 35% 30%, #FFE9C9, #E4B55C);
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
    border: 1px solid rgba(242,206,126,.8);
}
.ap-danmu-av img { width: 100%; height: 100%; object-fit: cover; }
.ap-danmu-nm { font-size: 12px; color: #FFE9C9; white-space: nowrap; font-weight: 600; }
.ap-danmu-nm b { color: #FFD9A0; font-weight: 800; }
@keyframes ap-danmu-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
/* 转盘专用：盘面是 canvas，弹幕贴在盘面下方空档，不遮挡转盘 */
.ap-danmu-bg-wheel {
    top: auto; bottom: -34px; height: auto;
    padding: 0; gap: 4px;
}
.ap-danmu-bg-wheel .ap-danmu-track-rev { display: none; }
.ap-danmu-bg-wheel .ap-danmu-item {
    background: linear-gradient(135deg, rgba(28,5,11,.82), rgba(20,3,7,.82));
}
/* 非转盘：悬浮带 → 悬浮在抽奖块上方、海报下沿的背景位置（绝对定位于 .game-wrap，不占布局不挡玩法） */
.ap-danmu-float {
    left: 5%; right: 5%; top: -92px; bottom: auto; height: 82px;
    z-index: 3; padding: 0; gap: 6px; opacity: 1;
    justify-content: space-between;
}
.ap-danmu-float .ap-danmu-item {
    padding: 3px 12px 3px 3px;
    background: linear-gradient(135deg, rgba(66,16,27,.78), rgba(42,8,16,.78));
}
@media (prefers-reduced-motion: reduce) {
    .ap-danmu-track { animation: none; }
}

/* ============================================================
 * 中奖记录悬浮按钮（FAB）· 右侧竖排，避开右下角音乐按钮
 * 球体：皇家金渐变 + 双层呼吸光环 + 新车中奖红点 + 入场弹出动画
 * ============================================================ */
.ap-fab {
    position: fixed; right: 14px; bottom: 92px; z-index: 999;
    width: 54px; height: 54px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
    background: radial-gradient(circle at 32% 28%, #FFF3D0 0%, #F2CE7E 34%, #D9A942 62%, #B9832F 100%);
    box-shadow:
        0 6px 18px rgba(120,72,10,.45),
        0 0 0 1.5px rgba(255,246,220,.75) inset,
        0 1px 0 rgba(255,255,255,.9) inset;
    display: flex; align-items: center; justify-content: center;
    animation: ap-fab-in .55s cubic-bezier(.2,1.4,.4,1) both, ap-fab-float 3.4s ease-in-out 1s infinite;
    -webkit-tap-highlight-color: transparent;
}
.ap-fab:active { transform: scale(.92); }
.ap-fab-ico { font-size: 25px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(90,42,18,.5)); position: relative; z-index: 2; }
/* 双层呼吸光环 */
.ap-fab-halo, .ap-fab-halo2 {
    position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    border: 2px solid rgba(242,206,126,.85);
    animation: ap-fab-halo 2.2s ease-out infinite;
}
.ap-fab-halo2 { animation-delay: 1.1s; }
/* 新车中奖红点 */
.ap-fab-dot {
    position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FF8A6B, #E02B12);
    border: 1.5px solid #FFF6DC; display: none; z-index: 3;
}
.ap-fab-dot.show { display: block; animation: ap-fab-blink 1.1s ease-in-out infinite; }
@keyframes ap-fab-in {
    from { opacity: 0; transform: scale(.3) translateY(30px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes ap-fab-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}
@keyframes ap-fab-halo {
    0%   { transform: scale(1);    opacity: .9; }
    70%  { transform: scale(1.75); opacity: 0; }
    100% { transform: scale(1.75); opacity: 0; }
}
@keyframes ap-fab-blink {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}
/* 各模板定制：图标球内的小徽章底色，呼应玩法场景 */
.ap-fab[data-tpl="zajindan"]  { background: radial-gradient(circle at 32% 28%, #FFF6DC 0%, #F7D78A 36%, #E0B45C 64%, #C2241C 130%); }
.ap-fab[data-tpl="fanpai"]    { background: radial-gradient(circle at 32% 28%, #FFE9F2 0%, #F2CE7E 34%, #D9A942 62%, #7A1230 130%); }
.ap-fab[data-tpl="niudanji"]  { background: radial-gradient(circle at 32% 28%, #E8FBFF 0%, #BEE9F5 30%, #F2CE7E 66%, #B9832F 130%); }
.ap-fab[data-tpl="xinyunka"]  { background: radial-gradient(circle at 32% 28%, #F3E8FF 0%, #F2CE7E 36%, #D9A942 62%, #4A1D6B 130%); }
.ap-fab[data-tpl="laohuji"]    { background: radial-gradient(circle at 32% 28%, #FFE9C2 0%, #E8B84E 34%, #C8372F 70%, #5A0E0A 130%); }
.ap-fab[data-tpl="chaihongbao"]{ background: radial-gradient(circle at 32% 28%, #FFE9C2 0%, #FFC24E 34%, #C8241C 72%, #7E120E 130%); }
.ap-fab[data-tpl="zhaqiqiu"]   { background: radial-gradient(circle at 32% 28%, #EAFBFF 0%, #9BD8F6 34%, #5AB8F0 70%, #2A6AA0 130%); }
.ap-fab[data-tpl="saima"]      { background: radial-gradient(circle at 32% 28%, #FFF3E0 0%, #FFC24E 34%, #C8623A 70%, #3A2456 130%); }
.ap-fab[data-tpl="qiangfudai"]{ background: radial-gradient(circle at 32% 28%, #FFE3D0 0%, #F2A65A 34%, #D9482E 62%, #8E0F06 130%); }
.ap-fab[data-tpl="manghe"]    { background: radial-gradient(circle at 32% 28%, #F0E8FF 0%, #C9A8FF 34%, #8F6FD8 62%, #4A2AA8 130%); }
.ap-fab[data-tpl="guagua"]    { background: radial-gradient(circle at 32% 28%, #FFF3D0 0%, #FFD9A0 36%, #E4B55C 64%, #B9832F 130%); }
.ap-fab[data-tpl="jiugongge"] { background: radial-gradient(circle at 32% 28%, #FFF3D0 0%, #F7CE8A 38%, #E0A23C 66%, #A3461A 130%); }
@media (prefers-reduced-motion: reduce) {
    .ap-fab, .ap-fab-halo, .ap-fab-halo2, .ap-fab-dot.show { animation: none !important; }
}

/* ============================================================
 * 中奖记录弹窗（点击悬浮按钮打开）
 * ============================================================ */
.ap-rmask {
    position: fixed; inset: 0; z-index: 9998; background: rgba(26,4,10,.72);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: .25s;
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.ap-rmask.show { opacity: 1; visibility: visible; }
.ap-rmodal {
    width: 84%; max-width: 380px; max-height: 74vh; display: flex; flex-direction: column;
    background: linear-gradient(165deg, #3A0C18 0%, #2A0810 60%, #42101B 100%);
    border: 1px solid rgba(242,206,126,.55); border-radius: 18px;
    box-shadow: 0 22px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,246,220,.08) inset;
    transform: translateY(16px) scale(.96); transition: .28s cubic-bezier(.2,1.2,.4,1);
    overflow: hidden;
}
.ap-rmask.show .ap-rmodal { transform: translateY(0) scale(1); }
.ap-r-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 8px;
    background: linear-gradient(180deg, rgba(242,206,126,.12), transparent);
}
.ap-r-title { font-size: 18px; font-weight: 800; color: #FFD9A0; letter-spacing: 1px; }
.ap-r-close {
    width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(242,206,126,.4);
    background: rgba(255,246,220,.06); color: #F2CE7E; font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: .18s;
}
.ap-r-close:hover { background: rgba(242,206,126,.18); }
/* 双 Tab：我的中奖 / 大家手气 */
.ap-r-tabs {
    display: flex; gap: 8px; padding: 10px 18px 4px;
}
.ap-r-tab {
    flex: 1; padding: 8px 6px; border-radius: 999px; cursor: pointer;
    font-size: 13px; font-weight: 700; letter-spacing: 1px;
    background: rgba(255,246,220,.06); color: #C9A06B;
    border: 1px solid rgba(242,206,126,.28); transition: .2s;
}
.ap-r-tab.active {
    background: linear-gradient(180deg, #F04A32, #C2241C); color: #FFF6DC;
    border-color: rgba(242,206,126,.7);
    box-shadow: 0 4px 12px rgba(194,36,28,.4);
}
.ap-r-sub { font-size: 12px; color: #C9A06B; padding: 6px 18px 10px; }
.ap-r-sub b { color: #FFD9A0; }
.ap-r-body { overflow-y: auto; padding: 4px 18px 20px; }
.ap-r-body .ap-list { max-height: 52vh; }
.ap-r-body .ap-empty { color: #9C7A52; }

/* ---------- 我的中奖记录（带核销按钮） ---------- */
.ap-mine-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 2px; border-bottom: 1px dashed rgba(242,206,126,.2);
}
.ap-mine-main { flex: 1; min-width: 0; }
.ap-mine-name {
    font-size: 13.5px; color: #FFE9C9; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.ap-mine-name b { color: #FFD9A0; font-weight: 700; }
.ap-mine-time { font-size: 11px; color: #9C7A52; margin-top: 2px; }
.ap-hx-btn {
    flex: 0 0 auto; padding: 7px 16px; border-radius: 999px; cursor: pointer;
    font-size: 12.5px; font-weight: 700; letter-spacing: 1px; color: #fff;
    background: linear-gradient(180deg, #F04A32, #C2241C); border: 0;
    box-shadow: 0 4px 12px rgba(194,36,28,.4);
}
.ap-hx-btn:active { transform: translateY(1px); }
.ap-hx-done {
    flex: 0 0 auto; font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
    color: #A8E6C0; border: 1px solid rgba(80,200,120,.5);
}
.ap-hx-none { flex: 0 0 auto; font-size: 11.5px; color: #9C7A52; }
.ap-mine-tip { font-size: 11.5px; color: #C9A06B; padding: 8px 0 4px; }

/* ---------- 我的奖品 · 抽奖码查询 ---------- */
.ap-search { display: flex; gap: 8px; align-items: center; padding: 2px 0 10px; }
.ap-search-ipt {
    flex: 1; min-width: 0; height: 40px; border-radius: 999px; outline: none;
    border: 1px solid rgba(242,206,126,.42); background: rgba(255,246,220,.08);
    color: #FFE9C9; font-size: 13.5px; padding: 0 16px; transition: .2s;
}
.ap-search-ipt::placeholder { color: #9C7A52; }
.ap-search-ipt:focus { border-color: rgba(242,206,126,.85); background: rgba(255,246,220,.14); }
.ap-search-btn {
    flex: 0 0 auto; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
    font-size: 13.5px; font-weight: 700; letter-spacing: 1px; color: #fff;
    background: linear-gradient(180deg, #F04A32, #C2241C);
    box-shadow: 0 4px 12px rgba(194,36,28,.4);
}
.ap-search-btn:active { transform: translateY(1px); }
.ap-search-res { min-height: 40px; }

/* ============================================================
 * 核销弹窗（我的中奖 → 核销）
 * ============================================================ */
.ap-dmask {
    position: fixed; inset: 0; z-index: 9999; background: rgba(26,4,10,.76);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: .25s;
}
.ap-dmask.show { opacity: 1; visibility: visible; }
.ap-dmodal {
    width: 84%; max-width: 360px; max-height: 78vh; overflow-y: auto;
    background: linear-gradient(165deg, #FFFDF7 0%, #FFF1E4 100%);
    border: 1.5px solid rgba(217,169,76,.7); border-radius: 18px;
    box-shadow: 0 22px 60px rgba(0,0,0,.5);
    transform: translateY(14px) scale(.96); transition: .28s cubic-bezier(.2,1.2,.4,1);
    color: #3A0C18;
}
.ap-dmask.show .ap-dmodal { transform: translateY(0) scale(1); }
.ap-d-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 18px 8px; border-bottom: 1px dashed rgba(217,169,76,.4);
}
.ap-d-title { font-size: 16px; font-weight: 800; color: #8E0F06; letter-spacing: 1px; }
.ap-d-close {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(217,169,76,.6);
    background: #fff; color: #8E0F06; font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.ap-d-body { padding: 14px 18px 20px; }
.ap-d-prize {
    width: 78px; height: 78px; margin: 0 auto 8px; border-radius: 14px;
    background: linear-gradient(145deg, #FFFDF6, #FFE9C9); border: 1.5px solid #E4B55C;
    display: flex; align-items: center; justify-content: center; font-size: 34px;
}
.ap-d-prize img { width: 82%; height: 82%; object-fit: contain; }
.ap-d-name { text-align: center; font-size: 14.5px; color: #5A2A12; margin-bottom: 14px; }
.ap-d-name b { color: #C2241C; }
.ap-d-web {
    display: block; text-align: center; padding: 12px; border-radius: 12px;
    background: linear-gradient(180deg, #F04A32, #C2241C); color: #fff;
    font-weight: 700; text-decoration: none; font-size: 15px;
}
.ap-d-code { text-align: center; }
.ap-d-code-no {
    font-size: 20px; font-weight: 800; color: #C2241C; letter-spacing: 3px;
    padding: 12px; background: #fff; border: 1.5px dashed #E4B55C; border-radius: 12px;
    word-break: break-all;
}
.ap-d-qr { width: 148px; height: 148px; margin: 14px auto 6px; display: block; }
.ap-d-addr { font-size: 12.5px; color: #8A5A1E; margin-top: 8px; line-height: 1.6; }
.ap-d-form { margin-top: 4px; }
.ap-d-field { display: block; margin-bottom: 12px; }
.ap-d-field span { display: block; font-size: 12.5px; color: #8A5A1E; margin-bottom: 5px; }
.ap-d-field input {
    width: 100%; box-sizing: border-box; height: 42px; padding: 0 12px;
    border: 1.5px solid rgba(217,169,76,.7); border-radius: 10px; background: #fff;
    font-size: 14.5px; color: #3D0F18; outline: none;
}
.ap-d-field input:focus { border-color: #C2241C; box-shadow: 0 0 0 3px rgba(194,36,28,.12); }
.ap-d-submit {
    width: 100%; margin-top: 6px; padding: 12px; border: 0; border-radius: 999px;
    background: linear-gradient(180deg, #F04A32, #C2241C); color: #fff;
    font-size: 15px; font-weight: 700; letter-spacing: 2px; cursor: pointer;
    box-shadow: 0 6px 16px rgba(194,36,28,.35);
}
.ap-d-submit:disabled { opacity: .6; }
.ap-loading { text-align: center; padding: 26px 0; font-size: 13px; color: #8A5A1E; }
.ap-d-body .ap-empty { color: #8A5A1E; }

/* ============================================================
 * 全模板 · 边框跑马灯装饰（marquee.js 注入 .act-mq）
 * 常驻暗金环 + 亮金追光沿周长奔驰；纯 SVG 动画，全兼容
 * ============================================================ */
.act-mq{
    position:absolute;inset:0;width:100%;height:100%;
    pointer-events:none;z-index:9;overflow:visible;display:block;
}
/* 常驻暗金细环（无动画依赖，任何时候都有一圈金边） */
.act-mq .mq-base{
    fill:none;stroke:rgba(242,206,126,.40);stroke-width:1.5;
}
/* 追光组：光晕 + 亮线，沿周长循环奔驰 */
.act-mq .mq-run{animation:mq-chase 3.6s linear infinite;}
.act-mq .mq-halo{
    fill:none;stroke:rgba(255,224,150,.26);stroke-width:7;stroke-linecap:round;
    filter:drop-shadow(0 0 5px rgba(255,214,120,.45));
}
.act-mq .mq-dash{
    fill:none;stroke:#FFF3C8;stroke-width:2.6;stroke-linecap:round;
    filter:drop-shadow(0 0 4px rgba(255,236,170,.85));
}
@keyframes mq-chase{to{stroke-dashoffset:var(--mq-per,-1200px);}}
/* 减弱动态效果时停追光，保留金环 */
@media (prefers-reduced-motion: reduce){
    .act-mq .mq-run{animation:none;}
}

/* ==================== 投诉悬浮球（位于中奖记录球正上方） ==================== */
.ap-fab-tousu {
    position: fixed; right: 14px; bottom: 158px; z-index: 999;
    width: 44px; height: 44px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
    background: radial-gradient(circle at 32% 28%, #FFFFFF 0%, #F3F4F6 55%, #E2E5EA 100%);
    box-shadow:
        0 5px 14px rgba(60,64,72,.38),
        0 0 0 1.5px rgba(255,255,255,.9) inset;
    color: #D94838; font-size: 13px; font-weight: 700; letter-spacing: 1px;
    font-family: "Microsoft YaHei", sans-serif;
    display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
    animation: ap-fab-in .55s cubic-bezier(.2,1.4,.4,1) .25s both, ap-fab-float 3.4s ease-in-out 1.3s infinite;
}
.ap-fab-tousu::before {
    content: ''; position: absolute; top: 5px; right: 5px;
    width: 7px; height: 7px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FF8A6B, #E02B12);
    border: 1.5px solid #FFF6DC;
}
.ap-fab-tousu:active { transform: scale(.92); }

/* ==================== 我的中奖记录 · 顶部常驻面板（抽奖码模式） ==================== */
.ap-mine-pinned {
    position: relative;
    border: 1.5px solid rgba(217,169,76,.55);
    box-shadow: 0 6px 18px rgba(194,36,28,.10);
    background: linear-gradient(180deg,#FFFDF7 0%,#FFF7E8 100%);
}
.ap-mine-pinned-tip {
    font-size: 12.5px; color: #9a6a2f; padding: 2px 4px 6px; line-height: 1.5;
}
.ap-mine-pinned-tip b { color: #C2241C; letter-spacing: .5px; }
.ap-mine-pinned-tip .ap-mine-req {
    color: #C2241C; text-decoration: none; font-weight: 700; margin-left: 4px;
    border-bottom: 1px dashed rgba(194,36,28,.5); cursor: pointer;
}
.ap-mine-pinned-tip .ap-mine-req:active { opacity: .7; }
.ap-mine-pinned-body { padding-top: 2px; }
