/*
 * IVS 라이브 시청 페이지 UI 테마 — 13개 요소 × 다중 변형 스타일.
 *
 * body 클래스 형식:
 *   bc-ui-chat-{variant}     : 채팅창 디자인
 *   bc-ui-nick-{variant}     : 닉네임 색상
 *   bc-ui-admin-{variant}    : 관리자 뱃지
 *   bc-ui-prod-{variant}     : 상품 카드
 *   bc-ui-buy-{variant}      : 구매 버튼
 *   bc-ui-notice-{variant}   : 공지 배너
 *   bc-ui-heart-{variant}    : 하트 애니메이션
 *   bc-ui-viewer-{variant}   : 시청자 수
 *   bc-ui-start-{variant}    : 방송 시작 화면
 *   bc-ui-port-{variant}     : 세로형 레이아웃
 *   bc-ui-pip-{variant}      : PiP 위치(공구 페이지)
 *   bc-ui-coupon-{variant}   : 쿠폰 팝업
 *   bc-ui-toast-{variant}    : 구매 토스트
 *
 * 컨테이너 hook:
 *   .bc-ui-heart-layer       : 하트 효과 컨테이너
 *   .bc-ui-viewer            : 시청자 수 칩
 *   .bc-ui-notice            : 공지 배너
 *   .bc-ui-product-card      : 핀 상품 카드
 *   .bc-ui-coupon            : 쿠폰 팝업
 *   .bc-ui-toast             : 구매 토스트
 *   .bc-ui-buy-btn           : 메인 CTA 버튼
 *   .bc-ui-start-screen      : 방송 대기 화면
 *   .bc-ui-pip-target        : 외부 페이지에서 PiP 위치 적용 시 사용
 *   .bc-ui-admin-badge       : 채팅 관리자 뱃지
 *   .bc-ui-nick              : 채팅 닉네임
 */

/* ---------------- 채팅창 디자인 ---------------- */

body.bc-ui-chat-glass .bc-chat-panel{
	background: rgba(15,23,42,0.45);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-left: 1px solid rgba(255,255,255,0.14);
}
body.bc-ui-chat-glass .bc-chat-head,
body.bc-ui-chat-glass .bc-chat-nick-row,
body.bc-ui-chat-glass .bc-chat-form{
	background: rgba(255,255,255,0.03);
	border-color: rgba(255,255,255,0.08);
}
body.bc-ui-chat-glass .bc-chat-nick-row input,
body.bc-ui-chat-glass .bc-chat-form input{
	background: rgba(0,0,0,0.28);
	border: 1px solid rgba(255,255,255,0.14);
	color: #e8efff;
}

body.bc-ui-chat-bubble .bc-chat-messages .bc-chat-msg{
	display: inline-block;
	max-width: 92%;
	margin: 0 0 8px;
	padding: 7px 11px;
	background: rgba(255,255,255,0.07);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 14px 14px 14px 4px;
	line-height: 1.45;
}
body.bc-ui-chat-bubble .bc-chat-messages .bc-chat-msg.is-self{
	background: rgba(61,124,255,0.22);
	border-color: rgba(61,124,255,0.35);
	border-radius: 14px 14px 4px 14px;
	margin-left: auto;
	color: #dce8ff;
}
body.bc-ui-chat-bubble .bc-chat-messages{ display: flex; flex-direction: column; }

body.bc-ui-chat-minimal .bc-chat-panel{
	background: transparent;
	border-left: 1px solid rgba(255,255,255,0.06);
}
body.bc-ui-chat-minimal .bc-chat-head{
	border-bottom: 1px solid rgba(255,255,255,0.06);
	font-weight: 500;
	color: #9aa8c7;
	letter-spacing: 0.04em;
}
body.bc-ui-chat-minimal .bc-chat-messages .bc-chat-msg{
	padding: 4px 0;
	border-bottom: 1px dashed rgba(255,255,255,0.06);
	margin: 0;
}

