/* ==========================================================================
   H5 用户端 - 全局样式
   依据：《03-UI设计规范 v1.0》（客户参考图提炼）
   基调：浅灰白底 + 白卡片 + 彩色圆角图标底；
   双主题以 body class 隔离：theme-home（首页红色营销风）/ theme-mine（浅灰白卡片风）。
   兼容性：保留全部旧类名（list/card/btn/topbar/hero/grid...），旧页面自动过渡到新色板。
   纯原生 CSS，无任何依赖；移动端优先。
   ========================================================================== */

:root {
    /* ---------------- 新版设计 token ---------------- */
    --primary: #2B6CF6;          /* 主色 */
    --primary-weak: #EAF1FE;     /* 主色浅底 */
    --success: #34C77B;
    --success-weak: #E6F7EE;
    --warning: #FF8F1F;
    --warning-weak: #FFF3E6;
    --danger: #F5484A;
    --danger-weak: #FDEBEC;
    --gold: #F0D9A0;             /* 黑卡金色按钮底 */
    --gold-text: #3D2E10;        /* 金色按钮文字 */
    --purple: #7B5CF0;
    --purple-weak: #F1EDFD;
    --banner-red: #E23A32;       /* 首页横幅兜底红 */

    --bg-page: #EEF0F4;          /* 个人中心等浅灰蓝底 */
    --bg-page-home: #F7F4F0;     /* 首页暖调底 */
    --bg-card: #FFFFFF;
    --bg-dark-card: #1A1A1A;     /* 黑卡 */
    --bg-soft: #F5F6F8;          /* 浅灰长条（推广微信号 / 权益横幅） */
    --divider: #F0F1F4;

    --text-1: #1A1A1A;
    --text-2: #8A8F99;
    --text-3: #B9BEC8;

    --r-card: 16px;              /* 大卡片 */
    --r-card-md: 14px;           /* 中卡片 / 推广中心宫格图标底 */
    --r-btn: 12px;               /* 普通按钮 / 黑卡 */
    --r-icon: 12px;              /* 个人中心宫格图标底 */
    --r-thumb: 8px;              /* 缩略图 */
    --r-full: 999px;             /* 胶囊 / 头像 */

    --shadow-card: 0 2px 8px rgba(26, 26, 26, .04);
    --shadow-float: 0 4px 16px rgba(26, 26, 26, .10);

    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-6: 24px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    /* ---------------- 旧变量兼容层（未改版页面继续引用，值已切换到新色板） ---------------- */
    --c-indigo: var(--primary);
    --c-violet: var(--primary);
    --c-purple: var(--purple);
    --grad-main: linear-gradient(135deg, #2B6CF6 0%, #2B6CF6 100%);   /* 旧渐变位 → 扁平主色 */
    --grad-soft: linear-gradient(135deg, #EAF1FE 0%, #EAF1FE 100%);   /* 旧渐变底 → 主色浅底 */
    --line: var(--divider);
    --bg: var(--bg-page);
    --card: var(--bg-card);
    --ok: var(--success);
    --warn: var(--warning);
    --danger-legacy: var(--danger);
    --radius: var(--r-card);
    --radius-sm: var(--r-btn);
    --shadow: var(--shadow-float);
    --shadow-sm: var(--shadow-card);
}

/* 双主题隔离：仅覆盖页面底色，互不污染 */
body.theme-mine { background: var(--bg-page); }
body.theme-home { background: var(--bg-page-home); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-page);
    color: var(--text-1);
    font-size: 15px;
    line-height: 1.6;
    font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ------------------------------- 布局 ---------------------------------- */
.app { min-height: 100vh; padding-bottom: calc(66px + var(--safe-bottom)); }

/* 顶栏：白底 + 居中标题 + 细分割线（规范 5.7） */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 52px;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--bg-card);
    color: var(--text-1);
    border-bottom: 1px solid var(--divider);
}
.topbar-title { font-size: 17px; font-weight: 600; margin: 0; }
.topbar-back, .topbar-right {
    position: absolute;
    top: 0;
    height: 44px;
    display: flex;
    align-items: center;
    font-size: 22px;
    color: var(--text-1);
    width: 48px;
    justify-content: center;
    cursor: pointer;
}
.topbar-back { left: 0; }
.topbar-right { right: 0; font-size: 15px; width: auto; padding: 0 14px; }

.page { padding: 12px 14px 20px; }

/* hero：未改版页面的过渡样式（扁平主色卡） */
.hero { background: var(--primary); color: #fff; padding: 18px 16px 26px; border-radius: var(--r-card); }
.hero-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.hero-sub { font-size: 13px; opacity: .92; margin: 0; }

/* ------------------------------- 卡片 ---------------------------------- */
.card {
    background: var(--bg-card);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 16px;
    margin-bottom: 12px;
}
.card-flush { padding: 0; overflow: hidden; }

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 2px 10px;
}
.section-title h2 { font-size: 17px; font-weight: 700; margin: 0; }
.section-title .more { font-size: 13px; color: var(--text-2); }

.muted { color: var(--text-2); font-size: 13px; }
.tiny { font-size: 12px; color: var(--text-3); }
.center { text-align: center; }

