/* 4VUPS v2 主播主页补充样式（叠加层；v1 语言延续） */

/* hero */
.streamer-hero { padding: 22px; margin-bottom: 14px; position: relative; }
/* 装扮入口（仅本人）：hero 卡右上角；hero-info 右侧让位按钮实际占位防重叠
   （桌面按钮 95px+边距→118px；手机按钮 103px+边距→124px，实测值+余量） */
.hero-decor { position: absolute; top: 14px; right: 14px; }
.streamer-hero.has-decor .hero-info { padding-right: 118px; }
.hero-row { display: flex; gap: 18px; align-items: center; }
.hero-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  flex: none; box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.hero-avatar-fb { display: flex; align-items: center; justify-content: center;
  background: var(--vups-accent); color: var(--vups-primary);
  font-size: 38px; font-weight: 700; }
.hero-info { flex: 1; min-width: 0; }
.hero-name { font-size: 22px; font-weight: 700; }
.hero-bio { color: var(--vups-muted); font-size: 14px; margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.hero-social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.social-chip { display: inline-flex; gap: 6px; font-size: 12px;
  background: var(--vups-accent); color: var(--vups-text);
  border-radius: 999px; padding: 2px 12px; }
.social-chip b { color: var(--vups-primary); }
.hero-follow { display: flex; align-items: center; gap: 14px; margin-top: 14px;
  border-top: 1px solid var(--vups-border); padding-top: 14px; }
.follow-count { font-size: 13px; color: var(--vups-muted); }
.follow-count b { font-size: 19px; color: var(--vups-text); margin-right: 4px; }
@media (max-width: 640px) {
  .hero-row { gap: 12px; }
  .hero-avatar, .hero-avatar-fb { width: 72px; height: 72px; font-size: 28px; }
  .hero-name { font-size: 19px; }
  .hero-bio { max-width: 100%; }
  .streamer-hero.has-decor .hero-info { padding-right: 124px; }}


/* tab 菜单（装入卡片：.card 供底/边框，此处收薄内边距并接好与 hero/内容的 14px 节奏；
   不吸附顶栏：hero 与菜单随内容滚走（用户定稿） */
.s-tabs { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 12px; margin-bottom: 14px; }
.s-tab { flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 999px; font-size: 14px;
  color: var(--vups-text); border: 1px solid transparent; }
.s-tab:hover { text-decoration: none; background: var(--vups-accent); }
.s-tab.is-cur { background: var(--vups-primary); color: var(--vups-primary-text); }
.tab-badge { background: var(--vups-accent); color: var(--vups-primary);
  border-radius: 999px; padding: 0 8px; font-size: 12px; }
.s-tab.is-cur .tab-badge { background: rgba(255,255,255,.28); color: inherit; }

/* 通用内容卡 */
.list-stack { display: flex; flex-direction: column; gap: 14px; }
.item-card { padding: 18px 20px; }
.i-head { display: flex; align-items: baseline; gap: 10px; }
.i-title { font-size: 17px; font-weight: 600; color: var(--vups-text); }
a.i-title:hover { color: var(--vups-primary); }
.i-title.is-locked { color: #8a8078; }
.i-date { margin-left: auto; color: var(--vups-muted); font-size: 13px; flex: none; }
.lock-ic { vertical-align: -2px; margin-right: 2px; }
.locked-card .i-head { padding-bottom: 10px; border-bottom: 1px solid var(--vups-border); }
/* 列表卡头部分隔线：可读内容卡与受限卡同构（受限卡自带，:not 防双线） */
.item-card:not(.locked-card) .i-head,
.item-card:not(.locked-card) .g-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--vups-border);
  margin-bottom: 10px;
}
.locked-card { text-align: center; }
.i-sub { color: var(--vups-muted); font-size: 13px; margin-top: 6px; }
.g-sub { color: var(--vups-muted); font-size: 13px; margin: 4px 0 8px; }
.g-desc { font-size: 13px; color: var(--vups-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.sep { border-top: 1px solid var(--vups-border); margin: 14px 0; }

/* 最新更新 */
.latest-list { list-style: none; margin: 0; padding: 0; display: flex;
  flex-direction: column; gap: 4px; }
.latest-list li { display: flex; align-items: center; gap: 10px; padding: 7px 6px;
  border-radius: 8px; }
.latest-list li:hover { background: var(--vups-accent); }
.latest-list a { display: flex; align-items: center; gap: 10px; flex: 1;
  color: inherit; min-width: 0; }
.latest-list a:hover { text-decoration: none; }
.lt-badge { flex: none; min-width: 68px; text-align: center; font-size: 12px;
  background: var(--vups-accent); color: var(--vups-primary);
  border-radius: 6px; padding: 2px 6px; }
.lt-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 15px; }
.lt-date { flex: none; color: var(--vups-muted); font-size: 13px; }
.latest-list .is-locked { color: #8a8078; }
.latest-list .is-locked .lt-title { text-decoration: line-through; text-decoration-thickness: 1px; }

/* 图集 */
/* 等高缩略图，宽度按原始比例（+N 累加宽度法的基准）；
   高度 CSS 变量驱动：桌面 110px / 手机 64px。
   子项禁止 flex 收缩——容量由 +N 累加法控制，收缩会造成假宽度（实测被压成 18px 细条） */
.g-thumbs { --thumb-h: 110px; }
@media (max-width: 640px) { .g-thumbs { --thumb-h: 64px; } }
.g-thumbs > * { flex: none; }
.g-thumbs img { height: var(--thumb-h); width: auto;
  border-radius: 12px; display: block; }
.g-thumbs .g-ext { width: var(--thumb-h); height: var(--thumb-h); }
.g-thumbs .g-more { width: var(--thumb-h); height: var(--thumb-h);
  font-size: calc(var(--thumb-h) * 0.18); }
.g-thumbs { display: flex; gap: 8px; overflow: hidden; }
.g-ext { width: 110px; height: 110px; display: inline-flex; align-items: center;
  justify-content: center; background: var(--vups-accent); border-radius: 12px;
  font-size: 13px; color: var(--vups-muted); overflow: hidden; padding: 6px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery-grid .g-item { margin: 0; }
.gallery-grid img { width: 100%; border-radius: 14px; cursor: zoom-in; }
.gallery-grid img.zoom { position: fixed; inset: 3vh 3vw; width: auto; max-width: 94vw;
  max-height: 94vh; z-index: 300; object-fit: contain; cursor: zoom-out;
  background: rgba(0,0,0,.8); border-radius: 12px; }
.gallery-grid figcaption { font-size: 13px; color: var(--vups-muted); margin-top: 6px; }

/* 文件柜 */
.f-entries { display: flex; gap: 8px; overflow: hidden; white-space: nowrap;
  margin-top: 10px; }
/* 图标+数字计数胶囊（v1 count-pill 语言，图标内嵌） */
.count-pill { display: inline-flex; align-items: center; gap: 4px; }
.count-pill .material-symbols-outlined { font-size: 14px; color: var(--vups-primary); }
.f-desc-line { font-size: 13px; color: var(--vups-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-entry { display: inline-flex; align-items: center; gap: 4px; }
.f-entry .material-symbols-outlined { font-size: 14px; color: var(--vups-primary); }
.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--vups-accent); padding: 10px 14px; border-radius: 12px; }
.file-row .f-name { font-weight: 600; }
.f-note { color: var(--vups-muted); font-size: 13px; }
/* 提取码/解压密码：纯文字右对齐（margin-left:auto 推到行尾），复制按钮紧随其后 */
.f-code { margin-left: auto; font-size: 13px; color: var(--vups-muted); }
.f-code b { color: var(--vups-text); font-weight: 600; letter-spacing: .5px; }
.ut-free { color: #1d7a3a; }

/* 点歌台 */
.song-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex;
  flex-direction: column; }
.song-row { display: grid; grid-template-columns: auto 1.5fr 1.6fr 132px auto;
  gap: 12px; align-items: center; padding: 9px 6px;
  border-bottom: 1px solid var(--vups-border); font-size: 14px; }
.s-style { font-size: 12px; border-radius: 6px; padding: 2px 8px; color: #fff; }
.st-pop { background: #476a9e; } .st-gufeng { background: #9a4438; }
.st-rap { background: #857629; } .st-rock { background: #3a4046; }
.st-jazz { background: #6f4d8c; } .st-other { background: #7c6f64; }
.s-main { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.s-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-artist { color: var(--vups-muted); font-size: 13px; flex: none; }
.s-note { color: var(--vups-muted); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-unlock { text-align: right; font-size: 13px; width: 132px;
  color: var(--vups-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { border: 1px solid var(--vups-border); background: var(--vups-card);
  color: var(--vups-text); border-radius: 999px; padding: 4px 14px;
  font-size: 13px; cursor: pointer; font-family: inherit; }
.chip:hover { background: var(--vups-accent); }
/* 通用激活态（礼物分类筛选用；点歌台曲风芯片仍由 .chip.active.st-* 覆盖配色） */
.chip.active { background: var(--vups-primary); color: var(--vups-primary-text);
  border-color: var(--vups-primary); }
.chip.active.st-pop, .chip.active.st-gufeng, .chip.active.st-rap,
.chip.active.st-rock, .chip.active.st-jazz, .chip.active.st-other { color: #fff; }
.chip.active.st-pop { background: #476a9e; } .chip.active.st-gufeng { background: #9a4438; }
.chip.active.st-rap { background: #857629; } .chip.active.st-rock { background: #3a4046; }
.chip.active.st-jazz { background: #6f4d8c; } .chip.active.st-other { background: #7c6f64; }
@media (max-width: 640px) {
  .song-row { grid-template-columns: auto 1fr auto; row-gap: 4px; }
  .song-row .s-note, .song-row .s-unlock { display: none; }
  .song-row .s-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* 礼品商店 */
.balance-bar { display: flex; align-items: center; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; }
/* 礼品商店侧栏：搜索卡 + 类别计数卡；窄屏堆叠到网格上方 */
.gift-shop { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.gift-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.gift-side-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.gift-side-cats { list-style: none; margin: 0; padding: 0; }
.gift-side-cats li { display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--vups-text); }
.gift-side-cats li:hover { background: var(--vups-accent); }
.gift-side-cats li.is-cur { background: var(--vups-primary); color: var(--vups-primary-text); }
.gift-side-cats li span { color: var(--vups-muted); font-size: 12px; }
.gift-side-cats li.is-cur span { color: inherit; opacity: .85; }
@media (max-width: 768px) {
  .gift-shop { grid-template-columns: 1fr; }
  .gift-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .gift-side > section { flex: 1 1 240px; }
}
.gift-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.gift-img { position: relative; display: block; aspect-ratio: 1; border-radius: 14px;
  overflow: hidden; background: var(--vups-accent); }
.gift-img img { width: 100%; height: 100%; object-fit: cover; }
/* 礼物详情图：恒定正方（桌面 400px 定宽，窄屏通栏），缺图走 GIFT_PH 占位 SVG */
.gd-img { flex: 0 0 400px; max-width: 45%; aspect-ratio: 1; }
.gd-img img { width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 14px; border: 1px solid var(--vups-border); }
.gift-name { font-weight: 600; font-size: 15px; }
.gift-name a { color: var(--vups-text); }
.gift-desc { font-size: 13px; color: var(--vups-muted);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gift-foot { display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; }
.gift-price { color: var(--vups-primary); font-weight: 700; font-size: 17px; }
.gd-price b { font-size: 30px; color: var(--vups-primary); }
.gd-meta { color: var(--vups-muted); font-size: 14px; margin: 6px 0; }
.gd-info { display: flex; flex-direction: column; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
@media (max-width: 768px) {
  .gift-detail-grid { grid-template-columns: 1fr !important; }
  .g-desc { max-width: 100%; }
  .gd-img { flex: none; max-width: 100%; width: 100%; }
}

/* 留言 */
.msg-row { padding: 12px 4px; border-bottom: 1px solid var(--vups-border); }
.msg-row:last-child { border-bottom: none; }
.msg-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.msg-head b { font-size: 14px; }
.msg-head span { color: var(--vups-muted); font-size: 12px; }
.msg-body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg-new { animation: msg-in .35s ease; background: var(--vups-accent);
  border-radius: 10px; padding: 12px 10px; }
@keyframes msg-in { from { opacity: 0; transform: translateY(-8px); } }
.b-marquee-host { display: flex; align-items: center; gap: 8px; margin-top: 10px;
  overflow: hidden; }
.b-marquee-label { flex: none; font-size: 13px; color: var(--vups-muted); }
.b-marquee { flex: 1; overflow: hidden; white-space: nowrap; }

/* 文章附件 */
.art-cover { max-width: 100%; border-radius: 14px; margin-bottom: 14px; }
.attach-list { display: flex; flex-direction: column; gap: 8px; }
.attach { background: var(--vups-accent); padding: 10px 14px; border-radius: 10px;
  font-size: 14px; }

/* 首页主播卡片（index.html 用） */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.s-card { display: flex; gap: 14px; padding: 16px; align-items: center; }
.s-card:hover { text-decoration: none; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.s-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.s-avatar-fb { display: inline-flex; align-items: center; justify-content: center;
  background: var(--vups-accent); color: var(--vups-primary); font-size: 26px; font-weight: 700; }
.s-info { min-width: 0; flex: 1; }
.s-name { font-weight: 700; font-size: 16px; color: var(--vups-text); }
.s-bio { color: var(--vups-muted); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-count { color: var(--vups-muted); font-size: 12px; margin-top: 4px; }
.s-count b { color: var(--vups-text); font-size: 13px; }
.vups-footer { margin: 40px 0 0; text-align: center; color: var(--vups-muted);
  font-size: 13px; }
.vups-footer a { color: var(--vups-muted); }

/* 展开态保持收起按钮可见（clamp-fade 默认 none，仅有 clamped 规则时展开即消失） */
.clamp-wrap.expanded .clamp-fade { display: block; }
.clamp-wrap.expanded .clamp-body::after { display: none; }

/* 详情页标题+日期下分隔线 */
.detail-meta { padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--vups-border); }

/* 文件柜 +N 虚线胶囊 */
.f-more { flex: none; display: none; align-items: center;
  border: 1px dashed var(--vups-muted); border-radius: 999px;
  padding: 2px 12px; font-size: 13px; color: var(--vups-muted);
  text-decoration: none !important; }

/* 手机端 tab 菜单：一行一个按钮，纵向排列（不横滚、不 sticky——多行菜单吸附顶栏会遮内容） */
@media (max-width: 640px) {
  .s-tabs { flex-direction: column; position: static; gap: 6px; padding: 10px; }
  .s-tab { width: 100%; justify-content: flex-start; padding: 9px 16px; }
  .s-tab .tab-badge { margin-left: auto; }
}

/* 统一卡片垂直节奏：视图内相邻卡片一律 16px 间距（列表卡在 .list-stack 的 gap 容器内，不受影响） */
#view > .card + .card { margin-top: 16px; }

/* 社媒芯片图标 */
.social-chip .sc-ic { width: 15px; height: 15px; border-radius: 3px; flex: none; }
.social-chip .sc-val { color: var(--vups-muted); }

/* 已关注按钮悬停翻转：取消关注（警示色调；连会员档位取消的前兆提示）。
   常态透明 1px 边框 + 定 min-width：两态几何严格恒定（无边框跳变/文字宽差
   引起的卡片 2px 形变与关注数位移） */
#unfollow-btn { border: 1px solid transparent; min-width: 96px; }
#unfollow-btn.is-unfollow { background: #fdecef; color: #d9536f;
  border-color: #f6c6d1; }

/* 主页装扮（背景图；主播本人在前台设置，存库对全部访客生效） */
body.has-page-bg { background-repeat: no-repeat; background-size: cover;
  background-position: center; background-attachment: fixed; }
.streamer-hero.has-hero-bg { background-size: cover; background-position: center; }
/* 蒙层已按用户定稿移除：背景图原图直出，花色与文字可读性由主播自己把关 */
/* 装扮入口按钮：btn-ghost 默认透明底，hero 背景图上会透图——补卡色实底（随主题自适应） */
.decor-btn { background: var(--vups-card); }

/* 装扮弹窗双列：左列背景图（预览吃宽）/ 右列配色（内容瘦身后收窄 270px）；
   桌面竖分隔线，手机回落单列 */
.decor-cols { display: grid; grid-template-columns: 1fr 270px; gap: 0 22px; }
.decor-col + .decor-col { border-left: 1px solid var(--vups-border); padding-left: 22px; }
@media (max-width: 720px) {
  .decor-cols { grid-template-columns: 1fr; }
  .decor-col + .decor-col { border-left: none; padding-left: 0; margin-top: 2px; }
}

/* 装扮弹窗预览框（整页背景 16:9 比例预览；卡片背景保持定高） */
.decor-preview { height: 96px; border-radius: 12px; border: 1px solid var(--vups-border);
  background-color: var(--vups-card); background-size: cover;
  background-position: center; }
.decor-preview-169 { height: auto; aspect-ratio: 16 / 9; }
.decor-preview.is-empty { border-style: dashed; color: var(--vups-muted);
  display: flex; align-items: center; justify-content: center; font-size: 13px; }
/* iOS 上 fixed 背景滚动抖动，手机端退化为滚动 */
@media (max-width: 640px) {
  body.has-page-bg { background-attachment: scroll; }
}