body.bc-ui-chat-dark .bc-chat-panel{ background: #05070d; }
body.bc-ui-chat-dark .bc-chat-head,
body.bc-ui-chat-dark .bc-chat-nick-row,
body.bc-ui-chat-dark .bc-chat-form{
	background: #0a0e16;
	border-color: rgba(255,255,255,0.04);
}

body.bc-ui-chat-neon .bc-chat-panel{
	background: linear-gradient(180deg, rgba(15,5,35,0.95), rgba(5,8,30,0.95));
	border-left: 1px solid rgba(192,132,252,0.4);
}
body.bc-ui-chat-neon .bc-chat-head{
	color: #c084fc;
	border-bottom-color: rgba(192,132,252,0.3);
	text-shadow: 0 0 8px rgba(192,132,252,0.55);
}
body.bc-ui-chat-neon .bc-chat-messages .bc-chat-msg{
	color: #e9d5ff;
}

/* ---- shorts — 쇼츠형 (시청자 6줄 / 셀러 8줄, 배경 없음)
 *  셀러 라이브 모니터링(.sl-chat-overlay) 과 동일한 영상 위 채팅 :
 *   - 메시지 배경/캡슐 없음 — 닉네임 색 + 본문 흰색 텍스트만
 *   - 닉네임 hue·role 색상은 broadcast-chat-overlay.css 규칙 사용
 *   - 시청자 오버레이: 최근 6줄 — 셀러 방송 스튜디오는 8줄 (각각 JS·dimen 으로 제한)
 *   - 6줄 중 위 2줄만 페이드 아웃 — 페이드 줄은 text-shadow 를 약하게 해 검은 띠 방지
 *  사이드바/오버레이 두 채팅 컨테이너 모두에 적용한다.
 */

/* ===== 오버레이 모드 ===== */
body.bc-ui-chat-shorts .bc-chat-overlay{
	bottom: 5px;
}
body.bc-ui-chat-shorts .bc-chat-overlay-messages{
	background: transparent;
	-webkit-mask-image: none;
	mask-image: none;
	padding: 4px 8px 8px;
	gap: 2px;
	font-size: 13.5px;
	max-height: calc(6 * (1.45em + 5px) + 12px);
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}
/* PIP 확대: ivs-chat.js 가 높이 지정 — shorts 전역 max-height 가 스크롤을 막지 않게 */
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages{
	max-height: none;
	overflow-y: scroll;
	pointer-events: auto;
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg{
	display: block;
	max-width: 100%;
	margin: 0 0 5px;
	padding: 0;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0;
	box-shadow: none !important;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	color: #fff;
	font-size: 13.5px;
	font-weight: 400;
	line-height: 1.45;
	word-break: break-word;
	text-shadow:
		0 0 2px #000,
		0 1px 2px #000,
		1px 1px 0 rgba(0,0,0,.95),
		-1px -1px 0 rgba(0,0,0,.95),
		1px -1px 0 rgba(0,0,0,.95),
		-1px 1px 0 rgba(0,0,0,.95),
		0 0 8px rgba(0,0,0,.8);
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg.is-host,
body.bc-ui-chat-shorts .bc-chat-overlay-msg.is-admin,
body.bc-ui-chat-shorts .bc-chat-overlay-msg.is-self{
	background: transparent !important;
	box-shadow: none !important;
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg.is-host{
	font-weight: 600;
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg.is-host::before{
	content: '★';
	display: inline-block;
	margin-right: 5px;
	color: #fff8d0;
	font-size: 11px;
	text-shadow: 0 0 6px rgba(255,224,128,.7), 0 0 2px #000, 1px 1px 0 #000, -1px -1px 0 #000;
}
/* SCM 관리자 뱃지(★ HOST 등)가 있으면 is-host::before 별 중복 제거 */
body.bc-ui-chat-shorts[class*="bc-ui-admin-"]:not(.bc-ui-admin-none) .bc-chat-overlay-msg.is-host::before,
body.bc-ui-chat-shorts[class*="bc-ui-admin-"]:not(.bc-ui-admin-none) .bc-chat-overlay-msg.is-admin::before{
	display: none !important;
	content: none !important;
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg.is-admin{
	font-weight: 600;
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg.is-system{
	background: transparent !important;
	opacity: .95;
	color: #b8f0ff;
	text-shadow:
		0 0 2px #000,
		1px 1px 0 rgba(0,0,0,.95),
		-1px -1px 0 rgba(0,0,0,.95),
		1px -1px 0 rgba(0,0,0,.95),
		-1px 1px 0 rgba(0,0,0,.95),
		0 0 8px rgba(0,0,0,.8);
}
body.bc-ui-chat-shorts .bc-chat-overlay-text{
	font-weight: 600;
	text-shadow:
		0 0 2px #000,
		1px 1px 0 rgba(0,0,0,.95),
		-1px -1px 0 rgba(0,0,0,.95),
		1px -1px 0 rgba(0,0,0,.95),
		-1px 1px 0 rgba(0,0,0,.95),
		0 0 8px rgba(0,0,0,.85);
}
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="0"] { color: #ffc9c9; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="1"] { color: #ffd7a8; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="2"] { color: #fff3a3; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="3"] { color: #b8ffd4; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="4"] { color: #b3f7ff; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="5"] { color: #c5dcff; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="6"] { color: #ddd0ff; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="7"] { color: #ffd0f5; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="8"] { color: #ffc4d6; }
body.bc-ui-chat-shorts .bc-chat-overlay-text[data-hue="9"] { color: #ffe9a8; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick{
	display: inline-block;
	margin-right: 5px;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.01em;
	text-shadow:
		0 0 2px #000,
		1px 1px 0 rgba(0,0,0,.95),
		-1px -1px 0 rgba(0,0,0,.95),
		1px -1px 0 rgba(0,0,0,.95),
		-1px 1px 0 rgba(0,0,0,.95),
		0 0 8px rgba(0,0,0,.85);
}
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="0"] { color: #ff8a8a; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="1"] { color: #ffb86c; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="2"] { color: #ffe566; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="3"] { color: #7dffb0; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="4"] { color: #6ef0ff; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="5"] { color: #7eb6ff; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="6"] { color: #c4a8ff; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="7"] { color: #ffa3f0; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="8"] { color: #ff8fb0; }
body.bc-ui-chat-shorts .bc-chat-overlay-nick[data-hue="9"] { color: #ffd24d; }
body.bc-ui-chat-shorts .bc-chat-overlay-msg.is-host .bc-chat-overlay-nick{
	background: transparent;
	padding: 0;
	border-radius: 0;
	color: #ffe28a;
}
/* PIP 확대 — 기본 캡슐(블러·그라데이션) 완전 제거, 판매자 라이브와 동일 */
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-msg,
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-msg.is-host,
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-msg.is-admin,
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-msg.is-self{
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	padding: 0 !important;
}
/* 화면에는 최근 6줄만 — 나머지는 숨김. 페이드 아웃은 위 2줄(5·6번째)만.
 * 페이드 줄에 기본 메시지 굵은 검은 stroke shadow 가 겹치면 뭉친 검은 띠가 되므로
 * 페이드 줄만 text-shadow 를 얇게 / filter 로 살짝 소프트. */
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(n+7 of .bc-chat-overlay-msg){ display: none; }
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg{
	display: block !important;
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(1 of .bc-chat-overlay-msg),
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(2 of .bc-chat-overlay-msg),
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(3 of .bc-chat-overlay-msg),
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(4 of .bc-chat-overlay-msg){ opacity: 1; }
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(5 of .bc-chat-overlay-msg){
	opacity: .55;
	text-shadow: 0 0 2px rgba(0,0,0,.55), 0 1px 1px rgba(0,0,0,.4);
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(5 of .bc-chat-overlay-msg) .bc-chat-overlay-nick,
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(5 of .bc-chat-overlay-msg) .bc-chat-overlay-text{
	text-shadow: 0 0 2px rgba(0,0,0,.5), 0 1px 1px rgba(0,0,0,.35) !important;
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(6 of .bc-chat-overlay-msg){
	opacity: .28;
	text-shadow: 0 0 1px rgba(0,0,0,.4);
}
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(6 of .bc-chat-overlay-msg) .bc-chat-overlay-nick,
body.bc-ui-chat-shorts .bc-chat-overlay-msg:nth-last-child(6 of .bc-chat-overlay-msg) .bc-chat-overlay-text{
	text-shadow: 0 0 1px rgba(0,0,0,.35) !important;
}
/* PIP 확대(스크롤) — 화면 하단 보이는 최근 줄 기준 동일 페이드 + 얇은 shadow */
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(1 of .bc-chat-overlay-msg),
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(2 of .bc-chat-overlay-msg),
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(3 of .bc-chat-overlay-msg),
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(4 of .bc-chat-overlay-msg){ opacity: 1; }
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(5 of .bc-chat-overlay-msg){
	opacity: .55;
	text-shadow: 0 0 2px rgba(0,0,0,.55), 0 1px 1px rgba(0,0,0,.4);
}
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(5 of .bc-chat-overlay-msg) .bc-chat-overlay-nick,
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(5 of .bc-chat-overlay-msg) .bc-chat-overlay-text{
	text-shadow: 0 0 2px rgba(0,0,0,.5), 0 1px 1px rgba(0,0,0,.35) !important;
}
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(6 of .bc-chat-overlay-msg){
	opacity: .28;
	text-shadow: 0 0 1px rgba(0,0,0,.4);
}
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(6 of .bc-chat-overlay-msg) .bc-chat-overlay-nick,
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-messages .bc-chat-overlay-msg:nth-last-child(6 of .bc-chat-overlay-msg) .bc-chat-overlay-text{
	text-shadow: 0 0 1px rgba(0,0,0,.35) !important;
}
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-msg .bc-ui-admin-badge,
body.bc-ui-chat-shorts #idx_live_pip.is-expanded .idx-live-chat-overlay .bc-chat-overlay-msg .bc-chat-role-badge{
	vertical-align: middle;
}

/* ===== 사이드바 모드 ===== */
body.bc-ui-chat-shorts .bc-chat-panel{
	background: transparent;
	border-left: 0;
}
body.bc-ui-chat-shorts .bc-chat-head{
	background: transparent;
	border-bottom: 0;
	color: #fff;
	text-shadow:
		-1px -1px 0 #000,
		 1px -1px 0 #000,
		-1px  1px 0 #000,
		 1px  1px 0 #000;
}
body.bc-ui-chat-shorts .bc-chat-messages{ background: transparent; }
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg{
	background: transparent !important;
	border: 0 !important;
	border-left: 0 !important;
	box-shadow: none !important;
	padding: 0;
	margin: 0 0 4px;
	color: #fff;
	font-weight: 600;
	line-height: 1.5;
	text-shadow:
		-1px -1px 0 #000,
		 1px -1px 0 #000,
		-1px  1px 0 #000,
		 1px  1px 0 #000;
}
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg .bc-ui-nick{
	color: #FFD700 !important;
	text-shadow:
		-1px -1px 0 #000,
		 1px -1px 0 #000,
		-1px  1px 0 #000,
		 1px  1px 0 #000;
}
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg.is-host .bc-ui-nick{
	background: #f5c842;
	color: #000 !important;
	padding: 1px 6px;
	border-radius: 4px;
	text-shadow: none;
}
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg:nth-last-child(n+7){ display: none; }
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg:nth-last-child(1){ opacity: 1; }
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg:nth-last-child(2){ opacity: .80; }
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg:nth-last-child(3){ opacity: .60; }
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg:nth-last-child(4){ opacity: .45; }
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg:nth-last-child(5){ opacity: .32; }
body.bc-ui-chat-shorts .bc-chat-messages .bc-chat-msg:nth-last-child(6){ opacity: .20; }

/* ---------------- 닉네임 색상 ---------------- */

.bc-ui-nick{ font-weight: 700; margin-right: 5px; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="0"]{ color:#D82D28; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="1"]{ color:#fb923c; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="2"]{ color:#fbbf24; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="3"]{ color:#a3e635; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="4"]{ color:#34d399; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="5"]{ color:#22d3ee; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="6"]{ color:#60a5fa; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="7"]{ color:#a78bfa; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="8"]{ color:#f472b6; }
body.bc-ui-nick-rainbow .bc-ui-nick[data-hue="9"]{ color:#facc15; }

body.bc-ui-nick-brand .bc-ui-nick{ color: #fb7185; }
body.bc-ui-nick-brand .bc-ui-nick[data-hue="0"]{ color: #D82D28; }
body.bc-ui-nick-brand .bc-ui-nick[data-hue="1"]{ color: #fb7185; }
body.bc-ui-nick-brand .bc-ui-nick[data-hue="2"]{ color: #f472b6; }
body.bc-ui-nick-brand .bc-ui-nick[data-hue="3"]{ color: #fca5a5; }

body.bc-ui-nick-mono .bc-ui-nick{ color: #cbd5e1 !important; }

body.bc-ui-nick-pastel .bc-ui-nick[data-hue="0"]{ color:#fda4af; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="1"]{ color:#fcd34d; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="2"]{ color:#86efac; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="3"]{ color:#7dd3fc; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="4"]{ color:#c4b5fd; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="5"]{ color:#f9a8d4; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="6"]{ color:#a5f3fc; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="7"]{ color:#bef264; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="8"]{ color:#fde68a; }
body.bc-ui-nick-pastel .bc-ui-nick[data-hue="9"]{ color:#ddd6fe; }

body.bc-ui-nick-role .bc-ui-nick{ color: #cbd5e1; }
body.bc-ui-nick-role .bc-ui-nick[data-role="host"]{ color: #fbbf24; }
body.bc-ui-nick-role .bc-ui-nick[data-role="admin"]{ color: #60a5fa; }
body.bc-ui-nick-role .bc-ui-nick[data-role="self"]{ color: #93c5fd; }

/* ---------------- 관리자 뱃지 ---------------- */

.bc-ui-admin-badge{
	display: none;
	margin-right: 5px;
	font-size: 10px;
	font-weight: 800;
	padding: 1px 6px;
	border-radius: 999px;
	vertical-align: 1px;
	letter-spacing: 0.02em;
}
.bc-ui-admin-badge[data-role="host"],
.bc-ui-admin-badge[data-role="admin"]{ display: inline-block; }

body.bc-ui-admin-crown .bc-ui-admin-badge[data-role="host"]::before{ content: "♛ HOST"; }
body.bc-ui-admin-crown .bc-ui-admin-badge[data-role="admin"]::before{ content: "♛ ADMIN"; }
body.bc-ui-admin-crown .bc-ui-admin-badge{
	background: linear-gradient(180deg, #fde68a, #f59e0b);
	color: #7c2d12;
	box-shadow: 0 1px 2px rgba(124,45,18,0.25);
}

body.bc-ui-admin-shield .bc-ui-admin-badge[data-role="host"]::before{ content: "🛡 HOST"; }
body.bc-ui-admin-shield .bc-ui-admin-badge[data-role="admin"]::before{ content: "🛡 ADMIN"; }
body.bc-ui-admin-shield .bc-ui-admin-badge{
	background: linear-gradient(180deg, #93c5fd, #2563eb);
	color: #fff;
}

body.bc-ui-admin-star .bc-ui-admin-badge[data-role="host"]::before{ content: "★ HOST"; }
body.bc-ui-admin-star .bc-ui-admin-badge[data-role="admin"]::before{ content: "★ ADMIN"; }
body.bc-ui-admin-star .bc-ui-admin-badge{
	background: linear-gradient(180deg, #fbbf24, #d97706);
	color: #fff;
}

body.bc-ui-admin-host .bc-ui-admin-badge[data-role="host"]::before{ content: "HOST"; }
body.bc-ui-admin-host .bc-ui-admin-badge[data-role="admin"]::before{ content: "ADMIN"; }
body.bc-ui-admin-host .bc-ui-admin-badge{
	background: rgba(255,255,255,0.16);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.18);
}

body.bc-ui-admin-none .bc-ui-admin-badge{ display: none !important; }

/* ---------------- 상품 카드 ---------------- */

.bc-ui-product-card{
	position: absolute;
	left: 14px;
	bottom: 14px;
	width: min(310px, 88%);
	display: none;
	z-index: 5;
	border-radius: 14px;
	overflow: hidden;
	font-family: inherit;
}
.bc-ui-product-card.is-visible{ display: block; animation: bc-ui-card-in .35s ease both; }
@keyframes bc-ui-card-in{
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}
.bc-ui-product-card .bc-ui-pc-inner{ display: flex; align-items: center; gap: 10px; padding: 10px; }
.bc-ui-product-card .bc-ui-pc-img{
	flex: 0 0 64px; width: 64px; height: 64px;
	border-radius: 10px; background: #1f2937 center/cover no-repeat;
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.bc-ui-product-card .bc-ui-pc-meta{ flex: 1; min-width: 0; color: #fff; }
.bc-ui-product-card .bc-ui-pc-title{ font-size: 13px; font-weight: 700; line-height: 1.35; max-height: 2.7em; overflow: hidden; }
.bc-ui-product-card .bc-ui-pc-price{ font-size: 14px; font-weight: 800; margin-top: 4px; color: #fde68a; }
.bc-ui-product-card .bc-ui-pc-price del{ font-size: 11px; color: #94a3b8; font-weight: 500; margin-right: 6px; }

body.bc-ui-prod-basic .bc-ui-product-card{
	background: #fff;
	box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
body.bc-ui-prod-basic .bc-ui-pc-meta{ color: #0f172a; }
body.bc-ui-prod-basic .bc-ui-pc-price{ color: #D82D28; }

body.bc-ui-prod-glass .bc-ui-product-card{
	background: rgba(15,23,42,0.55);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,0.18);
	box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

body.bc-ui-prod-mini .bc-ui-product-card{
	background: rgba(0,0,0,0.78);
	padding: 0;
	width: min(260px, 82%);
}
body.bc-ui-prod-mini .bc-ui-pc-inner{ padding: 6px 8px; }
body.bc-ui-prod-mini .bc-ui-pc-img{ flex: 0 0 44px; width: 44px; height: 44px; }
body.bc-ui-prod-mini .bc-ui-pc-title{ font-size: 12px; }
body.bc-ui-prod-mini .bc-ui-pc-price{ font-size: 13px; }

body.bc-ui-prod-wide .bc-ui-product-card{
	background: #fff;
	width: min(340px, 92%);
	box-shadow: 0 14px 36px rgba(0,0,0,0.4);
}
body.bc-ui-prod-wide .bc-ui-pc-inner{ flex-direction: column; align-items: stretch; padding: 0; gap: 0; }
body.bc-ui-prod-wide .bc-ui-pc-img{ flex: none; width: 100%; height: 150px; border-radius: 14px 14px 0 0; }
body.bc-ui-prod-wide .bc-ui-pc-meta{ padding: 10px 12px 12px; color: #0f172a; }
body.bc-ui-prod-wide .bc-ui-pc-price{ color: #D82D28; }

body.bc-ui-prod-sticker .bc-ui-product-card{
	background: #fff;
	border-radius: 22px;
	box-shadow: 0 18px 40px rgba(0,0,0,0.35), 0 0 0 4px rgba(255,255,255,0.6);
}
body.bc-ui-prod-sticker .bc-ui-pc-meta{ color: #0f172a; }
body.bc-ui-prod-sticker .bc-ui-pc-price{ color: #D82D28; }
body.bc-ui-prod-sticker .bc-ui-pc-img{ border-radius: 16px; }

/* ---------------- 구매 버튼 ---------------- */

.bc-ui-buy-btn{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 96px;
	height: 38px;
	padding: 0 16px;
	border: 0;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #fff;
	background: #D82D28;
	cursor: pointer;
	margin-top: 6px;
	position: relative;
	overflow: hidden;
}
body.bc-ui-buy-solid .bc-ui-buy-btn{ background: #D82D28; }
body.bc-ui-buy-solid .bc-ui-buy-btn:hover{ background: #B4231F; }

body.bc-ui-buy-gradient .bc-ui-buy-btn{
	background: linear-gradient(180deg, #f97316 0%, #D82D28 65%, #B4231F 100%);
	box-shadow: 0 6px 14px rgba(216,45,40,0.32);
}

body.bc-ui-buy-pulse .bc-ui-buy-btn{
	background: linear-gradient(180deg, #D82D28, #B4231F);
	animation: bc-ui-buy-pulse 1.5s ease-in-out infinite;
}
@keyframes bc-ui-buy-pulse{
	0%, 100% { box-shadow: 0 0 0 0 rgba(216,45,40,0.6); }
	50% { box-shadow: 0 0 0 12px rgba(216,45,40,0); }
}

body.bc-ui-buy-outline .bc-ui-buy-btn{
	background: transparent;
	color: #D82D28;
	border: 1.5px solid #D82D28;
}
body.bc-ui-buy-outline .bc-ui-buy-btn:hover{
	background: rgba(248,113,113,0.12);
}

body.bc-ui-buy-shine .bc-ui-buy-btn{
	background: linear-gradient(180deg, #D82D28, #B4231F);
}
body.bc-ui-buy-shine .bc-ui-buy-btn::after{
	content: '';
	position: absolute;
	top: 0; left: -150%;
	width: 80%; height: 100%;
	background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
	transform: skewX(-20deg);
	animation: bc-ui-buy-shine 2.4s ease-in-out infinite;
}
@keyframes bc-ui-buy-shine{
	0% { left: -150%; }
	60% { left: 150%; }
	100% { left: 150%; }
}

/* ---------------- 공지 배너 ---------------- */

.bc-ui-notice{
	display: none;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
}
.bc-ui-notice.is-visible{ display: flex; }
.bc-ui-notice .bc-ui-notice-text{ flex: 1; min-width: 0; }
.bc-ui-notice .bc-ui-notice-label{
	flex: 0 0 auto;
	font-size: 11px;
	background: rgba(255,255,255,0.18);
	padding: 2px 8px;
	border-radius: 999px;
	margin-right: 8px;
}

body.bc-ui-notice-top-marquee .bc-ui-notice{
	position: absolute;
	left: 0; right: 0; top: 0;
	z-index: 6;
	padding: 8px 12px;
	background: linear-gradient(180deg, rgba(216,45,40,0.95), rgba(216,45,40,0.6));
	overflow: hidden;
	white-space: nowrap;
}
body.bc-ui-notice-top-marquee .bc-ui-notice .bc-ui-notice-text{
	display: inline-block;
	animation: bc-ui-marquee 14s linear infinite;
}
/* 구매자 PIP 확대 — 마퀴: 배지 우측 트랙에서만 슬라이드, 좌측 edge mask로 fade-out (배지와 겹치지 않음) */
body.bc-ui-notice-top-marquee #idx_live_pip.is-expanded .bc-ui-notice{
	align-items: center;
	isolation: isolate;
}
body.bc-ui-notice-top-marquee #idx_live_pip.is-expanded .bc-ui-notice .bc-ui-notice-label{
	position: relative;
	z-index: 2;
	flex-shrink: 0;
	margin-right: 8px;
	background: #D82D28;
	border: 1px solid rgba(255, 255, 255, 0.22);
	transform: translateZ(0);
}
body.bc-ui-notice-top-marquee #idx_live_pip.is-expanded .bc-ui-notice .bc-ui-notice-marquee{
	flex: 1;
	min-width: 0;
	overflow: hidden;
	position: relative;
	z-index: 1;
	-webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.2) 6px, rgba(0, 0, 0, 0.72) 16px, #000 34px);
	mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.2) 6px, rgba(0, 0, 0, 0.72) 16px, #000 34px);
}
body.bc-ui-notice-top-marquee #idx_live_pip.is-expanded .bc-ui-notice .bc-ui-notice-text{
	flex: none;
	min-width: auto;
	position: relative;
	z-index: 1;
	padding-left: 100%;
	animation: bc-ui-pip-notice-marquee 14s linear infinite;
}
@keyframes bc-ui-pip-notice-marquee{
	0% { transform: translateX(0); }
	100% { transform: translateX(-100%); }
}
@keyframes bc-ui-marquee{
	0% { transform: translateX(15%); }
	100% { transform: translateX(-100%); }
}

body.bc-ui-notice-fixed-top .bc-ui-notice{
	position: absolute;
	left: 12px; right: 12px; top: 12px;
	z-index: 6;
	padding: 9px 12px;
	background: rgba(0,0,0,0.6);
	border-left: 4px solid #fbbf24;
	border-radius: 10px;
	align-items: center;
}

body.bc-ui-notice-bottom-toast .bc-ui-notice{
	position: absolute;
	left: 12px; right: 12px; bottom: 12px;
	z-index: 6;
	padding: 10px 14px;
	background: rgba(0,0,0,0.7);
	border-radius: 12px;
	align-items: center;
	animation: bc-ui-notice-up .35s ease;
}
@keyframes bc-ui-notice-up{
	from { transform: translateY(20px); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

body.bc-ui-notice-side-pill .bc-ui-notice{
	position: absolute;
	left: 12px; top: 50%;
	transform: translateY(-50%) rotate(-90deg);
	transform-origin: left center;
	z-index: 6;
	padding: 6px 12px;
	background: rgba(216,45,40,0.92);
	border-radius: 999px;
	white-space: nowrap;
}

body.bc-ui-notice-none .bc-ui-notice{ display: none !important; }

/* ---------------- 하트 애니메이션 ---------------- */

.bc-ui-heart-layer{
	position: absolute;
	right: 12px;
	bottom: 72px;
	width: 80px;
	height: 60vh;
	max-height: 520px;
	pointer-events: none;
	z-index: 7;
	overflow: hidden;
}
.bc-ui-heart-layer .bc-ui-heart{
	position: absolute;
	bottom: 0;
	font-size: 28px;
	line-height: 1;
	user-select: none;
}

body.bc-ui-heart-float .bc-ui-heart-layer .bc-ui-heart{
	animation: bc-ui-heart-float 3.6s ease-in forwards;
}
@keyframes bc-ui-heart-float{
	0% { transform: translate(0,0) scale(0.6) rotate(0deg); opacity: 0; }
	10% { opacity: 1; transform: translate(0,-10px) scale(1) rotate(-4deg); }
	100% { transform: translate(var(--bc-heart-x, -20px), -380px) scale(0.9) rotate(8deg); opacity: 0; }
}

body.bc-ui-heart-burst .bc-ui-heart-layer .bc-ui-heart{
	animation: bc-ui-heart-burst 1.3s ease-out forwards;
}
@keyframes bc-ui-heart-burst{
	0% { transform: scale(0.3); opacity: 0; }
	25% { transform: scale(1.6); opacity: 1; }
	100% { transform: translate(var(--bc-heart-x, -30px), -220px) scale(0.4); opacity: 0; }
}

body.bc-ui-heart-pop .bc-ui-heart-layer .bc-ui-heart{
	animation: bc-ui-heart-pop 1.1s ease-out forwards;
}
@keyframes bc-ui-heart-pop{
	0% { transform: scale(0); opacity: 0; }
	30% { transform: scale(1.4); opacity: 1; }
	60% { transform: scale(1); opacity: 1; }
	100% { transform: scale(0.2); opacity: 0; }
}

body.bc-ui-heart-mixed .bc-ui-heart-layer .bc-ui-heart{
	animation: bc-ui-heart-mixed 3.2s ease-in forwards;
}
@keyframes bc-ui-heart-mixed{
	0% { transform: translate(0,0) scale(0.5) rotate(0); opacity: 0; }
	15% { opacity: 1; transform: translate(0,-12px) scale(1.2) rotate(-8deg); }
	60% { transform: translate(var(--bc-heart-x, -20px), -200px) scale(1) rotate(8deg); opacity: 1; }
	100% { transform: translate(var(--bc-heart-x, -20px), -380px) scale(0.7) rotate(-4deg); opacity: 0; }
}

body.bc-ui-heart-none .bc-ui-heart-layer{ display: none !important; }

/* ---------------- 시청자 수 ---------------- */

.bc-ui-viewer{
	display: none;
	align-items: center;
	gap: 6px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	z-index: 5;
}
.bc-ui-viewer.is-visible{ display: inline-flex; }
.bc-ui-viewer .bc-ui-viewer-num{ font-variant-numeric: tabular-nums; }

body.bc-ui-viewer-chip .bc-ui-viewer{
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(0,0,0,0.55);
	border: 1px solid rgba(255,255,255,0.12);
	padding: 5px 10px;
	border-radius: 999px;
}
body.bc-ui-viewer-chip .bc-ui-viewer::before{ content: "👁"; font-size: 12px; }

body.bc-ui-viewer-dot-live .bc-ui-viewer{
	position: absolute;
	top: 14px;
	left: 14px;
	background: rgba(0,0,0,0.55);
	padding: 5px 10px 5px 8px;
	border-radius: 8px;
}
body.bc-ui-viewer-dot-live .bc-ui-viewer::before{
	content: "";
	width: 8px; height: 8px; border-radius: 50%;
	background: #D82D28;
	box-shadow: 0 0 0 0 rgba(216,45,40,0.6);
	animation: bc-ui-viewer-dot 1.6s ease-in-out infinite;
}
@keyframes bc-ui-viewer-dot{
	0%,100% { box-shadow: 0 0 0 0 rgba(216,45,40,0.6); }
	50% { box-shadow: 0 0 0 6px rgba(216,45,40,0); }
}

body.bc-ui-viewer-badge .bc-ui-viewer{
	position: absolute;
	top: 12px;
	right: 12px;
	background: linear-gradient(180deg, #D82D28, #B4231F);
	padding: 5px 12px;
	border-radius: 10px;
	box-shadow: 0 4px 10px rgba(216,45,40,0.32);
}
body.bc-ui-viewer-badge .bc-ui-viewer::before{ content: "LIVE"; font-size: 10px; opacity: 0.85; }

body.bc-ui-viewer-floating .bc-ui-viewer{
	position: absolute;
	top: 14px;
	right: 14px;
	background: rgba(255,255,255,0.16);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 5px 10px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,0.22);
}
body.bc-ui-viewer-floating .bc-ui-viewer::before{ content: "✦"; font-size: 11px; color: #fde68a; }

body.bc-ui-viewer-none .bc-ui-viewer{ display: none !important; }

/* ---------------- 하트 수 (누적) ---------------- */

.bc-ui-heart-count{
	display: none;
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 6;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	color: #fff1f2;
	background: rgba(244, 63, 94, 0.55);
	border: 1px solid rgba(244, 63, 94, 0.55);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	pointer-events: none;
	font-variant-numeric: tabular-nums;
}
.bc-ui-heart-count.is-visible{ display: inline-flex; }
.bc-ui-heart-count .bc-ui-heart-ico{ font-size: 12px; line-height: 1; }
.bc-ui-heart-count .bc-ui-heart-num{ line-height: 1; }
.bc-ui-heart-count.is-pulse{
	animation: bc-ui-heart-count-pulse .55s ease-out;
}
@keyframes bc-ui-heart-count-pulse{
	0% { transform: scale(1); }
	40% { transform: scale(1.08); }
	100% { transform: scale(1); }
}

/* 동접 배지와 겹치지 않도록 — dot-live 뷰어가 좌측일 때 하트를 아래로 */
body.bc-ui-viewer-dot-live .bc-ui-heart-count{
	top: 44px;
	left: 14px;
}

/* ---------------- 방송 시작 화면 ---------------- */

.bc-ui-start-screen{
	display: none;
	position: absolute;
	inset: 0;
	z-index: 3;
	color: #fff;
	text-align: center;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.bc-ui-start-screen.is-visible{ display: flex; }
.bc-ui-start-inner{
	max-width: 320px;
	padding: 22px;
	background: rgba(0,0,0,0.55);
	border-radius: 14px;
	border: 1px solid rgba(255,255,255,0.1);
}
.bc-ui-start-screen .bc-ui-start-title{ font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.bc-ui-start-screen .bc-ui-start-desc{ font-size: 13px; opacity: 0.85; margin: 0 0 12px; }
.bc-ui-start-screen .bc-ui-start-timer{ font-size: 24px; font-weight: 800; letter-spacing: 0.04em; color: #fbbf24; }

body.bc-ui-start-countdown .bc-ui-start-screen .bc-ui-start-timer{ display: block; }
body.bc-ui-start-poster .bc-ui-start-screen .bc-ui-start-inner{
	background: linear-gradient(180deg, rgba(15,23,42,0.4) 0%, rgba(15,23,42,0.9) 100%);
	border: none;
	padding: 28px 22px;
}
body.bc-ui-start-poster .bc-ui-start-screen .bc-ui-start-timer{ display: none; }
body.bc-ui-start-blur .bc-ui-start-screen{ backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(5,9,20,0.35); }
body.bc-ui-start-blur .bc-ui-start-screen .bc-ui-start-timer{ display: none; }
body.bc-ui-start-default .bc-ui-start-screen .bc-ui-start-timer{ display: none; }
body.bc-ui-start-default .bc-ui-start-screen .bc-ui-start-inner{ background: transparent; border: none; padding: 8px; }

/* ---------------- 세로형 레이아웃 ---------------- */

body.bc-portrait.bc-ui-port-chat-overlay.bc-with-chat .bc-chat-panel{
	position: absolute;
	left: 0; right: 0; bottom: 0;
	width: 100%;
	flex: none;
	height: min(45%, 360px);
	min-height: 0;
	background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.45) 25%, rgba(0,0,0,0.55) 100%);
	border-left: 0;
	border-top: 0;
	z-index: 4;
}
body.bc-portrait.bc-ui-port-chat-overlay.bc-with-chat .bc-chat-panel .bc-chat-head{ background: transparent; border-bottom: 0; }
body.bc-portrait.bc-ui-port-chat-overlay.bc-with-chat .bc-watch-layout{ position: relative; }

body.bc-portrait.bc-ui-port-chat-bottom.bc-with-chat .bc-watch-layout{ flex-direction: column; }
body.bc-portrait.bc-ui-port-chat-bottom.bc-with-chat .bc-player-wrap{ flex: 0 0 auto; height: 56vh; min-height: 0; }
body.bc-portrait.bc-ui-port-chat-bottom.bc-with-chat .bc-chat-panel{ width: 100%; flex: 1 1 auto; min-height: 0; border-left: 0; border-top: 1px solid var(--bc-border); }

@media (min-width: 1024px){
	body.bc-portrait.bc-ui-port-chat-side.bc-with-chat .bc-watch-layout{ flex-direction: row; }
	body.bc-portrait.bc-ui-port-chat-side.bc-with-chat .bc-chat-panel{ position: relative; width: min(360px, 100%); flex: 0 0 min(360px,100%); }
}

/* ---------------- 쿠폰 팝업 ---------------- */

.bc-ui-coupon{
	display: none;
	position: absolute;
	z-index: 9;
	color: #fff;
}
.bc-ui-coupon.is-visible{ display: block; animation: bc-ui-coupon-in .35s ease; }
.bc-ui-coupon-inner{
	position: relative;
	background: linear-gradient(180deg, #fff7ed 0%, #fed7aa 100%);
	color: #7c2d12;
	border-radius: 16px;
	padding: 18px 22px;
	box-shadow: 0 18px 50px rgba(0,0,0,0.4);
	min-width: 220px;
}
.bc-ui-coupon-toast{
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	max-width: calc(100% - 24px);
	padding: 11px 14px;
	border-radius: 11px;
	background: rgba(20,26,34,.94);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: -0.02em;
	text-align: center;
	box-shadow: 0 10px 24px rgba(0,0,0,.28);
	z-index: 12;
	opacity: 0;
	pointer-events: none;
	transition: opacity .22s ease;
	white-space: nowrap;
}
.bc-ui-coupon-toast.is-show{ opacity: 1; }
.bc-ui-coupon-title{ font-size: 13px; font-weight: 700; opacity: 0.85; margin-bottom: 4px; }
.bc-ui-coupon-amount{ font-size: 28px; font-weight: 900; line-height: 1.1; }
.bc-ui-coupon-desc{ font-size: 12px; margin-top: 8px; }
.bc-ui-coupon .bc-ui-buy-btn{ margin-top: 10px; width: 100%; }
.bc-ui-coupon-close{
	position: absolute;
	top: 6px; right: 8px;
	width: 26px; height: 26px;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 18px;
	cursor: pointer;
}

/* 쿠폰 마감 (선착순 소진) */
.bc-ui-coupon.is-sold-out .bc-ui-coupon-inner{
	background: linear-gradient(180deg,#f3f4f6 0%,#d1d5db 100%);
	color: #374151;
	filter: grayscale(0.4);
}
.bc-ui-coupon.is-sold-out .bc-ui-coupon-amount{
	text-decoration: line-through;
	opacity: 0.7;
}
.bc-ui-coupon.is-sold-out .bc-ui-buy-btn{
	background: #6b7280 !important;
	color: #fff !important;
	cursor: not-allowed;
	opacity: 0.9;
}

@keyframes bc-ui-coupon-in{
	from { opacity: 0; transform: scale(0.88); }
	to   { opacity: 1; transform: scale(1); }
}

body.bc-ui-coupon-center-modal .bc-ui-coupon{
	top: 50%; left: 50%; transform: translate(-50%, -50%);
}
body.bc-ui-coupon-slide-bottom .bc-ui-coupon{
	left: 12px; right: 12px; bottom: 14px;
}
body.bc-ui-coupon-slide-bottom .bc-ui-coupon-inner{ border-radius: 16px; }
body.bc-ui-coupon-slide-bottom .bc-ui-coupon.is-visible{ animation: bc-ui-coupon-slide-up .35s ease; }
@keyframes bc-ui-coupon-slide-up{
	from { opacity: 0; transform: translateY(40px); }
	to   { opacity: 1; transform: translateY(0); }
}

body.bc-ui-coupon-side-flag .bc-ui-coupon{
	right: 0; top: 30%;
}
body.bc-ui-coupon-side-flag .bc-ui-coupon-inner{
	border-radius: 16px 0 0 16px;
	box-shadow: -10px 12px 30px rgba(0,0,0,0.35);
}

body.bc-ui-coupon-none .bc-ui-coupon{ display: none !important; }

/* 1인쿠폰 ON-AIR — 전 시청자 발행 안내 배너 */
.bc-ui-coupon.is-viewer-one-announce .bc-ui-coupon-inner{
	background: linear-gradient(135deg, #fff7ed 0%, #fde68a 45%, #fed7aa 100%);
	border: 2px solid #f59e0b;
	box-shadow: 0 0 0 3px rgba(245,158,11,.22), 0 20px 55px rgba(180,83,9,.35);
}
.bc-ui-coupon.is-viewer-one-announce .bc-ui-coupon-title{
	font-size: 15px;
	font-weight: 900;
	line-height: 1.45;
	opacity: 1;
	margin-bottom: 0;
	text-align: center;
}
.bc-ui-coupon.is-viewer-one-announce .bc-ui-coupon-amount{
	display: none;
}
.bc-ui-coupon.is-viewer-one-announce .bc-ui-coupon-desc{
	text-align: center;
	font-size: 11.5px;
}
.bc-ui-coupon.is-viewer-one-announce .bc-ui-buy-btn{
	display: none !important;
}

/* 오래보면 할인 — 자동 발급 안내 배너 */
.bc-ui-coupon.is-watch-time-announce .bc-ui-coupon-inner{
	background: linear-gradient(135deg, #fff7ed 0%, #fde68a 45%, #fed7aa 100%);
	border: 2px solid #f59e0b;
	box-shadow: 0 0 0 3px rgba(245,158,11,.22), 0 20px 55px rgba(180,83,9,.35);
}
.bc-ui-coupon.is-watch-time-announce .bc-ui-coupon-title{
	font-size: 15px;
	font-weight: 900;
	line-height: 1.45;
	opacity: 1;
	margin-bottom: 6px;
	text-align: center;
}
.bc-ui-coupon.is-watch-time-announce .bc-ui-coupon-amount{
	display: none;
}
.bc-ui-coupon.is-watch-time-announce .bc-ui-coupon-desc{
	text-align: center;
	font-size: 11.5px;
	line-height: 1.45;
}
.bc-ui-coupon.is-watch-time-announce .bc-ui-buy-btn{
	display: none !important;
}

.bc-ui-firework-layer{
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 12;
}
.bc-ui-firework-layer .bc-ui-firework{
	position: absolute;
	font-size: 22px;
	line-height: 1;
	opacity: 0;
	animation: bc-ui-firework-burst 2.2s ease-out forwards;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}
@keyframes bc-ui-firework-burst{
	0%{ opacity: 0; transform: translate(0, 0) scale(0.4); }
	12%{ opacity: 1; transform: translate(calc(var(--bc-fw-x, 0px) * 0.15), calc(var(--bc-fw-y, -40px) * 0.12)) scale(1.05); }
	55%{ opacity: 1; transform: translate(calc(var(--bc-fw-x, 0px) * 0.55), calc(var(--bc-fw-y, -80px) * 0.55)) scale(1); }
	100%{ opacity: 0; transform: translate(var(--bc-fw-x, 0px), var(--bc-fw-y, -120px)) scale(0.75); }
}

/* ---------------- 구매 토스트 ---------------- */

.bc-ui-toast{
	position: absolute;
	z-index: 8;
	pointer-events: none;
}
.bc-ui-toast .bc-ui-toast-item{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 280px;
	padding: 8px 12px;
	background: rgba(0,0,0,0.75);
	color: #fff;
	font-size: 12px;
	border-radius: 999px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.35);
	margin: 4px 0;
}
.bc-ui-toast .bc-ui-toast-item::before{ content: "🛍"; font-size: 13px; }
.bc-ui-toast .bc-ui-toast-item strong{ color: #fde68a; font-weight: 800; }

body.bc-ui-toast-bottom .bc-ui-toast{ left: 12px; right: 12px; bottom: 14px; text-align: left; }
body.bc-ui-toast-top .bc-ui-toast{ left: 12px; right: 12px; top: 14px; text-align: left; }
body.bc-ui-toast-stack-left .bc-ui-toast{ left: 12px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
body.bc-ui-toast-center .bc-ui-toast{ left: 50%; top: 18%; transform: translateX(-50%); text-align: center; }
body.bc-ui-toast-center .bc-ui-toast .bc-ui-toast-item{
	background: linear-gradient(180deg, rgba(216,45,40,0.95), rgba(127,29,29,0.95));
}

.bc-ui-toast .bc-ui-toast-item{
	animation: bc-ui-toast-in .35s ease both, bc-ui-toast-out .35s ease 3.6s both;
}
@keyframes bc-ui-toast-in{
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes bc-ui-toast-out{
	to { opacity: 0; transform: translateY(-6px); }
}

/* ---------------- PIP 위치 (외부 페이지 — 공구목록 등 다른 페이지의 미니 플레이어) ---------------- */
.bc-ui-pip-target{ position: fixed; z-index: 9000; }
body.bc-ui-pip-bottom-right .bc-ui-pip-target{ right: 16px; bottom: 16px; }
body.bc-ui-pip-bottom-left .bc-ui-pip-target{ left: 16px; bottom: 16px; }
body.bc-ui-pip-top-right .bc-ui-pip-target{ right: 16px; top: 16px; }
body.bc-ui-pip-top-left .bc-ui-pip-target{ left: 16px; top: 16px; }

/* ---------------- 좋아요 트리거 버튼 (모든 변형 공통) ---------------- */
.bc-ui-like-btn{
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: rgba(0,0,0,0.55);
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	z-index: 7;
	box-shadow: 0 6px 16px rgba(0,0,0,0.35);
	transition: transform .15s ease;
}
.bc-ui-like-btn:active{ transform: scale(0.92); }
body.bc-ui-heart-none .bc-ui-like-btn{ display: none; }

/* ---------------- 셀러 모니터링 콘솔 「LIVE 채팅」 바로가기 ----------------
   m_reseller_live_studio.php 가 임베드한 watch 페이지에서만 노출되며,
   좋아요(하트) 버튼이 있던 영상 우측 하단 자리에 동일한 위치로 배치된다.
   target="_top" 으로 m_reseller_live_chat.php 콘솔을 열어 스튜디오 모달과
   nested watch iframe 을 한 번에 해제하고 셀러를 라이브 채팅 화면으로 이동. */
.bc-ui-seller-chat-btn{
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 14px 0 12px;
	border-radius: 999px;
	border: 0;
	background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.01em;
	text-decoration: none;
	cursor: pointer;
	z-index: 7;
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
	transition: transform .15s ease, box-shadow .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.bc-ui-seller-chat-btn:hover{
	box-shadow: 0 8px 22px rgba(37, 99, 235, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.20) inset;
}
.bc-ui-seller-chat-btn:active{ transform: scale(0.96); }
.bc-ui-seller-chat-btn:focus-visible{
	outline: 2px solid #93c5fd;
	outline-offset: 2px;
}
.bc-ui-seller-chat-btn svg{
	display: block;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}
.bc-ui-seller-chat-btn .bc-ui-seller-chat-btn-label{
	display: inline-block;
	white-space: nowrap;
}

/* ---------------- SCM 데모 카드(미리보기) 공통 보조 클래스 ---------------- */
.bc-ui-demo-stage{
	position: relative;
	width: 100%;
	min-height: 200px;
	border-radius: 12px;
	background: #0a0e1c center/cover no-repeat;
	background-image: linear-gradient(135deg, #1f2937 0%, #0a0e1c 100%);
	overflow: hidden;
}
.bc-ui-demo-stage .bc-ui-demo-frame{
	position: absolute; inset: 0;
}
