
/* Tianzhi Share Buttons */
.tz-share-pill,
button.tz-share-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .72rem 1.08rem;
  border: 1px solid rgba(46, 107, 71, .22);
  border-radius: 999px;
  background: linear-gradient(135deg, #2e7d52, #2b704c);
  color: #fffaf0;
  font-weight: 800;
  font-size: .98rem;
  line-height: 1;
  box-shadow: 0 14px 32px rgba(46, 107, 71, .18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tz-share-pill--light,
button.tz-share-pill--light {
  color: #2e6b47;
  background: rgba(255, 253, 246, .9);
  border-color: rgba(46, 107, 71, .22);
  box-shadow: 0 8px 20px rgba(50, 35, 20, .06);
}

.tz-share-pill--chapter,
button.tz-share-pill--chapter {
  min-height: 2.25rem;
  margin: -.35rem 0 1.1rem;
  padding: .54rem .86rem;
  font-size: .86rem;
  color: #2e6b47;
  background: rgba(46, 107, 71, .08);
  border-color: rgba(46, 107, 71, .18);
  box-shadow: none;
}

.flow-content .tz-share-pill--chapter {
  break-inside: avoid;
  break-after: auto;
}

.tz-share-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(20, 16, 12, .36);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.tz-share-sheet.is-open {
  display: flex;
}

.tz-share-panel {
  width: min(100%, 28rem);
  border: 1px solid rgba(78, 56, 32, .16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 85% 0%, rgba(214, 174, 94, .14), transparent 12rem),
    #fffdf8;
  box-shadow: 0 24px 70px rgba(20, 16, 12, .28);
  padding: 1rem;
  color: #211810;
  font-family: ui-serif, "Noto Serif SC", "Songti SC", "STSong", serif;
}

.tz-share-panel h2 {
  margin: .25rem 0 .35rem;
  font-size: 1.25rem;
  line-height: 1.35;
}

.tz-share-panel p {
  margin: .4rem 0 0;
  color: #75695c;
  line-height: 1.72;
  font-size: .94rem;
}

.tz-share-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
  margin: 1rem 0 .65rem;
}

.tz-share-option {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .78rem .88rem;
  border: 1px solid rgba(46, 107, 71, .18);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: #211810;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.tz-share-option strong {
  display: block;
  font-size: 1rem;
}

.tz-share-option span {
  display: block;
  margin-top: .12rem;
  color: #75695c;
  font-size: .82rem;
  line-height: 1.45;
}

.tz-share-icon {
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(46, 107, 71, .1);
  color: #2e6b47;
  font-size: 1.25rem;
}

.tz-share-message {
  min-height: 1.3rem;
  color: #2e6b47;
  font-size: .9rem;
  line-height: 1.55;
}

.tz-share-close {
  width: 100%;
  min-height: 2.45rem;
  margin-top: .6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(33, 24, 16, .08);
  color: #211810;
  font-weight: 800;
  cursor: pointer;
}

@media (min-width: 640px) {
  .tz-share-sheet {
    align-items: center;
  }
}

@media (max-width: 420px) {
  .tz-share-pill,
  button.tz-share-pill {
    padding-left: .95rem;
    padding-right: .95rem;
  }
}


/* 分享面板顺序与图标位置修正 */
.tz-share-option .tz-share-icon {
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.55rem !important;
  height: 2.55rem !important;
  min-width: 2.55rem !important;
  min-height: 2.55rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 16px;
  line-height: 1 !important;
  text-align: center !important;
  font-size: 1.15rem !important;
  font-weight: 900;
}

/* 让“分享本章”紧贴章节标题后面，不另起一行 */
.ebook-page h1 .tz-share-pill--chapter,
.reader-source-section h1 .tz-share-pill--chapter {
  display: inline-flex !important;
  vertical-align: middle;
  margin: 0 0 0 .62rem !important;
  min-height: 1.72rem !important;
  padding: .32rem .66rem !important;
  font-size: .78rem !important;
  line-height: 1 !important;
  letter-spacing: .02em;
  border-radius: 999px;
  white-space: nowrap !important;
  transform: translateY(-.08em);
}

@media (max-width: 420px) {
  .ebook-page h1 .tz-share-pill--chapter,
  .reader-source-section h1 .tz-share-pill--chapter {
    margin-left: .48rem !important;
    font-size: .76rem !important;
    padding-left: .58rem !important;
    padding-right: .58rem !important;
  }
}
