/* TEPoster styles */
.teposter-button-wrap {
  margin: 16px 0;
}

.teposter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.teposter-btn:hover {
  background: #155cc0;
}

/* Modal */
.teposter-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.teposter-modal {
  width: 400px;
  max-height: 92vh;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}
@media (max-width: 420px) {
  .teposter-modal {
    width: 300px;
  }
}
.teposter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}
.teposter-modal-body {
  padding: 14px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.teposter-modal-footer {
  padding: 14px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: center; /* center download button */
}
.teposter-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* Poster canvas root */
.teposter-root {
  width: 400px; /* will be overridden by inline style from config */
  background: #fff;
  color: #111;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 37px; /* add 5px vertical white margin overall */
}
.teposter-header {
  padding: 0 0 20px 0;
  display: flex;
  align-items: center;
}
.teposter-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.teposter-title {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
}
.teposter-summary {
  font-size: 13px;
  color: #333;
  line-height: 1.8; /* requested line-height */
  letter-spacing: 0.3px; /* requested tracking */
  display: -webkit-box;
  -webkit-line-clamp: 4; /* clamp to 4 lines */
  -webkit-box-orient: vertical;
  line-clamp: 4; /* non-prefixed fallback */
  overflow: hidden;
}
.teposter-logo {
  height: 33px;
  width: auto;
}
.teposter-random {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  /* Reserve space so the badge always has a place even before image loads */
  aspect-ratio: 4 / 3;
  min-height: 200px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.teposter-random img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.teposter-date-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(255,255,255,0.92);
  color: #111;
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  text-align: center;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}
.teposter-date-day {
  font-size: 22px;
  font-weight: 800;
}
.teposter-date-monthyear {
  margin-top: 4px;
  font-size: 11px;
  color: #444;
}
.teposter-qrcode {
  width: 140px;
  height: 140px;
  margin: 10px auto 6px auto;
}

/* Hidden staging area for html2canvas */
.teposter-staging {
  position: fixed;
  top: -10000px;
  left: -10000px;
  opacity: 1; /* ensure accurate colors */
  pointer-events: none;
  z-index: -1;
}

/* Loading toast */
.teposter-toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 99999;
  display: none;
}

/* progress bar removed to avoid interfering with site header */

/* ninetheme layout */
.teposter-nt {
  background: #ffffff;
  color: #111;
  padding: 16px; /* outer white border */
  border-radius: 22px;
}
.teposter-nt .nt-hero {
  position: relative;
  height: 78%; /* higher hero */
  min-height: 460px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  border-radius: 18px; /* rounded corners for background image */
  overflow: hidden;
}
.teposter-nt .nt-date {
  position: absolute;
  left: 22px;
  top: 18px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.teposter-nt .nt-day {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
}
.teposter-nt .nt-monthyear {
  margin-top: 2px;
  font-size: 18px;
  letter-spacing: 2px;
}
.teposter-nt .nt-hero-info {
  width: 100%;
  padding: 16px 22px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.teposter-nt .nt-hero-info-top { align-self: stretch; position: absolute; left: 0; right: 0; top: 0; }
.teposter-nt .nt-hero-info-bottom { align-self: stretch; position: relative; margin-top: auto; }
.teposter-nt .nt-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}
.teposter-nt .nt-summary {
  margin-top: 13px;
  font-size: 14px;
  opacity: 0.95;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.teposter-nt .nt-footer-white {
  background: transparent; /* merge with outer white area */
  color: #111111;
  padding: 16px 18px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.teposter-nt .nt-footer-white.no-desc { align-items: center; }
.teposter-nt .nt-brand-name {
  font-size: 26px;
  font-weight: 800;
}
.teposter-nt .nt-brand-desc {
  margin-top: 6px;
  font-size: 14px;
  color: #555555;
}
.teposter-nt .nt-qrcode {
  width: 120px;
  height: 120px;
}

.teposter-nt .nt-brand-row { display: flex; align-items: center; gap: 10px; }
.teposter-nt .nt-brand-logo { height: 44px; width: auto; }
.teposter-nt .nt-brand-title { font-size: 28px; font-weight: 800; }

/* SVG 图标尺寸，按要求 24 x 24.62 */
.teposter-svg-icon {
  width: 24px;
  height: 24.62px;
  display: inline-block;
  vertical-align: middle;
}

