/* 分享海报 · 小程序风格竖版海报 */
.poster-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.poster-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.poster-modal {
  width: 100%;
  max-width: 430px;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.poster-preview-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 20px 16px 12px;
  overflow-y: auto;
}

.poster-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  padding: 0 4px;
}

.poster-sheet__title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.poster-sheet__close {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
}

.poster-tpl-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin-bottom: 12px;
}

.poster-tpl-tab {
  flex: 1;
  padding: 7px 6px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.poster-tpl-tab.is-active {
  background: #fff;
  color: #e68600;
}

/* ── 竖版海报本体 ── */
.poster-artboard {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 3 / 4.6;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}

.poster-tpl--simple.poster-artboard {
  background: linear-gradient(180deg, #ffd8c2 0%, #ffc4a3 42%, #ffb088 100%);
}

.poster-tpl--emotion.poster-artboard {
  background: linear-gradient(180deg, #ffe0e8 0%, #ffd0c8 45%, #ffc8a8 100%);
}

.poster-tpl--help.poster-artboard {
  background: linear-gradient(180deg, #ffe8cc 0%, #ffd4a8 40%, #ffc89a 100%);
}

.poster-artboard__hero {
  flex-shrink: 0;
  height: 38%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px 12px 0;
  overflow: hidden;
}

.poster-artboard__hero svg {
  width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
}

.poster-artboard__hero-mascot {
  width: 64px;
  height: 64px;
  margin: 0 -6px;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.06));
}

.poster-artboard__hero-mascot svg {
  width: 100%;
  height: 100%;
}

.poster-artboard__hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.poster-artboard__body {
  flex: 1;
  margin: 0 14px 62px;
  padding: 16px 14px 14px;
  background: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-height: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.poster-artboard__score {
  font-size: 32px;
  font-weight: 900;
  color: #e68600;
  line-height: 1;
}

.poster-artboard__score[hidden] {
  display: none !important;
}

.poster-artboard__title {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  color: #333;
  line-height: 1.35;
}

.poster-artboard__sub {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  line-height: 1.5;
}

.poster-artboard__brand {
  margin: 4px 0 0;
  font-size: 10px;
  font-weight: 700;
  color: #bbb;
  letter-spacing: 0.5px;
}

.poster-artboard__qr {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 52px;
  height: 52px;
  padding: 4px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.poster-artboard__qr svg,
.poster-artboard__qr-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.poster-artboard__scan {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  color: #e68600;
  letter-spacing: 0.3px;
}

.poster-artboard__scan[hidden] {
  display: none !important;
}

/* ── 底部分享操作栏 ── */
.poster-share-sheet {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
}

.poster-share-options {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 16px;
}

.poster-share-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #666;
}

.poster-share-opt__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.poster-share-opt--image .poster-share-opt__icon {
  background: linear-gradient(145deg, #ffb347, #ff9500);
}

.poster-share-opt--wechat .poster-share-opt__icon {
  background: linear-gradient(145deg, #7ee06a, #07c160);
}

.poster-share-opt:active .poster-share-opt__icon {
  transform: scale(0.96);
}

.poster-share-cancel {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #f5f5f5;
  font-size: 15px;
  font-weight: 700;
  color: #666;
  cursor: pointer;
}

.poster-share-cancel:active {
  background: #ebebeb;
}
