/* =========================================================
   防直播间系统 · 设计系统 (高端大气 / 专业水准)
   品牌：珊瑚粉橙渐变 + 鎏金点缀 + 深空背景
   ========================================================= */
:root {
  --brand: #ff2e63;
  --brand-2: #ff7a3d;
  --brand-grad: linear-gradient(135deg, #ff2e63 0%, #ff7a3d 100%);
  --brand-grad-soft: linear-gradient(135deg, #ff5b7f 0%, #ff9966 100%);
  --gold: #ffd76a;
  --gold-grad: linear-gradient(135deg, #ffe9a8 0%, #f6c453 100%);
  --ink: #181826;
  --ink-2: #6b7280;
  --ink-3: #9aa0ad;
  --bg: #f5f6fa;
  --card: #ffffff;
  --line: #ececf3;
  --line-2: #f1f2f7;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(20, 20, 45, .06);
  --shadow-md: 0 10px 30px rgba(20, 20, 45, .10);
  --shadow-lg: 0 20px 60px rgba(20, 20, 45, .16);
  --shadow-brand: 0 8px 22px rgba(255, 46, 99, .35);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
button:active { transform: scale(.95); }

/* 通用品牌按钮 */
.btn-grad {
  background: var(--brand-grad); color: #fff; font-weight: 700;
  border-radius: 22px; padding: 10px 22px; box-shadow: var(--shadow-brand);
}
.btn-ghost {
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 8px 16px; font-weight: 600; font-size: 13px;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* 通用品牌标识 */
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto;
  background: var(--brand-grad); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 46, 99, .35);
}
.logo-mark svg { width: 18px; height: 18px; }

/* ===================== 首页 ===================== */
.home { max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100%; padding-bottom: 56px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.topbar .b-title { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.topbar .b-sub { font-size: 9px; letter-spacing: 2px; color: var(--ink-3); font-weight: 700; }
.topbar .spacer { flex: 1; }
.topbar .admin-link {
  font-size: 12px; font-weight: 700; color: var(--brand);
  background: rgba(255, 46, 99, .08); padding: 6px 14px; border-radius: 20px;
}
.topbar .admin-link:hover { background: rgba(255, 46, 99, .16); }

/* 轮播 */
.carousel { position: relative; margin: 14px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 16/8; background: #e7e9f2; }
.carousel .slides { display: flex; height: 100%; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.carousel .slide { min-width: 100%; height: 100%; position: relative; display: flex; align-items: flex-end; }
.carousel .slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .45)); }
.carousel .slide .cap {
  position: relative; z-index: 2; color: #fff; font-size: 18px; font-weight: 800;
  padding: 16px 18px; letter-spacing: .5px; text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.dots { position: absolute; bottom: 12px; right: 14px; z-index: 3; display: flex; gap: 6px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: .3s; }
.dots span.on { background: #fff; width: 18px; border-radius: 4px; }

/* 分类 */
.cats { display: flex; gap: 10px; padding: 6px 16px 14px; overflow-x: auto; }
.cats::-webkit-scrollbar { display: none; }
.cats .cat {
  flex: 0 0 auto; padding: 9px 18px; border-radius: 22px; background: var(--card);
  font-size: 13px; color: var(--ink-2); white-space: nowrap; font-weight: 600;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line-2);
}
.cats .cat.on { background: var(--brand-grad); color: #fff; font-weight: 700; border-color: transparent; box-shadow: var(--shadow-brand); }

/* 标题 */
.section-title { padding: 6px 16px 12px; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 9px; letter-spacing: .5px; }
.section-title::before { content: ''; width: 4px; height: 17px; background: var(--brand-grad); border-radius: 3px; }

/* 2*5 封面网格 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .cover { position: relative; aspect-ratio: 1/1; overflow: hidden; }
.card .cover img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .cover .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 35%, rgba(0,0,0,.35)); }
.card .cover .live-tag {
  position: absolute; left: 9px; top: 9px; background: var(--brand); color: #fff; font-size: 10px;
  padding: 3px 8px; border-radius: 11px; display: flex; align-items: center; gap: 4px; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 3px 8px rgba(255, 46, 99, .4);
}
.card .cover .live-tag .pulse { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: pulse 1.3s infinite; }
.card .cover .view {
  position: absolute; right: 9px; top: 9px; background: rgba(0, 0, 0, .42); color: #fff; font-size: 10px;
  padding: 3px 8px; border-radius: 11px; backdrop-filter: blur(4px);
}
.card .cover .play {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .25); border: 1.5px solid rgba(255, 255, 255, .8);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px;
  backdrop-filter: blur(4px); transition: .2s;
}
.card:hover .cover .play { background: var(--brand); border-color: transparent; transform: scale(1.08); }
.card .meta { padding: 9px 11px 11px; }
.card .meta .name { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta .sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; color: var(--ink-3); padding: 48px 0; font-size: 14px; }

/* ===================== 直播间（全屏深空） ===================== */
.room { position: fixed; inset: 0; background: #07070d; color: #fff; overflow: hidden; }
.room video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #111; }
.room .video-center { object-fit: contain; }
.room .video-bg { object-fit: cover; }
.video-fallback {
  position: absolute; inset: 0; background:
    radial-gradient(120% 80% at 50% 0%, #2a1a3a 0%, #120a1f 55%, #07070d 100%);
  display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .45); font-size: 14px;
}
.video-fallback::after { content: 'LIVE'; position: absolute; font-size: 64px; font-weight: 900; color: rgba(255,255,255,.04); letter-spacing: 8px; }

/* B站 iframe 满屏铺底（底层，四边顶到屏幕边缘） */
.bili-layer { position: absolute; inset: 0; z-index: 1; background: #000; }
.bili-layer .bili-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* 顶部信息条（玻璃） */
.room-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20; padding: 14px 14px 34px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0));
  display: flex; align-items: center; gap: 9px;
}
.room-top .back {
  font-size: 26px; line-height: 1; color: #fff; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center;
}
.room-top .brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.room-top .logo { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .7); flex: 0 0 auto; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.room-top .brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.room-top .store { font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.room-top .live-sub { font-size: 10px; color: rgba(255, 255, 255, .6); font-weight: 700; letter-spacing: 1px; }
.room-top .spacer { flex: 1; }
.room-top .btn { font-size: 12.5px; padding: 7px 14px; border-radius: 20px; font-weight: 700; color: #fff; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.btn-follow { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.btn-follow.done { background: rgba(255, 255, 255, .34); border-color: rgba(255, 255, 255, .75); }
.btn-cs { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
.btn-cs svg { width: 14px; height: 14px; }

/* 虚拟人数 */
.viewers {
  position: absolute; top: 62px; left: 14px; z-index: 20; font-size: 12px; font-weight: 600;
  background: rgba(0, 0, 0, .4); padding: 5px 11px; border-radius: 16px; backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 6px;
}
.viewers .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* 公屏 */
.chat {
  position: absolute; left: 12px; bottom: 78px; width: 72%; max-height: 44%; overflow-y: auto; z-index: 15;
  display: flex; flex-direction: column; gap: 7px; pointer-events: none;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chat::-webkit-scrollbar { display: none; }
.chat .row { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.45; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.chat .row img { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.chat .row .bubble { background: rgba(0, 0, 0, .45); border-radius: 12px; padding: 5px 10px; max-width: 100%; word-break: break-word; backdrop-filter: blur(4px); color: #fff; }
.chat .row .u { color: rgba(255, 255, 255, .6); margin-right: 5px; font-weight: 600; }
.chat .row.sys .bubble, .chat .row.me .bubble { background: rgba(0, 0, 0, .55); }
.chat .row.me .bubble { border: 1px solid rgba(255, 255, 255, .35); }
.chat .row.flower .bubble { background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .4); }
.chat.hidden { display: none !important; }

/* 飘花 / 爱心（从按钮升起，自然上飘） */
#fxLayer { position: absolute; inset: 0; z-index: 12; pointer-events: none; overflow: hidden; }
.fx { position: absolute; z-index: 12; pointer-events: none; will-change: transform, opacity; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }

/* 底部输入栏（玻璃） */
.room-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; align-items: center; gap: 9px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, .68), rgba(0, 0, 0, 0));
}
.room-bottom .input {
  flex: 1 1 0; max-width: 40%; min-width: 80px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 22px; padding: 10px 15px; color: #fff; font-size: 13px;
}
.room-bottom .input::placeholder { color: rgba(255, 255, 255, .6); }
/* @ 与发送按钮已移除 */
.room-bottom .btn-showcase {
  width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto; color: #fff;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.room-bottom .btn-showcase svg { width: 24px; height: 24px; }
.room-bottom .btn-showcase:active { background: rgba(255, 255, 255, .26); }
/* 优惠区：文字按钮，风格与购物袋一致 */
.room-bottom .btn-promo {
  height: 46px; padding: 0 14px; border-radius: 14px; flex: 0 0 auto;
  font-size: 14px; font-weight: 700; letter-spacing: 1px; color: #fff;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.room-bottom .btn-promo:active { background: rgba(255, 255, 255, .26); }
.room-bottom .btn-flower {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; color: #fff;
  background: #ff5b7f; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 91, 127, .4);
}
.room-bottom .btn-flower svg { width: 24px; height: 24px; }
.room-bottom .btn-hide {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; color: #fff;
  background: #ff5b7f; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; letter-spacing: 1px; box-shadow: 0 4px 12px rgba(255, 91, 127, .4);
}
.room-bottom .btn-hide:active { transform: scale(.94); }

/* @选择面板 */
.at-picker {
  display: none; position: absolute; bottom: 72px; left: 14px; z-index: 40;
  background: #fff; color: var(--ink); border-radius: 14px; padding: 6px;
  max-height: 200px; overflow: auto; width: 170px; box-shadow: var(--shadow-lg);
}
.at-picker button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: none; background: none;
  font-size: 13px; color: var(--ink); border-radius: 9px;
}
.at-picker button:hover { background: var(--line-2); color: var(--brand); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.modal { background: var(--card); color: var(--ink); border-radius: 22px; width: 84%; max-width: 350px; padding: 24px; text-align: center; box-shadow: var(--shadow-lg); animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 17px; margin-bottom: 14px; font-weight: 800; }
.modal .qr { width: 184px; height: 184px; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: #fff; }
.modal .qr img { width: 100%; height: 100%; }
.modal .row2 { font-size: 14px; margin: 8px 0; color: var(--ink-2); }
.modal .row2 b { color: var(--brand); font-weight: 800; }
.modal .close { margin-top: 16px; width: 100%; background: var(--brand-grad); color: #fff; padding: 11px 0; border-radius: 24px; font-weight: 800; box-shadow: var(--shadow-brand); }

/* 商品橱窗（底部抽屉式） */
.prod-sheet { background: #fff; color: var(--ink); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: slideUp .3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.prod-sheet .ps-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.prod-sheet .ps-head h3 { font-size: 16px; font-weight: 800; }
.prod-sheet .ps-head .ps-close { width: 30px; height: 30px; border-radius: 50%; background: var(--line-2); color: var(--ink-2); font-size: 18px; }
.prod-sheet .prod-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-height: 320px; overflow-y: auto; }
.prod-sheet .prod { background: var(--line-2); border-radius: 14px; padding: 10px; text-align: center; transition: .2s; }
.prod-sheet .prod:active { transform: scale(.97); }
.prod-sheet .prod .thumb { width: 100%; aspect-ratio: 1/1; border-radius: 10px; object-fit: cover; }
.prod-sheet .prod .pname { font-size: 12px; margin-top: 7px; font-weight: 600; line-height: 1.3; height: 31px; overflow: hidden; }
.prod-sheet .prod .price { color: var(--brand); font-weight: 800; font-size: 14px; margin-top: 3px; }
.prod-sheet .prod .pdesc { font-size: 11px; color: var(--ink-3); margin-top: 5px; line-height: 1.4; height: 30px; overflow: hidden; }
.prod-sheet .prod .reserve { margin-top: 8px; width: 100%; border: none; border-radius: 9px; padding: 7px; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--brand); font-family: inherit; cursor: pointer; }
.prod-sheet .prod .reserve:active { transform: scale(.97); }

/* B站 iframe 舞台（隐藏滚动条：稍微放大裁掉边缘滚动条区域） */
.bili-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 0; background: #000; overflow: hidden; }
.bili-layer, .bili-frame { scrollbar-width: none; -ms-overflow-style: none; }
.bili-layer::-webkit-scrollbar, .bili-frame::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* 已预约按钮（禁用态） */
.prod-sheet .prod .reserve.done { background: var(--line); color: var(--ink-3); cursor: default; box-shadow: none; }
.prod-sheet .prod .reserve.done:active { transform: none; }

/* 首页封面：已关注角标 */
.card .cover .fav-tag {
  position: absolute; left: 9px; top: 34px; background: rgba(0, 0, 0, .5); color: #ffd54a; font-size: 10px;
  padding: 3px 8px; border-radius: 11px; font-weight: 800; letter-spacing: .5px; backdrop-filter: blur(4px);
}

/* 进入直播间欢迎遮罩（规避浏览器自动播放限制） */
.welcome-mask {
  position: fixed; inset: 0; z-index: 500; display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(20,20,35,.86), rgba(5,5,12,.95));
  backdrop-filter: blur(6px); padding: 24px;
}
.welcome-card {
  width: 100%; max-width: 320px; text-align: center; color: #fff;
  background: linear-gradient(160deg, rgba(40,40,60,.7), rgba(20,20,32,.75));
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 30px 24px 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: welcomePop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes welcomePop { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }
.welcome-logo { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; box-shadow: 0 6px 18px rgba(255,46,99,.4); border: 2px solid rgba(255,255,255,.25); }
.welcome-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome-title { font-size: 17px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.welcome-title b { color: #ff7a9c; }
.welcome-tip { font-size: 12.5px; color: rgba(255,255,255,.7); margin-bottom: 22px; }
.welcome-btn {
  width: 100%; border: none; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 800; color: #fff;
  background: var(--brand-grad); font-family: inherit; cursor: pointer; letter-spacing: .5px;
  box-shadow: 0 8px 22px rgba(255,46,99,.45); transition: transform .15s;
}
.welcome-btn:active { transform: scale(.97); }

/* 会员弹窗 */
.member-card { width: 86%; max-width: 320px; }
.member-tip { font-size: 12.5px; color: var(--ink-3); margin: -6px 0 14px; }
.member-card .field { width: 100%; background: var(--line-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--ink); font-size: 14px; margin-bottom: 10px; font-family: inherit; outline: none; }
.member-card .field:focus { border-color: var(--brand); }
.member-err { color: #ff6b8a; font-size: 12px; min-height: 16px; }

/* 轻提示 */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== 后台（仪表盘） ===================== */
.admin { max-width: 768px; margin: 0 auto; padding: 0 0 80px; }
.admin-head {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; color: #fff; background: linear-gradient(120deg, #1c1c2e 0%, #2a1a3a 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.admin-head .a-brand { display: flex; align-items: center; gap: 10px; }
.admin-head .a-brand .logo-mark { box-shadow: 0 4px 12px rgba(255, 46, 99, .45); }
.admin-head .a-title { font-size: 16px; font-weight: 800; letter-spacing: .5px; }
.admin-head .a-sub { font-size: 9px; letter-spacing: 2px; color: rgba(255, 255, 255, .5); font-weight: 700; }
.admin-head .a-home { font-size: 12px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .14); padding: 7px 14px; border-radius: 20px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px 20px 4px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); }
.stat .num { font-size: 28px; font-weight: 900; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .5px; }
.stat .lbl { font-size: 12px; color: var(--ink-2); margin-top: 4px; font-weight: 600; }

.panel { background: var(--card); border-radius: var(--radius); margin: 16px 20px; padding: 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.panel-head h2::before { content: ''; width: 4px; height: 16px; background: var(--brand-grad); border-radius: 3px; }
.act { background: var(--brand-grad); color: #fff; padding: 7px 14px; border-radius: 18px; font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow-brand); }

/* 轮播编辑器：带实时预览 */
.carousel-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.car-item { border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: #fff; transition: .2s; }
.car-item:hover { box-shadow: var(--shadow-md); }
.car-preview { position: relative; height: 96px; display: flex; align-items: flex-end; }
.car-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .5)); }
.car-preview span { position: relative; z-index: 2; color: #fff; font-size: 14px; font-weight: 800; padding: 10px 12px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.car-body { padding: 12px; }
.car-body label { display: block; font-size: 11px; color: var(--ink-3); margin: 8px 0 4px; font-weight: 600; }
.car-body input[type="text"], .car-body input:not([type="color"]) {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-family: inherit; background: #fafbfc;
}
.car-body input:focus { outline: none; border-color: var(--brand); background: #fff; }
.car-colors { display: flex; gap: 10px; }
.car-colors > div { flex: 1; }
.car-colors label { margin-top: 0; }
.car-colors input[type="color"] { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 3px; cursor: pointer; }
.car-del { margin-top: 10px; }

/* 分类编辑器 */
.cats-editor { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chip { display: flex; align-items: center; gap: 8px; background: var(--line-2); border-radius: 14px; padding: 6px 8px 6px 12px; }
.cat-chip input { border: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink); width: 110px; }
.cat-chip input:focus { outline: none; }
.cat-chip .cid { font-size: 10px; color: var(--ink-3); background: #fff; padding: 2px 7px; border-radius: 8px; }
.cat-chip .x { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--brand); font-size: 14px; display: flex; align-items: center; justify-content: center; }

/* 直播间配置卡片 */
.room-card { border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.room-card-head { display: flex; align-items: center; gap: 12px; padding: 14px; background: linear-gradient(180deg, #fafbff, #fff); border-bottom: 1px solid var(--line-2); }
.room-card-head .rc-cover { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; box-shadow: var(--shadow-sm); }
.room-card-head .rc-info { flex: 1; min-width: 0; }
.room-card-head .rc-name { font-size: 15px; font-weight: 800; }
.room-card-head .rc-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 14px; }
.rc-grid .full { grid-column: 1 / -1; }
.rc-field label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; font-weight: 600; }
.rc-field input, .rc-field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-family: inherit; background: #fafbfc;
}
.rc-field input:focus, .rc-field select:focus { outline: none; border-color: var(--brand); background: #fff; }

.sub { padding: 14px; border-top: 1px solid var(--line-2); }
.sub h3 { font-size: 14px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.sub-inter { background: linear-gradient(180deg, rgba(255, 46, 99, .04), transparent); }
.sub-inter h3 { color: var(--brand); }
.sub-prod { background: linear-gradient(180deg, rgba(54, 209, 220, .05), transparent); }
.sub-prod h3 { color: #1c9bb0; }
.sub-cs { background: linear-gradient(180deg, rgba(246, 196, 83, .07), transparent); }
.sub-cs h3 { color: #c8920a; }

.mini-item { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.mini-item .row2 { display: flex; gap: 10px; }
.mini-item .row2 > div { flex: 1; }
.mini-item label { display: block; font-size: 11px; color: var(--ink-3); margin: 8px 0 4px; font-weight: 600; }
.mini-item input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; font-family: inherit; background: #fafbfc; }
.mini-item input:focus { outline: none; border-color: var(--brand); background: #fff; }
.mini-item .del { margin-top: 8px; }

/* 保存条 */
.save-bar { position: sticky; bottom: 0; z-index: 30; display: flex; justify-content: center; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.save-bar .save { background: var(--brand-grad); color: #fff; padding: 13px 40px; border-radius: 26px; font-weight: 800; font-size: 15px; box-shadow: var(--shadow-brand); }

/* 提示横幅 */
.banner { margin: 16px 20px 0; background: linear-gradient(90deg, rgba(255, 46, 99, .08), rgba(255, 122, 61, .08)); color: #b8431f; padding: 12px 16px; border-radius: 14px; font-size: 13px; border: 1px solid rgba(255, 46, 99, .15); }

@media (max-width: 480px) {
  .room-card-head .rc-cover { width: 46px; height: 46px; }
}
