/* 名片海报简介：在深色海报内形成清晰、紧凑且可折叠的信息层。 */
.face-swap-page .poster-bio {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-top: 4px;
  padding: 10px 12px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.face-swap-page .poster-bio[hidden] {
  display: none !important;
}

.face-swap-page .poster-bio .poster-c-label {
  display: inline-flex;
  align-self: flex-start;
  width: auto;
  margin: 0 0 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  letter-spacing: 0.04em;
}

.face-swap-page .poster-bio-text {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1;
  white-space: pre-line;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.face-swap-page .poster-bio.is-expanded .poster-bio-text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.face-swap-page .poster-bio-toggle {
  align-self: flex-end;
  margin: 4px -3px -2px 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: rgba(190, 216, 255, 0.92);
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.face-swap-page .poster-bio-toggle:focus-visible {
  outline: 1px solid rgba(190, 216, 255, 0.85);
  outline-offset: 2px;
  border-radius: 4px;
}

.ai-poster-entry {
  margin: 12px 16px -4px;
}

.ai-poster-entry-button {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(91, 111, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f2f4ff 58%, #f8f0ff 100%);
  box-shadow: 0 6px 18px rgba(41, 47, 105, 0.09);
  color: #20233b;
  text-align: left;
  cursor: pointer;
}

.ai-poster-entry-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #5e6cff, #a84de8);
  box-shadow: 0 5px 12px rgba(94, 108, 255, 0.25);
  font-size: 19px;
}

.ai-poster-entry-button b,
.ai-poster-entry-button small {
  display: block;
}

.ai-poster-entry-button b {
  margin-bottom: 3px;
  font-size: 14px;
}

.ai-poster-entry-button small {
  color: #747895;
  font-size: 10px;
  line-height: 1.35;
}

.ai-poster-entry-button em {
  color: #5d65dc;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

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

.ai-poster-sheet,
.ai-poster-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
}

.ai-poster-backdrop {
  background: rgba(13, 16, 35, 0.58);
  backdrop-filter: blur(2px);
}

.ai-poster-panel {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 301;
  width: min(100%, 750px);
  max-height: 86vh;
  overflow-y: auto;
  transform: translateX(-50%);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -16px 40px rgba(15, 20, 55, 0.2);
  box-sizing: border-box;
}

.ai-poster-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-poster-panel-head h2 {
  margin: 2px 0 0;
  color: #20233b;
  font-size: 19px;
}

.ai-poster-kicker {
  color: #626de6;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.ai-poster-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f2f7;
  color: #5b5e70;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ai-poster-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  margin-bottom: 14px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f4f5ff;
  color: #606681;
  font-size: 10px;
}

.ai-poster-status b {
  color: #515bd4;
}

.ai-poster-field {
  display: block;
  margin-bottom: 13px;
}

.ai-poster-field > span {
  display: block;
  margin-bottom: 7px;
  color: #3f435d;
  font-size: 12px;
  font-weight: 650;
}

.ai-poster-prompt {
  width: 100%;
  min-height: 76px;
  padding: 10px 11px;
  resize: vertical;
  border: 1px solid #dfe1eb;
  border-radius: 10px;
  color: #25283c;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  box-sizing: border-box;
}

.ai-poster-prompt:focus {
  outline: 2px solid rgba(94, 108, 255, 0.14);
  border-color: #7780ec;
}

.ai-poster-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ai-poster-option {
  padding: 9px 5px;
  border: 1px solid #e1e3ec;
  border-radius: 9px;
  background: #fff;
  color: #666a7e;
  font-size: 11px;
  cursor: pointer;
}

.ai-poster-option.is-active {
  border-color: #6974e8;
  background: #f1f3ff;
  color: #4f58cb;
  font-weight: 650;
}

.ai-poster-reserved {
  margin: 4px 0 13px;
  padding: 8px 10px;
  border-left: 3px solid #a66bea;
  border-radius: 6px;
  background: #faf7ff;
  color: #777189;
  font-size: 10px;
  line-height: 1.5;
}

.ai-poster-generate {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #5c69ef, #9e51df);
  box-shadow: 0 8px 18px rgba(91, 100, 224, 0.22);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ai-poster-generate:disabled {
  opacity: 0.65;
  cursor: wait;
}

body.ai-poster-sheet-open {
  overflow: hidden;
}

.face-swap-page .poster-card[data-ai-poster-generated="1"] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.face-swap-page .poster-card[data-ai-poster-generated="1"] > * {
  position: relative;
  z-index: 1;
}

.face-swap-page .poster-card[data-ai-poster-style="business"] {
  background: linear-gradient(145deg, #10172d 0%, #1d2e56 58%, #163f63 100%) !important;
}

.face-swap-page .poster-card[data-ai-poster-style="technology"] {
  background: radial-gradient(circle at 88% 8%, rgba(81, 208, 255, 0.34), transparent 30%), linear-gradient(145deg, #0b1238 0%, #26257c 54%, #0d617b 100%) !important;
}

.face-swap-page .poster-card[data-ai-poster-style="guochao"] {
  background: radial-gradient(circle at 88% 12%, rgba(255, 220, 135, 0.32), transparent 28%), linear-gradient(145deg, #361313 0%, #761f2b 58%, #a9572a 100%) !important;
}

.face-swap-page .poster-card[data-ai-poster-image="1"] {
  background-image: linear-gradient(rgba(9, 14, 35, 0.28), rgba(9, 14, 35, 0.62)), var(--ai-poster-image) !important;
  background-position: center !important;
  background-size: cover !important;
}

.ai-poster-generated-meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.84);
  font-size: 10px;
  line-height: 1.4;
  box-sizing: border-box;
}
