/* ═══════════════════════════════════════════
   前台直播间 - 仿快手沉浸式体验
   Dark immersive design, mobile-first
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --room-bg: #000;
  --card-bg: rgba(0,0,0,0.55);
  --card-glass: rgba(255,255,255,0.08);
  --primary: #FF3B5C;
  --primary-glow: rgba(255,59,92,0.4);
  --gold: #FFCB47;
  --green: #00E676;
  --blue: #42A5F5;
  --text: #fff;
  --text-muted: rgba(255,255,255,0.6);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; overflow: hidden; overscroll-behavior: none; }
/* 可滚动容器内部不把滚动链给整页（防边缘回弹拖动页面） */
.barrage-list, .product-list, .gift-grid, .kefu-body, .order-panel, .my-orders-panel { overscroll-behavior: contain; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--room-bg);
  color: var(--text);
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ── 房间容器 ── */
.room-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ── 视频层 ── */
.video-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
}

.video-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 默认：竖屏铺满全屏，超出裁切（同快手 App） */
  background: #000;
}
/* 连麦/横屏等"偏宽/偏方"画面：完整显示，不裁切（自动由 JS fitVideo 切换） */
.video-layer video.video-contain {
  object-fit: contain;
}

/* 后台「屏蔽画面」：底层继续播，用遮罩盖住 */
.video-layer video.admin-video-blocked {
  visibility: hidden;
}
.video-placeholder.admin-loading {
  z-index: 3;
}
.video-placeholder.admin-loading .offline-profile,
.video-placeholder.admin-loading .offline-cover,
.video-placeholder.admin-loading .placeholder-order-btn {
  display: none !important;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(220px, 30vh, 310px);
  padding: 22vh 24px 18vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 38% 37%, rgba(255,255,255,0.95) 0 4px, rgba(255,255,255,0.42) 5px, transparent 20px),
    radial-gradient(circle at 14% 43%, rgba(255,255,255,0.95) 0 2px, transparent 5px),
    radial-gradient(circle at 76% 17%, rgba(255,255,255,0.88) 0 2px, transparent 5px),
    radial-gradient(circle at 56% 23%, rgba(255,255,255,0.72) 0 1px, transparent 4px),
    radial-gradient(circle at 9% 22%, rgba(255,255,255,0.62) 0 1px, transparent 4px),
    radial-gradient(circle at 73% 39%, rgba(255,255,255,0.5) 0 1px, transparent 4px),
    linear-gradient(154deg, #13b6de 0%, #38a9df 34%, #7a7ecf 67%, #cf64aa 100%);
}

.video-placeholder::before,
.video-placeholder::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.video-placeholder::before {
  width: 8px;
  height: 8px;
  left: 52%;
  top: 13%;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    -170px 12px 0 -3px rgba(255,255,255,0.95),
    -138px 78px 0 -3px rgba(255,255,255,0.92),
    58px 46px 0 -3px rgba(255,255,255,0.85),
    150px 98px 0 -3px rgba(255,255,255,0.76),
    92px 186px 0 -4px rgba(255,255,255,0.8),
    -210px 208px 0 -4px rgba(255,255,255,0.72);
}

.video-placeholder::after {
  width: 20px;
  height: 20px;
  left: 10%;
  top: 42%;
  background:
    linear-gradient(#fff, #fff) center/2px 20px no-repeat,
    linear-gradient(90deg, #fff, #fff) center/20px 2px no-repeat;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
}

.video-placeholder .pulse-ring {
  width: 80px; height: 80px;
  border: 3px solid var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.3; }
}

.video-placeholder p {
  position: relative;
  z-index: 2;
  min-width: 148px;
  max-width: min(76vw, 320px);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.78);
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.offline-profile {
  position: relative;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: -150px;
  margin-bottom: -90px;
}

.video-placeholder.offline-waiting .offline-profile {
  display: flex;
}

.offline-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff3b7d, #632044);
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow: 0 12px 30px rgba(0,0,0,0.16), 0 0 18px rgba(255,255,255,0.28);
}

.offline-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.offline-reserve {
  min-width: 150px;
  max-width: min(72vw, 300px);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.offline-cover {
  position: relative;
  z-index: 2;
  display: none;
  width: min(88vw, 360px);
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.video-placeholder.offline-waiting {
  gap: 0;
  padding: 0 22px;
  background: #f3f4f6;
}

.video-placeholder.offline-waiting::before,
.video-placeholder.offline-waiting::after {
  display: none;
}

.video-placeholder.offline-waiting .offline-cover {
  display: flex;
}

.offline-count-card {
  background: #fff;
  border-radius: 18px;
  padding: 22px 16px 16px;
  box-shadow: 0 8px 24px rgba(20, 24, 40, 0.06);
  text-align: center;
}

.offline-count-title {
  color: #8b909a;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 14px;
}

.offline-count-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.offline-count-cell {
  width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.offline-count-cell b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border-radius: 10px;
  background: #e7f8ec;
  color: #34c759;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.offline-count-cell span {
  color: #8b909a;
  font-size: 13px;
  line-height: 1;
}

.offline-count-colon {
  width: 18px;
  color: #34c759;
  font-size: 26px;
  font-weight: 700;
  line-height: 52px;
  text-align: center;
}

.offline-count-when {
  margin-top: 14px;
  color: #8b909a;
  font-size: 14px;
}

.placeholder-kefu-btn {
  position: relative;
  z-index: 2;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: #4cd964;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.placeholder-kefu-btn:active,
.video-placeholder.offline-waiting .placeholder-order-btn:active {
  transform: scale(0.98);
}

.video-placeholder.offline-waiting .placeholder-order-btn {
  width: 100%;
  min-width: 0;
  height: 48px;
  background: #fff;
  color: #303133;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(20, 24, 40, 0.05);
}

.placeholder-order-btn {
  position: relative;
  z-index: 2;
  min-width: 172px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.24);
  color: rgba(255,255,255,0.94);
  font-size: 20px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24), 0 14px 36px rgba(69,77,160,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.placeholder-order-btn:active {
  transform: scale(0.97);
}

.placeholder-order-float {
  position: absolute;
  z-index: 3;
  top: 18vh;
  right: 30px;
  width: 58px;
  height: 72px;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  -webkit-tap-highlight-color: transparent;
}

.placeholder-order-icon {
  position: relative;
  display: block;
  width: 36px;
  height: 42px;
  border-radius: 5px 5px 8px 8px;
  background: linear-gradient(180deg, #42c7ff 0%, #1d82ea 100%);
  box-shadow: 0 4px 10px rgba(29,130,234,0.25);
}

.placeholder-order-icon::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  width: 17px;
  height: 3px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 11px 0 #fff;
}

.placeholder-order-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  top: -5px;
  width: 16px;
  height: 8px;
  border: 3px solid rgba(255,255,255,0.75);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.placeholder-order-float span:last-child {
  min-width: 48px;
  margin-top: -2px;
  padding: 4px 6px 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffb63d 0%, #ff6b31 100%);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(0,0,0,0.16);
  box-shadow: 0 4px 12px rgba(255,107,49,0.28);
}

.video-placeholder.offline-waiting .pulse-ring {
  display: none;
}

.video-placeholder:not(.offline-waiting) {
  gap: 16px;
}

.video-placeholder:not(.offline-waiting) .placeholder-order-float {
  display: none;
}

/* ── 点击播放覆盖层（手机端） ── */
.tap-to-play {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0,0,0,0.5);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tap-play-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: #fff;
  padding-left: 4px;
  animation: tap-pulse 2s ease-in-out infinite;
}

@keyframes tap-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 15px rgba(255,255,255,0); }
}

