.feed-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}
/* 顶部操作：零高度悬浮层，不参与文档流、不挤压视频 */
.feed-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  z-index: 35;
  pointer-events: none;
  overflow: visible;
}
/* 左上角：我的订阅 */
.top-sub-btn {
  position: absolute;
  top: calc(12px + var(--safe-top));
  left: 12px;
  z-index: 35;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
/* 右上角：创作者中心 */
.top-studio-btn {
  position: absolute;
  top: calc(12px + var(--safe-top));
  right: 12px;
  z-index: 35;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.sub-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
}
.sub-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  height: 62vh;
  max-height: 640px;
  background: #fff;
  color: #111;
  border-radius: 14px 14px 0 0;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.2);
}
.sub-sheet .cmt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 14px 10px;
}
.sub-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.sub-cont-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
}
.sub-cont-play-lbl {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  white-space: nowrap;
}
.sub-cont-play-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.sub-cont-play-ui {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 12px;
  background: #dcdcdc;
  transition: background 0.2s;
  flex-shrink: 0;
}
.sub-cont-play-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.sub-cont-play-input:checked + .sub-cont-play-ui {
  background: #07c160;
}
.sub-cont-play-input:checked + .sub-cont-play-ui::after {
  transform: translateX(16px);
}
.sub-sheet .cmt-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}
.sub-sheet .cmt-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f2f2f2;
  color: #333;
}
.sub-sheet .cmt-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
  margin: 10px auto 6px;
}
.sub-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 16px;
}
.sub-empty {
  padding: 48px 16px;
  text-align: center;
  color: #999;
  font-size: 14px;
}
.sub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sub-item:active {
  background: #f7f7f7;
}
.sub-item .av {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
}
.sub-item .av.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 16px;
}
.sub-item .meta {
  flex: 1;
  min-width: 0;
}
.sub-item .title {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sub-item .sub {
  margin-top: 4px;
  font-size: 12px;
  color: #999;
}
.sub-item .go {
  color: #ccc;
  font-size: 14px;
  flex-shrink: 0;
}
.feed,
.feed-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.28s ease;
  will-change: transform;
}
.feed-slot {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.feed-slot .video-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  will-change: transform;
}
.feed-slot video,
.feed-slot .video-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #000;
}
.feed-slot video {
  touch-action: none;
  z-index: 0;
}
.feed-slot .video-cover {
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.feed-slot .video-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.feed-slot.is-zoomed video,
.feed-track.feed-zooming {
  /* 放大时禁止浏览器默认手势抢事件 */
}
.feed-track.feed-zooming {
  touch-action: none;
}

/* 右滑清屏：隐藏侧栏/文案/顶栏按钮（含订阅） */
body.feed-immersive .side-rail,
body.feed-immersive .video-meta,
body.feed-immersive .top-studio-btn,
body.feed-immersive .top-sub-btn,
body.feed-immersive .feed-top-bar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}
body.feed-immersive .side-rail {
  transform: translateX(120%);
}
body.feed-immersive .video-meta {
  transform: translateY(100%);
}
.side-rail {
  position: fixed;
  right: 10px;
  bottom: calc(120px + var(--safe-bottom));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}
.side-avatar-wrap {
  position: relative;
  pointer-events: auto;
}
.side-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  background: #333;
}
.side-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
}
.dock-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--yellow);
  color: #000;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.side-follow {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}
.side-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: auto;
}
.act {
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.act .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  font-size: 22px;
}
.act .num {
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.act-like.on .icon-wrap i {
  color: var(--pink);
}
.act-fav.on .icon-wrap i {
  color: var(--yellow);
}
.act.is-disabled,
.act:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.video-meta {
  position: fixed;
  left: 14px;
  right: 80px;
  /* 整块贴底上移约一行文字高度，不随文案多少变化 */
  bottom: calc(14px + var(--safe-bottom));
  z-index: 15;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.video-meta-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.video-meta-desc {
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.video-meta-tags {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}
.video-meta-tags span {
  margin-right: 8px;
}
.feed-slot .play-icon {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  border: 2px solid rgba(255, 255, 255, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
  font-size: 26px;
  color: #fff;
}
.feed-slot.is-paused.is-user-paused .play-icon,
.feed-slot.is-paused.is-play-failed .play-icon {
  display: flex;
}
.cmt-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
}
.cmt-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  background: #1a1a1a;
  border-radius: 16px 16px 0 0;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}
.cmt-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  margin: 10px auto 6px;
}
.cmt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 10px;
}
.cmt-title {
  font-weight: 600;
}
.cmt-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 18px;
}
.cmt-author-text {
  padding: 0 16px 8px;
  color: var(--muted);
  font-size: 13px;
}
.cmt-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 12px;
}
.cmt-empty {
  text-align: center;
  color: var(--muted);
  padding: 32px 0;
}
.cmt-item {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.cmt-item .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
  flex-shrink: 0;
}
.cmt-item .av.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}
.cmt-item .name {
  font-size: 13px;
  color: var(--muted);
}
.cmt-item .txt {
  font-size: 14px;
  margin: 4px 0;
}
.cmt-item .time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}
.cmt-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cmt-input {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}
.cmt-send {
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  background: var(--yellow);
  color: #111;
  font-weight: 600;
}
