@import url('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&family=Noto+Sans+SC:wght@400;500;700&display=swap');

/* ============================================================
   脱单盲盒 · 奶油贴纸皮肤(cream)
   设计语言:米白纸感底 #FFF4E8 / 墨色描边 #33261F / 珊瑚红 #FF6F61
   奶黄 #FFC63F / 白卡 + 2px 描边 + 硬阴影 / 圆角 13-20px
   标题字体 ZCOOL KuaiLe,正文 Noto Sans SC,手机优先 480px 居中
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body.tm-body {
    background: #FFF4E8;
    color: #33261F;
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #FF6F61; text-decoration: none; }
a:hover { color: #E5584B; }
img { max-width: 100%; }
button { font-family: inherit; }

/* 标题字体 */
.tm-kuaile { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-weight: 400; }

/* 页面容器:手机优先,桌面米白留白居中 */
.tm-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 20px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
@media (min-width: 768px) {
    .tm-wrap { padding-top: 48px; padding-bottom: 48px; }
}

/* ---------- 通用卡片 ---------- */
.tm-card {
    background: #FFFFFF;
    border: 2px solid #33261F;
    border-radius: 16px;
    box-shadow: 3px 3px 0 #33261F;
    padding: 14px;
}
.tm-card-lg {
    background: #FFFFFF;
    border: 2px solid #33261F;
    border-radius: 20px;
    box-shadow: 4px 4px 0 #33261F;
    padding: 16px;
}
.tm-card-flat { box-shadow: none; }