.tap-to-play p {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

/* ── UI 覆盖层 ── */
.ui-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.ui-overlay > * { pointer-events: auto; }

.room-container.is-offline .top-bar,
.room-container.is-offline .bottom-bar,
.room-container.is-offline .checkin-card,
.room-container.is-offline .pinned-product-card,
.room-container.is-offline .pinned-card,
.room-container.is-offline .hot-banner,
.room-container.is-offline .barrage-list,
.room-container.is-offline .linkmic-strip,
.room-container.is-offline .linkmic-column,
.room-container.is-offline .gift-layer,
.room-container.is-offline .tap-to-play,
.room-container.is-offline .fan-club-badge {
  display: none !important;
}

.room-container.is-offline .ui-overlay {
  pointer-events: none;
}

.room-container.is-offline .schedule-banner {
  display: none !important;
}

.room-container.reserve-card-disabled .schedule-banner,
.room-container.is-offline.reserve-card-disabled .schedule-banner {
  display: none !important;
}

.room-container.is-offline .offline-reserve {
  display: none;
}

.room-container.is-offline .video-placeholder > p,
.room-container.is-offline .streamer-info {
  display: none !important;
}

.room-container.is-offline .panel-overlay,
.room-container.is-offline .my-orders-panel,
.room-container.is-offline .kefu-overlay,
.room-container.is-offline .kefu-modal,
.room-container.is-offline .report-overlay,
.room-container.is-offline .report-modal {
  pointer-events: auto;
}

/* ── 顶部信息栏 ── */
.top-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 12px 10px;
  padding-top: max(12px, env(safe-area-inset-top));
  min-width: 0;
}

.streamer-info {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-full);
  padding: 5px 6px 5px 5px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100vw - 198px);
}

.streamer-info > div:nth-child(2) {
  min-width: 0;
  flex: 0 1 auto;
}

.streamer-avatar {
  width: 36px; height: 36px;
  min-width: 36px;
  flex: 0 0 36px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, var(--primary), #e040fb);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  overflow: hidden;
  cursor: pointer;
}

.streamer-avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.streamer-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.viewer-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.5s ease-in-out infinite;
}

.like-badge {
  color: rgba(255,255,255,.78);
  font-weight: 600;
}

