/* 916-2 C端角色 UGC 創建工坊、聲音調試頁與我的角色專屬樣式 (ugc-studio.css)
 * [WIN: w-ui-phase0 · 2026-11-27] 全面重構為 Warm Cinema 暖影院暗黑統一版
 * 消除自發現頁/個人頁切入創角時的刺眼純白閃爍，與主站深咖毛玻璃 × 香檳金視覺無縫銜接。
 */

/* 拍板決策 #3：無 6 切片 UGC 角色進房預設隱藏四部位觸碰熱區與引導手勢 */
#stage.is-ugc-hide-zones #hitbox-layer,
#stage.is-ugc-hide-zones #pet-hud,
#stage.is-ugc-hide-zones #sim-hand-cursor {
  display: none !important;
  pointer-events: none !important;
}

/* 全屏獨立創角容器（掛載於 #stage 內，寬屏雙欄下與右側 9:16 視窗 1:1 嚴絲合縫對齊） */
.ugc-overlay-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  transform: none;
  background: var(--wc-bg-0, #120E0D);
  color: var(--wc-text-primary, #F6EEE9);
  z-index: 650;
  display: flex;
  flex-direction: column;
  font-family: var(--wc-font-sans, "PingFang TC", "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif);
  user-select: text;
  -webkit-user-select: text;
}
.ugc-overlay-page[hidden] {
  display: none !important;
}

#ugc-modal-root {
  position: absolute;
  inset: 0;
  z-index: 860;
  pointer-events: none;
  user-select: text;
  -webkit-user-select: text;
}
#ugc-modal-root:empty {
  display: none;
}
#ugc-modal-root > * {
  pointer-events: auto;
}

@media (min-width: 820px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
  #stage.chat-mode > .ugc-overlay-page,
  #stage.chat-mode > #ugc-modal-root {
    left: var(--cws-w, 0px);
    width: auto;
  }
}

.ugc-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--wc-surface-2, rgba(34, 26, 23, 0.88));
  backdrop-filter: var(--wc-blur-md, blur(16px));
  -webkit-backdrop-filter: var(--wc-blur-md, blur(16px));
  border-bottom: 1px solid var(--wc-border-subtle, rgba(236, 212, 198, 0.10));
  flex-shrink: 0;
}
.ugc-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--wc-border-subtle, rgba(236, 212, 198, 0.12));
  background: rgba(255, 255, 255, 0.04);
  color: var(--wc-text-primary, #F6EEE9);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.ugc-back-btn:hover {
  background: rgba(212, 180, 131, 0.14);
  border-color: var(--wc-border-default, rgba(212, 180, 131, 0.30));
}
.ugc-top-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #523830, #2D1F1B);
  color: var(--wc-gold-bright, #E8CFA2);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px solid var(--wc-border-strong, rgba(212, 180, 131, 0.45));
  flex-shrink: 0;
}
.ugc-top-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ugc-top-titles {
  flex: 1;
  min-width: 0;
}
.ugc-top-titles h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--wc-text-primary, #F6EEE9);
  letter-spacing: 0.2px;
}
.ugc-top-titles small {
  font-size: 11.5px;
  color: var(--wc-text-muted, #A9958B);
}
.ugc-progress-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(212, 180, 131, 0.12);
  border: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.28));
  color: var(--wc-gold-bright, #E8CFA2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ugc-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ugc-scroll-body::-webkit-scrollbar {
  display: none;
}