/* ------------------------------- 按钮 ---------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: var(--r-full);
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.98); opacity: .92; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: var(--bg-card); color: var(--text-2); border: 1px solid #D8DBE2; }
.btn-light { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-danger { background: var(--danger); }

/* ------------------------------- 表单 ---------------------------------- */
.field { margin-bottom: 14px; }
.field-label { font-size: 13px; color: var(--text-2); margin-bottom: 6px; display: block; }
.input, .textarea, select.input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--divider);
    border-radius: var(--r-btn);
    background: #FAFBFC;
    font-size: 15px;
    color: var(--text-1);
    outline: none;
    transition: border-color .15s, background .15s;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--primary); background: #fff; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.field-row { display: flex; gap: 10px; }
.field-row .input { flex: 1; }

.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }

/* ------------------------------- 列表 ---------------------------------- */
.list { background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; }
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--divider);
}
.list-item:last-child { border-bottom: none; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 14px; font-weight: 500; }
.list-item .li-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.list-item .li-arrow { color: var(--text-3); font-size: 18px; }
.li-thumb { width: 56px; height: 56px; border-radius: var(--r-thumb); object-fit: cover; background: var(--primary-weak); flex: 0 0 auto; }

/* 菜单式列表 */
.menu-list .list-item { padding: 15px 16px; }
.menu-ico {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-weak); color: var(--primary); font-size: 18px; flex: 0 0 auto;
}
.menu-ico svg { width: 18px; height: 18px; }

/* ------------------------------- 宫格（旧版 4 列） ---------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 4px;
    background: var(--bg-card);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 14px 8px;
}
.grid-item { text-align: center; padding: 6px 2px; cursor: pointer; }
.grid-ico { width: 44px; height: 44px; margin: 0 auto 6px; border-radius: var(--r-icon); background: var(--primary-weak); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.grid-ico img { width: 100%; height: 100%; object-fit: cover; }
.grid-item span { font-size: 12px; color: var(--text-1); }

/* ------------------------------- 轮播 ---------------------------------- */
.banner { border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-card); }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { flex: 0 0 100%; scroll-snap-align: start; height: 150px; position: relative; background: var(--primary); color: #fff; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.banner-cap h3 { margin: 0; font-size: 17px; }
.banner-cap p { margin: 2px 0 0; font-size: 12px; opacity: .92; }

.notice {
    display: flex; align-items: center; gap: 8px;
    background: var(--warning-weak); color: var(--warning);
    border-radius: var(--r-btn);
    padding: 10px 12px; font-size: 13px; margin-top: 12px;
}
.notice .notice-tag { flex: 0 0 auto; font-weight: 700; }

/* ------------------------------- 商品 / 线路 --------------------------- */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.goods-card { background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; }
.goods-card .thumb { height: 130px; background: var(--primary-weak); }
.goods-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.goods-card .body { padding: 10px; }
.goods-card .t { font-size: 14px; font-weight: 500; height: 40px; overflow: hidden; }
.price { color: var(--danger); font-weight: 700; }
.price small { font-size: 11px; font-weight: 400; }
.price-through { color: var(--text-3); text-decoration: line-through; font-size: 12px; margin-left: 6px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: var(--r-full); background: var(--primary-weak); color: var(--primary); }
.tag-line { background: var(--bg-soft); color: var(--text-2); }
.tag-ok { background: var(--success-weak); color: var(--success); }
.tag-warn { background: var(--warning-weak); color: var(--warning); }
.tag-danger { background: var(--danger-weak); color: var(--danger); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 6px 14px; border-radius: var(--r-full); background: var(--bg-card); color: var(--text-2); font-size: 13px; border: 1px solid var(--divider); cursor: pointer; }
.chip.active { background: var(--primary); color: #fff; border-color: transparent; }

/* ------------------------------- 底部导航 ------------------------------ */
.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: flex;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--divider);
    padding-bottom: var(--safe-bottom);
}
.tabbar-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 7px 0 6px; color: var(--text-2); font-size: 11px; }
.tabbar-item .ti-ico { display: flex; align-items: center; justify-content: center; height: 22px; line-height: 1; margin-bottom: 2px; }
.tabbar-item .ti-ico svg { display: block; }
/* 后台可上传自定义图标：<img> 与内联 SVG 占位保持一致（22×22，垂直居中） */
.tabbar-item .ti-ico img { display: block; width: 22px; height: 22px; object-fit: contain; }
.tabbar-item.active { color: var(--primary); }
.tabbar-item.active .ti-ico { transform: translateY(-1px); }

