:root {
	--bc-bg: #0b1020;
	--bc-card: #141c2f;
	--bc-border: rgba(255, 255, 255, 0.08);
	--bc-text: #eef3ff;
	--bc-muted: #9aa8c7;
	--bc-accent: #D82D28;
	--bc-accent-2: #3d7cff;
	--bc-ok: #22c55e;
}

* { box-sizing: border-box; }
body.bc-page {
	margin: 0;
	font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
	background: radial-gradient(1200px 600px at 10% -10%, #1a2440 0%, var(--bc-bg) 55%);
	color: var(--bc-text);
	min-height: 100vh;
}

.bc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--bc-border);
	background: rgba(10, 14, 28, 0.85);
	backdrop-filter: blur(8px);
	position: sticky;
	top: 0;
	z-index: 10;
}
.bc-header h1 { margin: 0; font-size: 22px; }
.bc-sub { margin: 4px 0 0; color: var(--bc-muted); font-size: 13px; }

.bc-main { max-width: 880px; margin: 0 auto; padding: 20px 16px 48px; }
.bc-card {
	background: var(--bc-card);
	border: 1px solid var(--bc-border);
	border-radius: 16px;
	padding: 18px 20px;
	margin-bottom: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}
.bc-card h2 { margin: 0 0 12px; font-size: 17px; }
.bc-alert { border-color: rgba(232, 51, 51, 0.35); }