.ugc-mod-card {
  background: var(--wc-bg-2, #261D1A);
  border: 1px solid var(--wc-border-subtle, rgba(236, 212, 198, 0.11));
  border-radius: 16px;
  padding: 15px 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ugc-mod-card.has-violation {
  border: 1.5px solid var(--wc-danger, #DF8288) !important;
  box-shadow: 0 0 0 3px rgba(223, 130, 136, 0.16);
}
.ugc-violation-tip {
  color: #F3A6AB;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.ugc-mod-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ugc-mod-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--wc-gold-bright, #E8CFA2);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.ugc-req-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--wc-rose-bright, #E2ACA7);
  white-space: nowrap;
}
.ugc-opt-tag {
  font-size: 11.5px;
  color: var(--wc-text-muted, #A9958B);
  white-space: nowrap;
}

/* 形象選擇大框 */
.ugc-portrait-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed var(--wc-border-strong, rgba(212, 180, 131, 0.42));
  background: rgba(212, 180, 131, 0.06);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.ugc-portrait-picker:hover {
  background: rgba(212, 180, 131, 0.11);
  border-color: var(--wc-gold, #D4B483);
}
.ugc-portrait-thumb {
  width: 72px;
  height: 98px;
  border-radius: 12px;
  background: linear-gradient(160deg, #352824, #1C1513);
  border: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.24));
  color: var(--wc-text-secondary, #D4C2B8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.ugc-portrait-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ugc-field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--wc-text-secondary, #D4C2B8);
  margin: 10px 0 6px;
}
.ugc-input,
.ugc-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(236, 212, 198, 0.14);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--wc-text-primary, #F6EEE9);
  background: var(--wc-bg-input, #161110);
  outline: none;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.ugc-textarea,
.ugc-overlay-page textarea {
  resize: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ugc-textarea::-webkit-scrollbar,
.ugc-overlay-page textarea::-webkit-scrollbar,
.ugc-textarea::-webkit-resizer,
.ugc-overlay-page textarea::-webkit-resizer {
  width: 0;
  height: 0;
  display: none;
}
.ugc-sheet-box,
.ugc-me-tabs,
.ugc-moment-tabs,
.ugc-sim-stream {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ugc-sheet-box::-webkit-scrollbar,
.ugc-me-tabs::-webkit-scrollbar,
.ugc-moment-tabs::-webkit-scrollbar,
.ugc-sim-stream::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.ugc-input::placeholder,
.ugc-textarea::placeholder {
  color: var(--wc-text-faint, #8C786F);
}
.ugc-input:focus,
.ugc-textarea:focus {
  border-color: var(--wc-gold, #D4B483);
  box-shadow: 0 0 0 2px rgba(212, 180, 131, 0.14);
}
.ugc-input[disabled],
.ugc-textarea[disabled] {
  background: rgba(255, 255, 255, 0.03);
  color: var(--wc-text-muted, #A9958B);
  border-color: rgba(255, 255, 255, 0.07);
  cursor: not-allowed;
}

.ugc-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ugc-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(236, 212, 198, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wc-text-secondary, #D4C2B8);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.ugc-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--wc-text-primary, #F6EEE9);
}
.ugc-pill.on {
  background: rgba(212, 180, 131, 0.18);
  border-color: var(--wc-gold, #D4B483);
  color: var(--wc-gold-bright, #E8CFA2);
  font-weight: 600;
}
.ugc-pill.dashed {
  border-style: dashed;
  border-color: rgba(212, 180, 131, 0.36);
  color: var(--wc-gold, #D4B483);
}
.ugc-pill[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 開場白 6 維快捷晶片 */
.ugc-six-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
}
.ugc-six-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 180, 131, 0.24);
  background: rgba(212, 180, 131, 0.08);
  color: var(--wc-text-primary, #F6EEE9);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ugc-six-chip:hover {
  background: rgba(212, 180, 131, 0.16);
  border-color: var(--wc-gold, #D4B483);
}
.ugc-six-chip span {
  background: rgba(212, 180, 131, 0.18);
  color: var(--wc-gold-bright, #E8CFA2);
  padding: 1px 5px;
  border-radius: 6px;
  margin-left: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ugc-hint-banner {
  background: rgba(212, 180, 131, 0.09);
  border: 1px solid rgba(212, 180, 131, 0.22);
  color: var(--wc-gold-bright, #E8CFA2);
  font-size: 12px;
  line-height: 1.55;
  padding: 9px 12px;
  border-radius: 10px;
  margin-top: 8px;
}

.ugc-bottom-bar {
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--wc-surface-3, rgba(26, 20, 18, 0.94));
  backdrop-filter: var(--wc-blur-md, blur(16px));
  -webkit-backdrop-filter: var(--wc-blur-md, blur(16px));
  border-top: 1px solid var(--wc-border-subtle, rgba(236, 212, 198, 0.10));
  flex-shrink: 0;
}
.ugc-btn-ghost {
  flex: 1;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(236, 212, 198, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--wc-text-primary, #F6EEE9);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.ugc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(212, 180, 131, 0.34);
}
.ugc-btn-pri {
  flex: 1.35;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 246, 224, 0.28);
  background: var(--wc-gold-grad, linear-gradient(135deg, #DEC08E 0%, #C49E66 100%));
  color: var(--wc-gold-ink, #241811);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(212, 180, 131, 0.24);
  transition: filter 0.16s ease, transform 0.14s ease;
}
.ugc-btn-pri:hover {
  filter: brightness(1.06);
}
.ugc-btn-pri:active {
  transform: scale(0.98);
}
.ugc-btn-pri:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 底部浮層與確認彈窗（對齊右側 #stage 視口） */
.ugc-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 6, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ugc-sheet-mask.center-modal {
  align-items: center;
}
.ugc-sheet-box {
  width: 100%;
  max-width: 100%;
  background: var(--wc-bg-2, #261D1A);
  color: var(--wc-text-primary, #F6EEE9);
  border-top: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.24));
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  max-height: 82%;
  overflow-y: auto;
  box-shadow: var(--wc-shadow-sheet, 0 20px 54px rgba(0, 0, 0, 0.62));
}
.ugc-modal-card {
  width: min(88%, 360px);
  background: linear-gradient(180deg, #2B211E 0%, #1C1513 100%);
  color: var(--wc-text-primary, #F6EEE9);
  border: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.28));
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: var(--wc-shadow-sheet, 0 20px 54px rgba(0, 0, 0, 0.65));
}

/* 我的頁面 -> 我的角色 區塊 */
.ugc-me-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--wc-border-subtle, rgba(236, 212, 198, 0.10));
}
.ugc-me-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.ugc-me-tab {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(236, 212, 198, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--wc-text-secondary, #D4C2B8);
  cursor: pointer;
  white-space: nowrap;
}
.ugc-me-tab.on {
  background: rgba(212, 180, 131, 0.20);
  border-color: var(--wc-gold, #D4B483);
  color: var(--wc-gold-bright, #E8CFA2);
  font-weight: 600;
}
.ugc-me-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ugc-me-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--wc-bg-2, #261D1A);
  border: 1px solid var(--wc-border-subtle, rgba(236, 212, 198, 0.12));
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}
.ugc-me-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(155deg, #322622, #1B1412);
  overflow: hidden;
}
.ugc-me-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ugc-me-status-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(18, 14, 13, 0.78);
  border: 1px solid rgba(212, 180, 131, 0.28);
  color: var(--wc-text-primary, #F6EEE9);
  backdrop-filter: blur(6px);
}
.ugc-me-more-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 14, 13, 0.76);
  color: var(--wc-text-primary, #F6EEE9);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ugc-me-card-name {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 42px;
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ugc-me-card-info {
  padding: 9px 10px 11px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--wc-text-secondary, #D4C2B8);
}
.ugc-me-subnote {
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(212, 180, 131, 0.14);
  color: var(--wc-gold-bright, #E8CFA2);
  font-size: 10.5px;
}

/* ── [ugc-freedom-v2] 權限透明徽章、多時刻頁籤、主題/狀態欄卡片牆與 9:16 即時預覽試聊窗 ── */
.ugc-perm-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(201, 142, 138, 0.16);
  border: 1px solid rgba(201, 142, 138, 0.30);
  color: var(--wc-rose-bright, #E2ACA7);
  margin-left: 6px;
  vertical-align: middle;
}
.ugc-perm-badge.is-secret {
  background: var(--wc-violet-bg, rgba(195, 169, 216, 0.14));
  border-color: var(--wc-violet-border, rgba(195, 169, 216, 0.32));
  color: var(--wc-violet, #C3A9D8);
}
.ugc-perm-badge.is-zero {
  background: var(--wc-ok-bg, rgba(127, 184, 158, 0.14));
  border-color: var(--wc-ok-border, rgba(127, 184, 158, 0.32));
  color: var(--wc-ok, #7FB89E);
}

.ugc-moment-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.ugc-moment-tab {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(236, 212, 198, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wc-text-secondary, #D4C2B8);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ugc-moment-tab.on {
  background: var(--wc-gold-grad, linear-gradient(135deg, #DEC08E 0%, #C49E66 100%));
  border-color: var(--wc-gold, #D4B483);
  color: var(--wc-gold-ink, #241811);
}

.ugc-skin-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ugc-skin-card {
  border: 1px solid rgba(236, 212, 198, 0.13);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--wc-text-primary, #F6EEE9);
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
}
.ugc-skin-card:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(212, 180, 131, 0.32);
}
.ugc-skin-card.on {
  border-color: var(--wc-gold, #D4B483);
  background: rgba(212, 180, 131, 0.13);
  box-shadow: 0 2px 12px rgba(212, 180, 131, 0.15);
}
.ugc-skin-swatch {
  display: inline-flex;
  gap: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
.ugc-skin-swatch i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.ugc-preview-fab {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--wc-border-strong, rgba(212, 180, 131, 0.45));
  background: rgba(212, 180, 131, 0.14);
  color: var(--wc-gold-bright, #E8CFA2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.16s ease;
}
.ugc-preview-fab:hover {
  background: rgba(212, 180, 131, 0.24);
}

.ugc-sim-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--wc-bg-0, #120E0D);
  background-size: cover;
  background-position: center top;
  overflow: hidden;
  color: var(--wc-text-primary, #F6EEE9);
}
.ugc-sim-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 8, 7, 0.22) 0%, rgba(12, 8, 7, 0.44) 48%, rgba(12, 8, 7, 0.88) 100%);
  pointer-events: none;
}
.ugc-sim-stream {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  padding: 130px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ugc-sim-bubble {
  border-radius: var(--am2-bubble-radius, 16px);
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.6;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  max-width: 90%;
}
.ugc-sim-bubble.ai {
  align-self: flex-start;
  background: var(--am2-ai-bubble-bg, rgba(26, 20, 18, 0.78));
  border-color: var(--am2-ai-bubble-border, rgba(236, 212, 198, 0.16));
  color: var(--am2-ai-bubble-text, #F6EEE9);
}
.ugc-sim-bubble.user {
  align-self: flex-end;
  background: var(--am2-user-bubble-bg, rgba(201, 142, 138, 0.26));
  border-color: var(--am2-user-bubble-border, rgba(201, 142, 138, 0.48));
  color: #fff;
}

/* ── 列表頁「我的角色」承載區（與 .dl-grid 左右邊距對齊） ── */
.ugc-list-roles-mount {
  padding: 12px 14px 24px;
}
.ugc-list-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.ugc-list-subbar .ugc-me-tabs {
  flex: 1;
  min-width: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  scrollbar-width: none;
}
.ugc-list-subbar .ugc-me-tabs::-webkit-scrollbar {
  display: none;
}
.ugc-list-create-btn {
  flex-shrink: 0;
  padding: 5px 12px;
}


/* ── [w-ui-phase2] 創角工坊：3D 破框靈動頭像生成預覽卡片 ─────────────────── */
.ugc-popout-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(36, 27, 24, 0.92), rgba(24, 18, 16, 0.96));
  border: 1px solid rgba(212, 180, 131, 0.28);
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: visible;
}
.ugc-popout-preview {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  overflow: visible;
  margin-top: 10px;
}
.ugc-popout-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(212, 180, 131, 0.28), rgba(18, 13, 12, 0.94) 76%);
  border: 1.5px solid rgba(232, 207, 162, 0.68);
  box-shadow: 0 0 16px rgba(212, 180, 131, 0.22);
}
.ugc-popout-img {
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  width: 72px;
  height: 86px;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.68));
  clip-path: inset(-56px -22px 0px -22px round 0 0 30px 30px);
}
.ugc-popout-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #E8CFA2;
  letter-spacing: 0.06em;
  z-index: 2;
}
.ugc-popout-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ugc-popout-title {
  font-size: 13px;
  font-weight: 700;
  color: #F6EEE9;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ugc-popout-desc {
  font-size: 11.5px;
  color: #A9958B;
  line-height: 1.42;
}
.ugc-popout-cta {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(232, 207, 162, 0.45);
  background: linear-gradient(135deg, #DEC08E 0%, #B88E56 100%);
  color: #1A1311;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.ugc-popout-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