/* ------------------------------- 空态 / 加载 --------------------------- */
.empty { text-align: center; color: var(--text-3); padding: 48px 16px; font-size: 14px; }
.empty .e-ico { font-size: 40px; margin-bottom: 8px; }
.empty .e-ico svg { width: 40px; height: 40px; margin: 0 auto; display: block; }
/* 空态默认插图（推广素材页等），宽度自适应且不撑破容器 */
.empty .empty-ico { display: block; width: 168px; max-width: 62%; height: auto; margin: 0 auto 10px; opacity: .92; }
.empty .empty-t { margin: 0; font-size: 14px; color: var(--text-3); }
.skeleton { background: linear-gradient(90deg, #eef0f4 25%, #f6f7f9 37%, #eef0f4 63%); background-size: 400% 100%; animation: sk 1.2s infinite; border-radius: var(--r-thumb); }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ------------------------------- Toast / 弹窗 -------------------------- */
.toast-wrap { position: fixed; left: 0; right: 0; top: 70px; z-index: 999; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.toast { margin-top: 8px; max-width: 80%; padding: 10px 18px; border-radius: var(--r-full); background: rgba(26, 26, 26, .9); color: #fff; font-size: 14px; box-shadow: var(--shadow-float); animation: tin .2s ease; }
.toast.ok { background: rgba(52, 199, 123, .95); }
.toast.err { background: rgba(245, 72, 74, .95); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.mask { position: fixed; inset: 0; background: rgba(20, 22, 30, .45); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 30px; }
.dialog { width: 100%; max-width: 320px; background: #fff; border-radius: var(--r-card); overflow: hidden; animation: pop .18s ease; box-shadow: var(--shadow-float); }
.dialog h4 { margin: 0; padding: 20px 18px 8px; font-size: 16px; color: var(--text-1); }
.dialog .d-body { padding: 0 18px 18px; color: var(--text-2); font-size: 14px; }
.dialog .d-foot { display: flex; border-top: 1px solid var(--divider); }
.dialog .d-foot button { flex: 1; height: 48px; border: none; background: #fff; font-size: 15px; color: var(--text-2); cursor: pointer; }
.dialog .d-foot button.cancel { color: var(--text-2); }
.dialog .d-foot button.primary { color: var(--primary); font-weight: 600; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ------------------------------- 结算栏 -------------------------------- */
.foot-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--divider);
    padding: 10px 14px calc(10px + var(--safe-bottom));
    display: flex; align-items: center; gap: 12px;
}
.foot-bar .fb-info { flex: 1; }
body.has-footbar { padding-bottom: 90px; }
body.has-footbar .app { padding-bottom: calc(90px + var(--safe-bottom)); }

/* --------------------------- 旧版我的头部（兼容） ---------------------- */
.profile-head { background: var(--primary); color: #fff; padding: 20px 16px; display: flex; align-items: center; gap: 14px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden; flex: 0 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-head .p-name { font-size: 18px; font-weight: 700; }
.profile-head .p-sub { font-size: 12px; opacity: .92; }

.stat-row { display: flex; background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card); margin: -18px 14px 12px; position: relative; z-index: 2; padding: 14px 0; }
.stat-row .stat { flex: 1; text-align: center; }
.stat-row .stat b { display: block; font-size: 18px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.stat-row .stat span { font-size: 12px; color: var(--text-2); }

.link-row { display: flex; gap: 10px; }
.link-row .btn { flex: 1; }

/* --------------------------- 图片兜底（防裂图） --------------------------- */
.thumb-fb {
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-weight: 700;
    background: var(--primary-weak);
    overflow: hidden;
}
/* 图片加载失败时的「首字兜底」文案（app.js thumb()/cover() 注入） */
.fb-text { font-size: 14px; line-height: 1; }
.li-thumb { overflow: hidden; }
.li-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==========================================================================
   公共新组件（theme-mine / theme-home 页面共用）
   ========================================================================== */

/* 浅色底图标块（规范 5.5 配对表） */
.ico-tile { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden; }
.ico-tile svg { display: block; width: 22px; height: 22px; }
.ico-blue { background: var(--primary-weak); color: var(--primary); }
.ico-red { background: var(--danger-weak); color: var(--danger); }
.ico-purple { background: var(--purple-weak); color: var(--purple); }
.ico-green { background: var(--success-weak); color: var(--success); }
.ico-orange { background: var(--warning-weak); color: var(--warning); }

/* 胶囊标签 / 描边按钮（规范 5.3 / 5.4） */
.pill-gray { display: inline-flex; align-items: center; background: var(--bg-soft); color: var(--text-2); font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: var(--r-full); white-space: nowrap; }
.pill-line { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border: 1px solid #D8DBE2; border-radius: var(--r-full); color: var(--text-2); font-size: 12px; background: transparent; cursor: pointer; white-space: nowrap; }

/* 卡片标题（常用服务 / 我的服务） */
.srv-title { font-size: 15px; font-weight: 600; color: var(--text-1); }

/* ==========================================================================
   个人中心 mine.html（theme-mine）
   ========================================================================== */
.mi-head { padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 4px; }
.mi-user { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.mi-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--bg-card); overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: var(--text-3); box-shadow: var(--shadow-card); }
.mi-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mi-avatar svg { width: 28px; height: 28px; }
.mi-main { flex: 1; min-width: 0; }
.mi-name { font-size: 18px; font-weight: 700; color: var(--text-1); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-role { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.mi-idrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

/* 四列数据（规范 5.6：数值 22px/700 + 12px 标签） */
.mi-stats { display: flex; padding: 18px 8px 14px; }
.mi-stat { flex: 1; text-align: center; display: block; }
.mi-stat b { display: block; font-size: 22px; font-weight: 700; color: var(--text-1); line-height: 1.2; font-variant-numeric: tabular-nums; }
.mi-stat span { display: block; margin-top: 4px; font-size: 12px; color: var(--text-2); }

/* 黑卡（规范 5.2） */
.card-dark {
    background: var(--bg-dark-card);
    border-radius: var(--r-btn);
    box-shadow: var(--shadow-card);
    padding: 14px 16px;
    margin: 0 12px 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cd-label { font-size: 12px; color: #B9AFA0; }
.cd-amount { margin-top: 4px; font-size: 20px; font-weight: 700; color: #FFFFFF; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cd-amount em { font-style: normal; font-size: 13px; font-weight: 500; margin-left: 2px; }
.btn-gold {
    display: inline-flex; align-items: center; justify-content: center;
    height: 32px; padding: 0 20px; border: none; border-radius: var(--r-full);
    background: var(--gold); color: var(--gold-text);
    font-size: 14px; font-weight: 600; cursor: pointer; flex: 0 0 auto;
}
.btn-gold:active { opacity: .9; }

/* 并排双白卡（我的订单 / 推广中心） */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 12px 12px; }
.duo-card {
    background: var(--bg-card); border-radius: var(--r-card-md); box-shadow: var(--shadow-card);
    padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
}
.duo-t { font-size: 15px; font-weight: 600; color: var(--text-1); }
.duo-s { font-size: 12px; color: var(--text-2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duo-ico { width: 40px; height: 40px; border-radius: 50%; }
.duo-ico svg { width: 20px; height: 20px; }

/* 常用服务 5 列宫格（规范 5.5：图标底 44px / 圆角 12px） */
.srv-card { background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 16px 8px 18px; margin: 0 12px 12px; }
.srv-card > .srv-title { padding: 0 8px 14px; }
.srv-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px 4px; }
.srv-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.srv-ico { width: 44px; height: 44px; border-radius: var(--r-icon); }
.srv-item span { font-size: 12px; color: var(--text-1); line-height: 1.2; text-align: center; }

/* 更多服务列表行 */
.mi-row { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--divider); cursor: pointer; }
.mi-row:last-child { border-bottom: none; padding-bottom: 2px; }
.mi-row:first-child { padding-top: 2px; }
.mr-ico { width: 32px; height: 32px; border-radius: 10px; }
.mr-ico svg { width: 16px; height: 16px; }
.mr-t { flex: 1; min-width: 0; font-size: 14px; color: var(--text-1); }
.mr-arrow { color: var(--text-3); font-size: 16px; flex: 0 0 auto; }

/* ==========================================================================
   推广中心 agent.html（theme-mine）
   ========================================================================== */
.ag-card { background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 16px; margin: 12px 12px 0; }
.ag-user { display: flex; align-items: center; gap: 12px; }
.ag-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--bg-soft); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.ag-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ag-avatar svg { width: 24px; height: 24px; }
.ag-name { font-size: 17px; font-weight: 700; color: var(--text-1); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-role { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* 浅灰长条：推广微信号 */
.ag-wx { margin-top: 12px; height: 36px; background: var(--bg-soft); border-radius: var(--r-thumb); display: flex; align-items: center; gap: 8px; padding: 0 4px 0 10px; }
.ag-wx-label { font-size: 12px; color: var(--text-2); flex: 0 0 auto; }
.ag-wx-val { flex: 1; min-width: 0; font-size: 13px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-mini {
    display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: none;
    border-radius: var(--r-full); background: var(--primary-weak); color: var(--primary);
    font-size: 13px; font-weight: 500; cursor: pointer; flex: 0 0 auto;
}
.btn-mini:active { opacity: .85; }

/* 提现区：可提现 28px 大数字 + 红色胶囊按钮 */
.ag-cash { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.ag-cash-label { font-size: 12px; color: var(--text-2); }
.ag-cash-num { margin-top: 4px; font-size: 28px; font-weight: 700; color: var(--text-1); line-height: 1.1; font-variant-numeric: tabular-nums; }
.btn-danger-pill {
    display: inline-flex; align-items: center; height: 36px; padding: 0 18px; border: none;
    border-radius: var(--r-full); background: var(--danger); color: #fff;
    font-size: 14px; font-weight: 600; cursor: pointer; flex: 0 0 auto;
}
.btn-danger-pill:active { opacity: .9; }

/* 三列数据（17px/700 + 12px 标签） */
.ag-stats { display: flex; margin-top: 18px; }
.ag-stat { flex: 1; text-align: center; }
.ag-stat b { display: block; font-size: 17px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.ag-stat span { display: block; margin-top: 4px; font-size: 12px; color: var(--text-2); }

/* 权益横幅 */
.ag-banner { margin: 12px; min-height: 44px; background: var(--bg-soft); border-radius: var(--r-thumb); display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.ag-banner .ag-open { margin-left: auto; color: var(--primary); font-size: 13px; font-weight: 500; cursor: pointer; flex: 0 0 auto; white-space: nowrap; }

/* 我的服务 4 列宫格（图标底 56px / 圆角 14px） */
.ag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; padding-top: 14px; }
.ag-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.ag-ico { width: 56px; height: 56px; border-radius: var(--r-card-md); }
.ag-ico svg { width: 24px; height: 24px; }
.ag-item span { font-size: 12px; color: var(--text-1); line-height: 1.2; text-align: center; }

/* ==========================================================================
   推广素材 promote.html（theme-mine）
   ========================================================================== */
/* tab 行：5 个分类换行铺开（宽度不够横滚，避免右侧被切） */
.pm-tabs { display: flex; flex-wrap: wrap; gap: 8px; overflow-x: visible; padding: 12px 16px; }
.pm-tab {
    flex: 0 0 auto; height: 30px; display: inline-flex; align-items: center; padding: 0 12px;
    border-radius: var(--r-full); font-size: 13px; color: var(--text-2);
    background: transparent; border: none; cursor: pointer; white-space: nowrap;
}
.pm-tab.on { background: var(--warning-weak); color: var(--warning); font-weight: 600; }

.pm-stage { background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card); margin: 0 12px; padding: 16px; }
.pm-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.pm-track::-webkit-scrollbar { display: none; }
.pm-slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; justify-content: center; }
.pm-poster {
    width: min(280px, 72vw); aspect-ratio: 3 / 4; border-radius: var(--r-thumb); overflow: hidden;
    background: var(--bg-soft);
    position: relative;
    -webkit-touch-callout: default;           /* iOS 长按唤起「存储图像」 */
    -webkit-user-select: none; user-select: none;
}
.pm-poster img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-touch-callout: default; -webkit-user-drag: none; }
.pm-dots { display: flex; justify-content: center; gap: 6px; padding: 14px 0 2px; }
.pm-dots i { width: 6px; height: 6px; border-radius: 50%; background: #D8DBE2; cursor: pointer; }
.pm-dots i.on { background: var(--primary); }

/* 宣传文案卡：一条素材一张，右上角一键复制 */
.pm-copy { margin: 12px 12px 0; display: flex; flex-direction: column; gap: 10px; }
.pm-copy-card {
    background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card);
    padding: 14px 16px 16px;
}
.pm-copy-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pm-copy-title { font-size: 14px; font-weight: 600; color: var(--text-1); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-copy-btn {
    flex: none; height: 30px; padding: 0 14px; border: none; border-radius: var(--r-full);
    background: var(--primary-weak, #EAF0FF); color: var(--primary);
    font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s;
}
.pm-copy-btn:active { transform: scale(.97); }
.pm-copy-btn.done { background: var(--success-weak, #E8F8EE); color: var(--success, #16A34A); }
.pm-copy-text {
    font-size: 13px; line-height: 1.75; color: var(--text-2);
    word-break: break-word; user-select: text; -webkit-user-select: text;
}

.pm-save-wrap {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 20px 16px calc(16px + var(--safe-bottom));
    background: linear-gradient(transparent, rgba(238, 240, 244, .95) 45%);
}
.btn-save {
    display: flex; width: 100%; height: 48px; align-items: center; justify-content: center;
    border: none; border-radius: var(--r-full); background: var(--primary); color: #fff;
    font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-float);
}
.btn-save:active { opacity: .92; }

/* ==========================================================================
   首页 index.html（theme-home · 红色营销风）
   ========================================================================== */

/* 红色营销大横幅（装修图优先，兜底 #E23A32 + 默认文案） */
.hb { position: relative; height: 220px; background: var(--banner-red); color: #fff; overflow: hidden; padding-top: env(safe-area-inset-top, 0px); }
.hb .hb-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.hb-fallback { position: relative; z-index: 2; height: 100%; padding: 34px 18px 0; background: radial-gradient(120% 130% at 85% 10%, rgba(255, 255, 255, .14), transparent 55%); }
.hb-title { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.32; letter-spacing: .5px; text-wrap: balance; text-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.hb-sub { margin: 8px 0 0; font-size: 14px; font-weight: 500; opacity: .95; }
/* 默认 banner 是红→深红渐变，底部本身偏暗，遮罩加深并提前起晕，保证白字对比度；
   底部留白 32px：红包卡片区 .rp-row 会整体上移 24px 压住横幅下缘，文案需抬到其上方 */
.hb-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 56px 16px 32px; background: linear-gradient(transparent, rgba(0, 0, 0, .30) 42%, rgba(0, 0, 0, .62)); }
.hb-cap .hb-cap-t { margin: 0; font-size: 17px; font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.hb-cap .hb-cap-s { margin: 4px 0 0; font-size: 12px; opacity: .94; }
.hb-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.hb-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.hb-dots i.on { background: #fff; }

/* 三张并排红包卡：白底红字，浮在红色横幅上
   —— 红色只保留在「横幅底色」和「领红包」这一处行动点上，避免红叠红糊成一片 */
.rp-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px; margin-top: -24px; position: relative; z-index: 3; }
.rp-card {
    border-radius: var(--r-btn);
    background: #FFFFFF;
    color: var(--text-1);
    padding: 14px 6px 12px;
    display: flex; flex-direction: column; align-items: center;
    /* 中性轻投影，不用红影（白卡靠阴影与横幅断开即可） */
    box-shadow: 0 4px 12px rgba(17, 24, 39, .08);
}
/* 红包图标（后台装修可传，可选）：有图时显示在名称上方，无图时完全不占位 */
.rp-ico { display: block; width: 26px; height: 26px; margin: 0 auto 4px; object-fit: contain; }
.rp-name { font-size: 13px; font-weight: 500; color: var(--text-1); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-amount { margin: 8px 0 10px; font-size: 22px; font-weight: 700; line-height: 1.1; color: #F5484A; font-variant-numeric: tabular-nums; }
.rp-amount small { font-size: 13px; font-weight: 600; margin-right: 1px; }
.rp-btn { height: 30px; padding: 0 16px; border: none; border-radius: var(--r-full); background: #F5484A; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.rp-btn:active { opacity: .88; }

/* 首页公告 */
.home-notice { display: flex; align-items: center; gap: 8px; background: var(--bg-card); border-radius: var(--r-btn); padding: 11px 12px; margin: 12px 12px 0; box-shadow: var(--shadow-card); }
.home-notice-tag { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--warning); background: var(--warning-weak); border-radius: 6px; padding: 2px 8px; }
.home-notice-text { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 金刚区：4 列 × 2 行（8 项正好铺满，不留右下角空格），饱和色块 + 白色扁平图形 + 11px 标签 */
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 16px 12px; margin: 12px 12px 0; }
.home-grid-item { text-align: center; cursor: pointer; }
.home-grid-ico {
    width: 40px; height: 40px; margin: 0 auto 6px; border-radius: var(--r-icon);
    background: var(--primary-weak);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    font-size: 15px; font-weight: 700; color: #fff;
    /* 中性微投影：让图标块从白卡上「浮」起来，不用彩色发光 */
    box-shadow: 0 3px 8px rgba(17, 24, 39, .10);
}
/* 宫格图标：默认素材是「白色描边图形 + 透明底」，必须靠饱和渐变底才显形；
   取容器 58%（40px 底 -> 约 23px 图形），白色 stroke-width 1.8 在该尺寸下清晰可辨 */
.home-grid-ico img { width: 58%; height: 58%; object-fit: contain; display: block; }
/* 图标底 5 色轮转：饱和渐变 + 纯白图形，延续「品牌色渐变圆角底 + 白色扁平图形」的视觉语言。
   .home-grid-ico.tone-N 权重高于 .thumb-fb，能同时覆盖其默认浅蓝底与蓝色首字兜底色 */
.home-grid-ico.tone-0 { background: linear-gradient(135deg, #5B8DEF, #2B6CF6); color: #fff; }
.home-grid-ico.tone-1 { background: linear-gradient(135deg, #FF7A6B, #F5484A); color: #fff; }
.home-grid-ico.tone-2 { background: linear-gradient(135deg, #9B7CF7, #7B5CF0); color: #fff; }
.home-grid-ico.tone-3 { background: linear-gradient(135deg, #4FD69C, #22B573); color: #fff; }
.home-grid-ico.tone-4 { background: linear-gradient(135deg, #FFB259, #FF8F1F); color: #fff; }
.home-grid-item span { display: block; font-size: 11px; color: var(--text-2); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 板块标题 + 全部› */
.home-sec { display: flex; align-items: center; justify-content: space-between; margin: 20px 14px 10px; }
.home-sec h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--text-1); }
.home-more { font-size: 13px; color: var(--text-2); cursor: pointer; }

/* 横向滚动卡（旅游 / 推荐位） */
.tv-row { display: flex; gap: 10px; overflow-x: auto; padding: 0 12px 4px; -webkit-overflow-scrolling: touch; }
.tv-row::-webkit-scrollbar { display: none; }
/* 省钱专区 / 旅游 横向卡：白底干净图 + 底部一条克制的深色带（不铺满下半张卡），
   卡片投影改为中性微弱，避免大范围发灰 */
.tv-card { flex: 0 0 200px; height: 120px; border-radius: var(--r-btn); overflow: hidden; position: relative; background: var(--primary-weak); cursor: pointer; box-shadow: 0 1px 2px rgba(17, 24, 39, .05); }
.tv-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-cap {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 56%; padding: 0 10px 8px;
    display: flex; flex-direction: column; justify-content: flex-end;
    /* 只压底部 56%：浅色商品图上不晕大片灰雾；淡出在带内完成，不会出现生硬分界线 */
    background: linear-gradient(to top, rgba(17, 24, 39, .50), rgba(17, 24, 39, .22) 48%, rgba(17, 24, 39, 0));
    color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .30);
}
.tv-cap .tv-t1 { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-cap .tv-t2 { font-size: 11px; opacity: .9; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 首页「省钱专区」单推荐位：整行铺满（运营位观感），多张时横向翻页；
   默认素材是饱和蓝紫渐变，遮罩再轻一档让蓝色透出来 */
.tv-row--full { padding: 0 12px 4px; }
.tv-row--full .tv-card { flex: 0 0 100%; height: 136px; }
.tv-row--full .tv-cap { background: linear-gradient(to top, rgba(17, 24, 39, .38), rgba(17, 24, 39, .15) 48%, rgba(17, 24, 39, 0)); padding: 0 14px 12px; }
.tv-row--full .tv-t1 { font-size: 16px; }
.tv-row--full .tv-t2 { font-size: 12px; margin-top: 3px; }

.home-empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 48px 16px; }

/* ==========================================================================
   登录页（lg- 前缀，仅 login.html 使用）
   ========================================================================== */
.lg-app { min-height: 100vh; padding-bottom: 0; background: #f6f7fb; display: flex; flex-direction: column; }

.lg-head {
    position: relative;
    padding: 46px 20px 64px;
    background: linear-gradient(160deg, #1E4FD8 0%, #2B6CF6 60%, #4C86F8 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
}
.lg-head.has-bg::after { content: ''; position: absolute; inset: 0; background: rgba(18, 24, 56, .30); }
.lg-head-mask { position: absolute; left: 0; right: 0; bottom: -1px; height: 34px; background: #f6f7fb; border-radius: 24px 24px 0 0; z-index: 3; }
.lg-brand { position: relative; z-index: 2; text-align: center; }
.lg-logo {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 16px; background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .32);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; color: #fff;
}
.lg-title { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: .3px; }
.lg-sub { margin: 6px 0 0; font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, .82); line-height: 1.55; }

.lg-body { flex: 1; padding: 0 16px 32px; margin-top: -46px; position: relative; z-index: 3; }
.lg-card { background: #fff; border: 1px solid #eef0f4; border-radius: 16px; box-shadow: 0 10px 30px rgba(26, 26, 26, .07); padding: 20px 18px 16px; }

.lg-field { margin-bottom: 14px; }
.lg-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.lg-input {
    width: 100%; height: 46px; padding: 0 14px;
    border: 1px solid transparent; border-radius: 12px;
    background: #f4f5f8; color: var(--text-1);
    font-size: 15px; outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.lg-input::placeholder { color: var(--text-3); }
.lg-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(43, 108, 246, .12); }

.lg-btn {
    display: block; width: 100%; height: 46px; margin-top: 20px;
    border: none; border-radius: 12px;
    background: var(--primary); color: #fff;
    font-size: 15px; font-weight: 600; letter-spacing: 2px;
    cursor: pointer; box-shadow: 0 6px 16px rgba(43, 108, 246, .26);
    transition: opacity .15s, transform .1s;
}
.lg-btn:active { transform: scale(.99); opacity: .94; }
.lg-btn.is-disabled { opacity: .55; pointer-events: none; }

.lg-links { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 13px; }
.lg-links a { color: var(--text-2); }
.lg-links a:active { color: var(--primary); }

.lg-agree { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.6; }

/* ==========================================================================
   忘记密码 / 联系客服（fg- 前缀，仅 forget.html 使用）
   ========================================================================== */
.fg-app { min-height: 100vh; padding-bottom: 0; background: #f6f7fb; display: flex; flex-direction: column; }

.fg-head { padding: 40px 20px 24px; text-align: center; }
.fg-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: #fff; box-shadow: 0 6px 18px rgba(26, 26, 26, .08); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.fg-icon svg { width: 26px; height: 26px; }
.fg-title { margin: 0; font-size: 20px; font-weight: 600; color: var(--text-1); }
.fg-sub { margin: 8px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.6; padding: 0 12px; }

.fg-body { padding: 0 16px 32px; }
.fg-card { background: #fff; border: 1px solid #eef0f4; border-radius: 16px; box-shadow: 0 10px 30px rgba(26, 26, 26, .07); padding: 18px 16px 8px; }
.fg-card-title { font-size: 16px; font-weight: 600; color: var(--text-1); text-align: center; }
.fg-card-tip { margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; background: var(--bg-soft); border-radius: 12px; padding: 10px 12px; }

.fg-row { display: flex; align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid #f2f3f8; }
.fg-row:last-of-type { border-bottom: none; }
.fg-key { flex: 0 0 68px; font-size: 13px; color: var(--text-3); }
.fg-val { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-act { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--primary); background: var(--primary-weak); border-radius: var(--r-full); padding: 4px 12px; }
.fg-act.fg-call { margin-left: -4px; }

.fg-qr { padding: 14px 0 6px; text-align: center; }
.fg-qr img { width: 168px; height: 168px; margin: 0 auto; border-radius: 12px; border: 1px solid #eef0f4; background: #fafbfe; object-fit: contain; cursor: pointer; }
.fg-qr-tip { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }

.fg-none { display: none; padding: 16px 0 14px; text-align: center; font-size: 13px; color: var(--text-3); }

.fg-back { display: block; margin-top: 20px; text-align: center; font-size: 14px; font-weight: 600; color: var(--primary); }

.fg-viewer { position: fixed; inset: 0; z-index: 900; background: rgba(18, 22, 30, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; }
.fg-viewer img { width: 100%; max-width: 300px; border-radius: 12px; background: #fff; }
.fg-viewer p { margin: 16px 0 0; font-size: 13px; color: rgba(255, 255, 255, .8); }

/* --------------------------- 推广海报页（poster.html） --------------------------- */
.ps-me {
    margin: 12px; padding: 16px; background: var(--bg-card);
    border-radius: var(--r-card); box-shadow: var(--shadow-card);
}
.ps-me-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ps-me-label { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.ps-me-code { font-size: 22px; font-weight: 700; color: var(--text-1); letter-spacing: 1px; }
.ps-btn {
    flex: none; height: 34px; padding: 0 16px; border: none; border-radius: var(--r-full);
    background: var(--primary-weak, #EAF0FF); color: var(--primary);
    font-size: 13px; font-weight: 500; cursor: pointer;
}
.ps-btn.done { background: var(--success-weak, #E8F8EE); color: var(--success, #16A34A); }
.ps-link {
    margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, #EEF0F5);
    font-size: 12px; color: var(--text-3); word-break: break-all; line-height: 1.6;
    user-select: text; -webkit-user-select: text;
}
.ps-list { margin: 0 12px; display: flex; flex-direction: column; gap: 12px; }
.ps-item { background: var(--bg-card); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 12px; }
.ps-poster { border-radius: 10px; overflow: hidden; background: #F5F6F8; position: relative; }
.ps-poster img {
    width: 100%; display: block; object-fit: cover;
    -webkit-touch-callout: default; -webkit-user-drag: none;
}
/* 顶部真实推广二维码（后端 PNG） */
.ps-qrbox { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.ps-qrbox-img {
    width: 108px; height: 108px; flex: none; display: block;
    border-radius: 10px; background: #fff; border: 1px solid var(--line, #EEF0F5);
}
.ps-qrbox-txt { min-width: 0; }
.ps-qrbox-t1 { font-size: 14px; font-weight: 600; color: var(--text-1); }
.ps-qrbox-t2 { margin-top: 4px; font-size: 12px; color: var(--text-3); line-height: 1.5; }
/* 默认占位海报上叠加真实二维码 + 真实邀请码（位置对齐 poster.svg 的 600x800 画布） */
.ps-poster--ph { aspect-ratio: 3 / 4; }
.ps-poster--ph > img { width: 100%; height: 100%; object-fit: contain; }
.ps-overlay { position: absolute; inset: 0; pointer-events: none; }
.ps-overlay-qr {
    position: absolute; left: 69.67%; top: 81.25%; width: 18.33%; height: 13.75%;
    display: block; object-fit: contain; background: #fff; border-radius: 8px;
}
.ps-overlay-code {
    position: absolute; left: 11%; top: 86.2%; font-weight: 800; color: #2A4BDA;
    letter-spacing: 1px; line-height: 1; font-size: clamp(11px, 4.6vw, 26px);
}
.ps-cap { margin-top: 10px; font-size: 13px; color: var(--text-2); text-align: center; }
.ps-preview {
    position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, .92);
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ps-preview img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-touch-callout: default; }

/* ==========================================================================
   v1.0.6 双积分账户（通用积分 / 旅游积分）+ 活动点击定价
   规则：两个账户物理隔离，任何位置都不允许出现「总积分」或合并求和
   ========================================================================== */

/* ---------- 个人中心：两块独立积分卡（mine.html） ---------- */
.pt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 12px; }
.pt-card {
    display: block; text-decoration: none; cursor: pointer;
    background: var(--bg-card); border-radius: var(--r-card-md);
    box-shadow: var(--shadow-card); padding: 14px 14px 12px;
}
/* 旅游积分：冷色浅底做区分，与通用积分的纯白卡拉开层次 */
.pt-card--travel { background: linear-gradient(135deg, #E9F3FF 0%, #EFF0FE 100%); }
.pt-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pt-name { font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pt-more { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.pt-num { margin-top: 6px; font-size: 26px; font-weight: 700; line-height: 1.15; color: var(--text-1); font-variant-numeric: tabular-nums; }
.pt-note { margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--text-2); }
.pt-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--divider); font-size: 11px; color: var(--text-3); }
.pt-card--travel .pt-name, .pt-card--travel .pt-num { color: #1E63D0; }
.pt-card--travel .pt-more { color: #7C9BD6; }
.pt-card--travel .pt-foot { border-top-color: rgba(43, 108, 246, .12); }

/* ---------- 旅游页：我的旅游积分条 + 立即兑换（travel.html） ---------- */
.tr-balance {
    display: flex; align-items: center; gap: 10px;
    margin: 12px 12px 0; padding: 14px 16px;
    border-radius: var(--r-card-md);
    background: linear-gradient(135deg, #2B6CF6, #4C86F8);
    color: #fff; box-shadow: 0 4px 12px rgba(43, 108, 246, .22);
}
.tr-balance .trb-main { flex: 1; min-width: 0; }
.tr-balance .trb-label { font-size: 12px; opacity: .9; }
.tr-balance .trb-num { margin-top: 2px; font-size: 24px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tr-balance .trb-link {
    flex: none; padding: 7px 12px; border-radius: var(--r-full);
    background: rgba(255, 255, 255, .20); color: #fff;
    font-size: 12px; white-space: nowrap; cursor: pointer;
}

/* 线路卡片底部：消耗提示 + 立即兑换按钮 */
.tr-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.tr-pt { font-size: 12px; color: var(--text-2); }
.tr-pt b { color: var(--primary); font-weight: 700; }
.tr-btn {
    flex: none; height: 30px; padding: 0 14px; border: none;
    border-radius: var(--r-full); background: var(--primary); color: #fff;
    font-size: 12px; font-weight: 600; cursor: pointer;
}
.tr-btn:active { opacity: .9; }
.tr-btn.is-off { background: #E3E6EC; color: var(--text-3); pointer-events: none; }

/* 通用「禁用」态：提交中 / 条件不满足 */
.btn.is-disabled, .btn:disabled { opacity: .5; pointer-events: none; }

/* 兑换弹层内的消耗明细条 */
.tr-cost {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--bg-soft); border-radius: 10px; padding: 10px 12px;
    font-size: 13px; color: var(--text-2); margin-bottom: 12px;
}
.tr-cost b { color: var(--text-1); font-weight: 700; font-variant-numeric: tabular-nums; }
.tr-cost .trc-travel b { color: #1E63D0; }

/* ---------- 活动列表：本次点击消耗积分标签（coupon.html 等） ---------- */
.clk-tag {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 3px 7px; border-radius: 6px;
    background: var(--warning-weak); color: var(--warning);
    font-size: 11px; font-weight: 600; line-height: 1;
    white-space: nowrap;
}
.clk-tag.is-free { background: var(--success-weak); color: var(--success); }

/* ---------- 兑换记录（travel-orders.html） ---------- */
.tr-orders { margin: 12px; }
.tr-order-status { font-size: 12px; font-weight: 600; }
.tr-order-status.s-pending { color: var(--warning); }
.tr-order-status.s-confirmed { color: var(--success); }
.tr-order-status.s-cancelled { color: var(--text-3); }
