/* ========== 品牌星 全局样式（手机端优先） ========== */
:root {
    --bg: #14172b;
    --bg-soft: #1b1f38;
    --card: #20253f;
    --card-hover: #262b49;
    --border: #2e3454;
    --text: #e8eaf6;
    --text-dim: #9aa1c0;
    --primary: #6c7bff;
    --primary-dark: #5563e8;
    --green: #2ecc71;
    --green-dark: #27ae60;
    --red: #ff5c6c;
    --red-dark: #e04a59;
    --orange: #ffa940;
    --blue: #40a9ff;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(0, 0, 0, .28);
    --script-size: 24px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { -webkit-user-drag: none; }

/* ---------- 顶栏 ---------- */
.topbar {
    background: rgba(20, 23, 43, .94);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.topbar-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 14px;
    height: 54px; display: flex; align-items: center; gap: 14px;
}
.logo { font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
    color: var(--text-dim); padding: 7px 14px; border-radius: 8px;
    font-size: 14px; white-space: nowrap;
}
.nav a.active { color: #fff; background: var(--primary); }
.topbar-clock { color: var(--text-dim); font-variant-numeric: tabular-nums; font-size: 13px; }
@media (max-width: 640px) { .topbar-clock { display: none; } }

/* ---------- 容器 ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 16px 14px calc(40px + var(--safe-bottom)); }

/* ---------- 通用组件 ---------- */
.flash {
    padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px;
    font-size: 14px; border: 1px solid transparent;
}
.flash-ok    { background: rgba(46, 204, 113, .12); border-color: rgba(46, 204, 113, .4); color: #7ce8a8; }
.flash-error { background: rgba(255, 92, 108, .12); border-color: rgba(255, 92, 108, .4); color: #ff9aa4; }

.page-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.page-head h1 { font-size: 21px; }
.page-head .sub { color: var(--text-dim); font-size: 13px; margin-top: 3px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
    font-size: 14px; cursor: pointer; color: #fff; background: var(--primary);
    transition: background .15s, transform .1s;
    font-family: inherit; line-height: 1.4; white-space: nowrap;
    -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.96); }
.btn-green { background: var(--green); }
.btn-red   { background: var(--red); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }

.badge {
    display: inline-block; padding: 2px 9px; border-radius: 20px;
    font-size: 12px; line-height: 1.7; white-space: nowrap;
}
.badge-green  { background: rgba(46, 204, 113, .15); color: #6fe3a1; }
.badge-gray   { background: rgba(154, 161, 192, .15); color: var(--text-dim); }
.badge-blue   { background: rgba(64, 169, 255, .15); color: #7cc6ff; }
.badge-orange { background: rgba(255, 169, 64, .15); color: #ffc178; }
.badge-red    { background: rgba(255, 92, 108, .15); color: #ff8f9b; }
.badge-purple { background: rgba(108, 123, 255, .18); color: #a3adff; }

.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
}

.empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty .icon { font-size: 44px; margin-bottom: 10px; }

/* ---------- 统计条 ---------- */
.stat-row { display: flex; gap: 10px; margin-bottom: 16px; }
.stat-card {
    flex: 1; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 13px 14px;
}
.stat-card .num { font-size: 24px; font-weight: 700; }
.stat-card .label { color: var(--text-dim); font-size: 12px; }

/* ---------- 筛选栏（美化：搜索框带放大镜、圆角胶囊、focus 发光） ---------- */
.filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    margin-bottom: 16px; padding: 10px; background: var(--card);
    border: 1px solid var(--border); border-radius: 16px;
}
.filter-bar input[type="search"], .filter-bar select {
    background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
    padding: 10px 14px; border-radius: 999px; font-size: 14px; font-family: inherit;
    flex: 1; min-width: 120px;
    transition: border-color .18s, box-shadow .18s, background .18s;
    appearance: none; -webkit-appearance: none;
}
.filter-bar input[type="search"] {
    padding-left: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b93b0' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 13px center;
}
.filter-bar input[type="search"]::-webkit-search-cancel-button { display: none; }
.filter-bar input::placeholder { color: var(--text-dim); opacity: .75; }
.filter-bar select {
    cursor: pointer; padding-right: 34px;
    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='%238b93b0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
}
.filter-bar input:hover, .filter-bar select:hover { border-color: rgba(108, 123, 255, .45); }
.filter-bar input:focus, .filter-bar select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 123, 255, .18);
    background-color: var(--card);
}

/* ---------- 商品卡片网格 ---------- */
.product-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 640px)  { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; display: flex;
    flex-direction: column; color: var(--text);
    transition: transform .15s, border-color .15s;
}
a.product-card:hover { text-decoration: none; border-color: var(--primary); }
.product-card .thumb {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
    background: var(--bg-soft);
}
.product-card .body { padding: 11px 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card .name {
    font-size: 14px; font-weight: 600; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.product-card .price { color: var(--orange); font-weight: 700; font-size: 16px; }
.product-card .times { color: var(--text-dim); font-size: 11px; }
.product-card .actions {
    display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px;
    border-top: 1px solid var(--border);
}
.product-card .actions .btn { flex: 1 1 calc(50% - 6px); white-space: nowrap; justify-content: center; }
.product-card .actions .btn:only-child { flex-basis: 100%; }
.product-card .actions form { display: contents; }

/* 合集卡片：序号角标 */
.gallery-card { position: relative; }
.gallery-order {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(108, 123, 255, .92); color: #fff;
    font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.gallery-order.done { background: rgba(46, 204, 113, .92); }

/* ---------- 表单 ---------- */
.form-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; max-width: 860px;
}
@media (min-width: 768px) { .form-card { padding: 26px; } }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 14px; }
.form-row label .req { color: var(--red); margin-left: 3px; }
.form-row .hint { color: var(--text-dim); font-size: 12px; margin-top: 6px; }
.hint-inline { color: var(--text-dim); font-size: 12px; font-weight: 400; }
.form-row input[type="text"], .form-row input[type="number"], .form-row input[type="password"],
.form-row input[type="url"], .form-row input[type="datetime-local"], .form-row textarea, .form-row select,
.cat-row select, #newCatInput {
    width: 100%; background: var(--bg-soft); border: 1px solid var(--border);
    color: var(--text); padding: 11px 13px; border-radius: 10px;
    font-size: 15px; font-family: inherit; line-height: 1.6;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--text-dim); opacity: .7; }
.form-row input:hover, .form-row textarea:hover, .form-row select:hover { border-color: rgba(108, 123, 255, .45); }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus,
.cat-row select:focus, #newCatInput:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 123, 255, .18);
    background: var(--card);
}
.form-row textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 20px; }
@media (min-width: 768px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.cat-row { display: flex; gap: 8px; align-items: center; }
.cat-row select { flex: 1; }
.cat-row .btn { flex-shrink: 0; }

.upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 22px 16px; text-align: center; color: var(--text-dim);
    cursor: pointer; transition: border-color .15s, background .15s;
}
.upload-zone.dragover { border-color: var(--primary); background: rgba(108, 123, 255, .06); }
.upload-zone input[type="file"] { display: none; }
.upload-zone .preview {
    max-width: 240px; max-height: 180px; border-radius: 10px; margin: 0 auto 10px;
    display: block; object-fit: cover;
}
.upload-zone .big { font-size: 14px; color: var(--text); }

/* 机制信息行 */
.mech-row { display: flex; gap: 8px; margin-bottom: 8px; }
.mech-row input {
    flex: 1; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
    padding: 10px 13px; border-radius: 10px; font-size: 15px; font-family: inherit;
}
.mech-row input:focus { outline: none; border-color: var(--primary); }

/* 机制图片列表 */
.mech-img-list { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.mech-img { position: relative; width: 92px; height: 92px; }
.mech-img img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
    border: 1px solid var(--border); display: block;
}
.mech-img-del {
    position: absolute; top: -7px; right: -7px; width: 24px; height: 24px;
    border-radius: 50%; border: none; background: var(--red); color: #fff;
    font-size: 12px; cursor: pointer; line-height: 1;
}

.tpl-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tpl-btns button {
    background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim);
    padding: 6px 13px; border-radius: 20px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.tpl-btns button:active { border-color: var(--primary); color: var(--text); }