.bc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--bc-border);
	background: rgba(255, 255, 255, 0.06);
	color: var(--bc-text);
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
}
.bc-btn:hover { background: rgba(255, 255, 255, 0.1); }
.bc-btn-primary { background: linear-gradient(180deg, #D82D28, #D82D28); border-color: transparent; font-weight: 700; }
.bc-btn-ghost { background: transparent; }
.bc-btn-small { padding: 6px 10px; font-size: 12px; margin-left: 6px; }
.bc-btn-warn { border-color: rgba(255, 180, 0, 0.4); color: #ffd76a; }

.bc-dl { margin: 0; }
.bc-dl dt { color: var(--bc-muted); font-size: 12px; margin-top: 12px; }
.bc-dl dd { margin: 4px 0 0; }
.bc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.bc-break { word-break: break-all; }
.bc-secret { letter-spacing: 0.02em; }
.bc-actions { margin-top: 14px; }
.bc-msg { min-height: 18px; margin-top: 10px; font-size: 13px; color: var(--bc-muted); }
.bc-msg.is-error { color: #ff8f8f; }
.bc-msg.is-ok { color: #86efac; }
.bc-hidden { display: none !important; }

.bc-status-row { display: flex; align-items: center; gap: 10px; }
.bc-status-dot {
	width: 10px; height: 10px; border-radius: 50%;
	background: #64748b;
	box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
}
.bc-status-dot[data-state="live"] {
	background: var(--bc-ok);
	animation: bc-pulse 1.6s ease-in-out infinite;
}
@keyframes bc-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
	50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}
.bc-muted { color: var(--bc-muted); font-size: 13px; }
.bc-muted.is-live-viewers {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 11px;
	border-radius: 999px;
	background: linear-gradient(135deg, #9a1d1d 0%, #B4231F 100%);
	color: #fff;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .01em;
	box-shadow: 0 3px 10px rgba(216,45,40, .32);
}

.bc-radio-row label { margin-right: 18px; font-size: 14px; cursor: pointer; }
.bc-guide ol { margin: 0; padding-left: 20px; color: var(--bc-muted); line-height: 1.7; font-size: 14px; }
.bc-guide strong { color: var(--bc-text); }

/* Watch */
body.bc-watch { background: #000; }
.bc-watch-header {
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(180deg, rgba(0,0,0,.75), transparent);
	position: absolute;
	left: 0; right: 0; top: 0;
	z-index: 2;
}
.bc-watch-header h1 { margin: 0; font-size: 16px; }
.bc-live-pill {
	background: var(--bc-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 999px;
}
.bc-watch-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.bc-player-wrap {
	position: relative;
	width: 100%;
	max-width: 960px;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}
body.bc-portrait .bc-player-wrap { max-width: 420px; aspect-ratio: 9 / 16; }
body.bc-embed .bc-watch-main { min-height: 100vh; padding: 0; }
body.bc-embed .bc-player-wrap { max-width: none; width: 100%; height: 100vh; aspect-ratio: auto; }
#bc-ivs-player { width: 100%; height: 100%; max-width: none; max-height: none; display: block; background: #000; object-fit: cover; object-position: center center; transform: none; -webkit-transform: none; filter: none; }
.bc-player-overlay {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0,0,0,.55);
	color: #fff;
	text-align: center;
	padding: 16px;
	pointer-events: none;
	transition: opacity .25s;
}
.bc-player-overlay.is-hidden { opacity: 0; }

.bc-watch-layout {
	display: flex;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	gap: 0;
	min-height: 100vh;
}

/* 채팅 포함 시청 — 한 화면에 영상+채팅 (페이지 스크롤 없음) */
body.bc-watch.bc-with-chat:not(.bc-embed) {
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
body.bc-watch.bc-with-chat:not(.bc-embed) .bc-watch-header {
	position: relative;
	flex: 0 0 auto;
	background: #0f1419;
	border-bottom: 1px solid var(--bc-border);
	padding: 10px 16px;
}
body.bc-watch.bc-with-chat:not(.bc-embed) .bc-watch-main {
	flex: 1 1 auto;
	min-height: 0;
	align-items: stretch;
	justify-content: stretch;
}
body.bc-watch.bc-with-chat:not(.bc-embed) .bc-watch-layout {
	flex: 1 1 auto;
	min-height: 0;
	max-width: none;
	width: 100%;
	margin: 0;
}
body.bc-watch.bc-with-chat:not(.bc-embed).bc-chat-sidebar .bc-player-wrap {
	flex: 1 1 auto;
	min-height: 0;
	max-width: none;
	max-height: 100%;
	height: 100%;
	aspect-ratio: auto;
	display: flex;
	align-items: center;
	justify-content: center;
}
body.bc-portrait.bc-with-chat:not(.bc-embed) .bc-player-wrap { max-width: none; }

body.bc-with-chat .bc-watch-main { align-items: stretch; }
body.bc-with-chat .bc-watch-layout { max-width: none; width: 100%; }
/* 임베드 — iframe 전체 높이 */
body.bc-with-chat.bc-embed .bc-player-wrap {
	flex: 1 1 auto;
	max-width: none;
	height: auto;
	min-height: 100vh;
	aspect-ratio: auto;
}
/* 임베드 + 사이드바 채팅(SCM 시청 등) — 영상·채팅 입력창 가로 배치 */
body.bc-watch.bc-with-chat.bc-embed.bc-chat-sidebar {
	height: 100%;
	min-height: 100%;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
body.bc-watch.bc-with-chat.bc-embed.bc-chat-sidebar .bc-watch-main {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	align-items: stretch;
	justify-content: stretch;
}
body.bc-watch.bc-with-chat.bc-embed.bc-chat-sidebar .bc-watch-layout {
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	width: 100%;
	flex-direction: row;
	align-items: stretch;
}
body.bc-watch.bc-with-chat.bc-embed.bc-chat-sidebar .bc-player-wrap {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	height: 100%;
	max-height: none;
}
body.bc-watch.bc-with-chat.bc-embed.bc-chat-sidebar .bc-chat-panel {
	flex: 0 0 360px;
	width: 360px;
	min-width: 280px;
	min-height: 0;
	height: 100%;
	max-height: none;
	border-left: 1px solid var(--bc-border);
}
body.bc-watch.bc-with-chat.bc-embed.bc-chat-sidebar .bc-chat-form {
	flex: 0 0 auto;
}
/* 오버레이 채팅(세로·모바일) — 헤더 아래 남은 영역에 영상 꽉 채움 */
body.bc-watch.bc-with-chat.bc-chat-overlay:not(.bc-embed) .bc-watch-main {
	flex: 1 1 auto;
	min-height: 0;
}
body.bc-watch.bc-with-chat.bc-chat-overlay:not(.bc-embed) .bc-watch-layout {
	min-height: 0;
	height: 100%;
}
body.bc-watch.bc-with-chat.bc-chat-overlay:not(.bc-embed) .bc-player-wrap {
	flex: 1 1 auto;
	min-height: 0;
	max-width: none;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

.bc-chat-panel {
	width: min(360px, 100%);
	flex: 0 0 min(360px, 100%);
	display: flex;
	flex-direction: column;
	background: #111827;
	border-left: 1px solid var(--bc-border);
	min-height: 0;
}
body.bc-watch.bc-with-chat:not(.bc-embed) .bc-chat-panel {
	height: 100%;
	max-height: 100%;
}
.bc-chat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	font-size: 14px;
	font-weight: 700;
	border-bottom: 1px solid var(--bc-border);
	flex: 0 0 auto;
}
.bc-chat-nick-row {
	display: flex;
	gap: 6px;
	padding: 8px 10px;
	border-bottom: 1px solid var(--bc-border);
}
.bc-chat-nick-row input {
	flex: 1;
	height: 32px;
	border-radius: 8px;
	border: 1px solid var(--bc-border);
	background: #0b1020;
	color: var(--bc-text);
	padding: 0 10px;
}
.bc-chat-nick-row button {
	height: 32px;
	border: 0;
	border-radius: 8px;
	background: var(--bc-accent-2);
	color: #fff;
	padding: 0 12px;
	cursor: pointer;
}
.bc-chat-messages {
	flex: 1;
	overflow-y: auto;
	margin: 0;
	padding: 10px 12px;
	list-style: none;
	font-size: 13px;
	line-height: 1.45;
}
.bc-chat-msg { margin-bottom: 8px; color: #dbe4ff; word-break: break-word; }
.bc-chat-msg.is-self { color: #93c5fd; }
.bc-chat-form {
	display: flex;
	gap: 6px;
	padding: 10px;
	border-top: 1px solid var(--bc-border);
}
.bc-chat-form input {
	flex: 1;
	height: 36px;
	border-radius: 8px;
	border: 1px solid var(--bc-border);
	background: #0b1020;
	color: var(--bc-text);
	padding: 0 10px;
}
.bc-chat-form button {
	height: 36px;
	border: 0;
	border-radius: 8px;
	background: var(--bc-accent);
	color: #fff;
	padding: 0 14px;
	cursor: pointer;
}

.bc-recordings-list { margin: 0; padding: 0; list-style: none; }
.bc-recordings-list li {
	padding: 10px 0;
	border-bottom: 1px solid var(--bc-border);
	font-size: 13px;
}
.bc-recordings-list a { color: #93c5fd; word-break: break-all; }
.bc-studio-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}
.bc-studio-links a {
	color: #93c5fd;
	font-size: 13px;
}

/* Studio — PC */
.bc-studio-pc .bc-main { max-width: 920px; }
.bc-notice { border-color: rgba(61, 124, 255, 0.35); }
.bc-notice p { margin: 0; color: #93c5fd; font-size: 14px; }

.bc-steps-nav { padding: 14px 18px; }
.bc-steps {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bc-step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 8px;
	border-radius: 12px;
	border: 1px solid var(--bc-border);
	background: rgba(255, 255, 255, 0.03);
	text-align: center;
	transition: border-color .2s, background .2s;
}
.bc-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.08);
	color: var(--bc-muted);
}
.bc-step-label { font-size: 12px; color: var(--bc-muted); font-weight: 600; }
.bc-step.is-active { border-color: rgba(61, 124, 255, 0.55); background: rgba(61, 124, 255, 0.12); }
.bc-step.is-active .bc-step-num { background: var(--bc-accent-2); color: #fff; }
.bc-step.is-active .bc-step-label { color: var(--bc-text); }
.bc-step.is-done { border-color: rgba(34, 197, 94, 0.45); }
.bc-step.is-done .bc-step-num { background: var(--bc-ok); color: #fff; }
.bc-step.is-done .bc-step-label { color: #86efac; }

.bc-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bc-step-head h2 { margin: 0; font-size: 17px; }
.bc-step-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	background: rgba(61, 124, 255, 0.2);
	color: #93c5fd;
}
.bc-step-desc { margin: 0 0 14px; color: var(--bc-muted); font-size: 14px; line-height: 1.6; }
.bc-step-card.is-active { border-color: rgba(61, 124, 255, 0.35); }
.bc-step-card.is-done { border-color: rgba(34, 197, 94, 0.25); }

.bc-key-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
	margin-top: 4px;
}
.bc-key-row .bc-mono { flex: 1 1 200px; min-width: 0; }
.bc-prism-guide { margin: 0; padding-left: 20px; color: var(--bc-muted); line-height: 1.75; font-size: 14px; }
.bc-prism-guide code { font-size: 12px; color: #93c5fd; }
.bc-prism-tip {
	margin-top: 14px;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--bc-border);
	font-size: 13px;
	color: var(--bc-muted);
}
.bc-checklist { margin: 0; padding: 0; list-style: none; }
.bc-checklist li {
	position: relative;
	padding: 8px 0 8px 28px;
	border-bottom: 1px solid var(--bc-border);
	font-size: 14px;
	color: var(--bc-muted);
}
.bc-checklist li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #64748b;
}
.bc-checklist li.is-done { color: #86efac; }
.bc-checklist li.is-done::before {
	border-color: var(--bc-ok);
	background: var(--bc-ok);
	box-shadow: inset 0 0 0 3px var(--bc-card);
}
.bc-advanced summary { cursor: pointer; color: var(--bc-muted); font-size: 14px; }

/* Studio — Mobile */
.bc-studio-mobile { background: #0f172a; }
.bc-studio-mobile .bc-main-mobile {
	max-width: 480px;
	padding: 12px 12px 32px;
	padding-bottom: calc(32px + env(safe-area-inset-bottom));
}
.bc-header-mobile {
	flex-wrap: wrap;
	padding: 14px 12px;
}
.bc-header-mobile h1 { font-size: 18px; }
.bc-header-mobile .bc-sub { font-size: 12px; }
.bc-btn-back { flex: 0 0 auto; font-size: 13px; padding: 8px 12px; }
.bc-status-card-mobile { padding: 14px 16px; }
.bc-status-card-mobile .bc-status-text { display: flex; flex-direction: column; gap: 2px; }

.bc-steps-mobile {
	display: flex;
	gap: 6px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}
.bc-step-mobile {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 10px 4px;
	border-radius: 10px;
	border: 1px solid var(--bc-border);
	background: var(--bc-card);
}
.bc-step-mobile .bc-step-num {
	width: 26px;
	height: 26px;
	font-size: 12px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.08);
	color: var(--bc-muted);
	font-weight: 700;
}
.bc-step-mobile .bc-step-label { font-size: 11px; color: var(--bc-muted); font-weight: 600; }
.bc-step-mobile.is-active { border-color: rgba(61,124,255,.55); background: rgba(61,124,255,.15); }
.bc-step-mobile.is-active .bc-step-num { background: var(--bc-accent-2); color: #fff; }
.bc-step-mobile.is-done .bc-step-num { background: var(--bc-ok); color: #fff; }

.bc-step-card-mobile { padding: 16px; }
.bc-step-head-mobile { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bc-step-head-mobile h2 { margin: 0; font-size: 16px; }
.bc-step-head-mobile .bc-step-badge {
	width: 28px;
	height: 28px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 14px;
}
.bc-key-block {
	margin-bottom: 14px;
	padding: 12px;
	border-radius: 12px;
	background: rgba(0,0,0,.2);
	border: 1px solid var(--bc-border);
}
.bc-key-block:last-child { margin-bottom: 0; }
.bc-key-label { font-size: 12px; color: var(--bc-muted); margin-bottom: 6px; font-weight: 600; }
.bc-key-value {
	font-size: 11px;
	line-height: 1.45;
	word-break: break-all;
	margin-bottom: 10px;
	padding: 8px;
	border-radius: 8px;
	background: rgba(255,255,255,.04);
	max-height: 72px;
	overflow-y: auto;
}
.bc-btn-block {
	display: flex;
	width: 100%;
	margin-top: 8px;
	min-height: 44px;
	font-size: 14px;
	font-weight: 700;
}
.bc-btn-block:first-of-type { margin-top: 0; }
.bc-prism-guide-mobile { font-size: 13px; line-height: 1.65; padding-left: 18px; }
.bc-prism-tip-mobile { margin: 12px 0 0; font-size: 12px; color: var(--bc-muted); }
.bc-checklist-mobile li { font-size: 13px; padding: 10px 0 10px 26px; }
.bc-radio-row-mobile { justify-content: center; display: flex; gap: 20px; }
.bc-studio-mobile .bc-step-desc { font-size: 13px; margin-bottom: 12px; }

@media (max-width: 768px) {
	body.bc-with-chat .bc-watch-layout { flex-direction: column; }
	body.bc-watch.bc-with-chat:not(.bc-embed).bc-chat-sidebar .bc-player-wrap {
		flex: 0 0 auto;
		height: auto;
		max-height: min(42vh, calc(100vw * 9 / 16));
		min-height: 0;
	}
	body.bc-watch.bc-with-chat:not(.bc-embed) .bc-chat-panel {
		flex: 1 1 auto;
		width: 100%;
		min-height: 0;
		border-left: 0;
		border-top: 1px solid var(--bc-border);
	}
	body.bc-with-chat.bc-embed .bc-player-wrap,
	body.bc-with-chat.bc-chat-overlay .bc-player-wrap { min-height: 56vw; }
	body.bc-with-chat.bc-embed .bc-chat-panel,
	body.bc-with-chat.bc-chat-overlay .bc-chat-panel {
		width: 100%;
		flex: none;
		min-height: 280px;
	}
}
