/* 新前台模板（方案 B · 浅色高效）。只在后台"前台模板 = 新模板"时加载，全部以 body.tb / .tb- 开头，不影响原模板。
   规范：尺寸和间距都是 4 的倍数；字号只用 12 / 16 / 20 / 24（例外：1px 边框、阴影）。主色跟随后台"主题色"（--primary）。 */
body.tb {
    --tb-accent: var(--primary, #1f286f);
    --tb-ink: #172033;
    --tb-ink-2: #5b6478;
    --tb-ink-3: #6b7489;
    --tb-line: #e3e7ef;
    --tb-line-2: #eef1f6;
    --tb-bg: #f3f5f9;
    --tb-soft: #f7f9fc;
    --tb-ok: #0f7a43;
    --tb-ok-bg: #e7f6ee;
    --tb-bad: #a33a12;
    --tb-bad-bg: #fdeee9;
    --tb-price: #b4231b;
    --tb-link: #1f4fd1;
    background: var(--tb-bg);
    color: var(--tb-ink);
    font-size: 16px;
    line-height: 1.5;
}
body.tb a { text-decoration: none; }
.tb-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.tb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tb-muted { color: var(--tb-ink-2); font-size: 12px; }

/* 按钮、徽标 */
.tb-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 36px; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
    font-size: 12px; font-weight: 600; line-height: 1.5; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, opacity .15s;
}
.tb-btn:disabled { cursor: not-allowed; }
.tb-btn-primary { background: var(--tb-accent); color: #fff; }
.tb-btn-primary:hover { opacity: .9; color: #fff; }
.tb-btn-ghost { background: #fff; color: var(--tb-link); border-color: #b9c6e8; }
.tb-btn-ghost:hover { background: #eef3ff; }
.tb-btn-muted { background: #e9edf3; color: #7a8396; }
.tb-btn-block { display: flex; width: 100%; box-sizing: border-box; }
.tb-badge { display: inline-block; padding: 4px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 1; }
.tb-badge-ok { background: var(--tb-ok-bg); color: var(--tb-ok); }
.tb-badge-bad { background: var(--tb-bad-bg); color: var(--tb-bad); }

/* 顶部信息条（深色）：左边服务承诺，右边客服、文章、API 文档、查询订单、语言、货币 */
.tb-topbar { background: #0b1228; color: #c9d1e4; font-size: 12px; }
.tb-topbar-in { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; justify-content: space-between; min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.tb-topbar-notice { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-topbar-notice p { margin: 0; display: inline; }
.tb-topbar-notice a { color: #f5c542; }
.tb-topbar svg { width: 12px; height: 12px; flex: none; }
.tb-topbar-tools { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
.tb-topbar-link { display: inline-flex; gap: 4px; align-items: center; color: #c9d1e4; }
body.tb .tb-topbar-link:hover { color: #fff; }
body.tb .tb-topbar-link.is-hot { color: #f5c542; font-weight: 600; }
.tb-select { display: inline-flex; gap: 4px; align-items: center; color: #c9d1e4; }
.tb-select select,
.tb-select .gt_selector {
    height: 24px; padding: 0 4px; border: 0; border-radius: 8px;
    background: transparent; color: #fff; font-size: 12px; font-weight: 400; cursor: pointer;
}
.tb-select select option, .tb-select .gt_selector option { color: var(--tb-ink); background: #fff; }
.tb-select .gtranslate_wrapper { display: flex; }
.tb-select .gt_selector { font-weight: 400 !important; font-size: 12px !important; }
/* 下拉框宽度按当前选中的文字（原来按最长的语言名撑宽，右边空一大块） */
.tb-select select { field-sizing: content; }

/* 头部：Logo + 苹果式胶囊导航（导航、搜索、用户都在这一行）；向下滚动时固定在页面顶端 */
.tb-header { background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--tb-line); position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(1.8) blur(8px); }
.tb-header-in { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.tb-logo { margin: 0; font-size: 16px; line-height: 0; flex: none; }
.tb-logo img { height: 40px; width: auto; }
.tb-menu-btn {
    display: none; width: 44px; height: 44px; border-radius: 12px; flex: none;
    border: 1px solid var(--tb-line); background: var(--tb-bg); color: var(--tb-ink); font-size: 16px;
}
.tb-capsule {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px; position: relative;
    background: #eceff4; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}
.tb-capsule-nav { display: flex; gap: 4px; flex: none; }
.tb-capsule-tools { display: flex; gap: 8px; align-items: center; margin-left: auto; flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
.tb-capsule-item {
    display: block; padding: 8px 16px; border-radius: 999px;
    font-size: 16px; line-height: 1.5; color: #4b5468; white-space: nowrap;
}
.tb-capsule-item:hover { color: var(--tb-ink); background: rgba(255, 255, 255, .6); }
.tb-capsule-item.is-active {
    background: #fff; color: var(--tb-ink); font-weight: 600;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .16), 0 0 0 1px rgba(15, 23, 42, .04);
}
.tb-caret { font-size: 12px; margin-left: 4px; opacity: .6; }
.tb-dd { position: relative; }
/* 透明"桥"：从按钮到下拉菜单之间的空隙也算悬停，鼠标移下去菜单不会消失 */
.tb-dd::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; display: none; }
.tb-dd:hover::after { display: block; }
.tb-dd-menu {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 200px;
    background: #fff; border: 1px solid var(--tb-line); border-radius: 16px; padding: 8px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
}
.tb-dd:hover .tb-dd-menu, .tb-dd:focus-within .tb-dd-menu { display: block; }
.tb-dd-menu a { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 8px; color: var(--tb-ink); font-size: 16px; }
.tb-dd-menu a:hover { background: var(--tb-bg); }
.tb-dd-wide { width: 560px; max-height: min(480px, calc(100vh - 120px)); overflow: auto; padding: 12px; flex-direction: column; gap: 12px; }
.tb-dd:hover .tb-dd-wide, .tb-dd:focus-within .tb-dd-wide { display: flex; }
.tb-dd-group { display: flex; flex-wrap: wrap; gap: 4px; }
.tb-dd-title { flex: 0 0 100%; padding: 0 4px 4px; font-size: 12px; font-weight: 600; color: var(--tb-ink-2); }
.tb-dd-menu .tb-dd-group a { gap: 4px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--tb-bg); font-size: 12px; line-height: 1.5; }
.tb-dd-menu .tb-dd-group a:hover { background: #e3eaff; color: var(--tb-link); }
.tb-dd-group img { width: 20px; height: 20px; object-fit: contain; }

/* 导航行里的搜索：平时只显示放大镜，点一下展开输入框 */
.tb-qsearch { display: flex; align-items: center; height: 40px; border-radius: 999px; background: transparent; transition: background .15s; }
.tb-qsearch input[type=search] {
    width: 0; padding: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--tb-ink);
    transition: width .2s, padding .2s;
}
.tb-qsearch.is-open { background: #fff; box-shadow: 0 0 0 1px var(--tb-line); }
.tb-qsearch.is-open input[type=search] { width: 200px; padding: 0 4px 0 16px; }
.tb-qsearch-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
    border: 0; border-radius: 999px; background: transparent; color: #4b5468; cursor: pointer;
}
.tb-qsearch-btn:hover { background: rgba(255, 255, 255, .6); color: var(--tb-ink); }
.tb-qsearch.is-open .tb-qsearch-btn { color: var(--tb-accent); }
@media (min-width: 992px) {
    .tb-qsearch { flex: 1 1 auto; min-width: 160px; background: #fff; box-shadow: 0 0 0 1px var(--tb-line); }
    .tb-qsearch input[type=search], .tb-qsearch.is-open input[type=search] { flex: 1; width: auto; min-width: 0; padding: 0 4px 0 16px; }
    .tb-qsearch .tb-qsearch-btn { color: var(--tb-accent); }
    /* 翻译后文字变长、一行放不下时（nav.php 脚本逐级加类）：先把搜索收成放大镜、隐藏用户名（余额保留），再缩小间距，最后缩小字号 */
    .tb-capsule.is-tight .tb-qsearch { flex: none; min-width: 0; background: transparent; box-shadow: none; }
    .tb-capsule.is-tight .tb-qsearch input[type=search] { flex: none; width: 0; padding: 0; }
    .tb-capsule.is-tight .tb-qsearch .tb-qsearch-btn { color: #4b5468; }
    .tb-capsule.is-tight .tb-qsearch.is-open {
        position: absolute; top: 4px; right: 4px; z-index: 2; width: min(360px, calc(100% - 8px));
        background: #fff; box-shadow: 0 0 0 1px var(--tb-line), 0 8px 24px rgba(15, 23, 42, .12);
    }
    .tb-capsule.is-tight .tb-qsearch.is-open input[type=search] { flex: 1; width: auto; padding: 0 4px 0 16px; }
    .tb-capsule.is-tight .tb-qsearch.is-open .tb-qsearch-btn { color: var(--tb-accent); }
    /* 余额一直显示（以前这里把用户名和余额一起隐藏，切换语言后文字变长就看不到余额了）；只隐藏用户名 */
    .tb-capsule.is-tight .tb-user { padding-right: 12px; }
    .tb-capsule.is-tight .tb-user-name { display: none; }
    .tb-capsule.is-tighter .tb-capsule-nav { gap: 0; }
    .tb-capsule.is-tighter .tb-capsule-item { padding: 8px; }
    .tb-capsule.is-tighter .tb-caret { display: none; }
    .tb-capsule.is-tightest .tb-capsule-item { font-size: 12px; }
}

.tb-user {
    display: flex; align-items: center; gap: 8px; padding: 4px 16px 4px 4px; flex: none;
    border-radius: 999px; background: #fff; color: var(--tb-ink); font-size: 12px; line-height: 1.25;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}
.tb-avatar {
    flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    color: #fff; font-size: 16px; font-weight: 600; line-height: 1; text-transform: uppercase;
}
.tb-user > span { display: flex; flex-direction: column; }
.tb-user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-user-money { color: var(--tb-ok); }
.tb-user-guest { padding: 8px 16px; font-size: 16px; font-weight: 600; gap: 8px; }

/* 手机侧栏、分类侧栏、遮罩要盖在固定头部上面（原值 4、5 比头部低，打开后顶部被头部挡住） */
body.tb .backdrop { z-index: 60; }
body.tb .nav-sidebar, body.tb .category-sidebar { z-index: 70; }
/* 手机侧栏（nav-common.php 两套模板共用，这里只改新模板的样式）：图标和文字一样 16px，用户/余额改成浅色卡片 */
body.tb .nav-header, body.tb .category-header { padding: 12px 16px; border-color: var(--tb-line); }
body.tb .nav-content { padding: 0 12px; }
body.tb .nav-btn { background: transparent; padding: 12px 0 0; margin-bottom: 8px; }
body.tb .nav-btn .btn {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border-radius: 12px;
    background: var(--tb-bg); border: 1px solid var(--tb-line); color: var(--tb-ink); font-size: 16px; font-weight: 600; box-shadow: none;
}
body.tb .nav-btn .btn i { font-size: 16px; width: 16px; text-align: center; color: var(--tb-accent); }
body.tb .nav-select-group { justify-content: space-between; padding: 0 4px 12px; font-size: 16px; color: var(--tb-ink-2); border-color: var(--tb-line); }
body.tb .nav-select-group p { margin: 0; }
body.tb .nav-select-group .text-wallet { background: none; text-shadow: none; color: var(--tb-ok); font-size: 16px; font-weight: 600; }
body.tb .nav-list { margin: 8px 0 0; padding: 0; }
body.tb .nav-list li { margin-left: 0; }
body.tb .nav-link { display: flex; align-items: center; gap: 12px; padding: 12px; font-size: 16px; font-weight: 400; color: var(--tb-ink); }
body.tb .nav-link:hover { background: var(--tb-bg); color: var(--tb-accent); }
body.tb .nav-link i { font-size: 16px; width: 16px; margin: 0; text-align: center; color: #4b5468; }
body.tb .nav-list .dropdown-list a, body.tb .category-item .dropdown-list a { display: flex; align-items: center; gap: 8px; font-size: 16px; }
body.tb .nav-list .dropdown-list img, body.tb .category-link img { width: 16px; height: 16px; margin: 0 !important; object-fit: contain; border-radius: 4px; }
body.tb .category-link { gap: 12px; padding: 12px 16px; color: var(--tb-ink); }
body.tb .category-title { font-size: 16px; color: var(--tb-ink); gap: 8px; margin: 0; }
body.tb .category-item { border-color: var(--tb-line-2); }
body.tb .nav-info-group { border-color: var(--tb-line); padding: 12px 4px; margin: 8px 0 16px; }
body.tb .nav-info i, body.tb .nav-info svg { font-size: 16px; width: 16px; height: 16px; margin-right: 12px; }
body.tb .nav-info p span { font-size: 16px; }

/* 首页 */
.tb-main { padding: 20px 0 32px; }
/* 首页、订单页通知（后台"首页通知""订单记录页面通知"）：和其他卡片一样的白底圆角卡片，两边留白相同；图标、颜色、大小、对齐都由后台编辑器决定 */
.tb-notice {
    margin-bottom: 16px; padding: 16px 20px; background: #fff; border: 1px solid var(--tb-line); border-radius: 16px;
    color: var(--tb-ink); font-size: 16px; line-height: 24px; overflow-wrap: anywhere;
}
.tb-notice-text { min-width: 0; }
/* 现有公告是手写 HTML，外层带 margin-top:-20px 等旧样式，这里归零，避免文字压到卡片边上 */
.tb-notice-text > div[style] { margin: 0 !important; }
.tb-notice-text p { margin: 0 0 4px; }
.tb-notice-text > :last-child, .tb-notice-text p:last-child { margin-bottom: 0; }
.tb-notice-text img { max-width: 100%; height: auto; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 8px; background: #fff; border: 1px solid var(--tb-line); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.tb-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; min-height: 32px; box-sizing: border-box;
    border-radius: 999px; border: 1px solid var(--tb-line); background: var(--tb-bg); color: var(--tb-ink); font-size: 12px;
}
.tb-chip:first-child { padding-left: 12px; }
/* 分类图标：不加白底；很多图标图片自带白底，用 multiply 让白色融进按钮底色，不再露白边（选中的深色按钮除外） */
.tb-chip img { width: 24px; height: 24px; object-fit: contain; mix-blend-mode: multiply; }
.tb-chip.is-active img { mix-blend-mode: normal; border-radius: 999px; }
.tb-dd-group img, .tb-group-head img, body.tb .nav-list .dropdown-list img, body.tb .category-link img { mix-blend-mode: multiply; }
.tb-chip.is-active { background: var(--tb-accent); border-color: var(--tb-accent); color: #fff; }
.tb-chip:hover:not(.is-active) { border-color: #b9c6e8; color: var(--tb-ink); }
/* 电脑：分类按钮加大（Windows 默认中文字体比 Mac 的苹方显小，12px 看起来太小）；手机（≤991）保持原样 */
@media (min-width: 992px) {
    .tb-chip { gap: 8px; min-height: 40px; padding: 4px 16px 4px 8px; font-size: 16px; }
    .tb-chip:first-child { padding-left: 16px; }
}

.tb-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.tb-content { flex: 999 1 640px; min-width: 0; }
.tb-aside { flex: 1 1 260px; display: flex; flex-direction: column; gap: 16px; }

.tb-group { background: #fff; border: 1px solid var(--tb-line); border-radius: 16px; margin-bottom: 16px; overflow: hidden; }
/* 卡片标题栏统一高 40：商品分类、充值/订单卡片、用户中心卡片（旧样式 h2 行高 48，以前标题栏有 73 高） */
.tb-group-head { display: flex; align-items: center; gap: 8px; min-height: 40px; box-sizing: border-box; padding: 8px 16px; background: var(--tb-soft); border-bottom: 1px solid var(--tb-line); }
.tb-group-head img { width: 24px; height: 24px; object-fit: contain; }
.tb-group-head h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--tb-ink); }
.tb-group-more { margin-left: auto; font-size: 12px; color: var(--tb-link); }
.tb-showmore {
    display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px;
    border-top: 1px solid var(--tb-line-2); color: var(--tb-ink); font-size: 16px; font-weight: 600;
}
body.tb .tb-showmore:hover { color: var(--tb-accent); background: var(--tb-soft); }
.tb-showmore.is-loading { opacity: .5; pointer-events: none; }
.tb-phead, .tb-prow { display: grid; grid-template-columns: minmax(0, 1fr) 96px 120px 184px; gap: 12px; align-items: center; padding: 12px 16px; }
.tb-phead { padding-top: 8px; padding-bottom: 8px; font-size: 12px; color: var(--tb-ink-2); border-bottom: 1px solid var(--tb-line-2); }
.tb-phead span:nth-child(2) { text-align: center; }
.tb-phead span:nth-child(3), .tb-phead span:nth-child(4) { text-align: right; }
.tb-prow { border-bottom: 1px solid var(--tb-line-2); }
.tb-prow:last-child { border-bottom: 0; }
.tb-prow-name { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
.tb-prow-name a { color: var(--tb-ink); }
.tb-prow-name a:hover { color: var(--tb-link); }
.tb-prow-desc { margin: 4px 0 0; font-size: 12px; color: var(--tb-ink-2); }
.tb-prow-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-stock-label { display: none; margin-right: 4px; font-size: 12px; color: var(--tb-ink-2); }
.tb-prow-stock { text-align: center; }
.tb-prow-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.tb-prow-price b { font-size: 16px; color: var(--tb-price); }
.tb-prow-price del { font-size: 12px; color: var(--tb-ink-3); }
.tb-off { font-size: 12px; color: var(--tb-bad); font-weight: 600; }
.tb-prow-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tb-prow.is-out .tb-prow-name a { color: var(--tb-ink-3); }
.tb-empty { background: #fff; border: 1px solid var(--tb-line); border-radius: 16px; padding: 40px 16px; text-align: center; color: var(--tb-ink-2); margin: 0 0 16px; }
.tb-group .tb-empty { border: 0; border-radius: 0; margin: 0; }

.tb-card { background: #fff; border: 1px solid var(--tb-line); border-radius: 16px; padding: 16px; }
.tb-card-title { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: var(--tb-ink); }
.tb-wallet-money { font-size: 24px; font-weight: 700; margin: 4px 0 12px; }
.tb-wallet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; text-align: center; margin-bottom: 12px; }
.tb-wallet-grid > div { background: var(--tb-bg); border-radius: 12px; padding: 8px 4px; }
.tb-wallet-grid span { display: block; color: var(--tb-ink-2); }
.tb-wallet-guest { display: flex; flex-direction: column; gap: 8px; }
.tb-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: #39425a; }
.tb-activity li { display: flex; gap: 8px; justify-content: space-between; }
.tb-activity time { flex: none; color: var(--tb-ink-3); }

/* 页脚 */
/* 页脚：SEO 介绍区（网站标题 + 简介 + 全部分类链接）→ 三栏链接 → 底栏版权 */
.tb-footer { background: #fff; border-top: 1px solid var(--tb-line); color: var(--tb-ink-2); font-size: 12px; line-height: 1.75; margin-top: 16px; }
.tb-footer a { color: var(--tb-ink-2); }
body.tb .tb-footer a:hover { color: var(--tb-link); }
.tb-footer-seo h2 { margin: 0 0 8px; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--tb-ink); }
.tb-footer-seo p { margin: 0 0 12px; }
.tb-footer-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.tb-footer-tags a { color: var(--tb-link); }
.tb-footer-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 32px 0; }
.tb-footer-title { margin: 0 0 8px; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--tb-ink); }
.tb-footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tb-footer-bottom { background: var(--tb-soft); border-top: 1px solid var(--tb-line-2); }
.tb-footer-bottom-in { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.tb-footer-bottom p { margin: 0; }
.tb-footer-card img { max-height: 24px; }

/* 手机底部导航（原模板的 .mobile-menu，换成浅色） */
body.tb .mobile-menu { background: #fff; border-top: 1px solid var(--tb-line); box-shadow: none; }
body.tb .mobile-menu a, body.tb .mobile-menu button { color: var(--tb-ink-2); }
body.tb .mobile-menu a.active, body.tb .mobile-menu a:hover { color: var(--tb-accent); }
/* 五个入口平分宽度；翻译后文字变长也只占一行，放不下用省略号（原样式固定 80px 宽、全大写，越南语会换成两行） */
body.tb .mobile-menu a, body.tb .mobile-menu button { flex: 1 1 0; min-width: 0; width: auto; padding: 8px 4px; }
body.tb .mobile-menu a span, body.tb .mobile-menu button span {
    max-width: 100%; font-size: 12px; line-height: 16px; text-transform: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 商品详情页 */
.tb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; font-size: 12px; color: var(--tb-ink-3); }
.tb-crumbs a { color: var(--tb-link); }
.tb-stack { display: flex; flex-direction: column; gap: 16px; }
.tb-pd-head { display: flex; gap: 16px; align-items: flex-start; }
.tb-pd-icon { flex: none; width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: var(--tb-soft); }
.tb-pd-info { min-width: 0; flex: 1; }
.tb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tb-tag { display: inline-block; padding: 4px 8px; border-radius: 8px; font-size: 12px; line-height: 1; background: var(--tb-line-2); color: var(--tb-ink-2); }
a.tb-tag:hover { color: var(--tb-link); }
.tb-tag-ok { background: var(--tb-ok-bg); color: var(--tb-ok); }
.tb-tag-blue { background: #eef3ff; color: var(--tb-link); }
.tb-pd-name { margin: 0; font-size: 24px; line-height: 1.32; font-weight: 700; color: var(--tb-ink); word-break: break-word; }
.tb-pd-meta { margin: 8px 0 0; font-size: 12px; color: var(--tb-ink-2); }
.tb-text-ok { color: var(--tb-ok); }
.tb-text-bad { color: var(--tb-bad); }
.tb-pd-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.tb-pd-gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; border: 1px solid var(--tb-line); }
.tb-richtext { font-size: 16px; overflow-wrap: anywhere; }
.tb-richtext img { max-width: 100%; height: auto; }
.tb-mb-8 { margin: 0 0 8px; }
.tb-input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--tb-line); border-radius: 8px; background: var(--tb-soft); font-size: 12px; color: var(--tb-ink); box-sizing: border-box; }
.tb-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tb-field-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tb-field-row .tb-input { flex-basis: 240px; }
.tb-btn-danger { background: #fff; color: var(--tb-bad); border-color: #f0c4b4; }
.tb-btn-danger:hover { background: var(--tb-bad-bg); }
.tb-btn-line { flex: 1; background: #fff; color: var(--tb-ink-2); border-color: var(--tb-line); }
.tb-btn-line:hover { color: var(--tb-link); border-color: #b9c6e8; }
.tb-btn-lg { min-height: 44px; font-size: 16px; }
.tb-buybox { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.tb-buybox-price b { font-size: 28px; color: var(--tb-price); margin-right: 4px; }
.tb-buybox-off { margin: -8px 0 0; display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--tb-ink-3); }
.tb-buybox-row { display: flex; gap: 8px; }
.tb-buybox-notes { margin: 0; padding: 12px 0 0 16px; border-top: 1px solid var(--tb-line-2); font-size: 12px; color: var(--tb-ink-2); }

/* 购买弹窗、自选 UID 弹窗：只换外观，内容和逻辑不变 */
body.tb .modal-content { border: 0; border-radius: 16px; overflow: hidden; }
body.tb .modal-header { border-bottom: 1px solid var(--tb-line); padding: 16px; }
body.tb .modal-footer { border-top: 1px solid var(--tb-line); padding: 12px 16px; }
body.tb .modal-body { padding: 16px; }
body.tb .modal-title { font-size: 16px; font-weight: 700; }
body.tb .modal .form-control, body.tb .modal .form-select { border-radius: 8px; border-color: var(--tb-line); }
body.tb .modal .btn { border-radius: 8px; }

/* 旧页面套新外观：充值中心、订单列表 / 详情、用户中心、记录页等仍用原页面结构和脚本，
   这里只把它们共用的旧样式（标题条、卡片、表格、输入框、按钮、分页、侧栏）改成方案 B，不改页面文件 */
body.tb .inner-section { margin-bottom: 0; padding-top: 24px !important; padding-bottom: 24px !important; }
body.tb .home-heading h3, body.tb .home-heading h3:not(.no-bg) {
    background: none !important; box-shadow: none; color: var(--tb-ink); padding: 0; border-radius: 0;
    font-size: 20px; font-weight: 700; gap: 8px;
}
body.tb .home-heading h3 i { margin: 0 !important; color: var(--tb-accent); }
/* 卡片：和首页商品分类（tb-panel）一样——白底、浅边框、圆角 16；卡片标题（.account-title）做成整条浅灰标题栏，正文留白 20 */
body.tb .account-card, body.tb .recharge-card {
    background: #fff; border: 1px solid var(--tb-line); border-radius: 16px; box-shadow: none; padding: 20px; margin-bottom: 16px; overflow: hidden;
}
body.tb .recharge-card h4 { font-size: 20px; margin-bottom: 16px; }
body.tb .account-card > .account-title:first-child {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; box-sizing: border-box;
    margin: -20px -20px 20px; padding: 8px 20px; background: var(--tb-soft); border-bottom: 1px solid var(--tb-line);
    font-size: 16px; line-height: 24px; font-weight: 700; color: var(--tb-ink);
}
body.tb .account-card.py-4 > .account-title:first-child { margin-top: -24px; }
body.tb .account-title::before { display: none; }
body.tb .account-title h4, body.tb .account-title h3 { font-size: 16px; line-height: 24px; font-weight: 700; margin: 0; color: var(--tb-ink); }
body.tb .account-title button, body.tb .account-title .btn {
    min-height: 32px; padding: 4px 12px; border-radius: 8px; border: 1px solid #b9c6e8; background: #fff;
    color: var(--tb-link); font-size: 12px; font-weight: 600; line-height: 1.5; text-transform: none; letter-spacing: 0;
}
body.tb .account-title button:hover { background: #eef3ff; }
body.tb .account-content > .row > [class*="col-"] .form-group { margin-bottom: 16px; }
/* 标题在卡片外面的旧页面（.home-heading 紧跟卡片）：标题和卡片拼成一张卡片，标题栏同上 */
body.tb .home-heading:has(+ .account-card) { margin: 0 !important; }
body.tb .home-heading:has(+ .account-card) h3, body.tb .home-heading:has(+ .account-card) h3:not(.no-bg) {
    display: flex; align-items: center; min-height: 40px; box-sizing: border-box; margin: 0; padding: 8px 20px !important;
    background: var(--tb-soft) !important; border: 1px solid var(--tb-line); border-bottom: 0; border-radius: 16px 16px 0 0 !important;
    font-size: 16px; line-height: 24px;
}
body.tb .home-heading + .account-card { border-top-left-radius: 0; border-top-right-radius: 0; }
/* 页面宽度、左右留白和首页一致（最宽 1200、左右 24，手机 16），栏间距 16 */
body.tb .inner-section > .container { max-width: 1200px; padding-left: 24px; padding-right: 24px; }
body.tb .inner-section > .container > .row { --bs-gutter-x: 16px; }
/* 大屏分档加宽（2026-11 测试站反馈：屏幕越宽两边留白越大）：1440 以上最宽 1400，1800 以上最宽 1600；普通笔记本仍是 1200 */
@media (min-width: 1440px) {
    .tb-container, body.tb .inner-section > .container { max-width: 1400px; }
}
@media (min-width: 1800px) {
    .tb-container, body.tb .inner-section > .container { max-width: 1600px; }
}
body.tb .profile-part { padding-top: 20px !important; padding-bottom: 32px !important; }
body.tb .profile-part .sidebar_profile:last-child { margin-bottom: 16px; }
body.tb .my-wallet { margin-bottom: 16px; }
body.tb .my-wallet p { font-size: 12px; color: var(--tb-ink-2); margin: 0 0 4px; }
body.tb .my-wallet h3 { font-size: 28px; margin: 0; color: var(--tb-ink); }
body.tb .wallet-card-group { gap: 12px; }
body.tb .form-control, body.tb .form-select, body.tb .recharge-input {
    border: 1px solid var(--tb-line); border-radius: 8px; background-color: var(--tb-soft); color: var(--tb-ink); font-size: 16px; min-height: 40px; box-shadow: none;
}
body.tb .form-control:focus, body.tb .form-select:focus, body.tb .recharge-input:focus { border-color: var(--tb-accent); background-color: #fff; box-shadow: 0 0 0 4px rgba(31, 79, 209, .08); }
body.tb .form-label { font-size: 12px; font-weight: 600; color: var(--tb-ink-2); margin-bottom: 4px; }
body.tb .shop-widget-btn { min-height: 40px; padding: 8px 12px; border-radius: 8px; font-size: 16px; gap: 8px; background: #fff; color: var(--tb-ink-2); border: 1px solid var(--tb-line); }
body.tb .shop-widget-btn:hover { background: var(--tb-soft); color: var(--tb-link); border-color: #b9c6e8; }
body.tb .form-btn, body.tb .recharge-submit { height: auto; min-height: 44px; line-height: 1.5; padding: 8px 16px; border-radius: 8px; font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; background: var(--tb-accent); color: #fff; border: 0; }
body.tb .recharge-amount-btn, body.tb .recharge-channel { border-width: 1px; border-color: var(--tb-line); border-radius: 12px; background: #fff; font-size: 16px; }
body.tb .recharge-amount-btn { padding: 16px 8px; font-size: 20px; }
body.tb .recharge-amount-btn .bonus { border-radius: 8px; padding: 0 8px; line-height: 20px; }
body.tb .recharge-label { font-size: 16px; margin: 16px 0 8px; }

/* 表格：浅色表头、细分隔线 */
body.tb thead { background: transparent; }
body.tb thead tr, body.tb .table thead tr { background: var(--tb-soft); }
body.tb thead tr th, body.tb .table thead th {
    color: var(--tb-ink-2); font-size: 12px; font-weight: 600; padding: 12px; border-right: 0; border-bottom: 1px solid var(--tb-line); border-radius: 0 !important;
}
body.tb .table tbody tr td, body.tb .table tbody tr th { font-size: 12px; padding: 12px; color: var(--tb-ink); border-color: var(--tb-line-2); vertical-align: middle; }
body.tb .table tbody tr th { border-right: 0; }
body.tb .table-scroll, body.tb .table-wrapper { border: 1px solid var(--tb-line); border-radius: 12px; overflow-x: auto; }
/* 卡片里的旧表格：和订单列表一样铺满卡片宽度（不再是卡片里再套一个框），表头浅灰、行间细线 */
body.tb .account-card > .table-scroll { margin: 16px -20px 0; border: 0; border-top: 1px solid var(--tb-line); border-radius: 0; }
body.tb .account-card > .table-scroll .table th:first-child, body.tb .account-card > .table-scroll .table td:first-child { padding-left: 20px; }
body.tb .account-card > .table-scroll .table th:last-child, body.tb .account-card > .table-scroll .table td:last-child { padding-right: 20px; }
body.tb .account-card > .table-scroll + .bottom-paginate, body.tb .account-card > .table-scroll + .empty-state { margin: 0 -20px; padding: 16px 20px 0; border-top: 1px solid var(--tb-line-2); }
body.tb .table td.is-time, body.tb .table td.is-ip { white-space: nowrap; }
body.tb .table.text-nowrap td.is-reason { white-space: normal !important; overflow-wrap: anywhere; min-width: 200px; }
body.tb .table { margin-bottom: 0; }
body.tb .bottom-paginate { padding-top: 16px; border-top: 0; flex-wrap: wrap; gap: 8px; }
body.tb .page-info { font-size: 12px; color: var(--tb-ink-2); margin: 0; }
body.tb .page-item { margin-left: 4px; }
body.tb .page-link { width: 32px; height: 32px; line-height: 32px; padding: 0; border-radius: 8px !important; font-size: 12px; color: var(--tb-ink-2); background: #fff; border: 1px solid var(--tb-line); }
body.tb .page-item.active .page-link, body.tb .page-item .active { background: var(--tb-accent); color: #fff; border-color: var(--tb-accent); }

/* 小按钮、徽标：统一圆角和颜色 */
body.tb .btn { border-radius: 8px; font-weight: 600; }
body.tb .btn-sm { font-size: 12px; padding: 4px 12px; min-height: 32px; display: inline-flex; align-items: center; gap: 4px; }
body.tb .btn-info { background: #eef3ff; color: var(--tb-link); border-color: #d6e0f8; }
body.tb .btn-info:hover { background: #dfe8ff; color: var(--tb-link); }
body.tb .btn-danger { background: #fff; color: var(--tb-bad); border-color: #f0c4b4; }
body.tb .btn-danger:hover { background: var(--tb-bad-bg); color: var(--tb-bad); }
body.tb .btn-primary { background: var(--tb-accent); border-color: var(--tb-accent); color: #fff; }
body.tb .badge { border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 600; }
body.tb .badge.bg-primary { background: #eef3ff !important; color: var(--tb-link); }
body.tb .badge.bg-danger { background: var(--tb-bad-bg) !important; color: var(--tb-price); }
body.tb .badge.bg-success { background: var(--tb-ok-bg) !important; color: var(--tb-ok); }
body.tb .badge.bg-warning { background: #fff4dc !important; color: #8a5a00; }
body.tb .badge.bg-secondary { background: var(--tb-line-2) !important; color: var(--tb-ink-2); }

/* 用户中心：左侧菜单、钱包卡片 */
body.tb .sidebar_profile { padding: 12px 16px; margin-bottom: 8px; border-radius: 12px; border-color: var(--tb-line); font-size: 16px; color: var(--tb-ink); gap: 8px; box-shadow: none; }
body.tb .sidebar_profile:hover, body.tb .sidebar_profile.active, body.tb .sidebar_profile.mobile-menu-active { border-color: var(--tb-accent); box-shadow: none; color: var(--tb-accent); background: #f5f7ff; }
body.tb .sidebar_profile h6 { margin: 0; font-size: 16px; font-weight: 600; color: inherit; display: flex; align-items: center; gap: 8px; }
/* 订单详情顶部：商品名、数量、实付 */
body.tb .details-name { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--tb-ink); }
body.tb .details-name a { color: var(--tb-ink); }
body.tb .details-name a:hover { color: var(--tb-link); }
body.tb .details-meta .label-text { background: var(--tb-line-2) !important; color: var(--tb-ink-2); border-radius: 8px; padding: 4px 8px; font-size: 12px; margin-right: 8px; }
body.tb .details-meta .label-text strong { color: var(--tb-ink); }
body.tb .details-meta .label-text.order strong { color: var(--tb-price); }
body.tb .wallet-card { padding: 16px; border-radius: 12px; background: var(--tb-soft); border: 1px solid var(--tb-line-2); }
body.tb .wallet-card:hover { background: var(--tb-soft); }
body.tb .wallet-card:hover p, body.tb .wallet-card:hover h3 { color: inherit; }
body.tb .wallet-card p { font-size: 12px; color: var(--tb-ink-2); }
body.tb .wallet-card h3 { font-size: 24px; margin: 0; }

/* 内容页（常见问题、政策、联系、文章）：深色横幅改成浅色页标题 */
body.tb .single-banner { background: none !important; padding: 24px 0 8px !important; margin: 0; text-align: left; }
body.tb .single-banner::before { display: none; }
body.tb .single-banner h2 { font-size: 28px; line-height: 1.4; margin: 0 0 4px; color: var(--tb-ink); text-transform: none; font-weight: 700; }
body.tb .single-banner .breadcrumb { justify-content: flex-start; margin: 0; font-size: 12px; background: none; padding: 0; }
body.tb .single-banner .breadcrumb-item, body.tb .single-banner .breadcrumb-item.active { color: var(--tb-ink-3); }
body.tb .single-banner .breadcrumb-item a { color: var(--tb-link); }
body.tb .single-banner .breadcrumb-item + .breadcrumb-item::before { color: var(--tb-ink-3); }
body.tb .contact-part .account-card { padding: 24px; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
body.tb .contact-part .account-card h1 { font-size: 24px; margin: 24px 0 8px; }
body.tb .contact-part .account-card h2 { font-size: 20px; margin: 20px 0 8px; }
body.tb .contact-part .account-card h3, body.tb .contact-part .account-card h4 { font-size: 16px; font-weight: 700; margin: 16px 0 4px; }
body.tb .contact-part .account-card > :first-child { margin-top: 0; }
body.tb .contact-part .account-card img { max-width: 100%; height: auto; border-radius: 12px; }
body.tb .contact-card { border: 1px solid var(--tb-line); border-radius: 16px; padding: 32px 16px; margin: 0 0 16px; box-shadow: none; }
body.tb .contact-card i { width: 48px; height: 48px; line-height: 48px; border-radius: 12px; font-size: 24px; background: #eef3ff; color: var(--tb-link); }
body.tb .contact-card h4 { font-size: 16px; font-weight: 700; margin: 12px 0 4px; }

/* 文章列表 / 详情 */
body.tb .blog-card { border: 1px solid var(--tb-line); border-radius: 16px; padding: 0 0 16px; margin: 0 0 16px; overflow: hidden; }
body.tb .blog-media { margin: 0 0 12px; background: var(--tb-soft); aspect-ratio: 16 / 9; overflow: hidden; }
body.tb .blog-media img { width: 100%; height: 100%; object-fit: cover; }
body.tb .blog-content { padding: 0 16px; }
body.tb .blog-meta { font-size: 12px; color: var(--tb-ink-3); margin-bottom: 8px; }
body.tb .blog-title { font-size: 16px; line-height: 1.5; font-weight: 700; margin-bottom: 8px; }
body.tb .blog-title a { color: var(--tb-ink); }
body.tb .blog-title a:hover { color: var(--tb-link); }
body.tb .blog-desc { font-size: 12px; color: var(--tb-ink-2); margin-bottom: 8px; }
body.tb .blog-btn { font-size: 12px; font-weight: 600; color: var(--tb-link); }
body.tb .blog-widget { border: 1px solid var(--tb-line); border-radius: 16px; padding: 16px; margin-bottom: 16px; box-shadow: none; background: #fff; }
body.tb .blog-widget-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--tb-line-2); }
body.tb .blog-widget-title::before { display: none; }
body.tb .blog-widget-form input { border: 1px solid var(--tb-line); border-radius: 8px 0 0 8px; background: var(--tb-soft); height: 40px; font-size: 12px; }
body.tb .blog-widget-form button { border-radius: 0 8px 8px 0; height: 40px; background: var(--tb-accent); }
body.tb .blog-widget-media img { border-radius: 8px; background: var(--tb-soft); }
body.tb .filter-show, body.tb .filter-short { font-size: 12px; color: var(--tb-ink-2); }

/* 登录、注册、找回密码 */
body.tb .user-form-card { border: 1px solid var(--tb-line); border-radius: 16px; padding: 32px; margin-bottom: 16px; box-shadow: none; }
body.tb .user-form-title h2 { font-size: 28px; font-weight: 700; color: var(--tb-ink); }
body.tb .user-form-title p { font-size: 16px; color: var(--tb-ink-2); }
body.tb .user-form .form-control { min-height: 44px; }
body.tb .form-button button, body.tb .form-button .btn { min-height: 44px; border-radius: 8px; font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; background: var(--tb-accent); border: 0; }
body.tb .user-form-remind { border: 1px solid var(--tb-line); border-radius: 16px; padding: 16px; box-shadow: none; }
body.tb .user-form-remind p { margin: 0; font-size: 16px; }

/* 弹窗通用（自选 UID 等原弹窗）：收紧留白 */
body.tb #openModal .modal-dialog:not(.tb-sheet) { max-width: 800px; }
body.tb #openModal .modal-dialog:not(.tb-sheet) .modal-content { padding: 24px; }

/* 购买弹窗（新模板排版 views/client/b/buy-modal.php，逻辑仍是原 view-product.php 的脚本）：
   上半部分确认商品、数量、总额和优惠券，下半部分灰底列出可用支付方式；手机上从底部滑出的半屏面板 */
/* 底部半屏面板通用样式（购买弹窗、购物车弹窗共用，对话框加 tb-sheet 类）：电脑居中，手机从底部滑出 */
/* :is(#…) 让选择器带上 id 的优先级，压过原弹窗内联样式 #openModal .modal-dialog{max-width:960px} 和 main.css 的 margin:10px !important */
body.tb :is(#openModal, #tbCartModal) .modal-dialog.tb-sheet { max-width: 560px; }
body.tb :is(#openModal, #tbCartModal) .tb-sheet .modal-content { padding: 0; border: 0; border-radius: 24px; overflow: hidden; }
.tb-sheet-close {
    position: absolute; top: 16px; right: 16px; z-index: 2; width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 8px; background: #1f2433; color: #fff; cursor: pointer;
}
@media (max-width: 767px) {
    body.tb #openModal .modal-dialog:not(.tb-sheet) { max-width: none; width: auto; margin: 8px; }
    body.tb #openModal .modal-dialog:not(.tb-sheet) .modal-content { padding: 16px; }
    /* 贴底、最宽 560px 水平居中（平板宽度下不会一边留白），内容多时面板内滚动 */
    body.tb :is(#openModal, #tbCartModal) .modal-dialog.tb-sheet {
        position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-width: 560px; min-height: 0; margin: 0 auto !important;
        transform: translateY(100%); transition: transform .25s ease-out;
    }
    body.tb :is(#openModal, #tbCartModal).show .modal-dialog.tb-sheet { transform: none; }
    body.tb :is(#openModal, #tbCartModal) .tb-sheet .modal-content { max-height: 88vh; border-radius: 24px 24px 0 0; padding: 0 0 env(safe-area-inset-bottom); }
    body.tb #openModal .tb-sheet .modal-content { overflow-y: auto; }
    .tb-sheet .modal-content::before {
        content: ""; position: absolute; top: 8px; left: 50%; z-index: 3; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #d5dae4;
    }
}

/* 购买弹窗（新模板排版 views/client/b/buy-modal.php，逻辑仍是原 view-product.php 的脚本）：
   上半部分确认商品、数量、总额，"有优惠券吗？"和"加入购物车"同一行；下半部分灰底列出可用支付方式。字号与全站一致（正文 16、说明 12） */
.tb-buy { position: relative; color: var(--tb-ink); }
/* 旧样式 main.css 在 ≤767px 把 .product-view 限制为最宽 480，比面板（最宽 560）窄，右边会空出一条 */
.tb-buy .product-view { max-width: none; }
.tb-buy .modal-close-mobile, .tb-buy .modal-close { display: none !important; }
.tb-buy-body { padding: 20px; }
.tb-buy-head { display: flex; gap: 8px; align-items: flex-start; padding-right: 40px; }
.tb-buy-head > svg { flex: none; width: 20px; height: 20px; margin-top: 4px; }
.tb-buy-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--tb-ink); }
.tb-buy-sub { margin: 0; font-size: 12px; line-height: 16px; color: var(--tb-ink-2); }
.tb-buy-label { display: flex; align-items: center; gap: 4px; margin: 12px 0 4px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--tb-ink-2); }
.tb-buy-label label { margin: 0; font: inherit; color: inherit; }
.tb-buy-label svg { flex: none; width: 12px; height: 12px; color: #5b6478; }
.tb-buy-label-end { justify-content: flex-end; }
.tb-buy-box {
    display: flex; align-items: center; width: 100%; min-height: 48px; padding: 8px 12px; box-sizing: border-box;
    border: 1px solid var(--tb-line); border-radius: 12px; background: #fff; font-size: 16px; color: var(--tb-ink);
}
.tb-buy-name a {
    color: var(--tb-ink); font-weight: 600; line-height: 24px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tb-buy-meta { margin: 4px 0 0; font-size: 12px; color: var(--tb-ink-2); }
.tb-buy-meta b { color: var(--tb-ink); }
.tb-buy-meta .tb-buy-price { color: var(--tb-price); }
.tb-buy-meta del { margin-left: 4px; color: var(--tb-ink-3); }
.tb-buy-meta span { margin: 0 4px; }
.tb-buy-deal { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #fff4dc; font-size: 12px; }
.tb-buy-deal b { color: var(--tb-price); }
.tb-buy .sku-picker { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
/* 规格多时选择框固定最高 180（每行连间距 72，约 2 行半，露出半行提示还能往下滑），框内滚动；留 4px 内边距，选中框的描边不被裁掉 */
.tb-buy .sku-picker { max-height: 180px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; margin: 0 -4px; }
.tb-buy .sku-option { border-radius: 12px; padding: 8px 12px; }
.tb-buy .sku-hint:empty { display: none; }
.tb-buy-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 12px; }
.tb-buy-qty { gap: 4px; padding: 4px; }
.tb-buy-qty .action-input {
    flex: 1; min-width: 0; height: 36px; padding: 0 8px; border: 0; background: transparent; outline: none;
    font-size: 16px; font-weight: 600; color: var(--tb-ink); text-align: center; -moz-appearance: textfield;
}
.tb-buy-qty .action-input::-webkit-inner-spin-button, .tb-buy-qty .action-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tb-buy-qty .action-minus1, .tb-buy-qty .action-plus1 {
    flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--tb-bg);
    font-size: 16px; line-height: 1; color: var(--tb-ink); cursor: pointer;
}
.tb-buy-qty .action-minus1:hover, .tb-buy-qty .action-plus1:hover { background: #e3eaff; color: var(--tb-link); }
.tb-buy-qty:focus-within, .tb-buy-coupon .tb-buy-box:focus { border-color: var(--tb-accent); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); outline: none; }
.tb-buy-total { justify-content: flex-end; }
.tb-buy-total #into_pay { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--tb-price); }
.tb-buy-extra { margin: 4px 0 0; text-align: right; font-size: 12px; color: var(--tb-ink-2); }
.tb-buy-extra del { color: var(--tb-price); }
.tb-buy-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.tb-buy-coupon-btn, .tb-buy-cart-link {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 0;
    border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--tb-ink); cursor: pointer;
}
.tb-buy-coupon-btn svg { width: 16px; height: 16px; }
.tb-buy-coupon-btn:hover, .tb-buy-coupon-btn[aria-expanded="true"] { color: var(--tb-link); }
.tb-buy-cart-link { color: var(--tb-link); }
.tb-buy-cart-link:hover { text-decoration: underline; }
.tb-buy-cart-link:disabled { opacity: .6; cursor: wait; }
.tb-buy-coupon { display: flex; gap: 8px; margin-top: 8px; }
.tb-buy-coupon[hidden] { display: none; }
.tb-buy-coupon .tb-buy-box { flex: 1; min-height: 40px; padding: 0 12px; }
.tb-buy-coupon .tb-btn { flex: none; min-height: 40px; padding: 0 16px; border-radius: 12px; }
.tb-buy-pick { display: block; margin-top: 8px; padding: 0; border: 0; background: none; font-size: 12px; color: var(--tb-ink-2); cursor: pointer; text-align: left; }
.tb-buy-pick b { color: var(--tb-link); }
.tb-buy-pay { padding: 16px 20px 20px; background: #f5f7fb; border-top: 1px solid var(--tb-line); }
.tb-buy-pay-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tb-buy-pay-head h3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--tb-ink); }
.tb-buy-pay-head span { font-size: 12px; color: var(--tb-ink-2); white-space: nowrap; }
.tb-buy-pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tb-pay-opt {
    position: relative; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 12px;
    border: 1px solid var(--tb-line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s, opacity .15s;
}
.tb-pay-opt:hover { border-color: var(--tb-accent); box-shadow: 0 4px 16px rgba(15, 23, 42, .08); }
.tb-pay-icon { position: relative; flex: none; width: 32px; height: 32px; }
/* 支付图标（libs/storefront.php 的 sf_pay_icon()）：统一圆角方块，USDT 右下角用网络颜色斜切一角 */
.tb-payi-wrap, .tb-payi { display: block; width: 32px; height: 32px; }
.tb-pay-text { display: flex; flex-direction: column; min-width: 0; }
/* 名称翻译后变长时折行显示，不溢出卡片 */
.tb-pay-text b, .tb-pay-text small { overflow-wrap: anywhere; }
.tb-pay-text b { font-size: 16px; line-height: 20px; color: var(--tb-ink); }
.tb-pay-text small { font-size: 12px; line-height: 16px; color: var(--tb-ink-2); }
.tb-pay-text .text-wallet { color: var(--tb-ok); font-size: inherit; font-weight: 600; text-shadow: none; }
/* 下单成功界面（原脚本生成）：按钮文字不折行，放不下整个按钮换到下一行 */
.tb-buy .vp-actions { flex-wrap: wrap; }
.tb-buy .vp-btn { flex: 1 1 auto; min-width: 0; padding: 0 16px; white-space: nowrap; }
/* 透明按钮盖住整张卡片；原脚本处理中会把按钮内容换成转圈图标，这里只把转圈显示在卡片右侧 */
.tb-pay-hit {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 12px;
    border: 0; border-radius: 12px; background: transparent; font-size: 0; color: transparent; cursor: pointer;
}
.tb-pay-hit > :not(.fa-spin) { display: none; }
.tb-pay-hit .fa-spin { font-size: 16px; color: var(--tb-accent); }
.tb-pay-hit:focus-visible { outline: 2px solid var(--tb-accent); outline-offset: 2px; }
.tb-pay-hit:disabled { cursor: not-allowed; }
.tb-pay-opt:has(.tb-pay-hit:disabled) { opacity: .6; }
.tb-pay-opt:has(.fa-spin) { opacity: 1; border-color: var(--tb-accent); }
@media (max-width: 767px) {
    .tb-buy-body { padding: 24px 16px 16px; }
    .tb-buy-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
    .tb-buy-pay { padding: 16px; }
    .tb-pay-opt { padding: 8px; }
    .tb-pay-hit { padding: 0 8px; }
}

/* 导航行购物车按钮（右上角数字为购物车商品数） */
.tb-cart-btn {
    position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 999px; color: #4b5468;
}
.tb-cart-btn:hover { background: rgba(255, 255, 255, .6); color: var(--tb-ink); }
.tb-cart-count {
    position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
    border-radius: 999px; background: var(--tb-price); color: #fff; font-size: 12px; line-height: 16px; text-align: center; font-weight: 600;
}
.tb-cart-count[hidden] { display: none; }

/* 购物车面板（views/client/b/cart-panel.php）：弹窗和购物车页共用。标题、可滚动的商品表、底部固定的合计与结算按钮 */
body.tb #tbCartModal .modal-dialog.tb-cart-dialog { max-width: 720px; }
#tbCartModal .modal-content { display: flex; flex-direction: column; max-height: 88vh; }
.tb-cartp { display: flex; flex-direction: column; min-height: 0; flex: 1; color: var(--tb-ink); }
.tb-cartp-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 16px 64px 16px 20px; border-bottom: 1px solid var(--tb-line); }
.tb-cartp-head h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.tb-cartp-body { flex: 1; min-height: 0; overflow-y: auto; }
.tb-cartp-empty { padding: 48px 20px; text-align: center; }
.tb-cartp-empty p { margin: 0 0 4px; font-size: 16px; }
.tb-cartp-table { width: 100%; margin: 0; border: 0 !important; border-collapse: collapse; }
.tb-cartp-table th, .tb-cartp-table td { border-left: 0 !important; border-right: 0 !important; border-top: 0 !important; }
.tb-cartp-table th { position: sticky; top: 0; z-index: 1; padding: 8px 12px; background: var(--tb-soft); border-bottom: 1px solid var(--tb-line); font-size: 12px; font-weight: 600; color: var(--tb-ink-2); text-align: left; }
.tb-cartp-table td { padding: 12px; border-bottom: 1px solid var(--tb-line-2); vertical-align: middle; }
.tb-cartp-table th:first-child, .tb-cartp-table td:first-child { padding-left: 20px; }
.tb-cartp-table th:last-child, .tb-cartp-table td:last-child { padding-right: 20px; width: 40px; }
.tb-cartp-table .tb-cartp-c { text-align: center; }
.tb-cartp-table .tb-cartp-r { text-align: right; white-space: nowrap; }
.tb-cartp-prod { display: flex; gap: 12px; align-items: center; }
.tb-cartp-prod > img { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: contain; }
.tb-cart-row.is-working { opacity: .6; }
.tb-cart-name { font-size: 16px; font-weight: 600; color: var(--tb-ink); line-height: 24px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-cart-meta { margin: 4px 0 0; font-size: 12px; color: var(--tb-ink-2); }
.tb-cart-meta .tb-tag { margin-right: 4px; }
.tb-cart-err { margin: 4px 0 0; font-size: 12px; color: var(--tb-bad); }
.tb-cart-err:empty { display: none; }
.tb-cart-result { margin: 4px 0 0; font-size: 12px; color: var(--tb-bad); }
.tb-cart-row.is-done .tb-cart-result { color: var(--tb-ok); }
.tb-cart-row.is-bad .tb-cart-pay b { color: var(--tb-ink-3); }
.tb-cart-row.is-done .tb-cart-qtybox, .tb-cart-row.is-done .tb-cart-del { visibility: hidden; }
/* 数量：和购买弹窗一样的 − 输入框 + （.tb-buy-qty 样式） */
.tb-cart-qtybox { display: inline-flex; width: 136px; min-height: 44px; }
.tb-cart-qty {
    flex: 1; min-width: 0; height: 36px; padding: 0 4px; border: 0; background: transparent; outline: none;
    font-size: 16px; font-weight: 600; color: var(--tb-ink); text-align: center; -moz-appearance: textfield;
}
.tb-cart-qty::-webkit-inner-spin-button, .tb-cart-qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tb-cart-step {
    flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--tb-bg);
    font-size: 16px; line-height: 1; color: var(--tb-ink); cursor: pointer;
}
.tb-cart-step:hover { background: #e3eaff; color: var(--tb-link); }
.tb-cart-pay b { font-size: 16px; }
.tb-cart-del {
    width: 40px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #f0b4ae; border-radius: 999px; background: #fff; color: #d93a2b; cursor: pointer;
}
.tb-cart-del:hover { background: #fdeeec; }
.tb-cartp-foot {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; background: var(--tb-soft); border-top: 1px solid var(--tb-line);
}
.tb-cartp-sum { min-width: 0; }
.tb-cartp-sum p { margin: 0; font-size: 16px; }
.tb-cartp-sum p + p { margin-top: 4px; font-size: 12px; }
.tb-cartp-sum b { color: var(--tb-price); font-size: 20px; }
.tb-cartp-btns { flex: none; display: flex; gap: 8px; }
.tb-cartp-btns .tb-btn { min-height: 44px; padding: 0 20px; border-radius: 12px; font-size: 16px; gap: 8px; display: inline-flex; align-items: center; }
.tb-cartp-clear { background: #fff; color: #d93a2b; border: 1px solid #f0b4ae; }
.tb-cartp-clear:hover { background: #fdeeec; }
.tb-cart-page { padding: 0; overflow: hidden; }
@media (max-width: 767px) {
    #tbCartModal .modal-content { max-height: 88vh; }
    .tb-cartp-head { padding: 24px 64px 12px 16px; }
    .tb-cartp-head .tb-sheet-close { top: 20px; }
    /* 手机：表格改成一行一个商品卡片，商品名占满一行，下面是数量、小计、删除 */
    .tb-cartp-table thead { display: none; }
    .tb-cartp-table, .tb-cartp-table tbody { display: block; }
    .tb-cartp-table tr { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--tb-line-2); }
    .tb-cartp-table td { display: block; padding: 0 !important; border: 0; width: auto !important; }
    .tb-cartp-table td.tb-cartp-prod { grid-column: 1 / -1; display: flex; }
    .tb-cartp-foot { padding: 12px 16px; flex-wrap: wrap; }
    .tb-cartp-sum { flex: 1 1 100%; }
    .tb-cartp-btns { flex: 1 1 100%; }
    .tb-cartp-btns #tbCartPay { flex: 1; justify-content: center; }
}

/* 平板：胶囊导航换行，头部收紧 */
@media (max-width: 1199px) {
    .tb-capsule-item { padding: 8px 12px; }
}
/* 手机：隐藏胶囊导航（用侧边菜单 + 底部导航），商品行改成卡片 */
@media (max-width: 991px) {
    .tb-container { padding: 0 16px; }
    body.tb .inner-section > .container { padding-left: 16px; padding-right: 16px; }
    body.tb .profile-part { padding-top: 12px !important; }
    .tb-topbar-link { display: none; }
    /* 手机不显示顶部提示语（后台"顶部左侧通知"），只留语言和货币 */
    .tb-topbar-notice { display: none; }
    .tb-topbar-tools { width: 100%; justify-content: center; }
    /* position: static 让展开的搜索框按整个头部定位（原来按很窄的胶囊定位，展开后把页面撑出横向滚动） */
    .tb-capsule { flex: none; background: transparent; box-shadow: none; padding: 0; position: static; }
    .tb-capsule-nav { display: none; }
    .tb-qsearch.is-open { position: absolute; left: 16px; right: 16px; top: 8px; z-index: 2; height: 44px; }
    .tb-qsearch.is-open input[type=search] { flex: 1; width: auto; }
    .tb-qsearch-btn { width: 44px; height: 44px; background: var(--tb-bg); border: 1px solid var(--tb-line); }
    .tb-qsearch.is-open .tb-qsearch-btn { border: 0; background: transparent; }
    .tb-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .tb-header-in { flex-wrap: nowrap; padding-top: 8px; padding-bottom: 8px; position: relative; }
    /* 手机导航不显示 logo；首页的 h1 仍留在页面里（视觉隐藏）给搜索引擎看 */
    .tb-logo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .tb-user { padding: 4px; }
    .tb-user-name { display: none; }
    .tb-user-guest { padding: 8px 12px; font-size: 12px; }
    .tb-main { padding: 12px 0 16px; }
    /* 手机：介绍区占整行、两栏链接并排，底部留出底部导航的高度 */
    .tb-footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 24px 0; }
    .tb-footer-seo { grid-column: 1 / -1; }
    .tb-footer-bottom-in { padding-bottom: 80px; }
    .tb-chips { padding: 12px; }
    /* 分类按钮拉伸铺满每一行，右边不留白 */
    .tb-chip { flex: 1 1 auto; justify-content: center; }
    /* 商品详情：手机上购买框紧跟商品名称，不用滑到底 */
    .tb-pd-layout { flex-direction: column; align-items: stretch; gap: 16px; }
    .tb-pd-layout > .tb-content { display: contents; }
    .tb-pd-layout > .tb-content > * { order: 3; }
    .tb-pd-layout > .tb-content > .tb-pd-head { order: 1; }
    .tb-pd-layout > .tb-aside { order: 2; flex: none; }
}
@media (max-width: 767px) {
    .tb-phead { display: none; }
    .tb-prow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "stock price" "act act"; gap: 8px 12px; padding: 12px 16px; }
    .tb-prow-main { grid-area: main; }
    .tb-prow-stock { grid-area: stock; text-align: left; }
    .tb-stock-label { display: inline; }
    .tb-prow-price { grid-area: price; flex-direction: row; align-items: baseline; gap: 8px; }
    .tb-prow-actions { grid-area: act; }
    .tb-prow-actions .tb-btn { flex: 1; min-height: 44px; font-size: 16px; }
    .tb-group-head { padding: 8px 12px; }
    .tb-pd-icon { width: 48px; height: 48px; border-radius: 12px; }
    .tb-pd-name { font-size: 20px; }
    .tb-buybox { position: static; }
    body.tb .user-form-card { padding: 24px 16px; }
    body.tb .single-banner h2 { font-size: 24px; }
}

/* 自选 UID 弹窗（新模板排版 views/client/b/pick-modal.php，逻辑仍是原 view-product-preview.php 的脚本）：
   标题 + 商品名，搜索行，两列账号卡片（勾选、复制），库存/每页/翻页，底部单价、已选、总价和支付按钮 */
body.tb #openModal .modal-dialog.tb-sheet.tb-pick-dialog { max-width: 680px; }
body.tb .pv-container.tb-pick { padding: 0 !important; display: flex; flex-direction: column; max-height: calc(100vh - 56px); color: var(--tb-ink); font-size: 16px; }
.tb-pick-head { padding: 16px 56px 12px 20px; border-bottom: 1px solid var(--tb-line-2); }
.tb-pick-head h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--tb-ink); }
.tb-pick-name { margin: 0; font-size: 12px; line-height: 1.5; color: var(--tb-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tb-pick-tags { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 8px; }
.tb-pick-tag { padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 20px; background: var(--tb-bg); }
.tb-pick-tag.is-red { background: #fdecec; color: #c81e1e; }
.tb-pick-tag.is-hot { background: #fff4e5; color: #b45309; }
.tb-pick-link { padding: 0; border: 0; background: none; font-size: 12px; color: var(--tb-link); cursor: pointer; }
.tb-pick-search { display: flex; gap: 8px; padding: 12px 20px 8px; }
.tb-pick-input { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--tb-line); border-radius: 999px; background: #fff; color: var(--tb-ink-2); }
.tb-pick-input:focus-within { border-color: var(--tb-accent); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); }
.tb-pick-input input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 12px; color: var(--tb-ink); }
.tb-pick-search .tb-btn { min-height: 36px; border-radius: 999px; padding: 0 16px; }
.tb-pick-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); align-content: start; gap: 8px; padding: 4px 20px 12px; }
.tb-pick-item { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 4px 4px 12px; border: 1px solid var(--tb-line); border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.tb-pick-item[hidden] { display: none; }
.tb-pick-item:hover { border-color: #b9c6e8; }
.tb-pick-item:has(.uid-checkbox:checked) { border-color: var(--tb-accent); background: #f5f7ff; }
.tb-pick-item .uid-checkbox { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--tb-accent); cursor: pointer; }
.tb-pick-item .pv-uid-text { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-pick-item .pv-uid-text.is-rich { white-space: normal; word-break: break-all; font-size: 12px; line-height: 1.5; }
.tb-pick-copy { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tb-line); border-radius: 8px; background: #fff; color: var(--tb-ink-2); font-size: 12px; cursor: pointer; }
.tb-pick-copy:hover { color: var(--tb-link); border-color: #b9c6e8; }
.tb-pick-none { grid-column: 1 / -1; margin: 0; padding: 24px 0; text-align: center; font-size: 12px; color: var(--tb-ink-2); }
.tb-pick-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px 20px; border-top: 1px solid var(--tb-line-2); font-size: 12px; }
.tb-pick-bar-l { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.tb-pick-per { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.tb-pick-per select { height: 32px; padding: 0 8px; border: 1px solid var(--tb-line); border-radius: 999px; background: #fff; font-size: 12px; color: var(--tb-ink); }
.tb-pick-all { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 400; cursor: pointer; }
.tb-pick-all input { width: 16px; height: 16px; margin: 0; accent-color: var(--tb-accent); }
.tb-pick-pages { display: flex; flex-wrap: wrap; gap: 4px; }
.tb-pick-pages button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--tb-line); border-radius: 999px; background: #fff; font-size: 12px; color: var(--tb-ink); cursor: pointer; }
.tb-pick-pages button.is-active { background: var(--tb-accent); border-color: var(--tb-accent); color: #fff; }
.tb-pick-pages button:disabled { opacity: .4; cursor: not-allowed; }
.tb-pick-foot { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; padding: 12px 20px; background: #f5f7fb; border-top: 1px solid var(--tb-line); }
.tb-pick-sum { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 12px; }
.tb-pick-sum b { font-size: 16px; }
.tb-pick-sum b { color: #b45309; }
.tb-pick-coupon { flex: 1 1 100%; order: 3; }
.tb-pick-coupon .tb-buy-box { min-height: 36px; font-size: 12px; }
.tb-pick-btns { display: flex; gap: 8px; }
.tb-pick-btns .tb-btn { min-height: 40px; padding: 0 16px; border-radius: 8px; }
.tb-pick-empty { padding: 48px 24px; text-align: center; color: var(--tb-ink-2); }
.tb-pick-empty i { font-size: 32px; margin-bottom: 12px; }
.tb-pick-empty p { margin: 0; font-size: 16px; font-weight: 600; }
/* 购买成功后原脚本换成成功页（带自己的关闭按钮），这时也要能关 */
.tb-pick .modal-close-mobile { display: flex !important; position: absolute; top: 16px; right: 16px; }
@media (max-width: 767px) {
    body.tb .pv-container.tb-pick { max-height: none; }
    .tb-pick-head { padding: 24px 56px 12px 16px; }
    .tb-pick-search { padding: 12px 16px 8px; }
    .tb-pick-search .tb-btn { padding: 0 12px; }
    .tb-pick-list { grid-template-columns: minmax(0, 1fr); padding: 4px 16px 12px; max-height: 40vh; }
    .tb-pick-bar { padding: 8px 16px; }
    /* 手机输入框保持 16px：小于 16px 时 iPhone 点进去会自动放大页面 */
    .tb-pick-input input, .tb-pick-coupon .tb-buy-box { font-size: 16px; }
    .tb-pick-foot { padding: 12px 16px; position: sticky; bottom: 0; }
    .tb-pick-btns { flex: 1 1 100%; }
    .tb-pick-btns .tb-btn { flex: 1; }
}
.tb-pick-btns .tb-btn:disabled { opacity: .5; }

/* 自选弹窗电脑端：列表限高，弹窗不撑满整屏 */
@media (min-width: 768px) {
    .tb-pick-list { max-height: min(400px, 48vh); }
}

/* 通用卡片（充值中心、查看订单、订单详情）：和首页商品分类同样式——白底、浅边框、圆角 16、浅灰标题栏 */
.tb-panel { background: #fff; border: 1px solid var(--tb-line); border-radius: 16px; margin-bottom: 16px; overflow: hidden; color: var(--tb-ink); }
.tb-panel-head { display: flex; align-items: center; gap: 8px; min-height: 40px; box-sizing: border-box; padding: 8px 20px; background: var(--tb-soft); border-bottom: 1px solid var(--tb-line); }
.tb-panel-head > svg { flex: none; color: var(--tb-accent); }
.tb-panel-head h1, .tb-panel-head h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--tb-ink); }
.tb-panel-sub { margin-left: auto; font-size: 12px; color: var(--tb-ink-2); white-space: nowrap; }
.tb-panel-body { padding: 20px; font-size: 16px; }
.tb-panel-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 20px; border-top: 1px solid var(--tb-line-2); font-size: 12px; }
.tb-panel-foot .pagination { margin: 0 0 0 auto; }
.tb-panel-total b { font-size: 16px; }
.tb-panel .tb-empty { border: 0; border-radius: 0; margin: 0; }
.tb-field-label { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--tb-ink-2); }
* + .tb-field-label { margin-top: 20px; }

/* 充值中心 */
.tb-rc-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.tb-rc-grid > .tb-panel { margin-bottom: 16px; }
.tb-rc-input { font-size: 20px; font-weight: 600; }
.tb-rc-amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 16px; }
.tb-rc-amount {
    position: relative; min-height: 48px; padding: 8px; border: 1px solid var(--tb-line); border-radius: 12px; background: #fff;
    font-size: 16px; font-weight: 700; color: var(--tb-ink); cursor: pointer;
}
.tb-rc-bonus {
    position: absolute; top: 0; right: 8px; transform: translateY(-50%); padding: 0 4px; border-radius: 999px;
    background: var(--tb-price, #d93a2b); color: #fff; font-size: 12px; line-height: 16px; font-weight: 600;
}
.tb-rc-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
button.tb-pay-opt { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.tb-rc-amount:hover { border-color: var(--tb-accent); }
.tb-rc-amount.active, .recharge-channel.tb-pay-opt.active { border-color: var(--tb-accent); background: #f5f7ff; box-shadow: 0 0 0 1px var(--tb-accent); }
#btnRecharge { margin-top: 20px; }
.tb-rc-note { font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.tb-rc-note p { margin: 0 0 8px; }
.tb-rc-note h1, .tb-rc-note h2, .tb-rc-note h3, .tb-rc-note h4 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }

/* 筛选行：输入框自动排列，按钮不折行（翻译后文字变长也只是按钮变宽，不挤成两行） */
.tb-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--tb-line-2); }
.tb-filter .tb-buy-box { flex: 1 1 160px; width: auto; min-height: 40px; padding: 0 12px; font-size: 16px; }
.tb-filter-btns { display: flex; gap: 8px; flex: none; }
.tb-filter-btns .tb-btn { min-height: 40px; font-size: 16px; white-space: nowrap; }

/* 表格：电脑一屏显示全部列（文字可折行，不用左右滑动）；手机每行变成一张卡片 */
.tb-table { width: 100%; margin: 0; border: 0 !important; border-collapse: collapse; font-size: 12px; }
.tb-table th, .tb-table td { border-left: 0 !important; border-right: 0 !important; border-top: 0 !important; }
.tb-table th { padding: 8px 12px; background: var(--tb-soft); border-bottom: 1px solid var(--tb-line); font-weight: 600; color: var(--tb-ink-2); text-align: left; white-space: nowrap; }
.tb-table td { padding: 12px; border-bottom: 1px solid var(--tb-line-2); vertical-align: middle; color: var(--tb-ink); overflow-wrap: anywhere; }
.tb-table th:first-child, .tb-table td:first-child { padding-left: 20px; }
.tb-table th:last-child, .tb-table td:last-child { padding-right: 20px; }
.tb-table tbody tr:last-child td { border-bottom: 0; }
.tb-table tbody tr:hover td { background: #fafbfd; }
.tb-table .is-num { text-align: right; white-space: nowrap; }
.tb-table .is-act { text-align: right; white-space: nowrap; }
.tb-table .is-act .tb-btn + .tb-btn { margin-left: 4px; }
.tb-table .is-check { width: 20px; }
.tb-table .is-title b { display: block; font-size: 16px; line-height: 24px; font-weight: 600; }
.tb-table td b { font-weight: 600; }
.tb-table .badge { font-size: 12px; font-weight: 600; }
.tb-orders tr.is-trash td { background: var(--tb-bad-bg); }
.tb-table .is-time { white-space: nowrap; }

/* 订单详情 */
.tb-od-name { margin: 0 0 12px; font-size: 20px; line-height: 28px; font-weight: 700; }
.tb-od-name a { color: var(--tb-ink); }
.tb-od-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 0 16px; }
.tb-od-meta div { display: flex; gap: 8px; align-items: baseline; }
.tb-od-meta dt { font-size: 12px; font-weight: 400; color: var(--tb-ink-2); }
.tb-od-meta dd { margin: 0; font-size: 16px; font-weight: 600; }
.tb-od-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-od-actions .tb-btn { min-height: 40px; font-size: 16px; }
.tb-od-note { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--tb-soft); font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.tb-od-list { list-style: none; margin: 0; padding: 0; }
.tb-od-list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--tb-line-2); }
.tb-od-list li:last-child { border-bottom: 0; }
.tb-od-uid { flex: none; font-size: 12px; font-weight: 600; }
.tb-od-acc {
    flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--tb-line); border-radius: 8px; background: var(--tb-soft);
    font-size: 12px; line-height: 1.5; color: var(--tb-ink); overflow-wrap: anywhere;
    /* 固定高度约 3 行（项目 E，原来随内容自动变高，长账号会把框撑得很大），内容多时框内滚动 */
    height: 72px; overflow-y: auto; resize: none;
}
.tb-od-list .tb-btn { flex: none; min-height: 40px; }

@media (max-width: 991px) {
    .tb-rc-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 767px) {
    .tb-panel-head { padding: 8px 16px; }
    .tb-panel-body { padding: 16px; }
    .tb-panel-foot { padding: 12px 16px; }
    .tb-panel-foot .pagination { margin: 0; }
    .tb-filter { padding: 12px 16px; }
    .tb-filter .tb-buy-box { flex-basis: calc(50% - 4px); }
    .tb-filter-btns { flex: 1 1 100%; }
    .tb-filter-btns .tb-btn { flex: 1; }
    .tb-rc-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* 手机充值通道两个一行；卡片放不下名称时缩小内边距和间距 */
    .tb-rc-channels .tb-pay-opt { padding: 8px; gap: 8px; }
    .tb-rc-channels .tb-pay-icon, .tb-rc-channels .tb-payi-wrap, .tb-rc-channels .tb-payi { width: 24px; height: 24px; }
    .tb-rc-channels .tb-pay-text b { white-space: nowrap; }
    /* 旧表格（活动日志、余额日志等，单元格带 data-label）：手机上每行一张卡片，左标签右内容，不用左右滑动 */
    body.tb .table:has(td[data-label]) thead { display: none; }
    body.tb .table:has(td[data-label]), body.tb .table:has(td[data-label]) tbody { display: block; width: 100%; }
    body.tb .table:has(td[data-label]) tr { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--tb-line-2); }
    body.tb .table:has(td[data-label]) tr td { display: flex; justify-content: space-between; gap: 12px; padding: 0 !important; border: 0; text-align: right; white-space: normal !important; }
    body.tb .table:has(td[data-label]) td::before { content: attr(data-label); flex: none; color: var(--tb-ink-2); text-align: left; }
    body.tb .table:has(td[data-label]) td.is-reason { display: block; text-align: left; }
    body.tb .table:has(td[data-label]) td.is-reason::before { display: block; margin-bottom: 4px; }
    body.tb .account-card > .table-scroll { margin: 12px -16px 0; overflow-x: visible; }
    body.tb .account-card > .table-scroll + .bottom-paginate, body.tb .account-card > .table-scroll + .empty-state { margin: 0 -16px; padding: 12px 16px 0; }
    body.tb .account-card { padding: 16px; }
    body.tb .account-card > .account-title:first-child { margin: -16px -16px 16px; padding: 8px 16px; }
    body.tb .home-heading:has(+ .account-card) h3, body.tb .home-heading:has(+ .account-card) h3:not(.no-bg) { padding: 8px 16px !important; }
    .tb-table thead { display: none; }
    .tb-table, .tb-table tbody { display: block; }
    .tb-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--tb-line-2); }
    .tb-table tbody tr:last-child { border-bottom: 0; }
    .tb-table td, .tb-table th:first-child, .tb-table td:first-child, .tb-table td:last-child { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 0; border: 0; text-align: right; background: none !important; }
    .tb-table td::before { content: attr(data-label); flex: none; color: var(--tb-ink-2); text-align: left; }
    .tb-table td:not([data-label])::before { content: none; }
    .tb-table td.is-title { display: block; text-align: left; }
    .tb-table td.is-title::before { content: none; }
    .tb-table td.is-title .tb-mono { font-size: 16px; font-weight: 600; }
    .tb-table td.is-act:has(> .tb-dash:only-child) { display: none; }
    .tb-table td.is-check { width: auto; order: -1; }
    .tb-table td.is-check:not(:has(input)) { display: none; }
    .tb-table td.is-check + .is-title { width: calc(100% - 32px); }
    .tb-table td.is-act { justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
    .tb-table td.is-act::before { margin-right: auto; }
    .tb-table .is-act .tb-btn + .tb-btn { margin-left: 0; }
    .tb-orders .is-act .tb-btn { flex: 1; min-height: 40px; }
    .tb-orders .is-act .tb-btn-danger { flex: none; }
    .tb-orders tr.is-trash { background: var(--tb-bad-bg); }
    .tb-od-list li { flex-wrap: wrap; padding: 12px 16px; }
    .tb-od-list .tb-od-acc { flex-basis: 100%; }
    .tb-od-list .tb-btn { flex: 1; }
    .tb-od-actions .tb-btn { flex: 1 1 auto; }
}

/* USDT 静态支付弹窗（views/common/usdt-pay-modal.php，商品在线支付和充值中心共用）：只换外观，脚本和支付流程不变。
   和其他卡片一样的浅灰标题栏；手机从底部滑出 */
body.tb #usdtPayModal { background: rgba(15, 23, 42, .55); }
body.tb #usdtPayModal .upm-box { max-width: 440px; padding: 0 0 16px; border-radius: 16px; color: var(--tb-ink); font-size: 12px; }
body.tb #usdtPayModal h5 { display: flex; align-items: center; min-height: 40px; box-sizing: border-box; margin: 0 0 8px; padding: 8px 56px 8px 20px; background: var(--tb-soft); border-bottom: 1px solid var(--tb-line); font-size: 16px; line-height: 24px; font-weight: 700; color: var(--tb-ink); }
body.tb #usdtPayModal .upm-close { top: 4px; right: 4px; width: 32px; height: 32px; padding: 0; border-radius: 8px; background: #1f2433; color: #fff; font-size: 20px; line-height: 32px; text-align: center; }
body.tb #usdtPayModal .upm-row { align-items: baseline; gap: 12px; margin: 0 20px; padding: 8px 0; border-bottom: 1px solid var(--tb-line-2); font-size: 12px; line-height: 16px; }
body.tb #usdtPayModal .upm-row span:first-child { color: var(--tb-ink-2); }
body.tb #usdtPayModal .upm-row b { font-weight: 600; color: var(--tb-ink); overflow-wrap: anywhere; }
body.tb #usdtPayModal .upm-row b.upm-amount { color: var(--tb-price); font-size: 16px; line-height: 16px; }
body.tb #usdtPayModal .upm-copy { margin-left: 8px; color: var(--tb-link); }
body.tb #usdtPayModal .upm-qr { margin: 12px 20px; }
body.tb #usdtPayModal .upm-qr img { width: 160px; height: 160px; padding: 8px; box-sizing: border-box; border: 1px solid var(--tb-line); border-radius: 12px; background: #fff; }
body.tb #usdtPayModal .upm-warn { margin: 12px 20px 0; padding: 8px 12px; border: 1px solid #f2dd9b; border-radius: 8px; background: #fff7e0; color: #6b4e07; font-size: 12px; line-height: 16px; }
body.tb #usdtPayModal .upm-state { margin: 12px 20px 0; font-size: 12px; line-height: 16px; }
@media (max-width: 767px) {
    body.tb #usdtPayModal { align-items: flex-end; padding: 0; }
    body.tb #usdtPayModal .upm-box { max-width: 560px; max-height: 88vh; border-radius: 16px 16px 0 0; }
}
/* 商品在线支付（新模板）：付款信息直接放在购买弹窗里（usdt-pay-modal.php 的 inline 模式），不再叠第二个弹窗。
   排版沿用购买弹窗：标题 + 二维码在左、金额和地址在右（手机上下排），下方是订单信息、提醒和状态 */
body.tb #usdtPayModal.upm-inline { position: static; inset: auto; z-index: auto; display: block; padding: 0; background: none; }
body.tb #usdtPayModal.upm-inline .upm-box { position: relative; max-width: none; max-height: none; padding: 20px; border-radius: 0; overflow: visible; background: transparent; font-size: 16px; }
body.tb #usdtPayModal.upm-inline .upm-close { top: 16px; right: 16px; width: 32px; height: 32px; font-size: 16px; line-height: 1; }
body.tb #usdtPayModal.upm-inline .upm-pay { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
body.tb #usdtPayModal.upm-inline .upm-qr { margin: 0; }
body.tb #usdtPayModal.upm-inline .upm-qr img { display: block; width: 160px; height: 160px; }
body.tb #usdtPayModal.upm-inline .upm-main .tb-buy-label:first-child { margin-top: 0; }
body.tb #usdtPayModal.upm-inline .upm-field { justify-content: space-between; gap: 8px; min-height: 44px; padding: 4px 4px 4px 12px; background: var(--tb-soft); }
body.tb #usdtPayModal.upm-inline .upm-amount { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--tb-price); }
body.tb #usdtPayModal.upm-inline .upm-addr { min-width: 0; font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
body.tb #usdtPayModal.upm-inline .upm-copy-btn {
    flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px;
    border: 1px solid var(--tb-line); border-radius: 8px; background: #fff; font-size: 12px; font-weight: 600; color: var(--tb-link); cursor: pointer;
}
body.tb #usdtPayModal.upm-inline .upm-copy-btn:hover { border-color: var(--tb-link); }
body.tb #usdtPayModal.upm-inline .upm-left { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: var(--tb-ink-2); }
body.tb #usdtPayModal.upm-inline .upm-left b { font-size: 16px; color: var(--tb-ink); font-variant-numeric: tabular-nums; }
body.tb #usdtPayModal.upm-inline .upm-rows { margin-top: 16px; padding: 4px 16px; border: 1px solid var(--tb-line); border-radius: 12px; }
body.tb #usdtPayModal.upm-inline .upm-row { margin: 0; }
body.tb #usdtPayModal.upm-inline .upm-row:last-child { border-bottom: 0; }
body.tb #usdtPayModal.upm-inline .upm-warn { margin: 12px 0 0; }
body.tb #usdtPayModal.upm-inline .upm-state { margin: 12px 0 0; text-align: center; font-size: 16px; line-height: 24px; }
@media (max-width: 575px) {
    body.tb #usdtPayModal.upm-inline .upm-box { padding: 20px 16px; }
    body.tb #usdtPayModal.upm-inline .upm-pay { grid-template-columns: minmax(0, 1fr); }
    body.tb #usdtPayModal.upm-inline .upm-qr { text-align: center; }
    body.tb #usdtPayModal.upm-inline .upm-qr img { display: inline-block; }
    body.tb #usdtPayModal.upm-inline .upm-copy-btn { min-height: 44px; }
}

/* 联系方式页（views/client/b/contact.php）：名称、图标、内容同步后台"联系方式" */
.tb-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 20px; }
.tb-contact-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 16px; border: 1px solid var(--tb-line); border-radius: 12px; background: #fff; }
.tb-contact-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: #eef3ff; color: var(--tb-link); font-size: 16px; }
.tb-contact-text { min-width: 0; font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.tb-contact-text p { margin: 0; font-size: 12px; line-height: 16px; color: var(--tb-ink-2); }
.tb-contact-text b { font-weight: 600; color: var(--tb-ink); }
.tb-contact-text a { font-weight: 600; color: var(--tb-link); }
.tb-contact-body { border-top: 1px solid var(--tb-line-2); line-height: 1.75; overflow-wrap: anywhere; }
.tb-contact-body img { max-width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 767px) {
    .tb-contact-grid { padding: 16px; }
}
@media (max-width: 359px) {
    .tb-rc-channels .tb-pay-text b { font-size: 12px; }
}

/* 卡密弹窗（buy-common.php 的 tbShowAccounts）：和购买弹窗同尺寸（tb-sheet），提示语来自后台"查看订单通知"（notice_orders） */
.tb-acc { position: relative; padding: 20px; color: var(--tb-ink); }
.tb-acc-head { display: flex; align-items: center; gap: 12px; padding-right: 40px; margin-bottom: 12px; }
.tb-acc-check { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tb-ok-bg); color: var(--tb-ok); font-size: 16px; }
.tb-acc-head h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--tb-ink); }
.tb-acc-head p { margin: 0; font-size: 12px; line-height: 16px; color: var(--tb-ink-2); overflow-wrap: anywhere; }
.tb-acc-notice, .tb-acc-note { margin-bottom: 12px; padding: 8px 12px; border: 1px solid #f2dd9b; border-radius: 8px; background: #fff7e0; color: #6b4e07; font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
.tb-acc-notice p { margin: 0; }
.tb-acc-notice * { font-size: inherit !important; }
.tb-acc-note[hidden] { display: none; }
.tb-acc-box { height: 200px; margin: 0 0 12px; padding: 12px; overflow: auto; border: 1px solid var(--tb-line); border-radius: 12px; background: var(--tb-soft); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 20px; color: var(--tb-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-acc-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.tb-acc-btns .tb-btn { min-height: 40px; }
@media (max-width: 767px) {
    .tb-acc { padding: 24px 16px 16px; }
    .tb-acc-btns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tb-acc-copy { grid-column: 1 / -1; }
}

/* 确认和提示弹窗（SweetAlert：删除、下载、退出、结果提示等）：圆角卡片，按钮和全站一致 */
body.tb .swal2-popup { width: 400px; max-width: calc(100% - 32px); padding: 24px; border-radius: 16px; font-size: 16px; }
body.tb .swal2-header { padding: 0; }
body.tb .swal2-icon { margin: -4px auto 0; transform: scale(.72); }
body.tb .swal2-title { margin: 0 0 8px; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--tb-ink); }
body.tb .swal2-content { padding: 0; font-size: 16px; line-height: 24px; color: var(--tb-ink-2); }
body.tb .swal2-actions { margin: 20px 0 0; gap: 8px; flex-wrap: nowrap; }
body.tb .swal2-styled { flex: 1; min-height: 40px; margin: 0; padding: 0 16px; border-radius: 8px !important; font-size: 16px; font-weight: 600; box-shadow: none !important; }
body.tb .swal2-styled.swal2-confirm { background: var(--tb-accent) !important; color: #fff; border: 0; }
body.tb .swal2-styled.swal2-cancel, body.tb .swal2-styled.swal2-deny { background: #fff !important; color: var(--tb-ink-2) !important; border: 1px solid var(--tb-line); }

/* 编辑资料弹窗 */
body.tb #profile-edit .modal-dialog { max-width: 480px; }
body.tb #profile-edit .modal-content { padding: 0; }
body.tb #profile-edit .modal-close { top: 16px; right: 16px; width: 32px; height: 32px; padding: 0; border-radius: 8px; background: #1f2433; color: #fff; }
body.tb #profile-edit .modal-close i { width: auto; height: auto; line-height: 32px; background: none; color: #fff; font-size: 16px; }
/* 旧样式 .modal-form 固定宽 400，比弹窗窄，右边会空出一条 */
body.tb #profile-edit .modal-form { width: 100%; box-sizing: border-box; padding: 20px; }
body.tb #profile-edit .form-title { margin-bottom: 16px; padding-right: 40px; text-align: left; }
body.tb #profile-edit .form-title h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--tb-ink); }
body.tb #profile-edit .form-btn { width: 100%; }

/* 公告弹窗 */
body.tb #modal_notification .modal-header { min-height: 40px; padding: 8px 20px; background: var(--tb-soft); }
body.tb #modal_notification .modal-title { font-size: 16px; line-height: 24px; color: var(--tb-ink); }
body.tb #modal_notification .modal-body { padding: 20px; font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
body.tb #modal_notification .modal-footer { padding: 12px 20px; }

/* 登录、注册、忘记密码等页面：上下留白和卡片间距，内容不贴着导航和页脚 */
body.tb .inner-section:has(.user-form-card) { padding-top: 48px !important; padding-bottom: 48px !important; }
body.tb .user-form-remind:last-child, body.tb .user-form-card:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
    body.tb .inner-section:has(.user-form-card) { padding-top: 24px !important; padding-bottom: 24px !important; }
}

/* 提示弹窗图标和弹出都不做动画（SweetAlert 自带的放大缩小是 CSS 动画），直接显示 */
body.tb .swal2-popup.swal2-show, body.tb .swal2-popup.swal2-hide, body.tb .swal2-icon, body.tb .swal2-icon * { animation: none !important; }

/* 手机点击区域：按钮、链接至少 44 高（小图标按钮外观不变，用透明区域扩大可点范围） */
@media (max-width: 767px) {
    .tb-notice { padding: 12px 16px; font-size: 12px; line-height: 20px; }
    .tb-btn, .tb-filter-btns .tb-btn, .tb-pick-search .tb-btn, .tb-od-actions .tb-btn, .tb-acc-btns .tb-btn, .tb-pick-btns .tb-btn, .tb-od-list .tb-btn { min-height: 44px; }
    .tb-chip { min-height: 44px; }
    .tb-user-guest { min-height: 44px; }
    .tb-cart-btn { width: 44px; height: 44px; }
    .tb-select select { min-height: 40px; }
    body.tb .account-title button, body.tb .account-title .btn { min-height: 44px; }
    .tb-buy-pick { min-height: 44px; }
    .tb-prow-name a { display: inline-block; padding: 8px 0; margin: -8px 0; }
    body.tb .blog-btn { display: inline-flex; align-items: center; min-height: 44px; }
    .tb-footer-links a, .tb-footer-tags a { display: inline-flex; align-items: center; min-height: 40px; }
    .tb-footer-tags { gap: 0 16px; }
    .tb-footer-links { gap: 0; }
    .tb-crumbs a { display: inline-flex; align-items: center; min-height: 32px; }
    .tb-filter .tb-buy-box { min-height: 44px; }
    .tb-buy-qty .action-minus1, .tb-buy-qty .action-plus1, .tb-cart-step { width: 44px; height: 44px; }
    .tb-buy-qty .action-input, .tb-cart-qty { height: 44px; }
    .tb-cart-qtybox { width: 152px; min-height: 52px; }
    .tb-cart-del { width: 44px; height: 44px; }
    .tb-buy-cart-link, .tb-buy-links button, .tb-pick-link { min-height: 44px; }
    .tb-pick-input { height: 44px; }
    .tb-pick-item { min-height: 52px; }
    .tb-pick-copy { width: 44px; height: 44px; }
    .tb-pick-per select { height: 44px; }
    .tb-pick-pages button { min-width: 44px; height: 44px; }
    body.tb .page-link { width: 44px; height: 44px; line-height: 44px; }
    body.tb .swal2-styled { min-height: 44px; }
    body.tb .btn-sm { min-height: 44px; }
    .tb-table .is-check input, .tb-pick-item .uid-checkbox, .tb-pick-all input { width: 24px; height: 24px; }
    .tb-sheet-close::after, body.tb #usdtPayModal .upm-close::after { content: ""; position: absolute; inset: -6px; }
    body.tb #usdtPayModal .upm-copy { padding: 12px; margin: -12px -12px -12px -4px; }
    body.tb .nav-close i, body.tb .category-close i { width: 44px; height: 44px; line-height: 44px; }
    body.tb .nav-close, body.tb .category-close { right: -22px; }
    .tk-btn, .tk-btn-sm, .tk-btn-ghost { min-height: 44px; }
}

/* 回到顶部：页面向下滚动超过 700 像素才出现（public/client/js/main.js），颜色用 Logo 的青绿色，和购买按钮区分开 */
body.tb .backtop { background: var(--primary1); color: #fff; }
body.tb .backtop:hover { background: var(--primary1); opacity: .9; color: #fff; }
