/* 非会员引导条；拦截后限制下载/上下篇，不锁整页 */
.tb-support-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -8px 24px -18px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #0f172a;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.nice-dark-mode .tb-support-bar {
  background: rgba(22, 24, 28, 0.96);
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #e8eaed;
}

.tb-support-bar[hidden] {
  display: none !important;
}

.tb-support-bar.is-restricted {
  background: rgba(255, 251, 235, 0.97);
  border-top-color: rgba(245, 158, 11, 0.28);
}

.nice-dark-mode .tb-support-bar.is-restricted {
  background: rgba(42, 32, 12, 0.96);
  border-top-color: rgba(245, 158, 11, 0.35);
}

.tb-support-bar-copy {
  flex: 1;
  min-width: 0;
}

.tb-support-bar-copy strong {
  font-weight: 650;
}

.tb-support-bar-cta,
.tb-support-bar-ghost {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  text-decoration: none !important;
}

.tb-support-bar-cta {
  background: #2387f5;
  color: #fff !important;
}

.tb-support-bar-cta:hover {
  background: #1b73d4;
}

.tb-support-bar-ghost {
  background: transparent;
  color: #334155 !important;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.nice-dark-mode .tb-support-bar-ghost {
  color: #e8eaed !important;
  border-color: rgba(255, 255, 255, 0.16);
}

.tb-support-bar-ghost[hidden] {
  display: none !important;
}

.tb-support-bar-close {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.tb-support-bar-close[hidden] {
  display: none !important;
}

.tb-support-bar-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}

body.has-tb-support-bar {
  padding-bottom: 3.4rem;
}

body.tb-sg-restricted .post-next-prev {
  position: relative;
  user-select: none;
  opacity: 0.55;
  filter: grayscale(0.2);
}

body.tb-sg-restricted .post-next-prev::after {
  content: "上下篇暂不可用";
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: not-allowed;
  font-size: 0.8125rem;
  font-weight: 650;
  color: #fff;
  text-shadow: 0 1px 8px rgba(15, 23, 42, 0.55);
  background: rgba(15, 23, 42, 0.18);
  border-radius: 8px;
}

body.tb-sg-restricted .tb-sg-story-cut {
  max-height: 12.5em;
  overflow: hidden !important;
  position: relative;
}

body.tb-sg-restricted .tb-sg-story-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 2.75rem 0.75rem 0.85rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 52%);
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #334155;
}

body.nice-dark-mode.tb-sg-restricted .tb-sg-story-mask {
  background: linear-gradient(to bottom, rgba(22, 24, 28, 0), #16181c 52%);
  color: #cbd5e1;
}

body.tb-sg-restricted .tb-sg-story-mask p {
  margin: 0 0 0.45rem;
}

.tb-sg-story-mask-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.85rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: #2387f5;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.75rem;
  font-weight: 600;
}

body.tb-sg-restricted #trans-preview,
body.tb-sg-restricted .bt-trans,
body.tb-sg-restricted .story-toolbar-tts {
  display: none !important;
}

@media (max-width: 575.98px) {
  .tb-support-bar {
    font-size: 0.75rem;
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .tb-support-bar-copy {
    flex: 1 1 100%;
  }
}
