html, body, #app { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #1f1d1b;
  background: #f6f5f3;
}
button { font-family: inherit; }
* { box-sizing: border-box; }
.app { height: 100vh; display: flex; flex-direction: column; background: #f6f5f3; font-size: 14px; }

.topwrap { flex: 0 0 auto; display: flex; flex-direction: column; }
.topbar { height: 56px; flex: 0 0 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: #fff; border-bottom: 1px solid #eceae6; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand b { font-size: 16px; letter-spacing: 1px; }
.logo { width: 26px; height: 26px; border-radius: 8px; background: #e8523f; color: #fff; display: grid; place-items: center; font-size: 14px; }
.sub { color: #9a958e; font-size: 12px; }
.topactions { display: flex; gap: 10px; align-items: center; }
.pill { border: 1px solid #f0d9d4; background: #fff7f5; color: #b7402f; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.pill b { font-size: 15px; }
.ghost { background: #fff; border: 1px solid #e4e1dc; color: #4a4642; border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.ghost:hover { background: #faf9f7; }
.ghost.sm { padding: 5px 10px; font-size: 12px; }
.ghost.xs { padding: 2px 8px; font-size: 12px; }
.ghost.wide { width: 100%; }

.login { flex: 1; display: grid; grid-template-columns: 1.2fr 380px; gap: 40px; align-items: center; padding: 0 8vw; max-width: 1100px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: 34px; line-height: 1.35; margin: 0 0 14px; letter-spacing: .5px; }
.hero p { color: #6d6862; line-height: 1.8; margin: 0 0 18px; }
.hero ul { list-style: none; padding: 0; color: #8a847d; font-size: 13px; line-height: 2; }
.card { background: #fff; border: 1px solid #eceae6; border-radius: 16px; padding: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.04); display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.tabs button { flex: 1; border: none; background: #f4f2ef; color: #7a746d; padding: 9px; border-radius: 9px; cursor: pointer; }
.tabs button.on { background: #1f1d1b; color: #fff; }
input, select, textarea { width: 100%; border: 1px solid #e4e1dc; border-radius: 9px; padding: 10px 12px; font: inherit; background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #e8523f; }
.primary { background: #e8523f; color: #fff; border: none; border-radius: 9px; padding: 11px 16px; font: inherit; cursor: pointer; }
.primary:hover { background: #d84633; }
.primary:disabled { background: #d9d5d0; cursor: not-allowed; }
.primary.big { width: 100%; padding: 13px; font-size: 15px; }
.err { color: #c0392b; font-size: 12px; margin: 2px 0 0; }

.workspace { flex: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 14px; padding: 14px; overflow: hidden; }
.col { background: #fff; border: 1px solid #eceae6; border-radius: 14px; padding: 14px; overflow-y: auto; }
.col h3 { font-size: 13px; color: #5c5751; margin: 6px 0 10px; font-weight: 600; }
.col h3:first-child { margin-top: 0; }
.count { color: #b8b2ab; font-weight: 400; }

.slot { border: 1.5px dashed #e0dcd6; border-radius: 10px; display: grid; place-items: center; cursor: pointer; overflow: hidden; background: #fbfaf9; color: #a8a29b; text-align: center; }
.slot:hover { border-color: #e8b4ac; }
.slot.big { height: 240px; }
.slot.small { height: 84px; font-size: 12px; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ph { padding: 10px; line-height: 1.7; font-size: 13px; }
.ph small { color: #bdb7b0; font-size: 11px; }

.tpl { margin-top: 4px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; min-height: 120px; border: 1.5px dashed #e0dcd6; border-radius: 10px; padding: 6px; background: #fbfaf9; }
.tpl .ph { grid-column: 1/-1; display: grid; place-items: center; cursor: pointer; }
.thumb { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 5px; cursor: pointer; }
.thumb:hover { opacity: .55; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.row .tip { flex: 1 1 100%; margin-top: 2px; }
.tip { color: #a8a29b; font-size: 11px; line-height: 1.6; margin: 8px 0 0; }

.stage-head { display: flex; justify-content: space-between; align-items: baseline; }
.status { font-size: 12px; color: #b7402f; }
.progress { height: 4px; background: #f1efec; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.progress i { display: block; height: 100%; background: #e8523f; transition: width .3s; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; background: #f4f2ef; }
.empty { height: 70%; display: grid; place-content: center; justify-items: center; color: #a8a29b; gap: 4px; }
.emptyIcon { font-size: 34px; color: #ded9d3; }
.actions { margin-top: 12px; display: flex; gap: 10px; align-items: center; }

.right label { display: flex; justify-content: space-between; font-size: 12px; color: #7a746d; margin: 14px 0 6px; }
.right label b { color: #1f1d1b; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; border: 1px solid #e4e1dc; background: #fff; border-radius: 8px; padding: 8px 0; cursor: pointer; color: #6d6862; }
.seg button.on { background: #1f1d1b; border-color: #1f1d1b; color: #fff; }
input[type=range] { padding: 0; }
.submit { margin-top: 20px; padding-top: 14px; border-top: 1px solid #f1efec; }
.hint { font-size: 11px; color: #a8a29b; margin: 8px 0 0; text-align: center; }

.errToast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #2b2321; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13px; display: flex; gap: 10px; align-items: center; z-index: 20; }
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.3); display: grid; place-items: center; z-index: 30; }
.dialog { width: 320px; background: #fff; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.dialog h4 { margin: 0 0 4px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #e0dcd6; border-radius: 4px; }

/* ---------- 左侧导航 ---------- */
.body { flex: 1; display: flex; overflow: hidden; }
.side { width: 176px; flex: 0 0 176px; background: #fff; border-right: 1px solid #eceae6; padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.sideTitle { font-size: 11px; color: #b3aca4; margin: 10px 8px 4px; letter-spacing: 1px; }
.sideTitle:first-child { margin-top: 0; }
.side button { display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: transparent; padding: 9px 10px; border-radius: 9px; cursor: pointer; color: #5c5751; font-size: 13px; text-align: left; }
.side button:hover { background: #faf8f6; }
.side button.on { background: #fdf1ee; color: #b7402f; font-weight: 600; }
.side button.off { color: #c9c2bb; cursor: default; }
.side button.off:hover { background: transparent; }
.side .ico { width: 16px; text-align: center; opacity: .85; }
.side .badge { margin-left: auto; background: #e8523f; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 6px; font-style: normal; }
.side .soonTag { margin-left: auto; font-size: 10px; color: #c9c2bb; font-style: normal; }
.sideFoot { margin-top: auto; padding: 10px 8px 2px; border-top: 1px solid #f2efeb; }
.sideFoot p { font-size: 10px; color: #bdb7b0; line-height: 1.6; margin: 0; }

/* ---------- 视频转动图 ---------- */
.slot.video { height: 320px; padding: 0; }
.slot.video video { width: 100%; height: 100%; object-fit: contain; background: #111; }
.steps-lite p { font-size: 12px; color: #6d6862; line-height: 1.7; margin: 0 0 10px; }
.steps-lite b { color: #37332f; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.vitem { border: 1px solid #eceae6; border-radius: 10px; overflow: hidden; background: #fbfaf9; display: flex; flex-direction: column; }
.vitem img { width: 100%; height: auto; display: block; background: #fbfaf9; }
.vitem video { width: 100%; height: auto; max-height: none; object-fit: contain; background: #000; display: block; }
.vitem video { aspect-ratio: auto; }
.vitem .zipBox { height: 160px; display: grid; place-items: center; font-size: 40px; }
.vmeta { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 12px; color: #5c5751; gap: 8px; }
.vmeta a { color: #b7402f; text-decoration: none; border: 1px solid #f0d9d4; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: #fff7f5; }
.seg.col3 button { font-size: 12px; padding: 8px 4px; }

/* ---------- 积分明细 ---------- */
.pointsPage, .soonPage { flex: 1; padding: 14px; overflow: auto; }
.col.wide { width: 100%; }
.table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.table th { text-align: left; color: #a8a29b; font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid #f1efec; }
.table td { padding: 9px 10px; border-bottom: 1px solid #f7f5f3; }
.table .muted { color: #a8a29b; font-size: 12px; }
.table .plus { color: #2e7d32; }
.table .minus { color: #b7402f; }

/* ---------- 未上线 ---------- */
.soonPage { display: grid; place-items: center; }
.soonCard { background: #fff; border: 1px solid #eceae6; border-radius: 16px; padding: 36px 44px; text-align: center; }
.soonCard h2 { font-size: 18px; margin: 6px 0 8px; }
.soonCard p { color: #a8a29b; font-size: 13px; margin: 0 0 16px; }

/* ---------- Live 运镜 + 素材库 ---------- */
.motions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.motions button { border: 1px solid #e4e1dc; background: #fff; border-radius: 8px; padding: 8px 4px; font-size: 12px; color: #6d6862; cursor: pointer; }
.motions button.on { background: #1f1d1b; border-color: #1f1d1b; color: #fff; }
.libtag { font-size: 10px; color: #b3aca4; }

.libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.libitem { border: 1px solid #eceae6; border-radius: 10px; padding: 8px; background: #fff; }
.libthumb { position: relative; border-radius: 8px; overflow: hidden; background: #f4f2ef; aspect-ratio: 3/4; }
.libthumb img, .libthumb video { width: 100%; height: 100%; object-fit: contain; background: #f4f2ef; display: block; }
.kindTag { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 5px; }
.libname { font-size: 11px; color: #6d6862; margin: 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.libacts { display: flex; flex-wrap: wrap; gap: 4px; }
.libacts .ghost { padding: 3px 6px; font-size: 10px; }
.ghost.danger { color: #b7402f; border-color: #f0d9d4; }

/* 裂变页三列商品图 */
.slots.three { grid-template-columns: 1fr 1fr 1fr; }

.tipToast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #2e7d32; color: #fff; padding: 9px 14px; border-radius: 10px; font-size: 13px; z-index: 25; }

.phoneDialog { width: 340px; align-items: center; text-align: center; }
.phoneDialog .qr { width: 240px; height: 240px; image-rendering: pixelated; border: 1px solid #f1efec; border-radius: 8px; }
.urlLine { word-break: break-all; }


/* Live 创作 多图上传 */
.lgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lthumb { position: relative; border-radius: 10px; overflow: hidden; background: #f2efea; aspect-ratio: 3/4; }
.lthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lx { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.ladd { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #d6cfc5; border-radius: 10px; color: #8a847d; font-size: 20px; cursor: pointer; aspect-ratio: 3/4; }
.ladd small { font-size: 11px; }
.slot.big img { object-fit: contain; background: #f2efea; }


/* Live 编辑 */
.layoutPick { display: flex; gap: 10px; }
.layoutPick button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid #e4e1dc; border-radius: 10px; background: #fff; cursor: pointer; }
.layoutPick button.on { border-color: #e8523f; background: #fdf2f0; }
.layoutPick b { font-size: 12px; font-weight: 500; color: #4a4642; }
.ly { width: 30px; height: 40px; border: 1.5px solid #b9b3aa; border-radius: 3px; position: relative; }
.ly2::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid #b9b3aa; }
.ly2h::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1.5px solid #b9b3aa; }
.ly4::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1.5px solid #b9b3aa; }
.ly4::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; border-top: 1.5px solid #b9b3aa; }

/* 预览区：整体高度受控，不用滚动就能看全 */
.editGrid {
  display: grid; gap: 8px; background: #fff; border-radius: 12px; padding: 8px;
  margin: 0 auto; width: auto; height: min(56vh, 520px);
}
.editGrid.g1 { aspect-ratio: 3/4; grid-template-columns: 1fr; grid-template-rows: 1fr; }
.editGrid.g2 { aspect-ratio: 3/4; grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
.editGrid.g2h { aspect-ratio: 3/4; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.editGrid.g4 { aspect-ratio: 3/4; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.editCell { position: relative; background: #f6f3ef; border: 1px dashed #ddd6cc; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; overflow: hidden; color: #8a847d; min-height: 0; }
.editCell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.editCell .plus { font-size: 22px; color: #b9b3aa; }
.editCell b { font-size: 12px; color: #6e6961; }
.editCell small { font-size: 10px; }
.editCell .lx { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer; z-index: 2; }
.dialog.wide { width: min(860px, 92vw); max-height: 80vh; overflow: auto; }
.libgrid.pick .libitem { cursor: pointer; }
.kindTag.live { background: #e8523f; color: #fff; }
/* Live 编辑页：让三栏都在一屏里 */
.workspace:has(.editGrid) .col { padding-top: 14px; padding-bottom: 14px; }


/* Live 编辑：结果视频限制高度，按钮始终看得见 */
.editResultBox { margin-top: 10px; }
.editResultBox .vitem { max-width: 260px; }
.editResultBox video { max-height: 200px; }
.editActions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }


/* 图片预览灯箱 */
.previewMask { background: rgba(0,0,0,.82); z-index: 60; }
.previewBox { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 94vw; max-height: 94vh; }
.previewImg { max-width: 94vw; max-height: 78vh; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #1c1b1a; }
.previewBar { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.94); padding: 8px 14px; border-radius: 999px; }
.previewBar .tip { color: #4a4642; }
.previewBar a.ghost { text-decoration: none; display: inline-flex; align-items: center; }


/* 商品图/参考图预览：完整显示不裁切 */
.slot.ref img, .slot.big img { object-fit: contain !important; background: #f2efea; }
.slot.ref { cursor: zoom-in; }


/* 素材库批量操作条 */
.libBar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pickBox { position: absolute; top: 6px; left: 6px; z-index: 3; background: rgba(255,255,255,.92); border-radius: 6px; padding: 2px 4px; display: flex; align-items: center; cursor: pointer; }
.pickBox input { width: 14px; height: 14px; margin: 0; cursor: pointer; }
.libitem.picked .libthumb { outline: 2px solid #e8523f; outline-offset: -2px; border-radius: 8px; }


/* 站内公告条：顶部通栏，单行，不占内容区 */
.announceBar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 18px; background: #fff8e6; border-bottom: 1px solid #f3e2b6; color: #7a5a12; font-size: 13px; flex: 0 0 auto; }
.announceBar .announceText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announceBar .ghost.xs { flex: 0 0 auto; }


/* 素材库保存目录 */
.saveBar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; background: #faf8f6; border: 1px solid #eceae6; border-radius: 10px; font-size: 12.5px; color: #6d6862; }
.saveBar .saveLabel { color: #a8a29b; }
.saveBar .savePath { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1f1d1b; }


.sideFoot .verText { font-size: 11px; color: #c3bdb6; margin: 2px 0 0; }


/* AI 动态产出的实况照片 */
.liveBox { position: relative; border-radius: 10px; overflow: hidden; background: #efece8; }
.liveBox img { width: 100%; display: block; }
.liveBox .kindTag { position: absolute; left: 8px; top: 8px; }