.char-count { color: var(--text-dim); font-size: 12px; text-align: right; margin-top: 4px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.form-actions .btn-lg { flex: 1; min-width: 140px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 7px 14px; border-radius: 9px; border: 1px solid var(--border);
    color: var(--text-dim); background: var(--card); font-size: 14px;
}
.pagination .cur { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 计划卡片 ---------- */
.plan-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px)  { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
.plan-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 11px;
}
.plan-card .title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-card .title { font-size: 17px; font-weight: 700; }
.plan-card .info { color: var(--text-dim); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.plan-card .progress-track { height: 8px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.plan-card .progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #9b6cff); border-radius: 6px; }
.plan-card .progress-text { font-size: 12px; color: var(--text-dim); margin-top: 5px; }
.plan-card .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-card .actions form { display: inline; }

/* ---------- 计划详情 / 排序 ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1000px) { .detail-layout { grid-template-columns: 1fr 340px; } }

.panel {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
}
.panel h2 { font-size: 16px; margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.item-list { display: flex; flex-direction: column; gap: 9px; }
.item-row {
    display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: 12px; padding: 10px 12px;
    transition: border-color .15s, opacity .15s;
}
@media (min-width: 768px) { .item-row { flex-wrap: nowrap; } }
.item-row.dragging { opacity: .4; border-color: var(--primary); }
.item-row .drag-handle { color: var(--text-dim); font-size: 17px; cursor: grab; user-select: none; }
.item-row .order-no {
    width: 27px; height: 27px; border-radius: 50%; background: var(--primary);
    color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.item-row .mini-thumb { width: 50px; height: 38px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.item-row .info { flex: 1; min-width: 120px; }
.item-row .info .n { font-weight: 600; font-size: 14px; }
.item-row .info .p { color: var(--orange); font-size: 13px; }
.move-btns { display: flex; gap: 4px; }
.item-row .minutes-input {
    width: 62px; background: var(--card); border: 1px solid var(--border); color: var(--text);
    padding: 6px 8px; border-radius: 8px; font-size: 13px; text-align: center; font-family: inherit;
}
.item-row .unit { color: var(--text-dim); font-size: 12px; }

.picker-search {
    width: 100%; margin-bottom: 12px; background: var(--bg-soft);
    border: 1px solid var(--border); color: var(--text);
    padding: 10px 13px; border-radius: 10px; font-size: 14px; font-family: inherit;
}
.picker-search:focus { outline: none; border-color: var(--primary); }
.picker-list { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; }
.picker-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft);
}
.picker-item img { width: 46px; height: 36px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.picker-item .pi-info { flex: 1; min-width: 0; }
.picker-item .pi-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-item .pi-price { color: var(--orange); font-size: 12px; }

.toast {
    position: fixed; bottom: calc(30px + var(--safe-bottom)); left: 50%; transform: translateX(-50%);
    background: rgba(30, 34, 60, .96); border: 1px solid var(--border);
    color: var(--text); padding: 10px 22px; border-radius: 24px;
    font-size: 14px; z-index: 300; box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.toast.show { opacity: 1; }

/* ---------- 商品详情页 ---------- */
.view-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.view-hero { overflow: hidden; }
.view-hero img { width: 100%; display: block; max-height: 460px; object-fit: cover; }
.view-card { padding: 18px; }
.view-name { font-size: 21px; line-height: 1.4; }
.view-price { color: var(--orange); font-size: 28px; font-weight: 800; margin-top: 6px; }
.view-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.view-section { margin-top: 20px; }
.view-section h3 { font-size: 15px; color: var(--text-dim); margin-bottom: 10px; }
.view-script { font-size: 17px; line-height: 1.95; white-space: pre-wrap; word-break: break-word; }
.view-remark { color: var(--text-dim); font-size: 14px; white-space: pre-wrap; }
.view-pagenav { display: flex; justify-content: space-between; gap: 10px; }
.view-pagenav .btn { max-width: 48%; overflow: hidden; text-overflow: ellipsis; }

/* 机制标签 */
.mech-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.mech-tag {
    background: rgba(108, 123, 255, .14); border: 1px solid rgba(108, 123, 255, .4);
    color: #b9c1ff; padding: 6px 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
}

/* 机制图片横向滑动画廊 */
.mech-gallery {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.mech-gallery img {
    height: 150px; border-radius: 12px; border: 1px solid var(--border);
    scroll-snap-align: start; flex-shrink: 0; cursor: zoom-in;
}

/* 手卡图 */
.handcard-img {
    width: 100%; border-radius: 12px; border: 1px solid var(--border);
    display: block; cursor: zoom-in;
}

/* ---------- 直播模式 ---------- */
body.live-mode { background: #0d1020; }
/* 【页面总宽度设置处】题词页横向满屏：不限制最大宽度，随屏幕自动铺满 */
.live-wrap {
    max-width: none; margin: 0 auto;
    padding: 12px 12px calc(120px + var(--safe-bottom));
}
.live-topbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 11px 14px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 12px;
    position: sticky; top: 8px; z-index: 60;
}
.live-topbar .lt-title { font-size: 16px; font-weight: 700; flex: 1; min-width: 120px; }
.live-topbar .lt-progress { color: var(--text-dim); font-size: 13px; white-space: nowrap; }
.live-topbar .lt-progress b { color: var(--primary); font-size: 17px; }
.live-clock { font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 13px; }
.lt-tools { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; width: 100%; }
.lt-tools::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .lt-tools { width: auto; } }
.lt-tools .btn, .lt-tools form { flex-shrink: 0; }

.live-main { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@media (min-width: 1100px) { .live-main { grid-template-columns: 300px 1fr 240px; } }

.live-product { padding: 16px; }
.lp-top { display: flex; gap: 14px; }
.lp-img { width: 110px; height: 110px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.lp-head { flex: 1; min-width: 0; }
.lp-head h2 { font-size: 18px; line-height: 1.4; }
.lp-price { color: var(--orange); font-size: 24px; font-weight: 800; margin: 4px 0; }
.lp-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.live-product h3 { font-size: 13px; color: var(--text-dim); margin: 16px 0 8px; }
.live-product .mech-gallery img { height: 120px; }
.live-product .lp-remark { color: var(--text-dim); font-size: 13px; }
@media (min-width: 1100px) {
    .lp-top { flex-direction: column; }
    .lp-img { width: 100%; height: auto; aspect-ratio: 4/3; }
}

.timer-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 92, 108, .12); color: #ff8f9b; border: 1px solid rgba(255, 92, 108, .35);
    padding: 4px 13px; border-radius: 20px; font-size: 13px; font-variant-numeric: tabular-nums;
}

.live-script { padding: 18px 18px 30px; min-height: 320px; }
@media (min-width: 768px) { .live-script { padding: 24px 28px 40px; } }
.live-script .ls-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; gap: 10px; flex-wrap: wrap;
}
.live-script .ls-title { font-size: 13px; color: var(--text-dim); }
.live-script .ls-title b { color: var(--text); }
@media (max-width: 640px) { .ls-keys { display: none; } }

.script-content { font-size: var(--script-size); line-height: 1.6; word-break: break-word; }
.s-line {
    padding: 2px 10px; border-radius: 8px; margin: 0 0 1px;
    transition: background .3s, color .3s, opacity .3s;
}
.s-line.read { opacity: .38; }
.s-line.active {
    background: rgba(108, 123, 255, .2); color: #fff; font-weight: 700;
    box-shadow: inset 3px 0 0 var(--primary);
}
.script-empty { color: var(--text-dim); font-size: 15px; padding: 30px 0; text-align: center; }

.live-side { padding: 14px; }
.live-side h3 { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.side-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.side-list::-webkit-scrollbar { display: none; }
.side-list form { display: block; flex-shrink: 0; }
.side-item {
    display: flex; align-items: center; gap: 8px; text-align: left;
    background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
    padding: 8px 12px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13px;
    max-width: 200px;
}
.side-item.current { border-color: var(--primary); background: rgba(108, 123, 255, .16); }
.side-item .no {
    width: 22px; height: 22px; border-radius: 50%; background: var(--border);
    color: var(--text); font-size: 11px; font-weight: 700; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.side-item.current .no { background: var(--primary); }
.side-item.done .no { background: var(--green); }
.side-item.skipped .no { background: var(--orange); }
.side-item .si-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item.done .si-name { color: var(--text-dim); text-decoration: line-through; }
@media (min-width: 1100px) {
    .live-side { max-height: 70vh; overflow-y: auto; position: sticky; top: 86px; }
    .side-list { flex-direction: column; overflow: visible; }
    .side-item { width: 100%; max-width: none; }
}

/* 底部操作栏：手机端固定 */
.live-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: flex; gap: 8px; justify-content: center; align-items: center;
    padding: 10px 12px calc(10px + var(--safe-bottom));
    background: rgba(13, 16, 32, .92); border-top: 1px solid var(--border);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.live-actions form { display: contents; }
.live-actions .btn { flex: 1; max-width: 240px; padding: 13px 10px; font-size: 15px; }

/* 语音跟随悬浮按钮 */
.fab-follow {
    position: fixed; right: 16px; bottom: calc(96px + var(--safe-bottom)); z-index: 80;
    background: var(--primary); color: #fff; border: none; border-radius: 24px;
    padding: 11px 20px; font-size: 14px; font-family: inherit; cursor: pointer;
    box-shadow: 0 6px 20px rgba(108, 123, 255, .5);
    opacity: 0; pointer-events: none; transform: translateY(8px);
    transition: opacity .25s, transform .25s;
}
.fab-follow.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

.live-banner {
    padding: 13px 16px; border-radius: var(--radius); margin-bottom: 12px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border: 1px solid; font-size: 14px;
}
.live-banner.warn { background: rgba(255, 169, 64, .1); border-color: rgba(255, 169, 64, .4); color: #ffc178; }
.live-banner.done { background: rgba(46, 204, 113, .1); border-color: rgba(46, 204, 113, .4); color: #7ce8a8; }

.live-empty { text-align: center; padding: 70px 20px; color: var(--text-dim); }
.live-empty .big { font-size: 40px; margin-bottom: 12px; }

/* ---------- 单商品题词页 ---------- */
.tp-wrap {
    max-width: 860px; margin: 0 auto;
    padding: 12px 12px calc(60px + var(--safe-bottom));
}
.tp-meta {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 12px;
}
.tp-price { color: var(--orange); font-size: 22px; font-weight: 800; }

/* ---------- 参考线（当前句锚定在屏幕上方 30% 处） ---------- */
.ref-line {
    position: fixed; left: 0; right: 0; top: 30%; z-index: 30;
    height: 0; border-top: 2px dashed rgba(255, 92, 108, .4);
    pointer-events: none;
}
.ref-line::before, .ref-line::after {
    content: ''; position: absolute; top: -6px;
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255, 92, 108, .55);
}
.ref-line::before { left: 12px; }
.ref-line::after { right: 12px; }

/* 提词器模式 */
body.tele .live-side, body.tele .live-product, body.tele .no-tele { display: none; }
body.tele .live-main { grid-template-columns: 1fr; }
body.tele { --script-size: 36px; background: #000; }
body.tele .live-topbar { background: #111; border-color: #2a2a2a; top: 0; }
body.tele .live-script { background: #000; border-color: #2a2a2a; }
body.tele .script-content { color: #ffe58f; font-weight: 600; }
body.tele .s-line.active { background: rgba(255, 229, 143, .14); box-shadow: inset 3px 0 0 #ffe58f; }
body.tele .s-line.read { opacity: .3; }
body.tele .ref-line { border-top-color: rgba(255, 229, 143, .45); }
body.tele .ref-line::before, body.tele .ref-line::after { background: rgba(255, 229, 143, .5); }
@media (max-width: 640px) { body.tele { --script-size: 30px; } }

/* 结尾占位：让最后一句也能滚动到参考线上方结束 */
.tp-end-spacer { height: 75vh; pointer-events: none; }

/* ========== 图片页内弹窗（lightbox） ========== */
.img-lightbox {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, .88);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .18s ease;
    padding: 20px;
    box-sizing: border-box;
    touch-action: none;          /* 手势缩放/拖动由 lightbox.js 接管 */
    overscroll-behavior: contain;
}
.img-lightbox.show { opacity: 1; pointer-events: auto; }
.img-lightbox img {
    max-width: 94vw; max-height: 88vh;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
    object-fit: contain;
    touch-action: none;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    will-change: transform;
}
.img-lightbox .ilb-close {
    position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px;
    width: 42px; height: 42px; border-radius: 50%;
    border: none; cursor: pointer;
    background: rgba(255, 255, 255, .14); color: #fff;
    font-size: 20px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    z-index: 1;
}
.img-lightbox .ilb-close:hover { background: rgba(255, 255, 255, .28); }
img.zoomable { cursor: zoom-in; }

/* ========== 快递 / 服务 / 附加信息 ========== */
.mech-tag.tag-express { background: rgba(124, 198, 255, .12); color: #7cc6ff; box-shadow: inset 0 0 0 1px rgba(124, 198, 255, .25); }
.mech-tag.tag-service { background: rgba(111, 227, 161, .12); color: #6fe3a1; box-shadow: inset 0 0 0 1px rgba(111, 227, 161, .25); }
.mech-tag.tag-info    { background: rgba(255, 209, 102, .10); color: #ffd166; box-shadow: inset 0 0 0 1px rgba(255, 209, 102, .22); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.info-item {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 10px; padding: 8px 12px;
    display: flex; flex-direction: column; gap: 2px;
}
.info-label { font-size: 12px; color: #8b93b0; }
.info-val   { font-size: 14px; color: #e8eaf2; font-weight: 600; word-break: break-all; }

.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-item {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 10px; padding: 10px 12px;
    color: #7cc6ff; text-decoration: none; font-size: 14px;
}
.link-item span {
    color: #8b93b0; font-size: 12px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-item:hover { border-color: rgba(124, 198, 255, .4); }

/* ========== 表单多选框 ========== */
.check-row { display: flex; flex-wrap: wrap; gap: 10px; }
.check-item {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px; padding: 9px 14px;
    cursor: pointer; font-size: 14px; color: #cfd4e4;
    user-select: none; transition: border-color .15s, background .15s;
}
.check-item:hover { border-color: rgba(124, 198, 255, .35); }
.check-item input[type="checkbox"] {
    width: 17px; height: 17px; margin: 0;
    accent-color: #5b8cff; cursor: pointer;
}
.check-item:has(input:checked) {
    background: rgba(91, 140, 255, .14);
    border-color: rgba(91, 140, 255, .5);
    color: #fff;
}

/* ========== 附加信息：一行三项数字输入（带单位） ========== */
.num-line { display: flex; gap: 10px; flex-wrap: wrap; }
.num-field {
    flex: 1; min-width: 150px;
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px; padding: 6px 12px;
    transition: border-color .15s;
}
.num-field:focus-within { border-color: rgba(91, 140, 255, .55); }
.num-field .nf-label { font-size: 13px; color: #8b93b0; white-space: nowrap; }
.num-field .nf-unit  { font-size: 13px; color: #6fe3a1; white-space: nowrap; }
.num-field input {
    flex: 1; min-width: 0;
    background: none; border: none; outline: none;
    color: #fff; font-size: 16px; font-weight: 600;
    text-align: center; padding: 6px 0;
}
.num-field input::placeholder { color: #4a5170; font-weight: 400; }
.num-field input::-webkit-outer-spin-button,
.num-field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.num-field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* 佣金自动计算结果 */
.comm-calc {
    display: none; margin-top: 10px;
    background: rgba(111, 227, 161, .10);
    border: 1px solid rgba(111, 227, 161, .3);
    color: #6fe3a1; font-size: 14px; font-weight: 600;
    border-radius: 10px; padding: 10px 14px;
}
.comm-calc.show { display: block; }

/* ========== 商品链接输入框（图标前缀美化） ========== */
.input-icon {
    display: flex; align-items: center; gap: 0;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px; overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.input-icon:focus-within {
    border-color: rgba(91, 140, 255, .55);
    box-shadow: 0 0 0 3px rgba(91, 140, 255, .12);
}
.input-icon .ii-icon {
    flex: none;
    padding: 0 12px 0 14px;
    font-size: 18px;
    border-right: 1px solid rgba(255, 255, 255, .08);
    height: 46px; display: flex; align-items: center;
    background: rgba(255, 255, 255, .03);
}
.input-icon input {
    flex: 1; min-width: 0;
    background: none; border: none; outline: none;
    color: #e8eaf2; font-size: 14px;
    padding: 12px 14px;
}
.input-icon input::placeholder { color: #4a5170; }

/* ========== 快递区域：其他输入 / 偏远地区 ========== */
.other-input, .remote-row {
    display: flex; align-items: center; gap: 10px;
    margin-top: 10px; flex-wrap: wrap;
}
.oi-label { font-size: 13px; color: #8b93b0; white-space: nowrap; }
.other-input input {
    flex: 1; min-width: 200px;
}

/* 偏远地区标签（橙色警示） */
.mech-tag.tag-remote {
    background: rgba(255, 153, 102, .12); color: #ff9966;
    box-shadow: inset 0 0 0 1px rgba(255, 153, 102, .3);
}

/* 后台模式顶栏区分 */
body.admin-mode .topbar { border-bottom-color: rgba(91, 140, 255, .35); }

/* ========== AI 识别页 ========== */
.ai-loading {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 26px 0 8px;
}
.ai-spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid rgba(91, 140, 255, .2);
    border-top-color: #5b8cff;
    animation: ai-spin .8s linear infinite;
    flex: none;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-loading-text { color: #8b93b0; font-size: 14px; }
.ai-error {
    margin-top: 14px;
    background: rgba(255, 92, 108, .10);
    border: 1px solid rgba(255, 92, 108, .35);
    color: #ff8a95; font-size: 14px;
    border-radius: 10px; padding: 12px 14px;
}

/* ========== 手卡大图管理弹窗 ========== */
.hc-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, .88);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .18s ease;
    padding: 20px; box-sizing: border-box;
}
.hc-modal.show { opacity: 1; pointer-events: auto; }
.hc-modal-box {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    max-width: 94vw;
}
.hc-modal-box img {
    max-width: 94vw; max-height: 76vh;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
    object-fit: contain;
}
.hc-modal-actions { display: flex; gap: 12px; }
.hc-modal-actions .btn { padding: 10px 22px; font-size: 15px; }
#handcardPreview { cursor: zoom-in; }

/* 划线日常价 */
.daily-price {
    font-size: 14px; color: #8b93b0;
    text-decoration: line-through;
    font-weight: 400; margin-left: 8px;
}
.badge.badge-green { background: rgba(111, 227, 161, .15); color: #6fe3a1; }

/* 后台商品卡片联系人行（仅后台可见） */
.contact-line {
    margin-top: 6px;
    font-size: 12px; color: #8b93b0;
    overflow-wrap: anywhere;
}


/* ========== 题词页：四周固定，仅中间话术区滚动 ========== */
body.live-mode {
    height: 100vh; height: 100dvh;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.live-wrap, .tp-wrap {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.live-wrap { width: 100%; padding-bottom: calc(76px + var(--safe-bottom)); }
.tp-wrap { width: 100%; padding-bottom: calc(24px + var(--safe-bottom)); }
body.tele .live-wrap { padding-bottom: 12px; }

.live-main {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden; align-items: stretch;
}
.live-script {
    display: flex; flex-direction: column;
    flex: 1; min-height: 0; overflow: hidden;
}
.script-scroll {
    position: relative;
    flex: 1; min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

/* 桌面端：左卡、右卡各自内部滚动，话术卡占满高度 */
@media (min-width: 1100px) {
    .live-main { display: grid; grid-template-columns: 300px 1fr 240px; }
    .live-main > .live-left,
    .live-main > .live-side {
        height: 100%; max-height: none;
        overflow-y: auto; position: static;
    }
    .live-main > .live-script { height: 100%; }
}

/* 手机/平板：左卡收起（用右下角悬浮按钮看商品信息），底部商品条固定不滚动 */
@media (max-width: 1099px) {
    .live-main > .live-left { display: none; }
    .live-main > .live-side { flex-shrink: 0; }
}

/* ========== 商品信息悬浮按钮 + 底部弹层 ========== */
.info-fab {
    position: fixed; right: 16px; bottom: calc(84px + var(--safe-bottom)); z-index: 80;
    width: 58px; height: 58px; border-radius: 50%;
    background: var(--card); color: var(--primary);
    border: 1px solid var(--primary);
    font-size: 12px; line-height: 1.25; font-family: inherit; cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
    transition: transform .2s;
}
.info-fab:active { transform: scale(.92); }
body.tele .info-fab { background: #1a1a1a; border-color: #ffe58f; color: #ffe58f; }

.info-panel {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(0, 0, 0, .55);
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
}
.info-panel.show { opacity: 1; pointer-events: auto; }
.info-panel-box {
    position: absolute; left: 0; right: 0; bottom: 0;
    max-height: 82vh;
    display: flex; flex-direction: column;
    background: var(--bg); border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    padding-bottom: var(--safe-bottom);
    transform: translateY(102%);
    transition: transform .28s ease;
}
.info-panel.show .info-panel-box { transform: translateY(0); }
.info-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.info-panel-body {
    flex: 1; min-height: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    margin: 12px;
}
@media (min-width: 768px) {
    .info-panel-box {
        left: 50%; right: auto;
        width: min(560px, 92vw);
        transform: translate(-50%, 102%);
    }
    .info-panel.show .info-panel-box { transform: translate(-50%, 0); }
}


/* ========== 隐藏滚动轨道条（保留滚动功能，鼠标滚轮/触控板正常用） ========== */
.script-scroll,
.live-main > .live-product,
.live-main > .live-side,
.info-panel-body {
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/旧 Edge */
}
.script-scroll::-webkit-scrollbar,
.live-main > .live-product::-webkit-scrollbar,
.live-main > .live-side::-webkit-scrollbar,
.info-panel-body::-webkit-scrollbar {
    display: none;                /* Chrome / Safari / 新 Edge */
    width: 0; height: 0;
}


/* ========== 左栏拆分卡片（三列叠放 / 五列分栏共用） ========== */
.live-left {
    display: flex; flex-direction: column; gap: 12px;
    min-height: 0;
    scrollbar-width: none;
}
.live-left::-webkit-scrollbar { display: none; }
.live-left > .card { flex-shrink: 0; }
/* 三列叠放时的视觉顺序：商品信息 → 附加信息 → 主播手卡（DOM 中手卡在最前，供四列布局叠放用） */
.live-left > .live-product { order: 1; }
.live-left > .live-extra { order: 2; }
.live-left > .live-hand { order: 3; }
.live-extra, .live-hand { padding: 16px; }
.live-extra h3, .live-hand h3 { font-size: 13px; color: var(--text-dim); margin: 16px 0 8px; }
.live-extra h3:first-child, .live-hand h3:first-child { margin-top: 0; }
.live-hand .handcard-img { width: 100%; border-radius: 10px; }
.live-hand .lp-remark { color: var(--text-dim); font-size: 13px; }

/* 提词模式下隐藏左侧区与手卡列 */
body.tele .live-left, body.tele .live-hand { display: none; }

/* 布局切换按钮：仅桌面端显示 */
@media (max-width: 1099px) { #colsBtn { display: none; } }

/* ========== 四列布局（中小屏幕桌面端：手卡叠在商品图片信息上方，右侧给实时提词留空间，提词模式下自动回到单列） ========== */
@media (min-width: 1100px) {
    /* 列宽比例 附加信息 1 : 手卡+商品 1.4 : 话术 3 : 清单 1，中间话术区保持大尺寸 */
    body.cols4:not(.tele) .live-main {
        grid-template-columns: 1fr 1.4fr 3fr 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        align-items: start;
    }
    body.cols4:not(.tele) .live-left { display: contents; }
    /* 第一行：附加信息（跨两行）｜手卡（商品上方）｜话术（跨两行）｜清单（跨两行） */
    body.cols4:not(.tele) .live-extra { grid-column: 1; grid-row: 1 / span 2; }
    body.cols4:not(.tele) .live-hand { grid-column: 2; grid-row: 1; }
    body.cols4:not(.tele) .live-product { grid-column: 2; grid-row: 2; }
    /* 无手卡/备注时，商品卡占满第二列的两行 */
    body.cols4:not(.tele) .live-left > .live-product:first-child { grid-row: 1 / span 2; }
    body.cols4:not(.tele) .live-script { grid-column: 3; grid-row: 1 / span 2; }
    body.cols4:not(.tele) .live-side { grid-column: 4; grid-row: 1 / span 2; }
    /* 手卡最长不超过约半屏，超出卡内滚动；其余侧栏卡内容超高时卡内滚动，隐藏滚动条 */
    body.cols4:not(.tele) .live-main .live-extra,
    body.cols4:not(.tele) .live-main .live-product,
    body.cols4:not(.tele) .live-main .live-side {
        height: auto; max-height: 100%;
        overflow-y: auto; position: static;
        scrollbar-width: none;
    }
    body.cols4:not(.tele) .live-main .live-hand {
        height: auto; max-height: min(46vh, 100%);
        overflow-y: auto; position: static;
        scrollbar-width: none;
    }
    body.cols4:not(.tele) .live-main .live-extra::-webkit-scrollbar,
    body.cols4:not(.tele) .live-main .live-hand::-webkit-scrollbar,
    body.cols4:not(.tele) .live-main .live-product::-webkit-scrollbar,
    body.cols4:not(.tele) .live-main .live-side::-webkit-scrollbar { display: none; }
}

/* ========== 五列布局（宽屏生效，提词模式下自动回到单列） ========== */
@media (min-width: 1500px) {
    /* 页面已改横向满屏（.live-wrap 不限宽），此处不再限制五列最大宽度 */
    /* 列宽比例 1 : 1 : 3 : 1 : 1，中间话术区占 3/7 大尺寸 */
    body.cols5:not(.tele) .live-main {
        grid-template-columns: 1fr 1fr 3fr 1fr 1fr;
        align-items: start; /* 卡片多高由内容决定，下方留白显示背景色 */
    }
    body.cols5:not(.tele) .live-left { display: contents; }
    body.cols5:not(.tele) .live-extra { grid-column: 1; grid-row: 1; }
    body.cols5:not(.tele) .live-product { grid-column: 2; grid-row: 1; }
    body.cols5:not(.tele) .live-script { grid-column: 3; grid-row: 1; }
    body.cols5:not(.tele) .live-side { grid-column: 4; grid-row: 1; }
    body.cols5:not(.tele) .live-hand { grid-column: 5; grid-row: 1; }
    /* 四张侧栏卡：内容到哪就显示到哪；内容超过一屏时卡内滚动，最高不超过一屏 */
    body.cols5:not(.tele) .live-main .live-extra,
    body.cols5:not(.tele) .live-main .live-product,
    body.cols5:not(.tele) .live-main .live-side,
    body.cols5:not(.tele) .live-main .live-hand {
        height: auto; max-height: 100%;
        overflow-y: auto; position: static;
        scrollbar-width: none;
    }
    body.cols5:not(.tele) .live-main .live-extra::-webkit-scrollbar,
    body.cols5:not(.tele) .live-main .live-product::-webkit-scrollbar,
    body.cols5:not(.tele) .live-main .live-side::-webkit-scrollbar,
    body.cols5:not(.tele) .live-main .live-hand::-webkit-scrollbar { display: none; }
}


/* ==========================================================
   联系信息折叠条（品牌方录入/修改商品：默认收起，点「✎ 修改」展开）
   ========================================================== */
.bp-contact-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 16px; font-size: 14px; color: var(--text);
    cursor: pointer; font-family: inherit; text-align: left;
}
.bp-contact-toggle b { color: var(--primary); font-weight: 700; }
.bp-contact-toggle .ct-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-contact-toggle .ct-arrow { color: var(--text-dim); font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.bp-contact-box { margin-top: 10px; }
.bp-add-tools { display: flex; justify-content: flex-end; margin: -6px 0 12px; }

/* ==========================================================
   白天 / 黑夜模式一键切换
   白天模式 = 白底黑字（直播时可把屏幕当补光灯用），选择自动记忆
   ========================================================== */
html.light {
    --bg: #ffffff;
    --bg-soft: #f3f5f9;
    --card: #ffffff;
    --card-hover: #f5f6fa;
    --border: #e3e6ef;
    --text: #171a26;
    --text-dim: #5c6376;
    --shadow: 0 4px 18px rgba(30, 36, 64, .08);
}
html.light body, html.light body.live-mode { background: #ffffff; }
html.light .topbar { background: rgba(255, 255, 255, .94); }
/* 提词模式（白天）：白底黑字 */
html.light body.tele { background: #ffffff; }
html.light body.tele .live-topbar { background: #ffffff; border-color: var(--border); }
html.light body.tele .live-script { background: #ffffff; border-color: var(--border); }
html.light body.tele .script-content { color: #14161f; }
html.light body.tele .s-line.active { background: rgba(108, 123, 255, .16); box-shadow: inset 3px 0 0 var(--primary); color: #14161f; }
html.light body.tele .info-fab { background: #ffffff; border-color: var(--primary); color: var(--primary); }
html.light .s-line.active { background: rgba(108, 123, 255, .14); color: #171a26; }
/* 直播页固定件 */
html.light .live-actions { background: rgba(255, 255, 255, .94); }
html.light .live-topbar .lt-progress b { color: var(--primary-dark); }
/* 徽标（白底配深色文字，保证可读） */
html.light .badge-green  { background: rgba(46, 204, 113, .13); color: #148c4b; }
html.light .badge.badge-green { background: rgba(46, 204, 113, .13); color: #148c4b; }
html.light .badge-blue   { background: rgba(64, 169, 255, .13); color: #1773c2; }
html.light .badge-orange { background: rgba(255, 169, 64, .18); color: #ad6800; }
html.light .badge-red    { background: rgba(255, 92, 108, .12); color: #cf3040; }
html.light .badge-purple { background: rgba(108, 123, 255, .13); color: #4753c9; }
html.light .badge-gray   { background: rgba(93, 100, 120, .12); color: #5c6376; }
/* 机制 / 快递 / 服务标签 */
html.light .mech-tag.tag-express { background: rgba(64, 169, 255, .10); color: #1773c2; box-shadow: inset 0 0 0 1px rgba(64, 169, 255, .3); }
html.light .mech-tag.tag-service { background: rgba(46, 204, 113, .10); color: #148c4b; box-shadow: inset 0 0 0 1px rgba(46, 204, 113, .3); }
html.light .mech-tag.tag-info    { background: rgba(255, 169, 64, .12); color: #ad6800; box-shadow: inset 0 0 0 1px rgba(255, 169, 64, .3); }
html.light .mech-tag.tag-remote  { background: rgba(255, 92, 108, .10); color: #cf3040; box-shadow: inset 0 0 0 1px rgba(255, 92, 108, .3); }
/* 表单部件 */
html.light .info-item, html.light .check-item, html.light .num-field,
html.light .input-icon, html.light .link-item { background: #f5f6fa; border-color: #e3e6ef; }
html.light .info-label, html.light .oi-label, html.light .num-field .nf-label { color: #828aa0; }
html.light .info-val { color: #171a26; }
html.light .num-field input { color: #171a26; }
html.light .num-field input::placeholder { color: #aab1c5; }
html.light .num-field .nf-unit { color: #148c4b; }
html.light .input-icon .ii-icon { background: #eef0f6; border-right-color: #e3e6ef; }
html.light .input-icon input { color: #171a26; }
html.light .input-icon input::placeholder { color: #aab1c5; }
html.light .check-item { color: #3c4257; }
html.light .check-item:has(input:checked) { background: rgba(91, 140, 255, .12); border-color: rgba(91, 140, 255, .5); color: #2a3fb0; }
html.light .link-item { color: #1773c2; }
html.light .link-item span { color: #828aa0; }
html.light .comm-calc { background: rgba(46, 204, 113, .08); border-color: rgba(46, 204, 113, .35); color: #148c4b; }
/* 提示 / 计时 / 文本 */
html.light .flash-ok { background: rgba(46, 204, 113, .10); border-color: rgba(46, 204, 113, .4); color: #148c4b; }
html.light .flash-error { background: rgba(255, 92, 108, .08); border-color: rgba(255, 92, 108, .35); color: #cf3040; }
html.light .timer-chip { background: rgba(255, 92, 108, .08); color: #cf3040; }
html.light .daily-price, html.light .contact-line { color: #828aa0; }
html.light .live-banner.warn { background: rgba(255, 169, 64, .10); border-color: rgba(255, 169, 64, .4); color: #ad6800; }
html.light .live-banner.done { background: rgba(46, 204, 113, .10); border-color: rgba(46, 204, 113, .4); color: #148c4b; }
html.light .ai-loading-text { color: #828aa0; }
html.light .ai-error { color: #cf3040; }
html.light .info-fab { background: #ffffff; }
/* 商品清单 */
html.light .side-item { color: #171a26; }
html.light .side-item .no { background: #dfe3ee; color: #3c4257; }
html.light .side-item.current .no { background: var(--primary); color: #fff; }
html.light .side-item.done .si-name { color: #828aa0; }
/* 品牌站 */
html.light body.bp-mode { background: #f6f7fb; }
html.light .bp-topbar { background: rgba(255, 255, 255, .92); }
html.light .bp-hero { background: linear-gradient(160deg, rgba(108, 123, 255, .10), rgba(108, 123, 255, .02)); }
html.light .bp-contact-bar { background: rgba(108, 123, 255, .08); }
html.light .bp-badge-collected { color: #148c4b; }
html.light .bp-badge-wait { color: #ad6800; }
html.light .bp-modal-err, html.light .req { color: #cf3040; }

/* 主题切换按钮（顶栏） */
.theme-btn { flex-shrink: 0; }

/* ==========================================================
   题词页：靠左布局 + 右侧「网页题词」嵌入区
   直播时左边看话术滚动，右边嵌入外部题词网页（iframe），地址自动记忆
   ========================================================== */
body.live-mode { flex-direction: row; }
.live-embed { display: none; }
body.embed-on .live-wrap { margin: 0; flex: 1 1 auto; min-width: 0; }
body.embed-on .live-embed {
    display: flex; flex-direction: column; position: relative;
    flex: 1 1 320px; min-width: 280px; min-height: 0;
    padding: 12px 12px calc(76px + var(--safe-bottom)) 0;
}
/* 题词模式下右侧实时提词区保持显示（用户要求题词时也能看 shishitici） */
.le-bar {
    display: flex; align-items: center; gap: 6px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0; padding: 8px;
}
.le-title { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.le-tip {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 12px; color: var(--text-dim); opacity: .75;
}
.live-embed iframe {
    flex: 1; min-height: 0; width: 100%;
    border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #fff;
}
.le-empty {
    position: absolute; inset: 49px 12px calc(76px + var(--safe-bottom)) 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    text-align: center; color: var(--text-dim); font-size: 14px; line-height: 1.8;
    background: var(--bg); border: 1px dashed var(--border); border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 20px; pointer-events: none;
}
.le-empty small { font-size: 12px; opacity: .8; }
/* 手机 / 平板：嵌入区改为全屏浮层，打开后盖在题词页上方 */
@media (max-width: 1099px) {
    body.embed-on .live-embed {
        position: fixed; inset: 0; z-index: 200;
        min-width: 0; padding: 8px 8px calc(8px + var(--safe-bottom));
        background: var(--bg);
    }
    .le-empty { inset: 49px 8px calc(8px + var(--safe-bottom)); }
}

/* ==========================================================
   手机端全站优化：简单、大方、明了
   ========================================================== */
@media (max-width: 640px) {
    body { font-size: 14px; }
    .container { padding: 12px 10px calc(40px + var(--safe-bottom)); }
    .topbar-inner { height: 50px; padding: 0 10px; gap: 8px; }
    .logo { font-size: 15px; }
    .nav a { padding: 6px 10px; font-size: 13px; }
    .page-head h1 { font-size: 19px; }
    .page-head .sub { font-size: 12px; }
    /* 统计卡片 */
    .stat-row { gap: 8px; margin-bottom: 12px; }
    .stat-card { padding: 10px 12px; }
    .stat-card .num { font-size: 20px; }
    /* 筛选栏 */
    .filter-bar { padding: 8px; gap: 6px; margin-bottom: 12px; border-radius: 14px; }
    .filter-bar input[type="search"], .filter-bar select { padding-top: 9px; padding-bottom: 9px; font-size: 14px; }
    /* 商品卡片：紧凑、价格佣金一眼看清 */
    .product-grid { gap: 10px; }
    .product-card .body { padding: 9px 10px; gap: 5px; }
    .product-card .name { font-size: 13px; }
    .product-card .price { font-size: 15px; }
    .product-card .badge { font-size: 11px; padding: 1px 7px; }
    .product-card .actions { padding: 8px 10px; }
    .product-card .actions .btn { font-size: 12px; padding: 7px 6px; }
    /* 表单 */
    .form-card { padding: 14px 12px; }
    /* 卡片与区块 */
    .card { border-radius: 12px; }
    .view-wrap { gap: 10px; }
    /* 题词页 */
    .live-wrap { padding: 8px 8px calc(76px + var(--safe-bottom)); }
    .live-topbar { padding: 8px 10px; gap: 6px; margin-bottom: 8px; top: 6px; }
    .live-topbar .lt-title { font-size: 14px; }
    .lt-tools .btn { font-size: 12px; padding: 6px 10px; }
    .live-script { padding: 14px 14px 24px; min-height: 0; }
    .lp-img { width: 92px; height: 92px; }
    .lp-head h2 { font-size: 16px; }
    .lp-price { font-size: 20px; }
    .info-fab { width: 52px; height: 52px; font-size: 11px; right: 12px; }
    /* 品牌站 */
    .bp-main { padding: 14px 12px 50px; }
    .bp-card { padding: 16px 14px; }
    .bp-hero { padding: 30px 14px 26px; }
    .bp-grid { grid-template-columns: repeat(2, 1fr); }
    .bp-kv-row { padding: 11px 12px; font-size: 13px; }
}

/* ==========================================================
   商品详情页 · 信息网格（两列一行：直播价/日常价/佣金/返点/品牌/分类/日期/保质期/发货）
   ========================================================== */
.view-info-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    margin-top: 14px; padding: 12px;
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px;
}
.vig-item {
    display: flex; align-items: baseline; gap: 8px; min-width: 0;
    padding: 8px 10px; background: var(--card);
    border: 1px solid var(--border); border-radius: 10px;
}
.vig-label { flex-shrink: 0; color: var(--text-dim); font-size: 12px; }
.vig-val {
    color: var(--text); font-size: 14px; font-weight: 600;
    word-break: break-all; line-height: 1.45;
}
.vig-item.vig-price { border-color: rgba(255, 176, 32, .4); }
.vig-item.vig-price .vig-val { color: var(--orange); font-size: 17px; font-weight: 800; }
@media (max-width: 380px) {
    .view-info-grid { gap: 6px; padding: 10px; }
    .vig-item { flex-direction: column; gap: 2px; align-items: flex-start; }
}

/* 商品链接 · 点击复制 */
.link-item.link-copy { cursor: pointer; user-select: none; }
.link-item.link-copy:active { transform: scale(.99); }
.link-item .lc-btn {
    margin-left: auto; flex-shrink: 0;
    font-size: 12px; font-weight: 600; color: var(--text-dim);
    background: var(--bg-soft); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: 8px;
}

/* 复制成功 toast */
.copy-toast {
    position: fixed; left: 50%; bottom: 46px; z-index: 9999;
    transform: translateX(-50%) translateY(16px);
    background: var(--green); color: #052e12;
    font-size: 14px; font-weight: 700;
    padding: 11px 22px; border-radius: 999px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .35);
    opacity: 0; transition: all .3s ease; pointer-events: none;
    white-space: nowrap;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 列表页佣金/返佣行 */
.comm-line { margin-top: 4px; }
html.light .vig-item { background: #fff; }
html.light .vig-item.vig-price { border-color: rgba(217, 142, 0, .45); }

/* ==========================================================
   价格机制（多组 价格+数量，如 ¥19.9 / 2盒）：输入行 + 高亮展示
   ========================================================== */
/* 表单输入行：价格 元 / 数量单位 + 日常价（占比小）；第一行为直播价 */
.po-row {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
}
.po-row input[name="price_opt_price[]"] { flex: 0 0 118px; }
.po-row input[name="price_opt_qty[]"] { flex: 1 1 auto; min-width: 0; }
.po-row input.po-daily { flex: 0 0 96px; }
.po-row .po-sep { color: var(--text-dim); font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.po-row .po-del { flex-shrink: 0; padding: 8px 12px; }
/* 第一行（直播价）不可删除：删除按钮直接移除，输入框占满整行不留空位 */
.po-row.po-main .po-del { display: none; }
.po-main-tag {
    flex-shrink: 0; white-space: nowrap;
    font-size: 12px; font-weight: 700;
    color: #ffc266;
    background: rgba(255, 171, 64, .14);
    border: 1px solid rgba(255, 171, 64, .45);
    padding: 4px 9px; border-radius: 999px;
}
html.light .po-main-tag { color: #b45309; background: #fff3e0; border-color: #f0a94f; }
@media (max-width: 480px) {
    .po-row { gap: 6px; }
    .po-row input[name="price_opt_price[]"] { flex: 0 0 92px; }
    .po-row input.po-daily { flex: 0 0 76px; }
}

/* 高亮标签：直播核心数据，一眼可见 */
.po-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 8px;
}
.po-tag {
    display: inline-flex; align-items: baseline; gap: 2px;
    background: linear-gradient(135deg, rgba(255, 183, 77, .22), rgba(255, 138, 61, .16));
    border: 1px solid rgba(255, 171, 64, .55);
    color: #ffc266;
    font-size: 15px; font-weight: 800;
    padding: 5px 13px; border-radius: 999px;
    letter-spacing: .2px;
    text-shadow: 0 0 12px rgba(255, 171, 64, .25);
    white-space: nowrap;
}
/* 标签内的数量单位与划线日常价 */
.po-tag .po-qty { font-weight: 700; }
.po-tag s.po-daily-s {
    font-size: .78em; font-weight: 400;
    opacity: .68; margin-left: 5px;
    text-shadow: none;
}
/* 直播题词页：更大更醒目 */
.po-tags-live { margin-top: 10px; }
.po-tags-live .po-tag {
    font-size: 19px; padding: 8px 18px;
    box-shadow: 0 0 18px rgba(255, 171, 64, .18);
}
/* 商品详情页：紧随信息网格，独立成行 */
.po-tags-view { margin: 14px 0 2px; }
.po-tags-view .po-tag { font-size: 17px; padding: 7px 16px; }
/* 白天模式：深橙文字保证对比度 */
html.light .po-tag {
    background: linear-gradient(135deg, #fff3e0, #ffe8d1);
    border-color: #f0a94f;
    color: #b45309;
    text-shadow: none;
}

/* ==========================================================
   分享链接弹窗（后台商品编辑页「分享编辑」）
   ========================================================== */
.share-box {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 18px; padding: 26px 24px;
    max-width: min(560px, 94vw); width: 100%;
    box-shadow: var(--shadow);
    align-items: stretch; text-align: center;
}
.share-title { font-size: 19px; font-weight: 800; }
.share-desc { color: var(--text-dim); font-size: 14px; line-height: 1.9; }
.share-desc b { color: var(--orange, #ffab40); }
.share-link-row { display: flex; gap: 10px; }
.share-link-row input {
    flex: 1; min-width: 0;
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text);
    padding: 11px 14px; font-size: 13px; font-family: inherit;
}
.share-link-row .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) {
    .share-link-row { flex-direction: column; }
}

/* ---------- 后台品牌商品库卡片（手机端防错位） ---------- */
.bcard { display: flex; gap: 14px; align-items: flex-start; padding: 14px; margin-bottom: 12px; }
.bcard-img {
    width: 84px; height: 84px; border-radius: 10px; object-fit: cover;
    flex-shrink: 0; cursor: zoom-in; background: var(--bg-soft);
    border: 1px solid var(--border);
}
.bcard-body { flex: 1; min-width: 0; }
.bcard-meta { color: var(--text-dim); font-size: 12px; margin-top: 4px; word-break: break-all; }
.bcard-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.bcard-actions .btn { white-space: nowrap; text-align: center; }
.bcard-actions form { margin: 0; }
.bcard-actions form .btn { width: 100%; }

@media (max-width: 640px) {
    .bcard { flex-wrap: wrap; gap: 10px; padding: 12px; }
    .bcard-img { width: 64px; height: 64px; }
    .bcard-body { flex: 1 1 calc(100% - 78px); }
    .bcard-actions { flex: 1 1 100%; flex-direction: row; gap: 8px; }
    .bcard-actions .btn { flex: 1; }
    .bcard-actions form { flex: 1; }
}

/* ---------- 手机授权管理 / 日志 ---------- */
.tel-add-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tel-add-form input[type="tel"] { flex: 1.2; min-width: 160px; }
.tel-add-form input[type="text"] { flex: 1; min-width: 120px; }
.tel-add-form select { flex: 0 0 130px; }
.tel-card { padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tel-main { flex: 1; min-width: 0; }
.tel-phone { font-size: 16px; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tel-name { font-size: 14px; margin-top: 4px; }
.tel-meta { color: var(--text-dim); font-size: 12px; margin-top: 3px; }
.tel-actions { display: flex; gap: 8px; flex-shrink: 0; }
.tel-actions form { margin: 0; }
.tel-edit-form { flex: 1 1 100%; display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.tel-edit-form input { flex: 1; min-width: 140px; }
.tel-first-tag { background: rgba(255,171,64,.14); color: #ffc266; border: 1px solid rgba(255,171,64,.4); padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.tel-role-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid; }
.tel-role-admin  { color: #ffc266; background: rgba(255,171,64,.12); border-color: rgba(255,171,64,.4); }
.tel-role-ops    { color: #7db4ff; background: rgba(91,141,255,.12); border-color: rgba(91,141,255,.4); }
.tel-role-bus    { color: #c39bff; background: rgba(154,93,255,.12); border-color: rgba(154,93,255,.4); }
.tel-role-anchor { color: #7ce8a8; background: rgba(46,204,113,.12); border-color: rgba(46,204,113,.4); }
.tel-role-guest  { color: #9aa3c0; background: rgba(154,163,192,.1); border-color: rgba(154,163,192,.35); }
.tel-role-desc { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-dim); }
.tel-role-desc > div { display: flex; align-items: center; gap: 10px; }
.log-table-wrap { overflow-x: auto; }
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th { text-align: left; padding: 11px 12px; color: var(--text-dim); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.log-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.log-table tr:last-child td { border-bottom: 0; }
.log-time { white-space: nowrap; color: var(--text-dim); font-size: 12px; }
.log-action { white-space: nowrap; font-weight: 600; }
.log-detail { color: var(--text-dim); word-break: break-all; min-width: 200px; }

/* ---------- 商务徽章（商品列表区分哪个商务选的品） ---------- */
.sw-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
    color: #c39bff; background: rgba(154,93,255,.12); border: 1px solid rgba(154,93,255,.4); }
html.light .sw-badge { color: #7c3aed; background: rgba(124,58,237,.08); border-color: rgba(124,58,237,.3); }
html.light .tel-role-admin  { color: #ad6800; background: rgba(255,171,64,.15); }
html.light .tel-role-ops    { color: #2456c9; background: rgba(91,141,255,.12); }
html.light .tel-role-bus    { color: #7c3aed; background: rgba(154,93,255,.1); }
html.light .tel-role-anchor { color: #148c4b; background: rgba(46,204,113,.12); }
html.light .tel-first-tag { color: #ad6800; }
html.light .log-table th { color: #666; }

/* ---------- 商务体系通用（投稿横幅 / 状态徽章 / 锁定提示） ---------- */
.bp-badge-collected { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
    color: #7ce8a8; background: rgba(46,204,113,.12); border: 1px solid rgba(46,204,113,.35); }
.bp-badge-wait { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
    color: #ffc266; background: rgba(255,171,64,.12); border: 1px solid rgba(255,171,64,.35); }
.bp-sw-banner {
    background: linear-gradient(135deg, rgba(154,93,255,.14), rgba(91,108,255,.10));
    border: 1px solid rgba(154,93,255,.4); color: #d6c2ff;
    border-radius: 14px; padding: 13px 16px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.7;
}
.bp-sw-banner b { color: #c39bff; }
.bp-sw-lock { background: linear-gradient(135deg, rgba(255,171,64,.12), rgba(255,120,60,.08));
    border-color: rgba(255,171,64,.4); color: #ffd9a3; }
.bp-sw-lock b { color: #ffc266; }
.bp-lock-tip { color: var(--text-dim); font-size: 12px; padding: 6px 4px; white-space: nowrap; }
html.light .bp-sw-banner { background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(91,108,255,.06)); color: #5b21b6; }
html.light .bp-sw-banner b { color: #7c3aed; }
html.light .bp-sw-lock { color: #92400e; }
html.light .bp-sw-lock b { color: #ad6800; }


/* ================= 品牌商品库 / 商务管理 卡片与弹窗 ================= */
.stat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.stat-chip b { color: var(--text); }

.search-bar { display: flex; gap: 8px; margin: 12px 0; }
.search-bar input { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 9px 13px; font-size: .9rem; }
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(102,126,234,.15); }

.btn-success { background: linear-gradient(135deg, #059669, #10b981) !important; color: #fff !important; border: none !important; }
.btn-success:hover { filter: brightness(1.1); }
.btn-danger { background: linear-gradient(135deg, #dc2626, #ef4444) !important; color: #fff !important; border: none !important; }
.btn-danger:hover { filter: brightness(1.1); }

.item.bcard { display: block; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; transition: border-color .2s, box-shadow .2s; }
.item.bcard:hover { border-color: rgba(102,126,234,.45); box-shadow: 0 4px 18px rgba(0,0,0,.25); }
html.light .item.bcard:hover { box-shadow: 0 4px 14px rgba(60,72,120,.12); }
.bcard-main { display: flex; gap: 14px; align-items: flex-start; }
.bcard-thumb { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex-shrink: 0; border: 1px solid var(--border); }
.product-thumb-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); font-size: .75rem; border-radius: 10px; border: 1px dashed var(--border); }
.bcard-info { flex: 1; min-width: 0; }
.item-name { font-weight: 700; font-size: .98rem; line-height: 1.5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.item-sub { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.bcard-actions { display: flex; flex-direction: column; gap: 7px; flex-shrink: 0; align-items: stretch; }
.bcard-actions .btn-sm { white-space: nowrap; text-align: center; }
.bcard-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.bcard-body:empty { display: none; }
.bcard-row { display: flex; gap: 10px; margin-bottom: 8px; }
.bcard-label { flex-shrink: 0; width: 92px; color: var(--muted); font-size: .8rem; padding-top: 1px; }
.bcard-val { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.6; word-break: break-all; }
.bcard-script { background: var(--bg); border-radius: 8px; padding: 8px 11px; }
.bcard-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bcard-flag { padding: 3px 10px; border-radius: 999px; background: rgba(102,126,234,.1); border: 1px solid rgba(102,126,234,.25); font-size: .75rem; color: var(--text); }
.bcard-flag-price { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); }
@media (max-width: 720px) {
    .bcard-main { flex-wrap: wrap; }
    .bcard-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
    .bcard-label { width: 76px; }
}

/* 预览 / 对比弹窗 */
.bp-modal-mask { position: fixed; inset: 0; background: rgba(5,8,20,.72); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px 30px; z-index: 300; overflow-y: auto; }
.bp-modal-mask.show { display: flex; }
.bp-modal { width: 100%; max-width: 760px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: bpModalIn .25s ease; }
@keyframes bpModalIn { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
.bp-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border); font-weight: 700; }
.bp-modal-x { background: none; border: none; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.bp-modal-x:hover { color: var(--text); background: rgba(255,255,255,.06); }
.bp-modal-body { padding: 16px 18px; max-height: 62vh; overflow-y: auto; }
.bp-modal-foot { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.bp-modal-tip { flex: 1; color: var(--muted); font-size: .78rem; }
.bp-pv-grid { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
@media (max-width: 640px) { .bp-pv-grid { grid-template-columns: 1fr; } }
.bp-pv-img { width: 100%; border-radius: 12px; border: 1px solid var(--border); min-height: 120px; object-fit: cover; }
.bp-pv-row { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.bp-pv-row:last-child { border-bottom: none; }
.bp-pv-label { flex-shrink: 0; width: 88px; color: var(--muted); font-size: .8rem; padding-top: 2px; }
.bp-pv-val { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.6; word-break: break-all; }
.bp-pv-section { margin-top: 16px; }
.bp-pv-section h4 { margin: 0 0 8px; font-size: .92rem; }
.bp-pv-section textarea { width: 100%; min-height: 220px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 12px; font-size: .88rem; line-height: 1.7; resize: vertical; box-sizing: border-box; }
.bp-pv-section textarea:focus { outline: none; border-color: var(--accent); }

/* ==========================================================
   联系人 · 微信号点击复制（全站通用）
   ========================================================== */
.contact-bit {
    display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 4px 10px; border-radius: 10px; font-size: .78rem;
    background: rgba(56, 189, 248, .08); border: 1px solid rgba(56, 189, 248, .28);
    color: var(--text); text-decoration: none;
}
a.contact-bit:hover { border-color: #38bdf8; }
.contact-bit b.wx-copy { color: #7dd3fc; cursor: pointer; font-weight: 600; }
html.light .contact-bit { background: rgba(2, 132, 199, .07); color: #0f172a; }
html.light .contact-bit b.wx-copy { color: #0369a1; }
.wx-copy-tag {
    padding: 2px 8px; border-radius: 7px; font-size: .7rem; cursor: pointer;
    background: rgba(56, 189, 248, .16); border: 1px solid rgba(56, 189, 248, .4);
    color: #7dd3fc; font-family: inherit;
}
.wx-copy-tag:hover { background: rgba(56, 189, 248, .3); }
.wx-copy-tag.copied { background: rgba(46, 204, 113, .2); border-color: rgba(46, 204, 113, .5); color: #7ce8a8; }
html.light .wx-copy-tag { color: #0369a1; }

/* ==========================================================
   商品进度阶段徽章（品牌方时间线）
   ========================================================== */
.bp-stage {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600; border: 1px solid transparent;
}
.bp-stage.stage-new      { background: rgba(148, 163, 184, .12); color: #cbd5e1; border-color: rgba(148, 163, 184, .35); }
.bp-stage.stage-intent   { background: rgba(56, 189, 248, .12);  color: #7dd3fc; border-color: rgba(56, 189, 248, .35); }
.bp-stage.stage-rec      { background: rgba(167, 139, 250, .14); color: #c4b5fd; border-color: rgba(167, 139, 250, .4); }
.bp-stage.stage-square   { background: rgba(245, 158, 11, .13);  color: #fbbf24; border-color: rgba(245, 158, 11, .38); }
.bp-stage.stage-selected { background: rgba(244, 114, 182, .13); color: #f9a8d4; border-color: rgba(244, 114, 182, .4); }
.bp-stage.stage-done     { background: rgba(46, 204, 113, .14);  color: #7ce8a8; border-color: rgba(46, 204, 113, .4); }
html.light .bp-stage.stage-new    { color: #475569; }
html.light .bp-stage.stage-intent { color: #0369a1; }
html.light .bp-stage.stage-rec    { color: #6d28d9; }
html.light .bp-stage.stage-square { color: #b45309; }
html.light .bp-stage.stage-selected { color: #be185d; }
html.light .bp-stage.stage-done   { color: #148c4b; }

/* ==========================================================
   商品详情弹窗 · 自适应（手机端不超出屏幕）
   ========================================================== */
.bp-modal-box.bp-detail-box {
    max-width: 560px; max-height: 88vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 640px) {
    .bp-modal { padding: 10px; align-items: flex-start; }
    .bp-modal-box.bp-detail-box {
        max-width: 100%; width: 100%; max-height: 92vh;
        padding: 18px 14px; margin-top: 8px; border-radius: 16px;
    }
    .bp-kv-row { flex-wrap: wrap; }
    .bp-kv-row .v { word-break: break-all; min-width: 0; }
}

/* ==========================================================
   直播页 · 输入端二维码弹窗
   ========================================================== */
.le-qr-mask {
    position: fixed; inset: 0; z-index: 1200;
    background: rgba(0, 0, 0, .68); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.le-qr-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 20px;
    padding: 26px 26px 20px; text-align: center; max-width: 320px; width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.le-qr-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; }
.le-qr-box {
    display: flex; justify-content: center; padding: 12px;
    background: #fff; border-radius: 14px; margin-bottom: 12px;
}
.le-qr-box img, .le-qr-box canvas { display: block; border-radius: 6px; }
.le-qr-url {
    font-size: .72rem; color: var(--muted); word-break: break-all;
    margin-bottom: 14px; line-height: 1.5;
}
.toast.error { background: #da3633; }

/* 品牌商品库 · 手卡缩略图 / 优化生成选项 */
.bcard-hc {
    width: 44px; height: 44px; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--border); cursor: zoom-in; vertical-align: middle;
    transition: transform .18s, border-color .18s;
}
.bcard-hc:hover { transform: scale(1.12); border-color: var(--accent); }
.bp-refine-lab {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    font-size: .8rem; color: var(--muted); margin-right: auto; user-select: none;
}
.bp-refine-lab input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.bp-refine-lab:hover { color: var(--text); }

/* ==========================================================
   下滑 / 下拉加载更多
   ========================================================== */
.lm-wrap { text-align: center; padding: 18px 0 30px; }
.lm-btn { min-width: 240px; }
.lm-end { color: var(--muted); font-size: .8rem; padding: 8px 0 4px; }

/* ==========================================================
   品牌方页 · 精简商务条（详细资料见寄样地址/账号资料/在线客服页）
   ========================================================== */
.sw-strip {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 0 0 16px; padding: 12px 16px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .1), rgba(91, 108, 255, .05)), var(--card, #17171f);
    border: 1px solid var(--border);
}
.sw-strip-avatar {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 2px solid rgba(195, 155, 255, .5);
}
.sw-strip-avatar-ph {
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    background: rgba(124, 58, 237, .18);
}
.sw-strip-id { flex: 1; min-width: 120px; display: flex; flex-direction: column; }
.sw-strip-id b { font-size: .98rem; }
.sw-strip-id span { font-size: .72rem; color: var(--muted); }
.sw-strip-links { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-strip-links a {
    padding: 6px 12px; border-radius: 999px; font-size: .76rem; text-decoration: none;
    background: rgba(124, 58, 237, .12); border: 1px solid rgba(124, 58, 237, .35); color: #c39bff;
    transition: all .18s;
}
.sw-strip-links a:hover { background: rgba(124, 58, 237, .28); color: #fff; }
html.light .sw-strip-links a { color: #7c3aed; }
html.light .sw-strip-links a:hover { color: #5b21b6; }

/* ==========================================================
   寄样非必卖 · 事先声明（明显提示）
   ========================================================== */
.sample-notice {
    margin: 16px 0 0; padding: 16px 18px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, .16), rgba(245, 158, 11, .07));
    border: 1px solid rgba(245, 158, 11, .45);
}
.sample-notice h4 { margin: 0 0 8px; font-size: .95rem; color: #fbbf24; }
.sample-notice p { margin: 0; font-size: .85rem; line-height: 1.9; color: var(--text); }
html.light .sample-notice h4 { color: #b45309; }

/* ==========================================================
   账号资料 · 多主播卡片（点击展开多平台账号）
   ========================================================== */
.anchor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.anchor-card {
    background: var(--card, #17171f); border: 1px solid var(--border); border-radius: 16px;
    padding: 18px 16px; cursor: pointer; transition: all .18s; text-align: center;
}
.anchor-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .28); }
.anchor-card .ac-ava {
    width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .25), rgba(91, 108, 255, .18));
    border: 2px solid rgba(195, 155, 255, .4);
}
.anchor-card .ac-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.anchor-card .ac-sub { font-size: .74rem; color: var(--muted); }
.anchor-card .ac-open { margin-top: 10px; font-size: .74rem; color: #c39bff; }
html.light .anchor-card .ac-open { color: #7c3aed; }
.anchor-acc-table { width: 100%; border-collapse: collapse; }
.anchor-acc-table th, .anchor-acc-table td {
    padding: 10px 12px; font-size: .85rem; text-align: left;
    border-bottom: 1px dashed var(--border);
}
.anchor-acc-table th { color: var(--muted); font-weight: 600; font-size: .76rem; }
.anchor-acc-table tr:last-child td { border-bottom: none; }
.fans-hide { color: var(--muted); font-size: .78rem; font-style: italic; }

/* 后台/个人资料 · 多主播编辑器 */
.ae-item { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--bg-soft); }
.ae-item-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ae-item-head input[type="text"] { flex: 1; min-width: 0; }
.ae-acc-row { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.ae-acc-row select, .ae-acc-row input { flex: 1; min-width: 90px; }
.ae-del { margin-left: auto; }

/* 多主播编辑器补充 */
.ae-fans-cb { display: flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.ae-fans-cb input { width: 15px; height: 15px; }
.ae-add-acc { margin-top: 4px; }
.ae-empty { color: var(--muted); font-size: .85rem; padding: 10px 0; text-align: center; border: 1px dashed var(--border); border-radius: 10px; margin-bottom: 12px; }

/* ---------- 列表排序 chips（sw.php / admin 列表共用） ---------- */
.sort-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.sort-chip { padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: .82rem; font-weight: 600; text-decoration: none; transition: .2s; }
.sort-chip:hover { color: var(--text); border-color: rgba(108,123,255,.45); }
.sort-chip.on { background: linear-gradient(135deg, rgba(102,126,234,.25), rgba(118,75,162,.25)); border-color: var(--accent); color: var(--text); box-shadow: 0 0 12px rgba(102,126,234,.3); }
.sort-chips-tip { margin-left: auto; color: var(--text-dim); font-size: .8rem; }
html.light .sort-chip:hover { border-color: #c3c9e2; }

/* ---------- 品牌商品库卡片紧凑化（E4：减少空白浪费） ---------- */
.item.bcard { padding: 12px 14px; }
.item.bcard .bcard-main { gap: 12px; }
.item.bcard .bcard-thumb { width: 64px; height: 64px; }
.item.bcard .bcard-actions { flex-direction: row; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-content: flex-start; max-width: 320px; }
.item.bcard .bcard-body { margin-top: 8px; padding-top: 8px; }
.item.bcard .bcard-row { margin-bottom: 5px; }
.item.bcard .bcard-flags { margin-top: 2px; }
@media (max-width: 720px) {
    .item.bcard .bcard-actions { max-width: none; width: 100%; justify-content: flex-start; }
}

/* ---------- 编辑入口链接（幽灵按钮风格） ---------- */
.bp-edit-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: transparent; border: 1px solid var(--border); color: var(--text); text-decoration: none; border-radius: 8px; cursor: pointer; transition: .15s; }
.bp-edit-link:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 推广已完成 ---------- */
.bp-badge-done { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: rgba(46,204,113,.14); border: 1px solid rgba(46,204,113,.45); color: #7ce8a8; }
html.light .bp-badge-done { color: #148c4b; }
.bp-stage.stage-complete { background: rgba(46, 204, 113, .16); color: #7ce8a8; border-color: rgba(46, 204, 113, .45); }
html.light .bp-stage.stage-complete { color: #148c4b; }

/* ========== 主题悬浮按钮：固定右上角，纯图标，不占头部栏目 ========== */
.theme-fab {
    position: fixed; top: 9px; right: 10px; z-index: 500;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--card); color: var(--text);
    font-size: 17px; line-height: 1; padding: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    transition: transform .15s, border-color .15s;
    -webkit-tap-highlight-color: transparent;
}
.theme-fab:hover { transform: scale(1.1); border-color: var(--primary); }
html.light .theme-fab { box-shadow: 0 4px 14px rgba(30, 36, 64, .15); }

/* ---------- 顶栏优化：右侧给悬浮按钮让位；导航可横滑、其余不挤压；手机端 logo 只留图标 ---------- */
.topbar-inner { padding-right: 58px; flex-wrap: nowrap; }
.topbar-inner .logo, .topbar-inner > .btn, .topbar-inner > a, .topbar-clock { flex-shrink: 0; }
.topbar-inner .nav { min-width: 0; }
@media (max-width: 640px) { .logo-t { display: none; } }

/* ========== 名称+分类 一行 ========== */
.fld-2col { display: flex; gap: 10px; align-items: center; }
.fld-2col .f-name { flex: 2 1 0; min-width: 0; }
.fld-2col .f-cat { flex: 1 1 0; min-width: 120px; }
.fld-2col .btn { flex-shrink: 0; }
@media (max-width: 560px) {
    .fld-2col { flex-wrap: wrap; }
    .fld-2col .f-name { flex: 1 1 100%; }
    .fld-2col .f-cat { flex: 1 1 0; }
}

/* ========== 佣金 / 商务返佣 一行（价格机制下一行） ========== */
.cr-line { display: flex; gap: 10px; flex-wrap: wrap; }
.cr-item {
    flex: 1; min-width: 170px;
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px; padding: 6px 12px;
    transition: border-color .15s;
}
.cr-item:focus-within { border-color: rgba(108, 123, 255, .55); }
.cr-item .cr-label { font-size: 13px; color: #8b93b0; white-space: nowrap; }
.cr-item input {
    flex: 1; min-width: 0; background: none; border: none; outline: none;
    color: #fff; font-size: 16px; font-weight: 600; text-align: center; padding: 6px 0;
}
.cr-item input::placeholder { color: #4a5170; font-weight: 400; }
.cr-item .nf-unit { font-size: 13px; color: #6fe3a1; white-space: nowrap; }
.cr-item input::-webkit-outer-spin-button, .cr-item input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cr-item input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
html.light .cr-item { background: #f5f6fa; border-color: #e3e6ef; }
html.light .cr-item .cr-label { color: #828aa0; }
html.light .cr-item input { color: #171a26; }
html.light .cr-item input::placeholder { color: #aab1c5; }
html.light .cr-item .nf-unit { color: #148c4b; }

/* ========== 折叠标签字段：默认只显示标签，点击展开输入 ========== */
.fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
.fx-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, .04);
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 999px; padding: 8px 14px;
    font-size: 13px; color: var(--text-dim); cursor: pointer;
    user-select: none; white-space: nowrap; max-width: 100%;
    transition: border-color .15s, background .15s, color .15s;
}
.fx-chip:hover { border-color: rgba(108, 123, 255, .5); color: var(--text); }
.fx-item.filled .fx-chip {
    border-style: solid; border-color: rgba(108, 123, 255, .45);
    background: rgba(108, 123, 255, .10); color: var(--text);
}
.fx-item.open .fx-chip { border-color: var(--primary); background: rgba(108, 123, 255, .16); }
.fx-val {
    font-weight: 600; color: #6fe3a1;
    max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-item:not(.filled) .fx-val { display: none; }
.fx-panel { display: none; align-items: center; gap: 8px; flex-wrap: wrap; padding-left: 4px; }
.fx-item.open .fx-panel { display: flex; }
.fx-item.open .fx-panel.fx-col { flex-direction: column; align-items: stretch; }
.fx-panel input[type="text"], .fx-panel input[type="number"], .fx-panel input[type="url"], .fx-panel select {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px; color: var(--text); font-size: 14px;
    padding: 9px 12px; outline: none; min-width: 0;
}
.fx-panel input:focus, .fx-panel select:focus { border-color: rgba(108, 123, 255, .55); }
.fx-panel input::placeholder { color: var(--text-dim); opacity: .65; }
.fx-panel .fx-unit { font-size: 13px; color: #6fe3a1; white-space: nowrap; }
.fx-panel .fx-lab { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.fx-num { width: 86px; text-align: center; }
.fx-grow { flex: 1; min-width: 150px; }
.fx-quick { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.fx-quick button {
    border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04);
    color: var(--text-dim); font-size: 12px; border-radius: 999px;
    padding: 5px 11px; cursor: pointer; transition: .15s;
}
.fx-quick button:hover { color: var(--text); border-color: rgba(108, 123, 255, .5); }
html.light .fx-chip { background: #f5f6fa; border-color: #d5dae8; color: #5c6376; }
html.light .fx-chip:hover { border-color: rgba(108, 123, 255, .55); color: #171a26; }
html.light .fx-item.filled .fx-chip { background: rgba(108, 123, 255, .10); color: #171a26; }
html.light .fx-item.open .fx-chip { background: rgba(108, 123, 255, .15); }
html.light .fx-val { color: #148c4b; }
html.light .fx-panel input, html.light .fx-panel select { background: #fff; border-color: #e3e6ef; color: #171a26; }
html.light .fx-panel .fx-unit { color: #148c4b; }
html.light .fx-quick button { background: #f5f6fa; border-color: #e3e6ef; color: #5c6376; }

/* ========== 寄样等选项展开面板（选中才显示） ========== */
.fold-panel { display: none; margin-top: 10px; }
.fold-panel.show { display: block; }

/* 折叠面板内的输入框不被 .form-row 全宽规则撑开（保持标签内联紧凑） */
.form-row .fx-panel input, .form-row .fx-panel select { width: auto; }
.form-row .fx-panel .fx-num { width: 86px; }
.form-row .fx-panel .fx-grow { flex: 1; min-width: 150px; }
.form-row .fx-panel.fx-col .input-icon input { width: auto; }

/* ---------- 后台左侧独立栏目（桌面固定 / 手机三杠折叠） ---------- */
body.admin-mode { padding-left: 216px; }
.adm-side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 216px; z-index: 300;
    background: var(--card); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 18px 12px 14px;
    transition: transform .28s ease;
}
.adm-logo {
    display: flex; align-items: center; gap: 9px; padding: 4px 10px 16px;
    font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.adm-logo:hover { color: var(--primary); }
.adm-nav {
    flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column;
    gap: 5px; padding: 14px 0; scrollbar-width: thin;
}
.adm-nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: 11px; color: var(--text-dim); font-size: 14px; white-space: nowrap;
    transition: background .18s, color .18s, box-shadow .18s;
}
.adm-nav a i { font-style: normal; font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.adm-nav a:hover { color: var(--text); background: rgba(108, 123, 255, .12); }
.adm-nav a.active {
    color: #fff; background: linear-gradient(135deg, var(--primary), #9b5cff);
    box-shadow: 0 4px 14px rgba(108, 123, 255, .38);
}
/* 导航分组标签：品牌方功能区 / 商品汇功能区 / 系统设置 */
.adm-nav-group {
    padding: 12px 12px 4px; font-size: 11px; color: var(--muted);
    letter-spacing: 2px; white-space: nowrap; user-select: none;
}
.adm-nav-group:first-child { padding-top: 0; }
.adm-side-foot { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.adm-foot-btn {
    display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px;
    color: var(--text-dim); font-size: 13px; border: 1px solid var(--border);
    transition: color .18s, border-color .18s;
}
.adm-foot-btn:hover { color: var(--primary); border-color: var(--primary); }
.adm-scrim {
    position: fixed; inset: 0; z-index: 290; background: rgba(8, 10, 22, .55);
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.adm-scrim.show { opacity: 1; pointer-events: auto; }
.adm-top { display: none; }
.adm-main { max-width: 1160px; }

/* 手机端：侧栏收起为抽屉，右上角三杠展开 */
@media (max-width: 900px) {
    body.admin-mode { padding-left: 0; }
    .adm-side { transform: translateX(-106%); box-shadow: none; }
    .adm-side.open { transform: none; box-shadow: 0 0 44px rgba(0, 0, 0, .5); }
    .adm-top {
        display: flex; align-items: center; gap: 10px;
        position: sticky; top: 0; z-index: 280;
        background: var(--card); border-bottom: 1px solid var(--border);
        padding: 8px 12px; min-height: 50px;
    }
    .adm-top-logo { font-size: 20px; flex-shrink: 0; }
    .adm-top-title {
        flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--text);
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .adm-burger {
        flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
        border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
        font-size: 17px; line-height: 1; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
    }
    .adm-burger:hover { border-color: var(--primary); color: var(--primary); }
    /* 右上角悬浮主题按钮给三杠让位 */
    body.admin-mode .theme-fab { right: 58px; }
}

/* ---------- 快递：三通一达主选项与折叠标签对齐 ---------- */
.fx-exp-main { margin: 0; flex-shrink: 0; }
.form-row .fx-panel .check-item { margin: 0; }
.form-row .fx-panel .check-item input[type="checkbox"] { width: auto; }

/* 克重「每X」输入框略窄 */
.form-row .fx-panel .fx-w-per { width: 76px; }

/* 后台无顶栏后，页头右侧按钮给悬浮主题钮让位 */
body.admin-mode .page-head > div:last-child { padding-right: 46px; }
@media (max-width: 900px) {
    body.admin-mode .page-head > div:last-child { padding-right: 0; }
}

/* ===== v8: 图片双区 + 排序下拉 ===== */
.up-2col{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:stretch}
.up-cell{display:flex;flex-direction:column;min-width:0}
.up-cell .up-t{font-size:13px;font-weight:600;color:var(--text-dim);margin:0 0 8px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.up-cell .up-t .req{color:#ef4444}
.up-cell .upload-zone{flex:1;margin-top:0}
.up-cell .mini-note{margin:6px 0 0}
@media(max-width:640px){.up-2col{grid-template-columns:1fr}}

.sort-dd{position:relative;display:inline-block}
.sort-dd-btn{user-select:none}
.sort-dd-btn .sort-arrow{font-size:10px;margin-left:3px;opacity:.7}
.sort-dd-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:260;min-width:148px;background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:0 14px 38px rgba(2,6,23,.22);padding:6px;display:none;flex-direction:column;gap:2px}
.sort-dd.open .sort-dd-menu{display:flex}
.sort-dd-menu a{display:flex;align-items:center;gap:6px;padding:8px 12px;border-radius:9px;font-size:13px;font-weight:600;color:var(--text);white-space:nowrap}
.sort-dd-menu a:hover{background:rgba(37,99,235,.09)}
.sort-dd-menu a.on{background:rgba(37,99,235,.13);color:#2563eb}
body.dark .sort-dd-menu a.on{color:#93c5fd}
.sort-dd-sep{height:1px;background:var(--border);margin:4px 6px}

/* ===== v9: 开关 / 手机端头部精简 / 授权表单美化 ===== */
.bp-switches{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.sw-switch{display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-size:12.5px;font-weight:600;color:var(--text-dim);user-select:none;white-space:nowrap}
.sw-switch input{display:none}
.sw-switch i{width:34px;height:19px;border-radius:999px;background:var(--bg-soft);border:1px solid var(--border);position:relative;transition:all .18s;flex-shrink:0}
.sw-switch i::after{content:'';position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:var(--text-dim);transition:all .18s}
.sw-switch input:checked + i{background:rgba(46,204,113,.25);border-color:rgba(46,204,113,.55)}
.sw-switch input:checked + i::after{left:17px;background:#2ecc71}
.sw-switch input:checked ~ span{color:var(--text)}

/* 手机授权：添加表单美化 */
.tel-add-form{display:grid;grid-template-columns:1.4fr 1fr .7fr .8fr auto;gap:10px;align-items:stretch}
.tel-add-form input,.tel-add-form select{width:100%;padding:11px 14px;border-radius:12px;border:1px solid var(--border);background:var(--bg-soft);color:var(--text);font-size:14px;outline:none;transition:border-color .18s,box-shadow .18s;appearance:none;-webkit-appearance:none}
.tel-add-form select{background-image:linear-gradient(45deg,transparent 50%,var(--text-dim) 50%),linear-gradient(135deg,var(--text-dim) 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px;background-repeat:no-repeat;padding-right:34px;cursor:pointer}
.tel-add-form input:focus,.tel-add-form select:focus{border-color:var(--primary,#2563eb);box-shadow:0 0 0 3px rgba(37,99,235,.16)}
.tel-add-form input::placeholder{color:var(--text-dim);opacity:.75}
.tel-add-form .btn{white-space:nowrap;border-radius:12px}
@media(max-width:860px){.tel-add-form{grid-template-columns:1fr 1fr}.tel-add-form .btn{grid-column:1/-1}}

/* 手机端头部精简：主题钮下移让出顶栏；身份只留图标；页头标题隐藏保持空间 */
@media(max-width:640px){
    .theme-fab{top:112px}
    body.admin-mode .theme-fab{top:112px}
    .topbar-inner .u-name{display:none}
    .page-head h1,.page-head .sub{display:none}
    .page-head{margin:0 0 12px;min-height:0}
    .page-head a.btn.back-mini{padding:7px 11px;font-size:15px;line-height:1} a.back-mini{font-size:16px}
}

/* ---------- v11 商城卡片美化（大气版） ---------- */
.product-grid { gap: 14px; }
@media (min-width: 1400px) { .product-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.product-card .badge { max-width: 100%; word-break: break-all; }
.product-card {
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108,123,255,.55);
    box-shadow: 0 14px 34px rgba(0,0,0,.38), 0 0 0 1px rgba(108,123,255,.25);
}
html.light .product-card:hover { box-shadow: 0 14px 30px rgba(30,36,64,.16), 0 0 0 1px rgba(108,123,255,.3); }
.product-card .thumb-link { display: block; overflow: hidden; position: relative; }
.product-card .thumb-link::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 62%, rgba(10,12,26,.42) 100%);
    pointer-events: none;
}
.product-card .thumb { transition: transform .35s ease; }
.product-card:hover .thumb { transform: scale(1.06); }
.product-card .body { padding: 13px 14px; gap: 7px; }
.product-card .name { font-size: 15px; line-height: 1.45; letter-spacing: .2px; }
.product-card .name:hover { color: var(--primary); }
.product-card .price {
    font-size: 19px; font-weight: 800; letter-spacing: .3px;
    background: linear-gradient(135deg, #ffb648 0%, #ff7a45 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html.light .product-card .price { background: linear-gradient(135deg, #f59e0b, #ea580c); -webkit-background-clip: text; background-clip: text; }
.product-card .badge { border-radius: 999px; backdrop-filter: blur(4px); }
.product-card .actions { padding: 11px 14px; border-top: 1px dashed var(--border); background: rgba(255,255,255,.015); }
.product-card .actions .btn { border-radius: 10px; }
.contact-line {
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
    border-radius: 10px; padding: 6px 9px; font-size: 12px; line-height: 1.7;
}
html.light .contact-line { background: rgba(20,23,43,.03); }
/* 卡片左上角的勾选框美化 */
.product-card .xpx-cb { accent-color: var(--primary); box-shadow: 0 1px 6px rgba(0,0,0,.4); border-radius: 4px; }

/* 商城卡片图片角标 */
.mall-flags { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 5px; flex-wrap: wrap; z-index: 2; }
.mall-flags .badge { box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.product-thumb-placeholder { display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 13px; letter-spacing: 2px; width: 100%; aspect-ratio: 4 / 3; border: none; border-radius: 0; background: var(--bg-soft); }

/* ---------- v12 列表瘦身 + 图标操作 + 移动端收纳 ---------- */
.card-line1 { align-items: baseline; gap: 7px; }
.c-pill { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.c-comm { background: rgba(255,150,60,.13); border: 1px solid rgba(255,150,60,.4); color: #ffb37a; }
.c-earn { background: rgba(46,204,113,.13); border: 1px solid rgba(46,204,113,.45); color: #7ce8a8; }
.card-line2 { align-items: center; gap: 7px; }
.c-time { color: var(--text-dim); font-size: 12px; }
html.light .c-comm { background: rgba(234,88,12,.08); color: #c2410c; }
html.light .c-earn { background: rgba(22,163,74,.08); color: #15803d; }

/* 图标操作行：全部操作收进一行小图标 */
.product-card .actions.icon-row { flex-wrap: nowrap; gap: 4px; justify-content: center; padding: 9px 10px; }
.icon-btn { flex: 0 0 auto; width: 38px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 15px; line-height: 1; padding: 0; font-family: inherit;
    background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text);
    cursor: pointer; text-decoration: none; transition: all .15s; }
.icon-btn:hover { background: rgba(108,123,255,.2); border-color: rgba(108,123,255,.55); transform: translateY(-1px); }
.icon-btn.green { background: rgba(46,204,113,.12); border-color: rgba(46,204,113,.42); }
.icon-btn.green:hover { background: rgba(46,204,113,.25); border-color: rgba(46,204,113,.62); }
.icon-btn.danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.42); }
.icon-btn.danger:hover { background: rgba(239,68,68,.26); border-color: rgba(239,68,68,.64); }
html.light .icon-btn { background: rgba(15,23,42,.05); }
.product-card .actions.icon-row .bp-lock-tip { font-size: 13px; }
.mall-flags.right { left: auto; right: 8px; justify-content: flex-end; }

/* 移动端：左上悬浮返回 + 右上三条杠收纳标签栏 */
.m-back-fab, .m-tabs-fab { display: none; }
.m-sheet { display: none; }
@media (max-width: 760px) {
    .m-back-fab, .m-tabs-fab { position: fixed; top: 10px; z-index: 460; width: 38px; height: 38px; border-radius: 50%;
        background: rgba(23,27,49,.94); border: 1px solid rgba(255,255,255,.16); color: #e8eaf6; font-size: 17px;
        align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.45); cursor: pointer; padding: 0; }
    .m-back-fab { left: 10px; }
    .m-tabs-fab { right: 10px; }
    html.light .m-back-fab, html.light .m-tabs-fab { background: rgba(255,255,255,.95); color: #1e2340; border-color: rgba(15,23,42,.14); }
    .m-sheet { position: fixed; top: 56px; right: 10px; z-index: 459; background: var(--card); border: 1px solid var(--border);
        border-radius: 14px; padding: 12px; width: min(300px, 84vw); max-height: 68vh; overflow: auto;
        box-shadow: 0 18px 46px rgba(0,0,0,.55); }
    .m-sheet.show { display: block; }
    .m-sheet .m-sheet-group + .m-sheet-group { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
    .m-sheet .src-tabs, .m-sheet .brand-chips { margin: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
    .m-sheet .src-tab, .m-sheet .brand-chip { display: block; text-align: left; }
}

/* ==========================================================
   v13 手机标题栏规范 + 筛选行一行化 + 卡片字号精调 + 寄样小标
   ========================================================== */
/* —— 寄样小标：列表页只显示「📦寄」，与时间同一行；快递单号在预览/编辑里查看 —— */
.c-sample-flag{display:inline-flex;align-items:center;gap:2px;font-size:11px;font-weight:800;color:#34d399;background:rgba(16,185,129,.13);border:1px solid rgba(16,185,129,.42);border-radius:999px;padding:0 7px;white-space:nowrap;line-height:1.7}
html.light .c-sample-flag{color:#059669;background:rgba(5,150,105,.1);border-color:rgba(5,150,105,.38)}
/* —— 价格单位（/箱 等）小号跟随价格 —— */
.price-unit{font-size:.62em;font-weight:700}

/* —— 筛选行一行化：搜索+分类+商务+佣金+价格 同一排（超出可横滑） —— */
.filter-row{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-bottom:12px;padding:2px}
.filter-row::-webkit-scrollbar{display:none}
.filter-row>*{flex:0 0 auto}
.filter-row .filter-bar{margin:0;padding:6px;gap:6px;flex-wrap:nowrap}
.filter-row .search-bar{margin:0;flex:0 0 auto}
.filter-row .search-bar input{min-width:190px;flex:0 0 auto}
.filter-row .sort-chips{margin:0;flex-wrap:nowrap;gap:6px}
.filter-row .filter-bar input[type="search"]{min-width:170px}
.filter-row .filter-bar select{min-width:92px}
form.filter-row{margin-bottom:12px}

@media (max-width: 760px) {
    /* —— 手机卡片字号：标题/价格略小，单位·佣金·赚与寄样小标同号，一行放得下 —— */
    .product-card .name{font-size:12px;line-height:1.42}
    .card-line1{flex-wrap:nowrap;gap:5px;overflow:hidden}
    .card-line1 .price{font-size:14px}
    .card-line1 .c-pill{font-size:11px;padding:1px 6px}
    .card-line2,.card-line2 .c-time{font-size:11px}
    .card-line2 .sw-badge{font-size:11px;padding:1px 7px}

    /* —— 前台标题栏：标签一排显示；选中只有下划线不满充；个人中心人物图标；文字标签不带图标 —— */
    .topbar-inner{height:46px;padding:0 48px;gap:2px}
    .topbar-inner .logo{display:none}
    .topbar-inner .nav{flex:initial;gap:0}
    .topbar-inner .nav a,.topbar-inner>a.btn{padding:8px 9px;font-size:13px;line-height:1;background:none!important;border:none;border-bottom:2px solid transparent;border-radius:0;color:var(--text-dim);box-shadow:none}
    .topbar-inner .nav a.active,.topbar-inner>a.btn.active{color:var(--primary);background:none!important;border-bottom:2px solid var(--primary)}
    .topbar-inner .tt-ic{display:none}
    .topbar-inner .u-name{display:none}

    /* —— 后台标题栏：左←右☰固定在栏两端，汉堡与主题钮依次排开 —— */
    .adm-top{padding:4px 48px 4px 48px;min-height:46px}
    body.m-has-sheet .adm-burger{margin-right:40px}

    /* —— 悬浮返回/标签三杠：固定在标题栏的最左边和最右边 —— */
    .m-back-fab{top:4px;left:6px}
    .m-tabs-fab{top:4px;right:6px}

    /* —— 主题钮：前台/品牌站固定在标题栏右端；后台让开汉堡 —— */
    .theme-fab{top:4px;right:6px;width:38px;height:38px;font-size:17px}
    body.admin-mode .theme-fab{top:4px;right:52px}
    body.admin-mode.m-has-sheet .theme-fab{right:94px}
    body.tele .theme-fab{top:56px}

    /* —— 筛选行手机上更紧凑 —— */
    .filter-row .filter-bar{padding:4px}
    .filter-row .filter-bar input[type="search"]{min-width:150px}
}
/* v13b 时间与寄样小标绑定同行 */
.c-time-wrap{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}

/* ==========================================================
   v14 手机卡片悬浮信息条 + 筛选行搜索图标 + 头部职位圆圈账号名
   ========================================================== */
/* —— 缩略图底部悬浮条：仅手机显示（此时正文行2隐藏）；桌面端仍显示正文行2 —— */
.thumb-meta{display:none;position:absolute;left:6px;right:6px;bottom:6px;z-index:2;align-items:center;gap:6px;pointer-events:none}
.thumb-meta .sw-badge{font-size:10px;padding:1px 6px;background:rgba(8,10,22,.55);color:#e9d5ff;border:none;backdrop-filter:blur(3px)}
.thumb-meta .tm-time{color:#fff;font-size:10px;font-weight:600;text-shadow:0 1px 4px rgba(0,0,0,.65);white-space:nowrap}
.thumb-meta .tm-flag{margin-left:auto;font-size:10px;font-weight:800;color:#a7f3d0;background:rgba(8,10,22,.55);border:1px solid rgba(52,211,153,.55);border-radius:999px;padding:1px 7px;white-space:nowrap;line-height:1.6}

/* —— 职位圆圈（仅手机显示，固定名字左上方；各职位颜色不同） —— */
.u-role{display:none}

/* —— 搜索图标：桌面输入框常显、图标钮隐藏；手机收起为图标（见下方媒体查询） —— */
.m-search{display:flex;align-items:center;gap:4px}
.m-search-btn{display:none}

@media (max-width: 760px) {
    .thumb-meta{display:flex}
    .product-card .body .card-line2{display:none}

    /* —— 佣金/赚 去高亮标签框：价格·单位·佣金·赚 一行纯文字放下 —— */
    .card-line1 .c-pill{background:none;border:none;padding:0}
    .card-line1 .c-comm{color:#ffa94d}
    .card-line1 .c-earn{color:#3ddc84}
    html.light .card-line1 .c-comm{background:none;border:none;color:#ea7c28}
    html.light .card-line1 .c-earn{background:none;border:none;color:#16a34a}

    /* —— 筛选行：搜索收成图标，点击展开输入框；「筛选/搜索」按钮隐藏（下拉即选即筛、回车即搜） —— */
    .m-search{display:flex;align-items:center;gap:4px}
    .m-search-btn{display:flex;flex:0 0 auto;width:34px;height:34px;border-radius:50%;border:1px solid var(--border);background:var(--bg-soft);color:var(--text);font-size:14px;align-items:center;justify-content:center;cursor:pointer}
    .m-search input{display:none}
    .m-search.open input{display:block;width:150px;min-width:150px}
    .m-filter-submit{display:none}

    /* —— 头部账号：名字固定靠右，左上方职位圆圈分色 —— */
    .topbar-inner .u-tab{margin-left:auto;position:relative;padding-left:17px;color:var(--text);font-weight:700}
    .topbar-inner .u-tab .u-ic{display:none}
    .topbar-inner .u-tab .u-name{display:inline;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
    .u-tab .u-role{position:absolute;top:1px;left:0;width:15px;height:15px;border-radius:50%;font-size:9px;font-weight:800;color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 4px rgba(0,0,0,.3)}
    .u-role-admin{background:#a855f7}
    .u-role-ops{background:#3b82f6}
    .u-role-bus{background:#f59e0b}
    .u-role-anchor{background:#22c55e}
}

/* v14b 手机筛选行再瘦身：搜索图标+分类+商务+佣金+价格 一屏全显 */
@media (max-width: 760px) {
    .filter-row{gap:6px;padding:2px}
    .filter-row .filter-bar{gap:5px;padding:2px}
    .filter-row .filter-bar select{min-width:0;width:auto;padding:8px 24px 8px 8px;font-size:12px}
    .filter-row .sort-dd-btn{padding:8px 9px;font-size:12px}
    .filter-row .sort-dd-btn .sort-arrow{margin-left:2px}
    .filter-row .search-bar input{min-width:150px}
}

/* v14c 悬浮条紧凑：商务标不换行、字号微缩 */
.thumb-meta .sw-badge{white-space:nowrap}
@media (max-width: 760px) {
    .thumb-meta{gap:5px;left:5px;right:5px}
    .thumb-meta .sw-badge{font-size:9.5px;padding:1px 5px}
    .thumb-meta .tm-time{font-size:9.5px}
    .thumb-meta .tm-flag{font-size:9.5px;padding:1px 6px}
}

/* ==========================================================
   价格机制：直播价 / 日常价 两组分段输入（每组 价格 元/ 数量单位）
   覆盖上面旧的整行 flex 占比规则（本文件内后者优先）
   ========================================================== */
.po-group { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; }
.po-group input { min-width: 0; }
.po-row .po-group-live input[name="price_opt_price[]"] { flex: 0 0 118px; }
.po-row .po-group-live input[name="price_opt_qty[]"] { flex: 1 1 auto; }
.po-row .po-group-daily input.po-daily { flex: 0 0 96px; }
.po-row .po-group-daily input[name="price_opt_daily_qty[]"] { flex: 1 1 auto; }
@media (max-width: 640px) {
    .po-row { flex-wrap: wrap; }
    .po-group { flex: 1 1 100%; }
    .po-row .po-group-live input[name="price_opt_price[]"] { flex: 0 0 92px; }
    .po-row .po-group-daily input.po-daily { flex: 0 0 76px; }
}

/* 「再创建一组价格机制」高亮按钮：醒目绿渐变，一眼可见 */
#poAdd {
    display: inline-block; border: none; cursor: pointer;
    background: linear-gradient(135deg, #07c160, #05a653);
    color: #fff; font-size: 14.5px; font-weight: 800; letter-spacing: .3px;
    padding: 10px 22px; border-radius: 999px;
    box-shadow: 0 4px 14px rgba(7, 193, 96, .42), 0 0 0 4px rgba(7, 193, 96, .12);
    transition: transform .12s ease, box-shadow .12s ease;
}
#poAdd:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(7, 193, 96, .5), 0 0 0 5px rgba(7, 193, 96, .16); }
#poAdd:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(7, 193, 96, .4); }

/* ==========================================================
   题词页固定五列布局（统一版式，不再有 三列/四列/五列 切换）
   经典语录 25%｜商品信息 10%｜商品话术 30%｜商品清单 10%｜实时题词 25%
   顶部三个显示开关（经典语录 / 商品题词 / 实时题词）控制区域显隐，
   关闭后其余列按比例自动补位；iframe 懒加载
   ========================================================== */

/* 顶栏区域开关（checkbox 胶囊样式） */
.lt-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text); cursor: pointer; user-select: none;
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 9px;
    background: var(--card); white-space: nowrap;
}
.lt-toggle input { display: none; }
.lt-toggle i {
    width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto;
    border: 1.5px solid var(--text-dim); position: relative; transition: .15s;
}
.lt-toggle input:checked + i { background: var(--primary); border-color: var(--primary); }
.lt-toggle input:checked + i::after {
    content: ""; position: absolute; left: 3px; top: 0px;
    width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.lt-toggle:has(input:not(:checked)) { opacity: .55; }

@media (min-width: 1100px) {
    /* 五列 flex：覆盖旧版 grid 三列，比例 23 : 15 : 28 : 9 : 25（商品信息列加宽，减少纵向滑动） */
    body.live-mode:not(.tele) .live-main {
        display: flex; flex-direction: row; gap: 12px;
        align-items: stretch;
    }
    body.live-mode:not(.tele) .live-main > .live-yulu      { flex: 23 23 0; min-width: 230px; }
    body.live-mode:not(.tele) .live-main > .live-left      { flex: 15 15 0; min-width: 200px; }
    body.live-mode:not(.tele) .live-main > .live-script    { flex: 28 28 0; min-width: 280px; }
    body.live-mode:not(.tele) .live-main > .live-side      { flex: 9 9 0; min-width: 120px; }
    body.live-mode:not(.tele) .live-main > .live-embed-col { flex: 25 25 0; min-width: 240px; }

    /* 各列等高铺满，卡内滚动 */
    body.live-mode:not(.tele) .live-main > .live-left,
    body.live-mode:not(.tele) .live-main > .live-side { height: 100%; max-height: none; overflow-y: auto; position: static; }

    /* 区域显隐开关（关闭后其余列 flex 比例自动补位） */
    body.live-mode.no-yulu  .live-yulu,
    body.live-mode.no-embed .live-embed-col { display: none; }
    body.live-mode.no-prod  .live-left,
    body.live-mode.no-prod  .live-script,
    body.live-mode.no-prod  .live-side { display: none; }
}

/* 经典语录列（内嵌 yulu 前台页） */
.live-yulu {
    display: flex; flex-direction: column; min-height: 0;
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: #fff;
}
.live-yulu iframe { flex: 1; min-height: 0; width: 100%; border: none; background: #fff; }

/* 实时题词列（内嵌 shishitici 显示端） */
.live-embed-col {
    display: flex; flex-direction: column; min-height: 0;
}
.live-embed-col .le-bar { flex: 0 0 auto; }
.live-embed-col iframe {
    flex: 1; min-height: 0; width: 100%;
    border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #fff;
}

/* 提词模式：只留话术区，语录列隐藏；题词列受「实时题词」开关控制（开着则右侧 25% 显示） */
body.tele .live-yulu { display: none; }
body.tele.no-embed .live-embed-col { display: none; }
body.tele:not(.no-embed) .live-embed-col {
    display: flex; flex: 25 25 0; min-width: 240px; height: 100%;
}
@media (min-width: 1100px) {
    body.tele:not(.no-embed) .live-main { display: flex; flex-direction: row; gap: 12px; }
    body.tele:not(.no-embed) .live-main > .live-script { flex: 75 75 0; }
}
@media (max-width: 1099px) {
    body.tele .live-embed-col { display: none; } /* 手机端题词模式下也不挤题词列 */
}

/* 手机 / 平板：语录列与题词列隐藏（屏幕宽度不足，题词可切提词模式，语录走 yulu 页面） */
@media (max-width: 1099px) {
    .live-yulu, .live-embed-col { display: none; }
    .lt-toggle { display: none; }
}

/* 商品信息列紧凑化：商品图与手卡同一行并排、标签精简，一屏显示更多内容 */
.lp-media { display: contents; } /* 默认布局不受影响（悬浮面板等沿用原样） */
@media (min-width: 1100px) {
    body.live-mode:not(.tele) .live-left > .card { padding: 10px; }
    body.live-mode:not(.tele) .live-left .lp-top { flex-direction: column; align-items: stretch; gap: 8px; }
    /* 商品图 + 手卡图同行并排，各占一半 */
    body.live-mode:not(.tele) .live-left .lp-media { display: flex; gap: 6px; align-items: flex-start; }
    body.live-mode:not(.tele) .live-left .lp-img {
        width: 0; flex: 1 1 0; min-width: 0; height: 88px;
        object-fit: cover; border-radius: 8px;
    }
    body.live-mode:not(.tele) .live-left .handcard-inline {
        width: 0; flex: 1 1 0; min-width: 0; height: 88px;
        object-fit: cover; border-radius: 8px;
    }
    /* 标题与价格收紧 */
    body.live-mode:not(.tele) .live-left h2 { font-size: 14px; line-height: 1.35; margin: 0 0 2px; }
    body.live-mode:not(.tele) .live-left .lp-price { font-size: 16px; margin: 2px 0; }
    body.live-mode:not(.tele) .live-left .daily-price { font-size: 11px; margin-left: 5px; }
    /* 标签精简：小字号小内边距，少占空间 */
    body.live-mode:not(.tele) .live-left .badge { padding: 1px 6px; font-size: 10px; border-radius: 10px; }
    body.live-mode:not(.tele) .live-left .lp-meta { gap: 4px; margin-bottom: 4px; }
    body.live-mode:not(.tele) .live-left .po-tags { gap: 4px; margin-top: 4px; }
    body.live-mode:not(.tele) .live-left .po-tags-live { margin-top: 4px; }
    body.live-mode:not(.tele) .live-left .po-tag,
    body.live-mode:not(.tele) .live-left .po-tags-live .po-tag {
        font-size: 11px; font-weight: 700; padding: 2px 8px; box-shadow: none;
    }
    body.live-mode:not(.tele) .live-left .timer-chip { padding: 2px 8px; font-size: 11px; border-radius: 12px; }
    /* 分区标题与标签组收紧 */
    body.live-mode:not(.tele) .live-left h3 { font-size: 12px; margin: 8px 0 5px; }
    body.live-mode:not(.tele) .live-left .mech-tags { gap: 4px; }
    body.live-mode:not(.tele) .live-left .mech-tag { padding: 2px 7px; font-size: 11px; border-radius: 6px; }
    /* 附加信息：标签与值同一行，压缩高度 */
    body.live-mode:not(.tele) .live-left .info-grid { grid-template-columns: 1fr; gap: 4px; }
    body.live-mode:not(.tele) .live-left .info-item {
        padding: 4px 8px; font-size: 11px; border-radius: 6px;
        flex-direction: row; align-items: baseline; gap: 6px;
    }
    body.live-mode:not(.tele) .live-left .info-label { font-size: 10px; flex-shrink: 0; }
    body.live-mode:not(.tele) .live-left .info-val { font-size: 12px; }
    body.live-mode:not(.tele) .live-left .lp-remark { font-size: 12px; }
}