/* ---------- 按钮 ---------- */
.tm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    border-radius: 999px;
    border: 2px solid #33261F;
    box-shadow: 4px 4px 0 #33261F;
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
    font-size: 19px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .08s, box-shadow .08s;
    text-decoration: none;
}
.tm-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #33261F; }
.tm-btn-coral { background: #FF6F61; color: #FFFFFF; }
.tm-btn-coral:hover { background: #E5584B; color: #FFFFFF; }
.tm-btn-yellow { background: #FFC63F; color: #33261F; }
.tm-btn-yellow:hover { background: #F5B92B; color: #33261F; }
.tm-btn-white { background: #FFFFFF; color: #33261F; }
.tm-btn-white:hover { color: #33261F; }
.tm-btn-sm { height: 42px; font-size: 16px; box-shadow: 3px 3px 0 #33261F; }
.tm-btn-mini {
    display: inline-flex; align-items: center; justify-content: center;
    height: 34px; padding: 0 16px; width: auto;
    border: 2px solid #33261F; border-radius: 999px;
    background: #FFC63F; color: #33261F;
    font-size: 12px; font-weight: 700; cursor: pointer;
    box-shadow: 2px 2px 0 #33261F;
    font-family: 'Noto Sans SC', sans-serif;
}
.tm-btn-mini:active { transform: translate(2px, 2px); box-shadow: none; }

/* ---------- 表单 ---------- */
.tm-field { display: flex; flex-direction: column; gap: 5px; }
.tm-label { font-size: 12px; font-weight: 700; color: #33261F; }
.tm-input, .tm-select, .tm-textarea {
    width: 100%;
    background: #FFFFFF;
    border: 2px solid #33261F;
    border-radius: 13px;
    padding: 12px 14px;
    font-size: 14px;
    color: #33261F;
    font-family: inherit;
    box-shadow: 2px 2px 0 #33261F;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.tm-input::placeholder, .tm-textarea::placeholder { color: #B8A392; }
.tm-input:focus, .tm-select:focus, .tm-textarea:focus { border-color: #FF6F61; }
.tm-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2333261F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.tm-textarea { min-height: 76px; resize: vertical; }

/* 两卡单选(性别/投放方式/盲盒类型):radio 隐藏,选中态换底色+硬阴影 */
.tm-seg { display: flex; gap: 10px; }
.tm-seg-item { flex: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tm-seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.tm-seg-face {
    text-align: center;
    padding: 11px 0;
    border-radius: 13px;
    background: #FFFFFF;
    color: #8A7365;
    border: 2px solid #33261F;
    font-size: 14px;
    transition: background .12s, color .12s, box-shadow .12s;
}
.tm-seg-item input:checked + .tm-seg-face {
    background: #FF6F61;
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: 2px 2px 0 #33261F;
}
.tm-seg-item input:checked + .tm-seg-face.tm-seg-yellow {
    background: #FFC63F;
    color: #33261F;
}
/* 大卡单选(投放方式/盲盒类型):多行内容卡 */
.tm-pick-face {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #FFFFFF;
    border: 2px solid #33261F;
    border-radius: 14px;
    padding: 11px 14px;
    transition: background .12s, box-shadow .12s;
}
.tm-pick-face .tm-pick-title { font-size: 14px; font-weight: 700; color: #8A7365; }
.tm-pick-face .tm-pick-price { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 17px; color: #8A7365; }
.tm-pick-face .tm-pick-desc { font-size: 11px; color: #B8A392; }
.tm-seg-item input:checked + .tm-pick-face { box-shadow: 3px 3px 0 #33261F; }
.tm-seg-item input:checked + .tm-pick-face.tm-pick-yellow { background: #FFC63F; }
.tm-seg-item input:checked + .tm-pick-face.tm-pick-yellow .tm-pick-title { color: #33261F; }
.tm-seg-item input:checked + .tm-pick-face.tm-pick-yellow .tm-pick-price { color: #FF6F61; }
.tm-seg-item input:checked + .tm-pick-face.tm-pick-yellow .tm-pick-desc { color: #6B5344; }
.tm-seg-item input:checked + .tm-pick-face.tm-pick-peach { background: #FFE3D6; }
.tm-seg-item input:checked + .tm-pick-face.tm-pick-peach .tm-pick-title { color: #33261F; }
.tm-seg-item input:checked + .tm-pick-face.tm-pick-peach .tm-pick-price { color: #FF6F61; }
.tm-seg-item input:checked + .tm-pick-face.tm-pick-peach .tm-pick-desc { color: #6B5344; }
/* 盲盒类型卡(居中版) */
.tm-pick-center { align-items: center; gap: 4px; border-radius: 16px; padding: 12px; }
.tm-pick-row { display: flex; justify-content: space-between; align-items: baseline; }
/* "推荐"角标 */
.tm-corner-badge {
    position: absolute; top: -10px; right: 10px;
    font-size: 10px; background: #FF6F61; color: #FFFFFF;
    border: 1.5px solid #33261F; border-radius: 999px;
    padding: 2px 8px; transform: rotate(4deg);
}

/* 复选框行 */
.tm-check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.tm-check-row input {
    width: 18px; height: 18px; margin: 0;
    accent-color: #FF6F61;
    border: 2px solid #33261F;
}

/* ---------- 顶栏(返回 + 标题) ---------- */
.tm-topbar { display: flex; align-items: center; gap: 12px; }
.tm-back {
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: 13px; background: #FFFFFF;
    border: 2px solid #33261F; box-shadow: 2px 2px 0 #33261F;
    display: flex; align-items: center; justify-content: center;
    color: #33261F;
}
.tm-back:active { transform: translate(2px, 2px); box-shadow: none; }
.tm-topbar-mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tm-topbar-title { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 24px; color: #FF6F61; line-height: 1.3; }
.tm-topbar-sub { font-size: 12px; color: #8A7365; }
.tm-topbar-link { font-size: 12px; color: #8A7365; text-decoration: underline; cursor: pointer; }

/* ---------- 小组件 ---------- */
.tm-sub { font-size: 12px; color: #8A7365; }
.tm-muted { font-size: 11px; color: #B8A392; }
.tm-badge {
    display: inline-block; font-size: 11px;
    background: #FF6F61; color: #FFFFFF;
    border-radius: 999px; padding: 2px 8px;
    border: 1.5px solid #33261F;
}
.tm-badge-yellow { background: #FFC63F; color: #33261F; }
.tm-badge-mint { background: #A8D8B9; color: #33261F; }
.tm-badge-gray { background: #EDE3D8; color: #6B5344; }
.tm-row { display: flex; gap: 10px; }
.tm-flex1 { flex: 1; min-width: 0; }
.tm-center { text-align: center; }
.tm-hidden { display: none !important; }
.tm-mt-auto { margin-top: auto; }

.tm-section-head { display: flex; align-items: center; gap: 8px; }
.tm-section-title { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 18px; color: #33261F; }

/* ---------- 首页:统计贴纸 ---------- */
.tm-stats { display: flex; gap: 10px; }
.tm-stat {
    flex: 1; text-align: center;
    background: #FFFFFF; border: 2px solid #33261F;
    border-radius: 16px; padding: 10px 0;
    box-shadow: 3px 3px 0 #33261F;
}
.tm-stat-num { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 20px; color: #FF6F61; line-height: 1.3; }
.tm-stat-num-blue { color: #4A90D9; }
.tm-stat-label { font-size: 11px; color: #8A7365; }
.tm-rot-l { transform: rotate(-1.5deg); }
.tm-rot-r { transform: rotate(1deg); }
.tm-rot-l2 { transform: rotate(-1deg); }

/* ---------- 首页:双大卡 ---------- */
.tm-hero-cards { display: flex; gap: 12px; }
.tm-hero-card {
    flex: 1; display: flex; flex-direction: column; gap: 8px;
    border: 2px solid #33261F; border-radius: 20px;
    padding: 16px; box-shadow: 4px 4px 0 #33261F;
    -webkit-tap-highlight-color: transparent;
}
.tm-hero-card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #33261F; }
.tm-hero-coral { background: #FF6F61; color: #FFFFFF; }
.tm-hero-coral:hover { color: #FFFFFF; }
.tm-hero-yellow { background: #FFC63F; color: #33261F; }
.tm-hero-yellow:hover { color: #33261F; }
.tm-hero-title { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 24px; }
.tm-hero-desc { font-size: 12px; }
.tm-hero-coral .tm-hero-desc { color: rgba(255,255,255,0.9); }
.tm-hero-yellow .tm-hero-desc { color: #6B5344; }
.tm-price-tag {
    align-self: flex-start; font-size: 12px; font-weight: 700;
    background: #FFFFFF; border: 2px solid #33261F;
    border-radius: 999px; padding: 2px 10px; color: #33261F;
}
.tm-hero-coral .tm-price-tag { color: #FF6F61; }

/* ---------- 列表条目(小纸条/订单/流水) ---------- */
.tm-list { display: flex; flex-direction: column; gap: 8px; }
.tm-list-item {
    display: flex; align-items: center; gap: 12px;
    background: #FFFFFF; border: 2px solid #33261F;
    border-radius: 16px; padding: 12px;
    box-shadow: 3px 3px 0 #33261F;
}
.tm-list-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tm-list-title { font-size: 13px; font-weight: 700; }
.tm-list-desc { font-size: 12px; color: #8A7365; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-list-time { font-size: 11px; color: #B8A392; flex: 0 0 auto; }

/* 头像/色块方块:底色随位置轮换 */
.tm-avatar {
    width: 44px; height: 44px; flex: 0 0 44px;
    border-radius: 14px; background: #FFC63F;
    border: 2px solid #33261F;
    display: flex; align-items: center; justify-content: center;
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 18px;
    overflow: hidden;
}
.tm-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-list > .tm-list-item:nth-child(4n+2) .tm-avatar { background: #A8D8B9; }
.tm-list > .tm-list-item:nth-child(4n+3) .tm-avatar { background: #FFE3D6; }
.tm-list > .tm-list-item:nth-child(4n+4) .tm-avatar { background: #EDE3D8; }

/* ---------- 首页:轮播 ---------- */
.tm-banner {
    position: relative; overflow: hidden;
    border: 2px solid #33261F; border-radius: 16px;
    box-shadow: 3px 3px 0 #33261F; background: #FFFFFF;
}
.tm-banner-track { display: flex; transition: transform .45s ease; }
.tm-banner-track > * { flex: 0 0 100%; min-width: 0; display: block; }
.tm-banner-track img { width: 100%; height: 110px; object-fit: cover; display: block; }
.tm-banner-dots {
    position: absolute; left: 0; right: 0; bottom: 8px;
    display: flex; justify-content: center; gap: 6px;
}
.tm-banner-dots i {
    width: 7px; height: 7px; border-radius: 50%;
    background: #FFFFFF; border: 1.5px solid #33261F; opacity: .75;
}
.tm-banner-dots i.on { background: #FF6F61; opacity: 1; }

/* ---------- 首页:合作伙伴 ---------- */
.tm-partners { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }
.tm-partner {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: #FFFFFF; border: 2px solid #33261F; border-radius: 13px;
    padding: 8px 12px; color: #33261F; font-size: 12px;
    box-shadow: 2px 2px 0 #33261F;
}
.tm-partner:hover { color: #33261F; }
.tm-partner img { width: 64px; height: 40px; object-fit: cover; border-radius: 8px; border: 1.5px solid #33261F; }

/* ---------- 首页:四宫格导航 ---------- */
.tm-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tm-grid4 a {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    background: #FFFFFF; border: 2px solid #33261F; border-radius: 14px;
    padding: 9px 0; color: #33261F; font-size: 11px;
    -webkit-tap-highlight-color: transparent;
}
.tm-grid4 a:active { transform: translate(1px, 1px); }

/* ---------- 公告 / 富文本 ---------- */
.tm-notice {
    background: #FFF9F0; border: 2px solid #33261F;
    border-radius: 16px; padding: 12px 14px;
    box-shadow: 3px 3px 0 #33261F; font-size: 13px;
}
.tm-rich { font-size: 14px; line-height: 1.8; word-break: break-word; }
.tm-rich img { max-width: 100%; height: auto; border-radius: 12px; }
.tm-rich p { margin: 0 0 8px; }
.tm-rich h1, .tm-rich h2, .tm-rich h3 { margin: 10px 0 6px; line-height: 1.4; }

/* ---------- 上传卡 ---------- */
.tm-upload-box {
    display: flex; align-items: center; gap: 12px;
    background: #FFF9F0; border: 2px dashed #FF6F61;
    border-radius: 14px; padding: 12px 14px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.tm-upload-icon {
    width: 42px; height: 42px; flex: 0 0 42px;
    border-radius: 12px; background: #FFE3D6;
    border: 2px solid #33261F;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.tm-upload-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-upload-text { display: flex; flex-direction: column; gap: 1px; }
.tm-upload-title { font-size: 13px; font-weight: 700; }
.tm-upload-sub { font-size: 11px; color: #8A7365; }

/* ---------- 结果卡(抽中信息,弹窗内) ---------- */
.tm-result-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tm-result-avatar {
    width: 72px; height: 72px;
    border-radius: 18px; background: #FFC63F;
    border: 2px solid #33261F; box-shadow: 3px 3px 0 #33261F;
    display: flex; align-items: center; justify-content: center;
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 28px; color: #33261F;
    overflow: hidden;
}
.tm-result-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-result-wechat { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 22px; color: #FF6F61; word-break: break-all; }
.tm-result-meta { font-size: 13px; font-weight: 700; color: #33261F; }
.tm-result-msg {
    font-size: 12px; color: #8A7365;
    background: #FFF9F0; border: 1.5px solid #EDE3D8;
    border-radius: 10px; padding: 8px 10px; width: 100%;
    word-break: break-word;
}
.tm-alert-strip {
    width: 100%; font-size: 12px; font-weight: 700;
    background: #FFC63F; border: 2px solid #33261F;
    border-radius: 10px; padding: 7px 10px; color: #33261F;
}

/* ---------- 订单/流水状态徽章 ---------- */
.tm-status { display: inline-block; font-size: 11px; border-radius: 999px; padding: 2px 10px; border: 1.5px solid #33261F; }
.tm-status-0 { background: #EDE3D8; color: #6B5344; }   /* 待支付/待处理 */
.tm-status-1 { background: #A8D8B9; color: #33261F; }   /* 已完成/已打款 */
.tm-status-2 { background: #FFE3D6; color: #6B5344; }   /* 已支付待抽/已拒绝 */

/* ---------- 空状态 ---------- */
.tm-empty { text-align: center; color: #B8A392; font-size: 13px; padding: 18px 0; }

/* ---------- tab(登录/注册) ---------- */
.tm-tabs {
    display: flex; gap: 8px; background: #FFFFFF;
    border: 2px solid #33261F; border-radius: 999px; padding: 4px;
    box-shadow: 2px 2px 0 #33261F;
}
.tm-tab {
    flex: 1; text-align: center; padding: 8px 0;
    border-radius: 999px; font-size: 14px; color: #8A7365;
    cursor: pointer; border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
}
.tm-tab.on {
    background: #FF6F61; color: #FFFFFF; font-weight: 700;
    border-color: #33261F;
}

/* ---------- 数字大卡(余额/累计) ---------- */
.tm-money-card { flex: 1; text-align: center; padding: 14px 0; }
.tm-money-num { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 26px; color: #FF6F61; line-height: 1.3; }
.tm-money-num-yellow { color: #E8A200; }
.tm-money-label { font-size: 11px; color: #8A7365; }

/* ---------- 简单流水行 ---------- */
.tm-log-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 2px; border-bottom: 1.5px dashed #EDE3D8; font-size: 13px;
}
.tm-log-item:last-child { border-bottom: 0; }
.tm-log-main { flex: 1; min-width: 0; }
.tm-log-remark { font-weight: 700; font-size: 13px; }
.tm-log-time { font-size: 11px; color: #B8A392; }
.tm-log-amount { font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif; font-size: 16px; color: #FF6F61; flex: 0 0 auto; }

/* ---------- 页脚 ---------- */
.tm-footer { margin-top: auto; text-align: center; font-size: 11px; color: #B8A392; padding-top: 6px; }
.tm-footer a, .tm-footer .tm-footer-link { color: #8A7365; text-decoration: underline; cursor: pointer; }

/* ---------- 弹窗(覆盖 manghe.js 的内联默认) ---------- */
.tm-skin-cream .tm-modal {
    border: 2px solid #33261F;
    box-shadow: 4px 4px 0 #33261F;
    color: #33261F !important;
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.tm-skin-cream .tm-modal-ok {
    background: #FF6F61 !important;
    border: 2px solid #33261F !important;
    box-shadow: 3px 3px 0 #33261F !important;
    color: #FFFFFF !important;
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif !important;
}

/* ---------- 二维码弹窗 ---------- */
.tm-qr-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tm-qr-box .tm-qr-canvas {
    background: #FFFFFF; border: 2px solid #33261F; border-radius: 12px;
    padding: 10px; box-shadow: 3px 3px 0 #33261F;
    display: flex; align-items: center; justify-content: center;
}
.tm-qr-box .tm-qr-canvas img, .tm-qr-box .tm-qr-canvas canvas, .tm-qr-box .tm-qr-canvas table { display: block; }

/* ---------- 支付通道按钮 ---------- */
.tm-pay-btns { display: flex; flex-direction: column; gap: 10px; }
.tm-pay-btn {
    display: flex; align-items: center; gap: 12px;
    background: #FFFFFF; border: 2px solid #33261F;
    border-radius: 14px; padding: 13px 14px;
    box-shadow: 2px 2px 0 #33261F; cursor: pointer;
    font-size: 15px; font-weight: 700; color: #33261F;
    width: 100%; text-align: left;
    -webkit-tap-highlight-color: transparent;
}
.tm-pay-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.tm-pay-btn .tm-pay-ico {
    width: 36px; height: 36px; flex: 0 0 36px;
    border-radius: 10px; border: 2px solid #33261F;
    display: flex; align-items: center; justify-content: center;
}
.tm-pay-ico-wx { background: #A8D8B9; }
.tm-pay-ico-ali { background: #CFE4F7; }
.tm-pay-btn .tm-pay-arrow { margin-left: auto; }