.like-badge .like-dot {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  background: linear-gradient(135deg,#ff76aa,#ff2f74);
  box-shadow: 0 0 8px rgba(255,47,116,.55);
}

.top-fan-actions {
  display: flex;
  align-items: center;
  height: 36px;
  margin-left: 2px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(106, 85, 79, 0.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
  flex: 0 0 auto;
  width: 96px;
}

.top-fan-heart,
.top-v-badge {
  width: 50%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.top-fan-heart {
  position: relative;
  color: #fff;
  font-size: 20px;
  background: linear-gradient(90deg, rgba(255, 83, 133, 0.92), rgba(255, 99, 145, 0.72));
}

.top-fan-heart::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 21px;
  background: linear-gradient(135deg, #ff8eb8, #ff4c91);
  transform: rotate(-45deg);
  border-radius: 11px 11px 5px 11px;
  z-index: -1;
  box-shadow: 0 0 7px rgba(255, 82, 142, 0.6);
}

.top-v-badge {
  color: #ffe28b;
  font-size: 22px;
  font-style: italic;
  text-shadow: 0 2px 3px rgba(98, 53, 0, 0.35);
}

/* 加入粉丝团后，顶部 +/+V 换成的等级标 */
.top-fan-level {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  margin-left: 2px;
  padding: 0 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff5e8a, #ff3b6b);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 8px rgba(255,59,107,.35);
  cursor: pointer;
  flex: 0 0 auto;
}
.top-fan-level .tfl-heart { font-size: 12px; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.top-right {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 0;
}

.top-viewer-count {
  min-width: 48px;
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(0,0,0,.32);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  white-space: nowrap;
  flex: 0 0 auto;
}

.watch-tag {
  background: var(--primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  animation: room-pulse 2s ease-in-out infinite;
}

@keyframes room-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
  50% { box-shadow: 0 0 0 8px rgba(255,59,92,0); }
}

.close-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  flex: 0 0 auto;
}
.close-btn:hover { background: rgba(255,255,255,0.15); }

/* ── 礼物浮层 ── */
.gift-layer {
  flex: 0;
  padding: 0 12px;
  min-height: 70px;
  max-height: 70px;
  overflow: hidden;
}

.gift-notification {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(90deg, rgba(255,59,92,0.82), rgba(255,59,92,0.34), transparent);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 5px 10px;
  margin-bottom: 5px;
  animation: gift-slide-in 0.4s ease-out, gift-fade-out 0.6s 3s ease-out forwards;
  width: min(230px, 62vw);
  min-height: 28px;
  overflow: hidden;
}

@keyframes gift-slide-in {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes gift-fade-out {
  to { opacity: 0; transform: translateX(20px); }
}

.gift-notification .gift-user {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 74px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gift-notification .gift-text {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 弹幕区域 ── */
.barrage-area {
  position: relative;
  z-index: 12;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 12px 6px;
  overflow: hidden;
  min-height: 0;
  pointer-events: none;
}

.barrage-list {
  max-height: calc(3 * 26px);
  overflow-y: auto;
  mask-image: linear-gradient(transparent 0%, black 28%);
  -webkit-mask-image: linear-gradient(transparent 0%, black 28%);
  scrollbar-width: none;
  pointer-events: auto;
}
.barrage-list::-webkit-scrollbar { display: none; }

.barrage-item {
  display: flex;
  width: fit-content;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  margin-bottom: 4px;
  max-width: 78%;
  max-height: 22px;
  animation: barrage-in 0.3s ease-out;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
}

@keyframes barrage-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.barrage-item .username {
  color: var(--blue);
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 粉丝团徽章（弹幕评论前缀）── */
.barrage-item .fan-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 5px 0 2px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff5e8a, #ff2d55);
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.barrage-item .fan-badge .fan-lv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
}

.barrage-item .msg-content {
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.barrage-item.system-msg {
  background: rgba(66,165,245,0.2);
  color: var(--blue);
  font-size: 12px;
}

.barrage-item.like-msg .msg-content {
  color: var(--primary);
}

@media (max-width: 380px) {
  .barrage-list { max-height: calc(3 * 24px); }
  .barrage-item {
    font-size: 11px;
    max-height: 20px;
    padding: 2px 7px;
    margin-bottom: 3px;
  }
}

/* ── 预约横幅 ── */
.schedule-banner {
  position: absolute;
  left: 14px;
  top: 72px;
  z-index: 10;
  width: 112px;
  min-height: 104px;
  box-sizing: border-box;
  padding: 9px 10px 7px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 11px;
  background: rgba(255,255,255,.78);
  color: #151515;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeInDown 0.4s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.schedule-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.schedule-label {
  color: #202020;
  font-size: 12px;
  font-weight: 800;
}

.schedule-time {
  color: #111;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: .5px;
  white-space: nowrap;
}

.schedule-meta {
  min-height: 11px;
  color: rgba(30,30,30,.55);
  font-size: 9px;
  text-align: center;
}

.schedule-reserve-btn {
  width: 100%;
  min-height: 26px;
  padding: 4px 1px 2px;
  border: none;
  border-top: 1px solid rgba(255,45,105,.12);
  border-radius: 0;
  background: transparent;
  color: #f72b70;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s;
}
.schedule-reserve-btn:active { transform: scale(0.95); }
.schedule-reserve-btn.reserved {
  color: #8a8a8a;
  cursor: default;
}
.schedule-reserve-btn:disabled {
  opacity: 1;
}
.reserve-bell {
  width: 13px;
  height: 13px;
  position: relative;
  color: transparent;
}
.reserve-bell::before {
  content: '🔔';
  position: absolute;
  inset: -4px 0 0 -2px;
  color: #f72b70;
  font-size: 14px;
  line-height: 1;
}
.schedule-reserve-btn.reserved .reserve-bell::before {
  content: '✓';
  top: -2px;
  left: 1px;
  color: #777;
  font-size: 14px;
}

/* ── 双击爱心 ── */
.dblheart {
  position: fixed;
  font-size: 32px;
  pointer-events: none;
  z-index: 9999;
  animation: dblheartFloat 1.3s ease-out forwards;
}

@keyframes dblheartFloat {
  0% {
    opacity: 1;
    transform: scale(0.3) translateY(0) translateX(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.2) translateY(-20px) translateX(calc(var(--dx) * 0.3));
  }
  50% {
    opacity: 0.9;
    transform: scale(1) translateY(-80px) translateX(calc(var(--dx) * 0.7));
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translateY(-180px) translateX(var(--dx));
  }
}

/* ── 底部工具栏 ── */
.bottom-bar {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.chat-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 42px;
  background: rgba(13, 13, 33, 0.58);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  padding: 8px 12px 8px 16px;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.emoji-toggle {
  display: none;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  color: #8d9199;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.emoji-toggle:active { transform: scale(0.94); }

.emoji-sheet {
  display: none;
  z-index: 15;
  background: #fff;
  padding: 8px 10px 6px;
  box-shadow: 0 -8px 20px rgba(0,0,0,0.08);
}
.emoji-sheet.open {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px 4px;
}
.emoji-item {
  height: 38px;
  border: none;
  background: transparent;
  font-size: 22px;
  border-radius: 8px;
  line-height: 1;
  cursor: pointer;
}
.emoji-item:active { background: #f3f4f6; }

.chat-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.chat-input-wrapper input::placeholder { color: var(--text-muted); }

/* 发送按钮：默认隐藏，聚焦评论框（编辑态）时出现 —— 快手红色胶囊 */
.chat-send-btn {
  flex: none; display: none; border: none;
  background: #ff2c54; color: #fff;
  font-size: 15px; font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0 20px; height: 38px; line-height: 38px;
  cursor: pointer; white-space: nowrap;
}
.chat-send-btn:active { background: #e02546; }

/* ── 评论编辑态：底栏变白条，输入框变白底，隐藏右侧图标，仅留 输入框 + 发送 ── */
.bottom-bar.composing {
  background: #fff;
  box-shadow: 0 -2px 14px rgba(0,0,0,0.12);
}
.bottom-bar.composing .more-menu-wrapper,
.bottom-bar.composing .action-btn { display: none !important; }
.bottom-bar.composing .chat-send-btn { display: inline-block; }
.bottom-bar.composing .emoji-toggle { display: inline-flex; }
.bottom-bar.composing .chat-input-wrapper {
  background: #f4f5f7;
  border-color: #ececec;
  box-shadow: none;
  backdrop-filter: none;
  padding-right: 10px;
}
.bottom-bar.composing .chat-input-wrapper input { color: #1a1a1a; }
.bottom-bar.composing .chat-input-wrapper input::placeholder { color: #b3b6bd; }

.action-btn {
  width: 45px; height: 45px;
  flex: 0 0 45px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: visible;
  background: radial-gradient(circle at 50% 34%, rgba(52, 44, 83, 0.96), rgba(17, 16, 39, 0.94) 66%, rgba(8, 7, 23, 0.96));
  box-shadow:
    0 8px 18px rgba(0,0,0,0.36),
    inset 0 1px 1px rgba(255,255,255,0.06),
    inset 0 -8px 13px rgba(0,0,0,0.2);
  -webkit-tap-highlight-color: transparent;
}

.action-btn:hover { transform: scale(1.06); }
.action-btn .badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--gold);
  color: #000;
  font-size: 10px; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.icon-520 {
  position: relative;
  width: 31px;
  height: 23px;
  display: block;
  transform: rotate(-5deg);
  filter: drop-shadow(0 2px 1px rgba(0,0,0,0.25));
}

.icon-520 .num {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: -1px;
  color: #ff77dc;
  -webkit-text-stroke: 1.3px #f7d8ff;
  text-shadow:
    0 1px 0 #8b43ff,
    1px 1px 0 #8b43ff,
    0 0 6px rgba(255, 115, 222, 0.78);
}

.icon-520 .spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, #ff9ee7 22% 46%, transparent 50%);
}

.icon-520 .spark::before,
.icon-520 .spark::after {
  content: '';
  position: absolute;
  inset: 2px auto auto 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ff7bda;
  box-shadow: 0 0 5px rgba(255, 123, 218, 0.9);
}

.icon-520 .spark-a {
  top: 0;
  left: 6px;
}

.icon-520 .spark-b {
  top: 2px;
  right: 2px;
  transform: scale(0.8);
}

.gift-icon {
  position: relative;
  width: 25px;
  height: 24px;
  display: block;
}

.gift-icon::before {
  content: '';
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 1px;
  height: 17px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 0 40%, rgba(255,255,255,0.9) 40% 60%, transparent 60%),
    linear-gradient(180deg, #ff4f97 0%, #ff206f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 2px 4px rgba(0,0,0,0.24);
}

.gift-icon::after {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  top: 7px;
  height: 7px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 0 41%, rgba(255,255,255,0.95) 41% 59%, transparent 59%),
    linear-gradient(180deg, #ffe467 0%, #ffbd28 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.gift-btn .gift-icon {
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.18)) drop-shadow(0 0 5px rgba(255, 70, 130, 0.36));
}

.gift-btn .gift-icon span { display: none; }

.gift-icon {
  background:
    radial-gradient(ellipse at 33% 20%, transparent 0 20%, #ffe467 21% 35%, transparent 36%),
    radial-gradient(ellipse at 67% 20%, transparent 0 20%, #ffe467 21% 35%, transparent 36%);
}

.heart-plus-icon {
  position: relative;
  width: 29px;
  height: 25px;
  display: block;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.22)) drop-shadow(0 0 5px rgba(255, 96, 150, 0.34));
}

.heart-plus-icon::before,
.heart-plus-icon::after {
  content: '';
  position: absolute;
}

.heart-plus-icon::before {
  width: 24px;
  height: 22px;
  left: 0;
  top: 2px;
  background: linear-gradient(135deg, #ff77af 0%, #ff3f86 92%);
  transform: rotate(-45deg);
  border-radius: 11px 11px 5px 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.heart-plus-icon::after {
  width: 11px;
  height: 3px;
  right: 0;
  top: 10px;
  border-radius: 4px;
  background: #fff0f8;
  box-shadow: 0 0 4px rgba(255,255,255,0.55);
}

.like-btn .heart-plus-icon {
  transform: translateX(1px);
}

.like-btn .heart-plus-icon + span { display: none; }

.like-btn::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 11px;
  right: 13px;
  top: 17px;
  border-radius: 4px;
  background: #fff0f8;
  box-shadow: 0 0 4px rgba(255,255,255,0.55);
}

.icon-520,
.cart-icon,
.linkmic-icon,
.gift-icon,
.heart-plus-icon {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.cart-icon {
  width: 34px;
  height: 34px;
  background-image: url('/public/img/room-action-cart.svg?v=20260527a');
  transform: translateY(1px);
}

.linkmic-icon {
  width: 34px;
  height: 34px;
  background-image: url('/public/img/room-action-linkmic.svg?v=20260527b');
  transform: translateY(1px);
}

.icon-520 {
  width: 36px;
  height: 31px;
  transform: translateY(1px);
  background-image: url('/public/img/room-action-520.svg');
}

.icon-520 > * {
  display: none;
}

.gift-icon {
  width: 34px;
  height: 34px;
  background-image: url('/public/img/room-action-gift.svg');
  filter: none;
}

.gift-icon::before,
.gift-icon::after {
  display: none;
}

.heart-plus-icon {
  width: 36px;
  height: 31px;
  transform: translateX(1px);
  background-image: url('/public/img/room-action-heart-plus.svg');
  filter: none;
}

.heart-plus-icon::before,
.heart-plus-icon::after,
.like-btn::after {
  display: none;
}

/* ── 商品橱窗面板 ── */
.panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}
.panel-overlay.active { opacity: 1; visibility: visible; }

.product-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #1a1a2e;
  border-radius: 20px 20px 0 0;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.product-panel.active { transform: translateY(0); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.panel-close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
}

.product-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

/* ── 主播资料页 ── */
.profile-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 104;
  height: 60vh;
  min-height: 510px;
  background: #fff;
  color: #111;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  visibility: hidden;
  overflow: hidden;
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.34s;
  padding: 0 20px 18px;
  box-shadow: 0 -14px 34px rgba(0,0,0,0.22);
}

.profile-panel.active {
  transform: translateY(0);
  visibility: visible;
  overflow: visible;
}

.profile-report {
  position: absolute;
  right: 22px;
  top: 34px;
  border: 0;
  background: none;
  color: #aaa;
  font-size: 15px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 40px;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: linear-gradient(135deg, #ff3b7b, #1d1a2a);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.16);
  margin-top: -54px;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 16px;
  flex: 1;
  padding-right: 42px;
}

.profile-stats div {
  text-align: center;
}

.profile-stats strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
  white-space: nowrap;
}

.profile-stats span {
  display: block;
  color: #777;
  margin-top: 8px;
  font-size: 15px;
}

.profile-stats i {
  height: 30px;
  background: #eee;
}

.profile-name {
  margin-top: 18px;
  font-size: 26px;
  font-weight: 900;
}

.profile-badges {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.profile-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 4px;
  background: #f7f7f7;
  color: #555;
  font-size: 14px;
}

.profile-badges em {
  font-style: normal;
}

.profile-desc {
  color: #909090;
  font-size: 15px;
  margin: 14px 0 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-clubs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-clubs button {
  height: 62px;
  border: 0;
  background: #fff9fb;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: #333;
}

.profile-clubs button:nth-child(2) {
  background: #fffdf6;
}

.profile-clubs b {
  font-size: 16px;
  white-space: nowrap;
}

.profile-clubs em {
  margin-left: auto;
  color: #555;
  font-size: 14px;
  font-style: normal;
  white-space: nowrap;
}

.club-heart,
.tab-heart {
  width: 38px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff9fbe, #ff5b97);
  border-radius: 999px 999px 12px 12px;
  box-shadow: 0 0 10px rgba(255, 91, 151, 0.3);
}

.club-v {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffd36a;
  font-size: 28px;
  font-weight: 900;
}

.club-v::before {
  content: 'V';
  font-style: italic;
}

.profile-rank {
  width: 100%;
  height: 64px;
  margin-top: 12px;
  border: 0;
  border-radius: 4px;
  background: #eefcff;
  color: #4b9eb1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  text-align: left;
}

.profile-rank span {
  font-size: 26px;
}

.profile-rank b,
.profile-rank em {
  display: block;
  font-style: normal;
}

.profile-rank b {
  color: #4d9fb1;
  font-size: 16px;
}

.profile-rank em {
  color: #75b7c5;
  font-size: 14px;
  margin-top: 2px;
}

.profile-rank strong {
  margin-left: auto;
  color: #8ba5ad;
  font-size: 28px;
  font-weight: 400;
}

.profile-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 18px -20px 0;
  padding-bottom: 86px;
  background: #fff;
}

.profile-video-grid div {
  height: 96px;
  background: linear-gradient(135deg, #c6e5cb, #87b7d8);
}

.profile-video-grid div:nth-child(2) {
  background: linear-gradient(135deg, #b7d7f8, #e9f4ff);
}

.profile-video-grid div:nth-child(3) {
  background: linear-gradient(135deg, #ead5c8, #84b98d);
}

.profile-tabs {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1.35fr 1fr 2.55fr;
  gap: 10px;
}

.profile-tabs button {
  height: 64px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.profile-tabs button:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ── 我的订单页 ── */
.my-orders-panel {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #f5f5f5;
  color: #111;
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.my-orders-panel.active {
  transform: translateY(0);
}
.om-back, .om-more { position: absolute; top: 12px; width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(0,0,0,.32); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; z-index: 6; }
.om-back { left: 14px; }
.om-more { right: 14px; }
.om-menu { position: absolute; top: 50px; right: 14px; z-index: 7; background: #fff; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.2); overflow: hidden; display: none; min-width: 128px; }
.om-menu.show { display: block; }
.om-menu button { display: block; width: 100%; text-align: left; padding: 12px 16px; border: none; background: none; font-size: 14px; color: #333; cursor: pointer; }
.om-menu button + button { border-top: 1px solid #f2f2f2; }
.om-menu button:active { background: #f5f5f5; }

.orders-hero {
  height: 270px;
  background: radial-gradient(circle at 20% 12%, rgba(255,255,255,0.15), transparent 30%),
              linear-gradient(135deg, #3b2856, #6a254a);
  position: relative;
  overflow: hidden;
}

.orders-hero::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 6%;
  top: 122px;
  height: 120px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
}

.orders-card-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 158px;
  text-align: center;
  color: rgba(255,255,255,0.36);
  font-size: 18px;
  font-weight: 700;
}

.orders-floating {
  position: absolute;
  right: 22px;
  top: 80px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.orders-floating span {
  margin-top: -8px;
  padding: 2px 8px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffd35b, #ff7b37);
  font-size: 14px;
  font-weight: 900;
}

.orders-sheet {
  position: absolute;
  left: 0;
  right: 0;
  top: 215px;
  bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f7f7f7;
  overflow: hidden;
}

.orders-tabs {
  height: 64px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: #fff;
}

.orders-tabs button {
  height: 64px;
  border: 0;
  background: #fff;
  color: #222;
  font-size: 14px;
  position: relative;
  white-space: nowrap;
}

.orders-tabs em {
  color: #d92d3e;
  font-style: normal;
}

.orders-tabs .active {
  color: #e73145;
  font-weight: 800;
}

.orders-tabs .active::after {
  content: '';
  position: absolute;
  left: 34%;
  right: 34%;
  bottom: 0;
  height: 4px;
  border-radius: 4px;
  background: #ff4359;
}

.orders-empty {
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 18px;
}

.orders-empty button {
  margin-top: 28px;
  border: 0;
  border-radius: 25px;
  background: #ff4a5d;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 13px 32px;
}

.orders-list {
  display: none;
  padding: 12px 12px 92px;
  max-height: calc(100vh - 279px);
  overflow-y: auto;
}

.orders-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.orders-item img {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #f1f1f1;
  flex: none;
}

.oi-main {
  min-width: 0;
  flex: 1;
}

.oi-name {
  color: #111;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oi-meta,
.oi-no {
  margin-top: 4px;
  color: #888;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oi-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
}

.oi-side strong {
  color: #ff2f4f;
  font-size: 14px;
  font-weight: 900;
}

.oi-side span {
  color: #999;
  font-size: 11px;
}

.oi-pay,
.oi-refund {
  margin-top: 2px;
  border: 0;
  border-radius: 13px;
  padding: 5px 10px;
  background: #ff2f68;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.oi-refund { background: #ff8a00; }
.oi-pay:active,
.oi-refund:active { opacity: .86; }

.orders-help {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: max(22px, env(safe-area-inset-bottom));
  height: 56px;
  border: 0;
  border-radius: 6px;
  background: #ff2f68;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(255,47,104,0.25);
}

/* ── 独立个人中心（我的订单直达页） ── */
.my-orders-panel {
  background: #f5f6f8;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.personal-center-scroll {
  position: absolute;
  inset: 0 0 68px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  background: #f5f6f8;
}

.personal-topbar {
  height: 74px;
  padding: max(8px, env(safe-area-inset-top)) 18px 8px;
  box-sizing: content-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  position: relative;
}

.personal-topbar > div:first-of-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.personal-topbar strong {
  font-size: 22px;
  color: #17191d;
  letter-spacing: 1px;
}

.personal-topbar span {
  max-width: 210px;
  color: #8a8f98;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-close,
.pc-more {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #20242a;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.pc-more {
  font-size: 19px;
  letter-spacing: 1px;
}

.personal-topbar .om-menu {
  top: calc(max(8px, env(safe-area-inset-top)) + 52px);
  right: 16px;
}

.personal-profile-card {
  min-height: 142px;
  margin: 0;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 8% 0, rgba(255,255,255,.22), transparent 32%),
    linear-gradient(120deg, #ff2f68, #ff243d);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 10px 22px rgba(255,45,78,.16);
}

.personal-avatar {
  width: 76px;
  height: 76px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background-color: rgba(255,255,255,.24);
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 12px rgba(112,0,25,.18);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.personal-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.personal-identity strong {
  max-width: 240px;
  font-size: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-identity span {
  color: rgba(255,255,255,.84);
  font-size: 14px;
}

.personal-orders-card,
.personal-menu-card,
.personal-order-list-card {
  margin: 14px 14px 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(28,36,52,.045);
  overflow: hidden;
}

.personal-orders-title {
  width: 100%;
  height: 62px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid #f1f2f4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.personal-orders-title strong {
  color: #202329;
  font-size: 18px;
}

.personal-orders-title span {
  color: #ff3858;
  font-size: 14px;
}

.personal-orders-title b,
.personal-contact b,
.personal-menu-card b {
  margin-left: 7px;
  color: #b6bbc4;
  font-size: 24px;
  font-weight: 400;
}

.personal-order-status {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 18px 4px 16px;
}

.personal-order-status button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  color: #3a3d43;
  cursor: pointer;
}

.personal-order-status .status-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff2f5;
  color: #ee3156;
  font-size: 23px;
  font-style: normal;
  line-height: 1;
}

.personal-order-status button.active .status-icon {
  color: #fff;
  background: linear-gradient(135deg, #ff496c, #ff2747);
  box-shadow: 0 4px 10px rgba(255,40,72,.24);
}

.personal-order-status button span {
  max-width: 100%;
  font-size: 12px;
  white-space: nowrap;
}

.personal-order-status button.active span {
  color: #ef3154;
  font-weight: 700;
}

.personal-order-status .status-count {
  position: absolute;
  top: -7px;
  left: calc(50% + 10px);
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #f1264c;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 14px;
  text-align: center;
}

.personal-contact {
  width: calc(100% - 28px);
  height: 58px;
  margin: 14px 14px 0;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(100deg, #fff, #fff5f7);
  box-shadow: 0 2px 12px rgba(28,36,52,.045);
  display: flex;
  align-items: center;
  cursor: pointer;
}

.personal-contact > span {
  margin-right: 12px;
  font-size: 21px;
}

.personal-contact strong {
  flex: 1;
  text-align: left;
  color: #24272d;
  font-size: 16px;
}

.personal-menu-card button {
  width: 100%;
  height: 62px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid #f1f2f4;
  background: #fff;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.personal-menu-card button:last-child {
  border-bottom: 0;
}

.personal-menu-card .menu-icon {
  width: 28px;
  height: 28px;
  margin-right: 14px;
  border: 2px solid #ec3b5b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ec3b5b;
  font-size: 14px;
  font-weight: 800;
}

.personal-menu-card strong {
  flex: 1;
  color: #282b31;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.personal-list-title {
  height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid #f0f1f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.personal-list-title strong {
  color: #202329;
  font-size: 17px;
}

.personal-list-title span {
  color: #999fa8;
  font-size: 13px;
}

.personal-order-list-card .orders-list {
  max-height: none;
  padding: 10px;
  overflow: visible;
}

.personal-order-list-card .orders-empty {
  height: 220px;
  font-size: 15px;
}

.personal-order-list-card .orders-empty button {
  margin-top: 16px;
  padding: 9px 25px;
  font-size: 14px;
}

.empty-order-icon {
  margin-bottom: 8px;
  font-size: 38px;
  filter: grayscale(1);
  opacity: .48;
}

.personal-bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  height: calc(68px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
  border-top: 1px solid #eceef2;
  background: rgba(255,255,255,.98);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  box-shadow: 0 -3px 14px rgba(29,37,51,.05);
}

.personal-bottom-nav button {
  border: 0;
  background: transparent;
  color: #959aa3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
}

.personal-bottom-nav i {
  font-size: 21px;
  font-style: normal;
}

.personal-bottom-nav button.active {
  color: #ed3154;
}

.personal-address-dialog {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  align-items: flex-end;
}

.personal-address-dialog.show {
  display: flex;
}

.personal-address-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.42);
}

.personal-address-card {
  width: 100%;
  min-height: 255px;
  padding: 24px 20px calc(22px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  border-radius: 20px 20px 0 0;
  background: #fff;
  position: relative;
  z-index: 1;
}

.personal-address-card h3 {
  margin: 0 0 24px;
  color: #1f2227;
  font-size: 20px;
  text-align: center;
}

.address-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #8e939c;
  font-size: 26px;
}

#personalAddressContent {
  min-height: 66px;
  padding: 14px;
  border-radius: 10px;
  background: #f6f7f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #444950;
  font-size: 14px;
  line-height: 1.55;
}

#personalAddressContent strong {
  color: #20242a;
  font-size: 15px;
}

.address-empty {
  margin: auto;
  color: #9a9fa7;
}

.personal-address-card > p {
  margin: 12px 2px;
  color: #a1a5ad;
  font-size: 12px;
}

.address-confirm {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: #f13256;
  color: #fff;
  font-size: 16px;
}

/* ── 粉丝团 ── */
.fan-club-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 151;
  background: #fff;
  color: #111;
  border-radius: 18px 18px 0 0;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 20px 20px max(28px, env(safe-area-inset-bottom));
}

.fan-club-panel.active {
  transform: translateY(0);
}

.fan-club-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fan-club-header h3 {
  font-size: 20px;
  font-weight: 900;
}

.fan-club-header button {
  border: 0;
  background: none;
  font-size: 28px;
  color: #888;
}

.fan-level-card {
  margin-top: 18px;
  min-height: 86px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff1f6, #fff);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.fan-level-heart {
  width: 54px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #ff9dbc, #ff4d8d);
  border-radius: 50% 50% 46% 46%;
}

.fan-level-card b {
  font-size: 19px;
}

.fan-level-card p {
  margin-top: 4px;
  color: #888;
}

/* ── 连麦申请面板 ── */
.linkmic-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 103;
  min-height: 390px;
  background: #fff;
  color: #121212;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  box-shadow: 0 -12px 36px rgba(0,0,0,0.22);
}

.linkmic-panel.active {
  transform: translateY(0);
}

.linkmic-header {
  height: 72px;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  padding: 0 20px;
}

.linkmic-header h3 {
  text-align: center;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
}

.linkmic-header button {
  border: 0;
  background: none;
  color: #9b9b9b;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
}

.linkmic-content {
  padding: 20px 22px 0;
}

.linkmic-label {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 22px;
}

.linkmic-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.linkmic-option {
  height: 82px;
  border-radius: 5px;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #151515;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.linkmic-option.active {
  border-color: #ff6fa1;
  background: #ffe4ed;
  color: #f73472;
}

.linkmic-submit {
  width: 100%;
  height: 58px;
  margin-top: 72px;
  border: 0;
  border-radius: 8px;
  background: #ff2f68;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.room-toast {
  position: fixed;
  left: 50%;
  top: 46%;
  z-index: 140;
  transform: translate(-50%, -50%) scale(0.96);
  min-width: 260px;
  max-width: calc(100vw - 64px);
  padding: 18px 24px;
  border-radius: 6px;
  background: rgba(21, 15, 13, 0.86);
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.room-toast.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.product-card {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.product-card img {
  width: 80px; height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #2a2a3e;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
}
.product-price span {
  font-size: 12px;
  font-weight: 400;
}

.product-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.buy-btn {
  background: linear-gradient(90deg, var(--primary), #e040fb);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.buy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* ── 下单面板 ── */
.order-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 102;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.order-panel.active { transform: translateY(0); }

/* ── 快手式白色下单面板 ── */
.op2-banner { display: flex; align-items: center; padding: 12px 16px; }
.op2-svc { flex: 1; color: #2ba471; font-size: 13px; font-weight: 600; }
.op2-x { border: none; background: none; font-size: 22px; color: #999; line-height: 1; cursor: pointer; }
.op2-addr { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid #f2f2f2; cursor: pointer; }
.op2-addr-ico { font-size: 15px; }
.op2-addr-text { flex: 1; color: #222; font-size: 14px; }
.op2-addr-arrow { color: #bbb; font-size: 18px; }
.op2-addr-tip { margin: -4px 16px 10px 39px; color: #ff2d55; font-size: 13px; font-weight: 700; line-height: 1.35; }
.op2-addr-form { padding: 0 16px 10px; flex-direction: column; gap: 8px; }
.op2-addr-form input { width: 100%; background: #f6f6f8; border: 1px solid #eee; border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none; color: #222; }
.op2-card { display: flex; gap: 12px; padding: 14px 16px; border-top: 8px solid #f5f5f7; }
.op2-thumb { width: 86px; height: 86px; border-radius: 8px; object-fit: cover; flex: none; background: #f2f2f2; }
.op2-cardinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.op2-name { font-size: 14px; color: #222; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op2-price { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.op2-now { color: #ff2d2d; font-size: 20px; font-weight: 800; }
.op2-orig { color: #bbb; font-size: 13px; text-decoration: line-through; }
.op2-pick { color: #909399; font-size: 12px; }
.op2-qty { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 10px; font-size: 13px; color: #666; }
.op2-stepper { display: flex; align-items: center; border: 1px solid #e5e5e5; border-radius: 6px; overflow: hidden; }
.op2-stepper button { width: 30px; height: 28px; border: none; background: #f6f6f8; font-size: 16px; color: #333; cursor: pointer; }
.op2-stepper span { min-width: 40px; text-align: center; font-size: 14px; color: #222; }
.op2-sec-t { padding: 14px 16px 0; font-size: 14px; color: #222; font-weight: 600; }
.op2-colors { display: flex; gap: 10px; padding: 10px 16px 0; overflow-x: auto; }
.op2-color { flex: none; width: 80px; cursor: pointer; }
.op2-color img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; border: 2px solid transparent; background: #f2f2f2; display: block; }
.op2-color span { display: block; text-align: center; font-size: 12px; color: #444; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op2-color.active img { border-color: #ff2d55; }
.op2-color.active span { color: #ff2d55; font-weight: 600; }
.op2-sizes { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 16px 6px; }
.op2-size { padding: 9px 16px; border-radius: 8px; background: #f3f4f6; font-size: 14px; color: #333; cursor: pointer; }
.op2-size.active { background: rgba(255,45,85,.12); color: #ff2d55; box-shadow: inset 0 0 0 1px #ff2d55; }
.op2-pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px 6px; }
.op2-pay-options.wx-only { grid-template-columns: 1fr; }
.op2-pay { height: 42px; border: 1px solid #eee; border-radius: 10px; background: #f3f4f6; color: #333; font-size: 14px; font-weight: 700; cursor: pointer; }
.op2-pay.active { background: rgba(255,45,85,.12); color: #ff2d55; border-color: #ff2d55; }

.ali-guide-mask {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0,0,0,.48);
}
.ali-guide-mask.show { display: flex; }
.ali-guide-card {
  width: 100%;
  max-width: 360px;
  padding: 22px 18px 16px;
  border-radius: 18px;
  background: #fff;
  color: #111;
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
}
.ali-guide-card h3 {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.35;
  text-align: center;
}
.ali-guide-card ol {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.85;
}
.ali-guide-card p {
  margin: 10px 0 0;
  color: #888;
  font-size: 13px;
  line-height: 1.6;
}
.ali-guide-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.ali-guide-actions button {
  flex: 1;
  height: 42px;
  border: 0;
  border-radius: 21px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ali-guide-copy { background: #ff2d55; color: #fff; }
.ali-guide-close { background: #f1f2f5; color: #333; }
.op2-footer { position: sticky; bottom: 0; background: #fff; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #f2f2f2; }
.op2-buy { width: 100%; padding: 13px; border: none; border-radius: 24px; background: linear-gradient(90deg,#ff2d55,#ff5e3a); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.op2-buy.disabled { background: linear-gradient(90deg,#ffb0bf,#ffc4ab); cursor: not-allowed; }

.order-product-preview {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}

.order-product-preview img {
  width: 60px; height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.order-form label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 12px;
}

.order-form input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.order-form input:focus { border-color: var(--primary); }

.submit-order-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: linear-gradient(90deg, var(--primary), #e040fb);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.submit-order-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 25px var(--primary-glow);
}

/* ── 订单成功 ── */
.order-success {
  text-align: center;
  padding: 30px 20px;
}
.order-success .check-icon {
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #00c853);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop-in {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
.order-success h3 { font-size: 18px; margin-bottom: 8px; }
.order-success p { color: var(--text-muted); font-size: 13px; }

/* ── 列表首页 ── */
.home-container {
  min-height: 100vh;
  background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 100%);
  overflow-y: auto;
}

.home-header {
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  text-align: center;
}

.home-header h1 {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 20px;
}

.room-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #2a2a3e;
  cursor: pointer;
  transition: transform 0.2s;
}
.room-card:hover { transform: scale(1.03); }

.room-card .room-cover {
  width: 100%; height: 100%;
  object-fit: cover;
}

.room-card .room-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.8));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}

.room-card .room-watch-tag {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
}

.room-card .room-viewers {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--card-bg);
  backdrop-filter: blur(6px);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  display: flex; align-items: center; gap: 3px;
}

.room-card .room-name {
  font-size: 14px;
  font-weight: 600;
}

.room-card .room-streamer {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── 动画 ── */
.float-hearts {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 50;
  pointer-events: none;
}
.float-heart {
  position: absolute;
  bottom: 0;
  font-size: 24px;
  animation: float-up 2s ease-out forwards;
  opacity: 0;
}
@keyframes float-up {
  0% { transform: translateY(0) scale(0.5); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translateY(-200px) scale(1.2) translateX(var(--dx)); opacity: 0; }
}

/* ── 三个点菜单 ── */
.more-menu-wrapper {
  position: relative;
}
.more-dots-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(13, 13, 33, 0.58);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.85);
  font-size: 18px; font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}
.more-dots-btn:active { transform: scale(0.92); }
.more-popup {
  position: absolute;
  bottom: 52px; left: 0;
  background: rgba(20, 18, 45, 0.96);
  backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 6px 0;
  min-width: 140px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  opacity: 0; visibility: hidden;
  transform: translateY(8px) scale(0.95);
  transition: all 0.22s cubic-bezier(0.22, 0.68, 0, 1.1);
  z-index: 999;
}
.more-popup.show {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
}
.more-popup button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 18px;
  border: none; background: none;
  color: rgba(255,255,255,0.9);
  font-size: 14px; cursor: pointer;
  transition: background 0.15s;
}
.more-popup button:hover { background: rgba(255,255,255,0.08); }
.more-popup button:active { background: rgba(255,255,255,0.14); }
.mp-icon { font-size: 17px; }

/* ── 举报弹窗 ── */
.report-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0; visibility: hidden;
  transition: all 0.3s;
}
.report-overlay.show { opacity: 1; visibility: visible; }

.report-modal {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #1a1a2e;
  border-radius: 20px 20px 0 0;
  z-index: 9999;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 0.68, 0, 1.1), visibility 0.35s;
  max-height: 80vh;
  overflow-y: auto;
}
.report-modal.show { transform: translateY(0); visibility: visible; }

.report-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.report-header h3 {
  margin: 0; color: #fff; font-size: 17px; font-weight: 600;
}
.report-header button {
  background: rgba(255,255,255,0.1);
  border: none; color: rgba(255,255,255,0.6);
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.report-body { padding: 16px 20px 28px; }
.report-tip {
  color: rgba(255,255,255,0.7); font-size: 14px;
  margin: 0 0 12px;
}

.report-reasons {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px;
}
.report-reason-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.report-reason-btn:active { transform: scale(0.95); }
.report-reason-btn.active {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.report-body textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff; font-size: 14px;
  padding: 12px 14px;
  resize: none; outline: none;
  font-family: inherit;
}
.report-body textarea::placeholder { color: rgba(255,255,255,0.3); }
.report-body textarea:focus { border-color: rgba(255, 107, 107, 0.5); }

.report-char-count {
  text-align: right; font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin: 4px 0 14px;
}

.report-submit-btn {
  width: 100%; padding: 14px;
  border: none; border-radius: 25px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.report-submit-btn:active { transform: scale(0.97); opacity: 0.9; }
.report-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── 连麦竖排列表（仿快手） ── */
.linkmic-column {
  position: absolute;
  right: 8px;
  bottom: 96px;
  width: 78px;
  max-height: 62vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  z-index: 30;
  -webkit-overflow-scrolling: touch;
}
.linkmic-column::-webkit-scrollbar { display: none; }
.linkmic-card {
  position: relative;
  width: 78px;
  height: 104px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}
.linkmic-card .lm-avatar {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 58px; height: 58px;
  border-radius: 50%;
  object-fit: cover;
}
.linkmic-card .lm-avatar-ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6a5acd, #ff5e8a);
  color: #fff; font-size: 22px; font-weight: 700;
}
.linkmic-card .lm-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center;
  gap: 2px;
  padding: 3px 4px;
  font-size: 10px;
  color: #fff;
}
.linkmic-card .lm-gift {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 7px;
  padding: 1px 4px;
  white-space: nowrap;
}
.linkmic-card .lm-mute { font-size: 10px; }
.linkmic-card .lm-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.linkmic-card .lm-follow {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ff2d55;
  color: #fff;
  font-size: 12px; line-height: 14px;
  text-align: center;
  flex-shrink: 0;
}

/* ── 顶部模拟观众头像 ── */
.fake-viewers { display: flex; align-items: center; margin-right: 2px; flex: 0 0 auto; }
.fv-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.85);
  margin-left: -9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.fv-avatar:first-child { margin-left: 0; }
.fv-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 390px) {
  .top-bar { padding-left: 8px; padding-right: 8px; gap: 4px; }
  .streamer-info { gap: 6px; padding: 4px 5px 4px 4px; max-width: calc(100vw - 194px); }
  .streamer-avatar { width: 32px; height: 32px; min-width: 32px; flex-basis: 32px; font-size: 15px; }
  .streamer-name { max-width: 60px; font-size: 12px; }
  .viewer-badge { font-size: 10px; }
  .like-badge .like-dot { width: 14px; height: 14px; font-size: 9px; }
  .top-fan-actions { width: 76px; height: 32px; border-radius: 16px; }
  .top-fan-heart, .top-v-badge { height: 32px; }
  .top-fan-heart { font-size: 18px; }
  .top-v-badge { font-size: 20px; }
  .top-fan-level { height: 30px; padding: 0 8px; font-size: 12px; }
  .fake-viewers .fv-avatar:nth-child(1) { display: none; }
  .top-viewer-count { min-width: 54px; padding: 0 9px; font-size: 16px; }
  .close-btn { width: 30px; height: 30px; }
}

@media (max-width: 360px) {
  .streamer-info { max-width: calc(100vw - 170px); }
  .streamer-name { max-width: 52px; }
  .fake-viewers .fv-avatar:nth-child(2) { display: none; }
  .top-fan-actions { width: 70px; }
  .top-fan-level { padding: 0 7px; }
}

/* ── 下单：颜色 + 规格 + 数量 ── */
.spec-label { font-size: 13px; color: #aaa; margin: 12px 0 6px; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.spec-chip {
  padding: 6px 12px; border-radius: 16px; font-size: 13px;
  background: #2a2a3e; color: #ddd; border: 1px solid #3a3a4e; cursor: pointer;
}
.spec-chip.active { background: rgba(255,45,85,0.18); color: #ff5b78; border-color: #ff2d55; }
.spec-chip.disabled { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; color: #ccc; font-size: 14px; }
.qty-ctrl { display: flex; align-items: center; border: 1px solid #3a3a4e; border-radius: 6px; overflow: hidden; }
.qty-ctrl button {
  width: 32px; height: 30px; background: #2a2a3e; color: #fff; border: none;
  font-size: 18px; cursor: pointer;
}
.qty-ctrl button:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-val { min-width: 40px; text-align: center; color: #fff; }
.qty-stock { color: #909399; font-size: 12px; }
.op-total { margin-top: 10px; font-size: 15px; color: #ccc; }

/* ── 客服面板 ── */
.kefu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 998; display: none; }
.kefu-overlay.show { display: block; }
.kefu-modal { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 500px; height: 62vh; background: #fff; border-radius: 16px 16px 0 0; z-index: 999; display: none; flex-direction: column; }
.kefu-modal.show { display: flex; }
.kefu-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #eee; font-weight: 600; color: #333; }
.kefu-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #ddd; }
.kefu-close { margin-left: auto; border: none; background: none; font-size: 22px; cursor: pointer; color: #999; line-height: 1; }
.kefu-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f5f6f8; }
.kefu-msg { max-width: 75%; padding: 8px 12px; border-radius: 10px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.kefu-msg.robot { align-self: flex-start; background: #fff; border: 1px solid #eee; color: #333; }
.kefu-msg.user { align-self: flex-end; background: #409EFF; color: #fff; }
.kefu-input { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #eee; }
.kefu-input input { flex: 1; border: 1px solid #ddd; border-radius: 18px; padding: 8px 14px; outline: none; font-size: 14px; }
.kefu-input button { border: none; background: #409EFF; color: #fff; border-radius: 18px; padding: 0 18px; cursor: pointer; }

/* ── 粉丝团：右下角等级药丸 + 加入按钮 ── */
/* 右下角粉丝团 Lv 浮标已弃用（与讲解商品卡抢位）；等级改在顶部展示 */
.fan-club-badge { display: none !important; }
.fan-club-badge .fcb-heart { font-size: 12px; }
.fan-club-badge .fcb-lv { letter-spacing: .3px; }
.top-fan-heart.joined { background: linear-gradient(135deg,#ff5e8a,#ff3b6b); color: #fff; font-weight: 700; }
.fan-join-btn { width: calc(100% - 32px); margin: 16px; padding: 11px 0; border: none; border-radius: 22px; background: linear-gradient(135deg,#ff5e8a,#ff3b6b); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.fan-join-btn:disabled, .fan-join-btn.joined { background: #e4e7ed; color: #909399; cursor: default; }

/* ── 每日打卡卡片（左下角，仿快手）── */
.checkin-card { position: absolute; left: 8px; bottom: 116px; z-index: 46; display: none; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 12px; background: rgba(20,20,30,.78); backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0,0,0,.35); max-width: 248px; }
.checkin-card .cc-icon { font-size: 22px; line-height: 1; flex: none; }
.checkin-card .cc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.checkin-card .cc-top { color: #fff; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.checkin-card .cc-top b { color: #ffce3d; font-weight: 700; }
.checkin-card .cc-collapse { color: #aaa; font-size: 11px; cursor: pointer; padding: 0 2px; }
.checkin-card .cc-down { color: #b9bcc7; font-size: 11px; }
.checkin-card .cc-btn { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.12; border: none; border-radius: 18px; padding: 5px 16px; background: linear-gradient(135deg,#ff5e8a,#ff3b6b); color: #fff; cursor: pointer; }
.checkin-card .cc-btn .cc-btn-main { font-size: 14px; font-weight: 700; }
.checkin-card .cc-btn .cc-btn-sub { font-size: 10px; opacity: .9; font-style: normal; }
.checkin-card .cc-btn.done { background: #67c23a; }
.checkin-card.mini { max-width: none; padding: 7px 9px; gap: 0; }
.checkin-card.mini .cc-body, .checkin-card.mini .cc-btn { display: none; }
.checkin-card.mini .cc-icon { cursor: pointer; }

/* ── 礼物面板 ── */
.gift-panel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 200; background: #1c1c28; border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform .28s ease; max-height: 56vh; display: flex; flex-direction: column; }
.gift-panel.active { transform: translateY(0); }
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 16px 22px; overflow-y: auto; }
.gift-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 4px; background: #2a2a3e; border: none; border-radius: 12px; color: #fff; cursor: pointer; }
.gift-tile:active { background: #38384f; }
.gift-tile .gt-icon { font-size: 30px; line-height: 1; }
.gift-tile .gt-name { font-size: 12px; }
.gift-tile .gt-free { font-size: 10px; color: #ffb14e; }
.gift-notification .gift-icon-big { font-size: 26px; line-height: 1; }

/* ── 小黄车增强：热卖/已售/置顶浮卡 ── */
.product-thumb { position: relative; width: 80px; height: 80px; flex: none; }
.product-thumb img { width: 80px; height: 80px; }
.hot-tag { position: absolute; top: 0; left: 0; z-index: 1; background: linear-gradient(135deg,#ff4d4f,#ff7a45); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px 0 6px 0; }
.product-sold { font-size: 11px; color: #ff8a00; margin: 2px 0; }
.product-sold .sold-count { font-weight: 700; }

/* 讲解商品卡下移，与左侧热卖条同一底边，开启热卖时左右贴合 */
.pinned-card { position: absolute; right: 8px; bottom: 60px; z-index: 45; display: none; flex-direction: column; width: 118px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 16px rgba(0,0,0,.35); cursor: pointer; }
.pinned-card .pc-top { display: flex; align-items: center; padding: 4px 5px; }
.pinned-card .pc-tag { background: linear-gradient(135deg,#ff4d4f,#ff7a45); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.pinned-card .pc-close { margin-left: auto; border: none; background: rgba(0,0,0,.06); color: #999; width: 16px; height: 16px; border-radius: 50%; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pinned-card .pc-imgwrap { width: 100%; height: 92px; background: #f2f2f2; }
.pinned-card .pc-imgwrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pinned-card .pc-name { color: #222; font-size: 11px; font-weight: 700; line-height: 1.25; padding: 5px 7px 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pinned-card .pc-services { font-size: 9px; color: #2ba471; padding: 3px 7px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinned-card .pc-foot { display: flex; align-items: center; justify-content: space-between; padding: 5px 7px 7px; gap: 5px; }
.pinned-card .pc-price { color: #ff2d2d; font-size: 14px; font-weight: 800; white-space: nowrap; }
.pinned-card .pc-buy { border: none; background: linear-gradient(135deg,#ff2d55,#ff5e3a); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 13px; cursor: pointer; white-space: nowrap; }

@media (max-width: 390px) {
  .pinned-card { width: 108px; right: 7px; bottom: 58px; border-radius: 9px; }
  .pinned-card .pc-imgwrap { height: 82px; }
  .pinned-card .pc-price { font-size: 13px; }
  .pinned-card .pc-buy { padding: 4px 8px; }
}

/* ── 热卖大横条 ── */
.hot-banner { position: absolute; left: 8px; bottom: 60px; z-index: 44; display: none; align-items: center; gap: 6px; max-width: 72%; padding: 7px 14px; border-radius: 10px; background: linear-gradient(90deg,#ff2d2d,#ff5e3a 70%,rgba(255,94,58,.2)); color: #fff; box-shadow: 0 3px 12px rgba(255,45,45,.45); cursor: pointer; }
.hot-banner .hb-fire { font-size: 18px; }
.hot-banner .hb-label { font-size: 16px; font-weight: 800; letter-spacing: 1px; }
.hot-banner .hb-count { font-size: 16px; font-weight: 800; }
.hot-banner .hb-count .sold-count { font-size: 18px; }
.hot-banner .hb-sub { font-size: 10px; opacity: .92; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 客服头部副标题 ── */
.kefu-header .kefu-title { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.kefu-header .kefu-title #kefuName { font-weight: 600; font-size: 15px; }
.kefu-header .kefu-title em { font-size: 11px; color: #999; font-style: normal; font-weight: 400; }

/* ── 响应式 ── */
@media (min-width: 768px) {
  .room-container { max-width: 500px; margin: 0 auto; }
  .home-container { max-width: 600px; margin: 0 auto; }
  .room-grid { grid-template-columns: 1fr 1fr 1fr; }
}
