.tms-live-watch {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 16px;
	margin: 16px 0;
	align-items: start;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
	overflow-x: clip;
}

.tms-live-watch *,
.tms-live-watch *::before,
.tms-live-watch *::after {
	box-sizing: border-box;
}

.tms-live-watch__main {
	position: sticky;
	top: 16px;
	align-self: start;
	min-width: 0;
}

.tms-live-watch__player-wrap {
	position: relative;
	background: #000;
	border-radius: 12px;
	/* Avoid overflow:hidden — it clips/blocks native video controls in Chrome. */
	overflow: visible;
	isolation: isolate;
	aspect-ratio: 16 / 9;
}

.tms-live-watch__player {
	width: 100%;
	height: 100%;
	background: #000;
	object-fit: contain;
	display: block;
	position: relative;
	z-index: 1;
	border-radius: 12px;
}

.tms-live-watch__player-wrap video::-webkit-media-controls-panel {
	z-index: 3;
}

.tms-live-watch__offline[hidden] {
	display: none !important;
	pointer-events: none !important;
}

.tms-live-watch__playback-error {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 56px;
	z-index: 5;
	padding: 10px 12px;
	border-radius: 8px;
	background: rgba(20, 20, 20, 0.92);
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	pointer-events: none;
}

.tms-live-watch__playback-error[hidden] {
	display: none !important;
}

.tms-live-watch__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	pointer-events: none;
	background: #e03131;
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 999px;
}

.tms-live-watch__badge--vod {
	background: #364fc7;
}

/* ===== YouTube-like live controls ===== */
.tms-live-watch__player-wrap.is-live {
	overflow: hidden;
	cursor: pointer;
}

.tms-yt-player {
	position: absolute;
	inset: 0;
	z-index: 4;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	border-radius: 12px;
}

.tms-yt-player__gradient {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 96px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
	pointer-events: none;
}

.tms-yt-player__controls {
	position: relative;
	z-index: 1;
	pointer-events: auto;
	padding: 0 10px 8px;
}

.tms-yt-player__progress {
	position: relative;
	height: 4px;
	margin: 0 2px 8px;
	background: rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	cursor: pointer;
	touch-action: none;
}

.tms-yt-player__progress:hover,
.tms-yt-player__progress:focus-visible {
	height: 6px;
}

.tms-yt-player__progress-buffer,
.tms-yt-player__progress-played {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	border-radius: inherit;
}

.tms-yt-player__progress-buffer {
	background: rgba(255, 255, 255, 0.4);
	width: 0;
}

.tms-yt-player__progress-played {
	background: #f00;
	width: 0;
}

.tms-yt-player__progress-thumb {
	position: absolute;
	top: 50%;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	margin-top: -6px;
	border-radius: 50%;
	background: #f00;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transition: opacity 0.12s ease;
	left: 0;
}

.tms-yt-player__progress:hover .tms-yt-player__progress-thumb,
.tms-yt-player__progress:focus-visible .tms-yt-player__progress-thumb {
	opacity: 1;
}

.tms-yt-player__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.tms-yt-player__left,
.tms-yt-player__right {
	display: flex;
	align-items: center;
	gap: 6px;
}

.tms-yt-player__btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: #fff;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}

.tms-yt-player__btn:hover {
	background: rgba(255, 255, 255, 0.12);
}

.tms-yt-player__live {
	appearance: none;
	border: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.tms-yt-player__live-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #adb5bd;
	box-shadow: none;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

/* At the live tip — glow like YouTube/Facebook */
.tms-yt-player__live.is-live-edge {
	background: rgba(255, 0, 0, 0.22);
	box-shadow: 0 0 0 1px rgba(255, 0, 0, 0.45), 0 0 10px rgba(255, 0, 0, 0.35);
}

.tms-yt-player__live.is-live-edge .tms-yt-player__live-dot {
	background: #f00;
	box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.35);
	animation: tms-live-dot-pulse 1.2s ease-in-out infinite;
}

/* Scrubbed behind live — ash / muted */
.tms-yt-player__live.is-behind {
	background: rgba(255, 255, 255, 0.12);
	box-shadow: none;
	color: rgba(255, 255, 255, 0.75);
}

.tms-yt-player__live.is-behind .tms-yt-player__live-dot {
	background: #adb5bd;
	box-shadow: none;
	animation: none;
}

@keyframes tms-live-dot-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.25); opacity: 0.7; }
}

.tms-yt-player__volume {
	width: 72px;
	height: 4px;
	accent-color: #fff;
	cursor: pointer;
	vertical-align: middle;
}

.tms-yt-player__volume::-webkit-slider-thumb {
	cursor: pointer;
}

.tms-yt-player__viewers {
	color: rgba(255, 255, 255, 0.9);
	font-size: 12px;
	font-weight: 600;
	margin-left: 4px;
}

.tms-yt-player__icon {
	display: block;
	width: 18px;
	height: 18px;
	background: currentColor;
}

.tms-yt-player__icon--play {
	clip-path: polygon(18% 8%, 90% 50%, 18% 92%);
}

.tms-yt-player__icon--pause {
	width: 14px;
	height: 16px;
	background:
		linear-gradient(currentColor, currentColor) left / 4px 100% no-repeat,
		linear-gradient(currentColor, currentColor) right / 4px 100% no-repeat;
}

.tms-yt-player__icon--vol {
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 10v4h4l5 5V5L7 10H3zm13.5 2a4.5 4.5 0 0 0-2.3-3.9v7.8A4.4 4.4 0 0 0 16.5 12z'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 10v4h4l5 5V5L7 10H3zm13.5 2a4.5 4.5 0 0 0-2.3-3.9v7.8A4.4 4.4 0 0 0 16.5 12z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tms-yt-player__icon--muted {
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M16.5 12c0-1.8-1-3.3-2.5-4.1v2.2l2.4 2.4.1-.5zM19 12c0 .9-.2 1.8-.5 2.6l1.5 1.5c.6-1.3 1-2.6 1-4.1 0-3.4-2.2-6.3-5.2-7.3v2.1A5.5 5.5 0 0 1 19 12zM4.3 3 3 4.3 7.7 9H3v6h4l5 5v-6.7l4.7 4.7 1.3-1.3L4.3 3zM12 5.3 9.8 7.5 12 9.7V5.3z'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M16.5 12c0-1.8-1-3.3-2.5-4.1v2.2l2.4 2.4.1-.5zM19 12c0 .9-.2 1.8-.5 2.6l1.5 1.5c.6-1.3 1-2.6 1-4.1 0-3.4-2.2-6.3-5.2-7.3v2.1A5.5 5.5 0 0 1 19 12zM4.3 3 3 4.3 7.7 9H3v6h4l5 5v-6.7l4.7 4.7 1.3-1.3L4.3 3zM12 5.3 9.8 7.5 12 9.7V5.3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tms-yt-player__icon--fs {
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 14H5v5h5v-2H7v-3zm12 0h-2v3h-3v2h5v-5zM7 7h3V5H5v5h2V7zm12-2h-5v2h3v3h2V5z'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 14H5v5h5v-2H7v-3zm12 0h-2v3h-3v2h5v-5zM7 7h3V5H5v5h2V7zm12-2h-5v2h3v3h2V5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tms-live-watch__offline {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 200px;
	color: #fff;
	padding: 24px;
	text-align: center;
	background: #1a1a2e;
}

.tms-live-watch__sidebar {
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	height: min(calc(100vh - 32px), 720px);
	max-height: min(calc(100vh - 32px), 720px);
	min-height: 360px;
	overflow: hidden;
	position: sticky;
	top: 16px;
}

.tms-live-chat {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	height: 100%;
	padding: 12px;
	overflow: hidden;
}

.tms-live-chat__messages {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	font-size: 14px;
}

.tms-live-chat__footer {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 8px;
	border-top: 1px solid #f1f3f5;
	margin-top: 8px;
}

.tms-live-chat__messages .msg {
	margin: 4px 0;
	padding: 8px 10px;
	border: 1px solid #e9ecef;
	border-radius: 10px;
	background: #f8f9fa;
	line-height: 1.4;
}

.tms-live-chat__messages .msg--donation {
	color: #e67700;
	font-weight: 600;
	border-color: rgba(230, 119, 0, 0.35);
	background: rgba(230, 119, 0, 0.08);
}

.tms-live-chat__messages .msg--system {
	color: #868e96;
	font-style: italic;
	background: #f1f3f5;
	border-color: #e9ecef;
}

.tms-live-chat .msg--page .tms-live-chat__msg-name {
	color: #1864ab;
	font-weight: 700;
}

.tms-live-chat .msg--subscriber .tms-live-chat__msg-name {
	color: var(--tms-sub-name-color, #ff9500);
	font-weight: 600;
}

/* Donation styling wins over subscriber name color. */
.tms-live-chat .msg--donation .tms-live-chat__msg-name {
	color: inherit;
	font-weight: inherit;
}

.tms-live-chat__messages .msg--subscriber.msg--tier-1:not(.msg--donation) {
	--tms-sub-name-color: #ff9500;
	border-color: rgba(255, 149, 0, 0.55);
	background: #fff4e6;
	box-shadow: inset 3px 0 0 #ff9500;
}

.tms-live-chat__messages .msg--subscriber.msg--tier-2:not(.msg--donation) {
	--tms-sub-name-color: #bf00ff;
	border-color: rgba(191, 0, 255, 0.5);
	background: #f8f0ff;
	box-shadow: inset 3px 0 0 #bf00ff;
}

.tms-live-chat__messages .msg--subscriber.msg--tier-3:not(.msg--donation) {
	--tms-sub-name-color: #00e676;
	border-color: rgba(0, 230, 118, 0.55);
	background: #ebfbee;
	box-shadow: inset 3px 0 0 #00e676;
}

.tms-live-chat__sub-badge {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	margin-right: 2px;
	line-height: 1;
	vertical-align: middle;
}

.tms-live-chat__sub-badge-img {
	display: block;
	width: 18px;
	height: 18px;
	object-fit: contain;
	border-radius: 50%;
}

.tms-live-chat__sub-badge-fallback {
	display: inline-block;
	min-width: 1.25em;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
}

.tms-live-chat__pinned {
	flex-shrink: 0;
	background: #fff9db;
	border: 1px solid #ffe066;
	border-radius: 8px;
	padding: 8px 10px;
	margin-bottom: 8px;
	max-height: 120px;
	overflow-y: auto;
}

.tms-live-chat__pinned-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: #e67700;
	margin-bottom: 6px;
}

.tms-live-chat__pinned-list .msg {
	padding: 4px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tms-live-chat__msg-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.tms-live-chat__msg-text {
	flex: 1 1 auto;
	min-width: 0;
	word-break: break-word;
}

.tms-live-chat__msg-actions {
	display: none;
	gap: 4px;
	margin-left: auto;
}

.msg:hover .tms-live-chat__msg-actions {
	display: inline-flex;
}

.tms-live-chat__msg-btn {
	border: none;
	background: #f1f3f5;
	color: #495057;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 4px;
	cursor: pointer;
}

.tms-live-chat__msg-btn--danger {
	background: #fff5f5;
	color: #c92a2a;
}

.tms-live-chat__mod-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.tms-live-chat__composer,
.tms-live-chat__donate,
.tms-live-chat__mod {
	display: grid;
	gap: 8px;
}

.tms-live-chat__composer-field {
	display: flex;
	align-items: center;
	gap: 4px;
	width: 100%;
	min-height: 44px;
	padding: 4px 6px 4px 12px;
	border: 1px solid #ced4da;
	border-radius: 999px;
	background: #fff;
	box-sizing: border-box;
}

.tms-live-chat__composer-field input {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 8px 4px;
	border: 0;
	background: transparent;
	box-shadow: none;
	outline: none;
	font-size: 16px;
}

.tms-live-chat__send-btn {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #e8b84a;
	cursor: pointer;
}

.tms-live-chat__send-btn:hover {
	background: rgba(232, 184, 74, 0.12);
}

.tms-live-chat__send-icon {
	display: block;
}

.tms-live-chat__composer input,
.tms-live-chat__donate input,
.tms-live-chat__mod input {
	font-size: 16px;
}

.tms-live-chat__donate-wrap {
	margin-top: 0;
}

.tms-btn-donate-toggle {
	width: 100%;
	background: linear-gradient(135deg, #228be6, #1c7ed6);
	color: #fff;
	border: none;
	font-weight: 600;
	padding: 10px 16px;
	border-radius: 8px;
	cursor: pointer;
}

.tms-btn-donate-toggle:hover {
	background: linear-gradient(135deg, #1c7ed6, #1971c2);
}

.tms-live-chat__donate {
	padding: 12px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	margin-top: 8px;
}

.tms-live-chat__balance {
	margin: 0 0 4px;
	font-size: 13px;
	color: #495057;
	font-weight: 600;
}

.tms-live-chat__donate-actions {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
}

.tms-btn-ghost {
	background: transparent;
	border: 1px solid #ced4da;
	color: #495057;
}

.tms-live-chat__donation-alert {
	background: linear-gradient(90deg, #ffd43b, #ff922b);
	color: #212529;
	padding: 10px;
	border-radius: 8px;
	font-weight: 600;
	flex-shrink: 0;
}

.tms-live-watch__meta {
	margin-top: 12px;
}

.tms-live-watch__meta-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.tms-live-watch__avatar {
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.tms-live-watch__page-name {
	margin: 0 0 4px;
	font-size: 14px;
	color: #868e96;
}

.tms-live-watch__title {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.3;
}

.tms-live-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: linear-gradient(135deg, #fff5f5 0%, #fff4e6 100%);
	border: 1px solid #ffc9c9;
	padding: 14px 18px;
	border-radius: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.tms-live-banner__content {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.tms-live-banner__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tms-live-banner__title {
	font-size: 15px;
	line-height: 1.3;
}

.tms-live-banner__subtitle {
	font-size: 13px;
	color: #868e96;
}

.tms-live-banner__badge {
	background: #e03131;
	color: #fff;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	flex-shrink: 0;
	animation: tms-live-pulse 1.5s ease-in-out infinite;
}

@keyframes tms-live-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.75; }
}


/* Shared button utilities (studio + elsewhere) */
.tms-btn-block {
	width: 100%;
	justify-content: center;
}

.tms-btn-danger {
	background: #d84b4b;
	color: #fff;
	border: none;
}

.tms-btn-danger:hover {
	background: #c73f3f;
	color: #fff;
}

.tms-feed-live-card {
	border: 1px solid #e9ecef;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	margin-top: 8px;
}

.tms-feed-live-card--preview {
	opacity: 1;
}

.tms-feed-live-card--preview .tms-feed-live-card__watch {
	pointer-events: auto;
}

.tms-feed-live-card__badge--preview {
	background: #495057;
}

.tms-feed-live-card__badge--ended {
	background: #868e96;
}

.tms-feed-live-card__media {
	position: relative;
	background: #000;
	aspect-ratio: 16 / 9;
}

.tms-feed-live-card__player {
	width: 100%;
	height: 100%;
	display: block;
	background: #000;
	object-fit: contain;
}

.tms-feed-live-card__thumb {
	position: relative;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tms-feed-live-card__play {
	color: rgba(255, 255, 255, 0.85);
	font-size: 36px;
	line-height: 1;
}

.tms-feed-live-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
}

.tms-feed-live-card__badge--live {
	background: #e03131;
}

.tms-feed-live-card__badge--replay {
	background: #364fc7;
}

.tms-feed-live-card__badge--ended {
	background: #495057;
}

.tms-feed-live-card__body {
	padding: 12px 14px;
}

.tms-feed-live-card__page {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.tms-feed-live-card__avatar {
	border-radius: 50%;
	object-fit: cover;
}

.tms-feed-live-card__page-name {
	font-weight: 600;
	font-size: 14px;
}

.tms-feed-live-card__preview-title {
	margin: 0 0 10px;
	font-size: 14px;
	color: #495057;
}

.tms-feed-live-card__viewers {
	margin: 0 0 10px;
	font-size: 13px;
	color: #868e96;
}

.tms-feed-live-card__cta-overlay {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.72) 100%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.tms-feed-live-card__media.is-cta-active .tms-feed-live-card__cta-overlay {
	opacity: 1;
	pointer-events: auto;
}

.tms-feed-live-card__media.is-cta-active .tms-feed-live-card__player {
	opacity: 0.35;
	transition: opacity 0.35s ease;
}

.tms-feed-live-card__cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 28px;
	border-radius: 999px;
	background: #e03131;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	animation: tms-live-cta-pulse 1.6s ease-in-out infinite;
	box-shadow: 0 4px 20px rgba(224, 49, 49, 0.45);
}

.tms-feed-live-card__cta-btn:hover {
	background: #c92a2a;
	color: #fff;
}

.tms-feed-live-card__cta-hint {
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
}

@keyframes tms-live-cta-pulse {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.04);
	}
}

.tms-live-post-chat-cta {
	margin: 12px 0 0;
	padding: 14px 16px;
	border: 1px solid #ffe3e3;
	border-radius: 10px;
	background: #fff5f5;
}

.tms-live-post-chat-cta__text {
	margin: 0 0 10px;
	font-size: 14px;
	color: #495057;
}

.tms-live-post-chat-cta__btn {
	text-decoration: none;
}

/* Live wall posts — hide PeepSo "Comments are closed"; Join live chat CTA is shown instead. */
.tms-live-wall-post .ps-comments,
.ps-post[data-module-id="7721"].tms-live-wall-post .ps-comments {
	display: none !important;
}

.tms-avatar-live-ring {
	display: inline-flex;
	position: relative;
	vertical-align: middle;
}

.tms-avatar-live-ring.is-live {
	padding: 3px;
	border-radius: 50%;
	background: linear-gradient(135deg, #e03131 0%, #ff6b6b 100%);
	box-shadow: 0 0 0 2px rgba(224, 49, 49, 0.2);
}

.tms-avatar-live-ring.is-live img {
	display: block;
	border-radius: 50%;
}

.tms-avatar-live-ring__badge {
	position: absolute;
	left: 50%;
	bottom: -6px;
	transform: translateX(-50%);
	padding: 1px 6px;
	border-radius: 4px;
	background: #e03131;
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.ps-post__header .tms-avatar-live-ring--block {
	flex-shrink: 0;
	line-height: 0;
	vertical-align: top;
}

.ps-post__header .tms-avatar-live-ring--block .ps-avatar,
.ps-post__header .tms-avatar-live-ring--block .ps-avatar--post {
	display: block;
	border-radius: 50%;
	overflow: hidden;
}

.ps-post__header .tms-avatar-live-ring--block .ps-avatar img,
.ps-post__header .tms-avatar-live-ring--block .ps-avatar--post img {
	display: block;
	border-radius: 50%;
}

/* Profile focus avatar — ring must NOT change display/position (PeepSo uses position:absolute). */
.tms-page-is-live .ps-focus__avatar.ps-avatar--focus::before {
	content: '';
	position: absolute;
	top: -4px;
	right: -4px;
	bottom: -4px;
	left: -4px;
	border-radius: 50%;
	background: linear-gradient(135deg, #e03131 0%, #ff6b6b 100%);
	z-index: 0;
	pointer-events: none;
}

.tms-page-is-live .ps-focus__avatar.ps-avatar--focus img {
	position: relative;
	z-index: 1;
	border-radius: 50%;
}

.tms-page-is-live .ps-focus__avatar.ps-avatar--focus::after {
	content: 'LIVE';
	position: absolute;
	left: 50%;
	bottom: -2px;
	transform: translateX(-50%);
	padding: 2px 8px;
	border-radius: 4px;
	background: #e03131;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
	z-index: 2;
	pointer-events: none;
}

.tms-live-discovery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.tms-live-discovery__card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	border: 1px solid #dee2e6;
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.tms-live-discovery__card:hover {
	border-color: #e03131;
	box-shadow: 0 4px 12px rgba(224, 49, 49, 0.12);
}

.tms-live-discovery__card-top {
	display: flex;
	align-items: center;
	gap: 10px;
}

.tms-live-discovery__avatar {
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.tms-live-discovery__card-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.tms-live-discovery__badge {
	display: inline-block;
	align-self: flex-start;
	background: #e03131;
	color: #fff;
	font-size: 10px;
	padding: 2px 8px;
	border-radius: 999px;
	font-weight: 700;
}

.tms-live-discovery__title {
	font-size: 14px;
	color: #495057;
	line-height: 1.4;
}

.tms-live-discovery__viewers {
	color: #868e96;
}

.tms-btn {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid #ced4da;
	background: #fff;
	cursor: pointer;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.4;
}

.tms-btn-sm {
	padding: 6px 10px;
	font-size: 13px;
}

.tms-btn-primary {
	background: #f5c84c;
	border-color: #e0b63b;
	color: #292a2b;
}

.tms-btn-live {
	background: #292a2b;
	border-color: #1a1b1c;
	color: #fff;
}

.tms-btn-live:hover {
	background: #3a3b3d;
	border-color: #3a3b3d;
	color: #fff;
}


@media (max-width: 900px) {
	.tms-live-watch {
		grid-template-columns: 1fr;
	}

	.tms-live-watch__main {
		position: relative;
		top: auto;
	}

	.tms-live-watch__sidebar {
		height: min(440px, 55vh);
		max-height: min(440px, 55vh);
		min-height: 280px;
		position: relative;
		top: auto;
	}
}

/* ===== Live Experience layout v2 (feature flag) ===== */
.tms-live-watch--layout-v2 {
	display: grid;
	gap: 16px;
	align-items: start;
	margin: 16px 0;
}

.tms-live-watch--layout-v2.tms-live-watch--chat-right {
	grid-template-columns: minmax(0, 1fr) clamp(360px, 28vw, 480px);
	grid-template-areas:
		"toolbar toolbar"
		"primary chat";
}

.tms-live-watch--layout-v2.tms-live-watch--chat-below {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas:
		"toolbar"
		"primary"
		"chat";
}

.tms-live-watch--layout-v2 .tms-live-watch__toolbar {
	grid-area: toolbar;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.tms-live-watch__chat-collapse-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 8px 12px;
	margin: 0;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	background: #fff;
	color: #212529;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.tms-live-watch__chat-collapse-btn:focus-visible,
.tms-live-watch__layout-btn:focus-visible,
.tms-live-watch__follow-btn:focus-visible,
.tms-live-watch__channel-identity:focus-visible {
	outline: 2px solid #364fc7;
	outline-offset: 2px;
}

.tms-live-watch--chat-collapsed .tms-live-watch__sidebar {
	display: none;
}

.tms-live-chat__head {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 0 8px;
	margin-bottom: 4px;
	border-bottom: 1px solid #f1f3f5;
}

.tms-live-chat__title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #495057;
}

.tms-live-chat__presence {
	position: relative;
	flex-shrink: 0;
}

.tms-live-chat__viewers-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	padding: 0 10px;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	background: #fff;
	color: #212529;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.tms-live-chat__viewers-btn:hover {
	background: #f8f9fa;
}

.tms-live-chat__viewers-btn:focus-visible {
	outline: 2px solid #364fc7;
	outline-offset: 2px;
}

.tms-live-chat__viewers-btn-count {
	font-variant-numeric: tabular-nums;
}

.tms-live-chat__viewers-panel {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 40;
	width: min(280px, 78vw);
	max-height: 360px;
	overflow: auto;
	padding: 10px;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(33, 37, 41, 0.12);
}

.tms-live-chat__viewers-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	font-size: 12px;
	color: #495057;
	margin-bottom: 6px;
}

.tms-live-chat__viewers-note {
	margin: 0 0 8px;
	font-size: 11px;
	line-height: 1.35;
	color: #868e96;
}

.tms-live-chat__viewers-filters {
	display: flex;
	gap: 6px;
	margin-bottom: 8px;
}

.tms-live-chat__viewers-filter {
	border: 1px solid #dee2e6;
	background: #fff;
	color: #495057;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 4px;
	cursor: pointer;
}

.tms-live-chat__viewers-filter.is-active {
	background: #212529;
	border-color: #212529;
	color: #fff;
}

.tms-live-chat__viewers-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tms-live-chat__viewer-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px solid #f1f3f5;
}

.tms-live-chat__viewer-row:last-child {
	border-bottom: 0;
}

.tms-live-chat__viewer-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #e9ecef;
}

.tms-live-chat__viewer-avatar--empty {
	display: inline-block;
}

.tms-live-chat__viewer-meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tms-live-chat__viewer-name {
	font-size: 13px;
	font-weight: 600;
	color: #212529;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tms-live-chat__viewer-row.is-page .tms-live-chat__viewer-name {
	color: #1864ab;
}

.tms-live-chat__viewer-row.is-subscriber .tms-live-chat__viewer-name {
	color: var(--tms-sub-name-color, #ff9500);
}

.tms-live-chat__viewer-role {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #868e96;
}

.tms-live-chat__viewers-more,
.tms-live-chat__viewers-empty {
	margin: 8px 0 0;
	font-size: 12px;
	color: #868e96;
}

.tms-live-watch__page-action-slot {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.tms-live-watch__page-action-slot:empty {
	display: none;
}

.tms-live-watch__follow-error {
	flex-basis: 100%;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	color: #c92a2a;
}

.tms-live-watch__follow-error[hidden] {
	display: none !important;
}

.tms-live-watch--layout-v2 .tms-live-watch__primary {
	grid-area: primary;
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	position: relative;
	z-index: 1;
}

.tms-live-watch--layout-v2 .tms-live-watch__player-region {
	grid-area: auto;
	min-width: 0;
	position: relative;
	top: auto;
	align-self: stretch;
	z-index: 0;
}

.tms-live-watch--layout-v2 .tms-live-watch__meta {
	grid-area: auto;
	margin-top: 0;
	min-width: 0;
	position: relative;
	z-index: 2;
}

.tms-live-watch--layout-v2 .tms-live-watch__sidebar {
	grid-area: chat;
	width: 100%;
	min-width: 0;
	min-height: 0;
}

.tms-live-watch--layout-v2.tms-live-watch--chat-right .tms-live-watch__sidebar {
	height: min(720px, calc(100vh - 120px));
	max-height: min(720px, calc(100vh - 120px));
	min-height: 0;
	align-self: start;
	position: sticky;
	top: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.tms-live-watch--layout-v2.tms-live-watch--chat-right .tms-live-chat {
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	max-height: 100%;
}

.tms-live-watch--layout-v2.tms-live-watch--chat-below .tms-live-watch__player-region {
	position: relative;
	top: auto;
}

.tms-live-watch--layout-v2.tms-live-watch--chat-below .tms-live-watch__sidebar {
	height: clamp(340px, 55vh, 620px);
	max-height: clamp(340px, 55vh, 620px);
	min-height: 280px;
	position: relative;
	top: auto;
}

.tms-live-watch__layout-toggle {
	display: inline-flex;
	padding: 3px;
	gap: 2px;
	border: 1px solid #dee2e6;
	border-radius: 10px;
	background: #f8f9fa;
}

.tms-live-watch__layout-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 8px 12px;
	min-height: 40px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #495057;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tms-live-watch__layout-btn:hover:not(:disabled) {
	background: #fff;
	color: #212529;
}

.tms-live-watch__layout-btn:focus-visible {
	outline: 2px solid #364fc7;
	outline-offset: 2px;
}

.tms-live-watch__layout-btn.is-active {
	background: #fff;
	color: #364fc7;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tms-live-watch__layout-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.tms-live-watch__layout-icon {
	display: inline-flex;
	flex-shrink: 0;
}

.tms-live-watch__layout-status.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.tms-live-watch__layout-btn {
		transition: none;
	}
}

@media (max-width: 900px) {
	.tms-live-watch--layout-v2.tms-live-watch--chat-right,
	.tms-live-watch--layout-v2.tms-live-watch--chat-below {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"toolbar"
			"primary"
			"chat";
	}

	.tms-live-watch--layout-v2 .tms-live-watch__player-region {
		position: relative;
		top: auto;
	}

	.tms-live-watch--layout-v2 .tms-live-watch__sidebar {
		height: clamp(340px, 55vh, 620px);
		max-height: clamp(340px, 55vh, 620px);
		min-height: 280px;
		position: relative;
		top: auto;
	}

	.tms-live-watch__layout-label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.tms-live-watch__layout-btn {
		min-width: 44px;
		justify-content: center;
		padding: 10px;
	}
}

/* ===== Phase 2: stream info + channel bar ===== */
.tms-live-watch--info-v2 .tms-live-watch__info {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 4px 0 2px;
}

.tms-live-watch--info-v2 .tms-live-watch__stream-info {
	min-width: 0;
}

.tms-live-watch--info-v2 .tms-live-watch__title {
	margin: 0 0 6px;
	font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
	font-weight: 700;
	line-height: 1.25;
	color: #212529;
	word-break: break-word;
}

.tms-live-watch--info-v2 .tms-live-watch__stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 13px;
	color: #868e96;
}

.tms-live-watch__state {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: #f1f3f5;
	color: #495057;
}

.tms-live-watch__state--live {
	background: #ff0000;
	color: #ffffff;
}

.tms-live-watch__state--vod {
	background: #e7f5ff;
	color: #1971c2;
}

.tms-live-watch__state--offline {
	background: #f1f3f5;
	color: #868e96;
}

.tms-live-watch__stats-sep {
	opacity: 0.55;
}

.tms-live-watch__channel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	padding-top: 12px;
	border-top: 1px solid #e9ecef;
}

.tms-live-watch__channel-identity {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.tms-live-watch__channel-identity:hover .tms-live-watch__page-name {
	color: #364fc7;
}

.tms-live-watch__channel-identity:focus-visible {
	outline: 2px solid #364fc7;
	outline-offset: 3px;
	border-radius: 8px;
}

.tms-live-watch--info-v2 .tms-live-watch__avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #e9ecef;
}

.tms-live-watch__avatar--placeholder {
	display: inline-block;
}

.tms-live-watch__channel-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tms-live-watch--info-v2 .tms-live-watch__page-name {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #212529;
	line-height: 1.3;
}

.tms-live-watch__verified {
	display: inline-flex;
	color: #364fc7;
	flex-shrink: 0;
}

.tms-live-watch__category {
	font-size: 12px;
	font-weight: 600;
	color: #868e96;
	text-transform: capitalize;
}

.tms-live-watch__channel-actions {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	min-width: 0;
}

.tms-live-watch__followers {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	min-height: 24px;
	font-size: 13px;
	font-weight: 600;
	color: #495057;
}

.tms-live-watch__followers-label {
	font-weight: 500;
	color: #868e96;
}

.tms-live-watch__follow-btn {
	min-height: 40px;
	min-width: 96px;
	padding: 8px 16px;
	border-radius: 8px;
	font-weight: 700;
	background: #364fc7;
	border: 1px solid #364fc7;
	color: #fff;
}

.tms-live-watch__follow-btn:hover:not(:disabled) {
	background: #3b5bdb;
	border-color: #3b5bdb;
	color: #fff;
}

.tms-live-watch__follow-btn.is-following {
	background: #f8f9fa;
	border-color: #ced4da;
	color: #212529;
}

.tms-live-watch__follow-btn.is-following:hover:not(:disabled) {
	background: #fff5f5;
	border-color: #ffa8a8;
	color: #c92a2a;
}

.tms-live-watch__follow-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.tms-live-watch__follow-btn.is-loading,
.tms-live-watch__followers.is-loading {
	position: relative;
}

.tms-live-watch__skeleton {
	display: inline-block;
	border-radius: 6px;
	background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 50%, #e9ecef 100%);
	background-size: 200% 100%;
	animation: tms-live-skeleton 1.2s ease-in-out infinite;
}

.tms-live-watch__skeleton--followers {
	width: 88px;
	height: 14px;
}

.tms-live-watch__skeleton--btn {
	width: 64px;
	height: 14px;
	vertical-align: middle;
}

.tms-live-watch__follow-btn.is-loading {
	background: #e9ecef;
	border-color: #dee2e6;
	color: transparent;
}

@keyframes tms-live-skeleton {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.tms-live-watch__skeleton {
		animation: none;
		background: #e9ecef;
	}
}

@media (max-width: 640px) {
	.tms-live-watch__channel {
		flex-direction: column;
		align-items: stretch;
	}

	.tms-live-watch__channel-actions {
		justify-content: flex-start;
		width: 100%;
	}

	.tms-live-watch__follow-btn {
		flex: 1 1 auto;
		min-width: 120px;
	}
}

@media (prefers-color-scheme: dark) {
	.tms-live-watch--info-v2 .tms-live-watch__title {
		color: #f8f9fa;
	}

	.tms-live-watch__channel {
		border-top-color: #373a40;
	}

	.tms-live-watch--info-v2 .tms-live-watch__page-name {
		color: #f1f3f5;
	}

	.tms-live-watch__followers {
		color: #ced4da;
	}

	.tms-live-watch__followers-label,
	.tms-live-watch__category,
	.tms-live-watch--info-v2 .tms-live-watch__stats {
		color: #adb5bd;
	}
}

/* ===== Studio dark watch theme (layout v2) ===== */

/* Use more of the viewport on PeepSo profile / theme shells. */
body:has(.tms-live-watch--layout-v2) #main.main,
body:has(.tms-live-watch--layout-v2) #main,
body:has(.tms-live-watch--layout-v2) .main {
	max-width: min(1680px, calc(100vw - 32px)) !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}

body:has(.tms-live-watch--layout-v2) #peepso-wrap,
body:has(.tms-live-watch--layout-v2) .peepso,
body:has(.tms-live-watch--layout-v2) .ps-page--profile,
body:has(.tms-live-watch--layout-v2) .ps-page.ps-page--profile {
	max-width: none !important;
	width: 100%;
}

body:has(.tms-live-watch--layout-v2) .entry-content,
body:has(.tms-live-watch--layout-v2) .site-main,
body:has(.tms-live-watch--layout-v2) .site-content,
body:has(.tms-live-watch--layout-v2) .content-area,
body:has(.tms-live-watch--layout-v2) .ast-container,
body:has(.tms-live-watch--layout-v2) .container,
body:has(.tms-live-watch--layout-v2) .wrapper,
body:has(.tms-live-watch--layout-v2) .wp-block-group__inner-container {
	max-width: none !important;
	width: 100%;
}

.tms-live-watch--layout-v2 {
	--tms-studio-bg: #0c0c0c;
	--tms-studio-surface: #161616;
	--tms-studio-surface-2: #1e1e1e;
	--tms-studio-border: #2a2a2a;
	--tms-studio-text: #f5f5f5;
	--tms-studio-muted: #9b9b9b;
	--tms-studio-gold: #e8b84a;
	--tms-studio-gold-hover: #f0c85c;
	--tms-studio-gold-ink: #1a1408;
	--tms-studio-radius: 14px;
	width: 100%;
	max-width: none;
	gap: 20px;
	padding: 16px;
	border-radius: 18px;
	background: var(--tms-studio-bg);
	color: var(--tms-studio-text);
	box-sizing: border-box;
}

.tms-live-watch--layout-v2.tms-live-watch--chat-right {
	grid-template-columns: minmax(0, 1fr) clamp(360px, 28vw, 480px);
}

.tms-live-watch--layout-v2 .tms-live-watch__player-wrap {
	border-radius: var(--tms-studio-radius);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
	position: relative;
	z-index: 0;
	isolation: isolate;
}

.tms-live-watch--layout-v2 .tms-live-watch__player {
	border-radius: var(--tms-studio-radius);
}

.tms-live-watch--layout-v2 .tms-live-watch__toolbar {
	opacity: 0.85;
}

.tms-live-watch--layout-v2 .tms-live-watch__chat-collapse-btn,
.tms-live-watch--layout-v2 .tms-live-watch__layout-toggle {
	border-color: var(--tms-studio-border);
	background: var(--tms-studio-surface);
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-watch__layout-btn {
	color: var(--tms-studio-muted);
}

.tms-live-watch--layout-v2 .tms-live-watch__layout-btn:hover:not(:disabled) {
	background: var(--tms-studio-surface-2);
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-watch__layout-btn.is-active {
	background: var(--tms-studio-surface-2);
	color: var(--tms-studio-gold);
	box-shadow: none;
}

.tms-live-watch--layout-v2 .tms-live-watch__chat-collapse-btn:focus-visible,
.tms-live-watch--layout-v2 .tms-live-watch__layout-btn:focus-visible,
.tms-live-watch--layout-v2 .tms-live-watch__follow-btn:focus-visible,
.tms-live-watch--layout-v2 .tms-live-watch__share-btn:focus-visible,
.tms-live-watch--layout-v2 .tms-live-watch__channel-identity:focus-visible,
.tms-live-watch--layout-v2 .tms-live-watch__subscribe-btn:focus-visible {
	outline-color: var(--tms-studio-gold);
}

.tms-live-watch--layout-v2.tms-live-watch--info-v2 .tms-live-watch__info {
	gap: 16px;
	padding: 0;
}

.tms-live-watch--layout-v2 .tms-live-watch__stream-info {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px 16px;
}

.tms-live-watch--layout-v2 .tms-live-watch__stream-info-main {
	min-width: 0;
	flex: 1 1 220px;
}

.tms-live-watch--layout-v2.tms-live-watch--info-v2 .tms-live-watch__title {
	margin: 0 0 8px;
	font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2.tms-live-watch--info-v2 .tms-live-watch__stats {
	gap: 8px;
	font-size: 13px;
	color: var(--tms-studio-muted);
}

.tms-live-watch--layout-v2 .tms-live-watch__watching-label,
.tms-live-watch--layout-v2 .tms-live-watch__duration {
	color: var(--tms-studio-muted);
}

.tms-live-watch--layout-v2 .tms-live-watch__viewers {
	font-weight: 700;
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-watch__state {
	background: var(--tms-studio-surface-2);
	color: var(--tms-studio-muted);
}

.tms-live-watch--layout-v2 .tms-live-watch__state--live {
	background: #e03131;
	color: #fff;
}

.tms-live-watch--layout-v2 .tms-live-watch__state--vod {
	background: #243b55;
	color: #a5d8ff;
}

.tms-live-watch--layout-v2 .tms-live-watch__stream-info-actions {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	flex-shrink: 0;
}

.tms-live-watch--layout-v2 .tms-live-watch__share-btn {
	min-height: 40px;
	padding: 8px 16px;
	border-radius: 10px;
	border: 1px solid var(--tms-studio-border);
	background: var(--tms-studio-surface-2);
	color: var(--tms-studio-text);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

.tms-live-watch--layout-v2 .tms-live-watch__share-btn:hover:not(:disabled) {
	border-color: #3a3a3a;
	background: #262626;
	color: #fff;
}

.tms-live-watch--layout-v2 .tms-live-watch__share-btn:disabled {
	opacity: 0.7;
	cursor: wait;
}

.tms-live-watch--layout-v2 .tms-live-watch__channel {
	align-items: center;
	gap: 14px 18px;
	padding: 16px 18px;
	border: 1px solid var(--tms-studio-border);
	border-radius: var(--tms-studio-radius);
	background: var(--tms-studio-surface);
}

.tms-live-watch--layout-v2 .tms-live-watch__channel-identity:hover .tms-live-watch__page-name {
	color: var(--tms-studio-gold);
}

.tms-live-watch--layout-v2.tms-live-watch--info-v2 .tms-live-watch__avatar {
	width: 56px;
	height: 56px;
	border: 2px solid var(--tms-studio-border);
	background: #2a2a2a;
}

.tms-live-watch--layout-v2.tms-live-watch--info-v2 .tms-live-watch__page-name {
	font-size: 16px;
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-watch__verified {
	color: var(--tms-studio-gold);
}

.tms-live-watch--layout-v2 .tms-live-watch__verified-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(232, 184, 74, 0.16);
	color: var(--tms-studio-gold);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tms-live-watch--layout-v2 .tms-live-watch__channel-meta {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	font-size: 13px;
	color: var(--tms-studio-muted);
}

.tms-live-watch--layout-v2 .tms-live-watch__category,
.tms-live-watch--layout-v2 .tms-live-watch__followers,
.tms-live-watch--layout-v2 .tms-live-watch__followers-label,
.tms-live-watch--layout-v2 .tms-live-watch__meta-sep {
	color: var(--tms-studio-muted);
	font-weight: 500;
	text-transform: none;
}

.tms-live-watch--layout-v2 .tms-live-watch__followers-value {
	font-weight: 600;
	color: #cfcfcf;
}

.tms-live-watch--layout-v2 .tms-live-watch__channel-actions {
	gap: 10px;
	position: relative;
	z-index: 2;
	isolation: isolate;
}

.tms-live-watch--layout-v2 .tms-live-watch__share-btn,
.tms-live-watch--layout-v2 .tms-live-watch__follow-btn,
.tms-live-watch--layout-v2 .tms-live-watch__subscribe-btn {
	position: static !important;
	float: none !important;
	inset: auto !important;
}

.tms-live-watch--layout-v2 .tms-live-watch__follow-btn {
	min-height: 42px;
	min-width: 110px;
	padding: 8px 18px;
	border-radius: 10px;
	border: 1px solid var(--tms-studio-gold);
	background: var(--tms-studio-gold);
	color: var(--tms-studio-gold-ink);
	font-weight: 700;
}

.tms-live-watch--layout-v2 .tms-live-watch__follow-btn:hover:not(:disabled) {
	background: var(--tms-studio-gold-hover);
	border-color: var(--tms-studio-gold-hover);
	color: var(--tms-studio-gold-ink);
}

.tms-live-watch--layout-v2 .tms-live-watch__follow-btn.is-following {
	background: var(--tms-studio-gold);
	border-color: var(--tms-studio-gold);
	color: var(--tms-studio-gold-ink);
	display: flex;
	align-items: center;
	justify-content: center;
}

.tms-live-watch--layout-v2 .tms-live-watch__follow-btn.is-following:hover:not(:disabled) {
	background: #3a2020;
	border-color: #c92a2a;
	color: #ffc9c9;
}

.tms-live-watch--layout-v2 .tms-live-watch__follow-btn.is-loading {
	background: var(--tms-studio-surface-2);
	border-color: var(--tms-studio-border);
	color: transparent;
}

.tms-live-watch--layout-v2 .tms-live-watch__skeleton {
	background: linear-gradient(90deg, #2a2a2a 0%, #3a3a3a 50%, #2a2a2a 100%);
	background-size: 200% 100%;
}

.tms-live-watch--layout-v2 .tms-live-watch__subscribe-btn {
	min-height: 42px;
	padding: 8px 16px;
	border-radius: 10px;
	border: 1px solid #3a3a3a;
	background: transparent;
	color: var(--tms-studio-text);
	font-weight: 600;
}

.tms-live-watch--layout-v2 .tms-live-watch__subscribe-btn:hover {
	background: var(--tms-studio-surface-2);
	border-color: #4a4a4a;
	color: #fff;
}

.tms-live-watch--layout-v2 .tms-live-watch__subscribe-btn.is-subscribed {
	background: transparent;
	border-color: var(--tms-studio-gold);
	color: var(--tms-studio-gold);
}

.tms-live-watch--layout-v2 .tms-live-watch__follow-error {
	color: #ff8787;
}

.tms-live-watch--layout-v2 .tms-live-watch__about {
	padding: 16px 18px;
	border: 1px solid var(--tms-studio-border);
	border-radius: var(--tms-studio-radius);
	background: var(--tms-studio-surface);
}

.tms-live-watch--layout-v2 .tms-live-watch__about-title {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tms-studio-gold);
}

.tms-live-watch--layout-v2 .tms-live-watch__about-game {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-watch__about-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #c8c8c8;
}

.tms-live-watch--layout-v2 .tms-live-watch__sidebar {
	background: var(--tms-studio-surface);
	border: 1px solid var(--tms-studio-border);
	border-radius: var(--tms-studio-radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tms-live-watch--layout-v2 .tms-live-chat__head {
	border-bottom-color: var(--tms-studio-border);
	padding-bottom: 10px;
	margin-bottom: 8px;
}

.tms-live-watch--layout-v2 .tms-live-chat__title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-chat__viewers-btn {
	border-color: var(--tms-studio-border);
	background: var(--tms-studio-surface-2);
	color: var(--tms-studio-muted);
}

.tms-live-watch--layout-v2 .tms-live-chat__viewers-btn:hover {
	color: var(--tms-studio-text);
	border-color: #3a3a3a;
}

.tms-live-watch--layout-v2 .tms-live-chat__viewers-panel {
	background: var(--tms-studio-surface-2);
	border-color: var(--tms-studio-border);
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-chat__messages .msg {
	margin: 6px 0;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--tms-studio-border);
	background: var(--tms-studio-surface-2);
	color: #dedede;
	line-height: 1.4;
}

.tms-live-watch--layout-v2 .tms-live-chat__messages .msg--system {
	margin: 6px 0;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--tms-studio-border);
	background: var(--tms-studio-surface-2);
	color: var(--tms-studio-muted);
	font-style: normal;
	font-size: 12px;
	line-height: 1.4;
}

.tms-live-watch--layout-v2 .tms-live-chat__msg-name {
	color: var(--tms-studio-gold);
}

.tms-live-watch--layout-v2 .tms-live-chat .msg--page .tms-live-chat__msg-name {
	color: var(--tms-studio-gold);
}

.tms-live-watch--layout-v2 .tms-live-chat .msg--subscriber .tms-live-chat__msg-name {
	color: var(--tms-sub-name-color, var(--tms-studio-gold));
	font-weight: 700;
}

/* Page / streamer chat — gold accent (not a sub tier). */
.tms-live-watch--layout-v2 .tms-live-chat__messages .msg--page:not(.msg--system):not(.msg--donation) {
	border-color: rgba(232, 184, 74, 0.45);
	background: linear-gradient(90deg, rgba(232, 184, 74, 0.12), var(--tms-studio-surface-2) 32%);
	box-shadow: inset 3px 0 0 var(--tms-studio-gold);
}

/* Tier borders match badge colors: T1 orange, T2 purple, T3 green. */
.tms-live-watch--layout-v2 .tms-live-chat__messages .msg--subscriber.msg--tier-1:not(.msg--donation) {
	--tms-sub-name-color: #ff9500;
	border-color: rgba(255, 149, 0, 0.7);
	background: linear-gradient(90deg, rgba(255, 149, 0, 0.14), var(--tms-studio-surface-2) 34%);
	box-shadow: inset 3px 0 0 #ff9500;
}

.tms-live-watch--layout-v2 .tms-live-chat__messages .msg--subscriber.msg--tier-2:not(.msg--donation) {
	--tms-sub-name-color: #bf00ff;
	border-color: rgba(191, 0, 255, 0.7);
	background: linear-gradient(90deg, rgba(191, 0, 255, 0.14), var(--tms-studio-surface-2) 34%);
	box-shadow: inset 3px 0 0 #bf00ff;
}

.tms-live-watch--layout-v2 .tms-live-chat__messages .msg--subscriber.msg--tier-3:not(.msg--donation) {
	--tms-sub-name-color: #00e676;
	border-color: rgba(0, 230, 118, 0.75);
	background: linear-gradient(90deg, rgba(0, 230, 118, 0.16), var(--tms-studio-surface-2) 34%);
	box-shadow: inset 3px 0 0 #00e676;
}

.tms-live-watch--layout-v2 .tms-live-chat__messages .msg--donation {
	margin: 6px 0;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid rgba(232, 184, 74, 0.45);
	background: rgba(232, 184, 74, 0.1);
	color: var(--tms-studio-text);
	box-shadow: none;
}

.tms-live-watch--layout-v2 .tms-live-chat__sub-badge-fallback {
	color: var(--tms-sub-name-color, inherit);
}

.tms-live-watch--layout-v2 .tms-live-chat__pinned {
	border-color: var(--tms-studio-border);
	background: var(--tms-studio-surface-2);
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-chat__footer {
	border-top-color: var(--tms-studio-border);
	gap: 10px;
	padding-top: 10px;
}

.tms-live-watch--layout-v2 .tms-live-chat__composer {
	display: block;
	gap: 0;
}

.tms-live-watch--layout-v2 .tms-live-chat__composer-field {
	display: flex;
	align-items: center;
	gap: 4px;
	width: 100%;
	min-height: 46px;
	padding: 4px 6px 4px 14px;
	border: 1px solid var(--tms-studio-border);
	border-radius: 999px;
	background: var(--tms-studio-surface-2);
	box-sizing: border-box;
}

.tms-live-watch--layout-v2 .tms-live-chat__composer-field:focus-within {
	border-color: rgba(232, 184, 74, 0.55);
	box-shadow: 0 0 0 2px rgba(232, 184, 74, 0.12);
}

.tms-live-watch--layout-v2 .tms-live-chat__composer input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 38px;
	margin: 0;
	padding: 8px 4px;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	color: var(--tms-studio-text);
	box-shadow: none !important;
	outline: none;
}

.tms-live-watch--layout-v2 .tms-live-chat__donate input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid var(--tms-studio-border);
	border-radius: 10px;
	background: var(--tms-studio-surface-2);
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-live-chat__composer input::placeholder,
.tms-live-watch--layout-v2 .tms-live-chat__donate input::placeholder {
	color: #777;
}

.tms-live-watch--layout-v2 .tms-live-chat__send-btn,
.tms-live-watch--layout-v2 #tms-live-chat-send {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 38px;
	min-width: 38px;
	max-width: 38px;
	height: 38px;
	min-height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--tms-studio-gold);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.tms-live-watch--layout-v2 .tms-live-chat__send-btn:hover,
.tms-live-watch--layout-v2 #tms-live-chat-send:hover {
	background: rgba(232, 184, 74, 0.14);
	color: var(--tms-studio-gold-hover);
}

.tms-live-watch--layout-v2 .tms-live-chat__send-btn:focus-visible,
.tms-live-watch--layout-v2 #tms-live-chat-send:focus-visible {
	outline: 2px solid var(--tms-studio-gold);
	outline-offset: 1px;
}

.tms-live-watch--layout-v2 .tms-live-chat__send-icon {
	display: block;
	transform: translateX(1px);
}

.tms-live-watch--layout-v2 .tms-btn-donate-toggle {
	width: 100%;
	min-height: 44px;
	border-radius: 10px;
	border: 1px solid var(--tms-studio-gold);
	background: transparent;
	color: var(--tms-studio-gold);
	font-weight: 700;
}

.tms-live-watch--layout-v2 .tms-btn-donate-toggle:hover {
	background: rgba(232, 184, 74, 0.12);
	color: var(--tms-studio-gold-hover);
}

.tms-live-watch--layout-v2 .tms-live-chat__donate {
	border-color: var(--tms-studio-border);
	background: var(--tms-studio-surface-2);
}

.tms-live-watch--layout-v2 .tms-live-chat__balance,
.tms-live-watch--layout-v2 .tms-live-chat__login,
.tms-live-watch--layout-v2 .tms-live-chat__mod {
	color: var(--tms-studio-muted);
}

.tms-live-watch--layout-v2 .tms-live-chat__mod input {
	border-color: var(--tms-studio-border);
	background: var(--tms-studio-bg);
	color: var(--tms-studio-text);
}

.tms-live-watch--layout-v2 .tms-btn-primary {
	background: var(--tms-studio-gold);
	border-color: var(--tms-studio-gold);
	color: var(--tms-studio-gold-ink);
}

.tms-live-watch--layout-v2 .tms-btn-ghost {
	color: var(--tms-studio-muted);
	border-color: var(--tms-studio-border);
}

@media (max-width: 640px) {
	.tms-live-watch--layout-v2 {
		padding: 8px;
		border-radius: 12px;
	}

	.tms-live-watch--layout-v2 .tms-live-watch__channel,
	.tms-live-watch--layout-v2 .tms-live-watch__about {
		padding: 14px;
	}

	.tms-live-watch--layout-v2 .tms-live-watch__stream-info-actions {
		width: 100%;
	}

	.tms-live-watch--layout-v2 .tms-live-watch__share-btn {
		flex: 1 1 auto;
	}
}

/* —— Stream Studio: Subscriptions —— */
.tms-live-subs-studio__fee-note {
	margin: 8px 0 0;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.4;
	background: #f3f0e8;
	color: #3d3a32;
	border: 1px solid #d8d3c8;
}

.tms-live-subs-card__net-note {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.35;
	color: #5c584e;
}

.tms-live-subs-studio__status {
	margin: 0 0 12px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13px;
	background: #fff2bd;
	color: #1e1e1c;
}

.tms-live-subs-studio__status.is-error {
	background: #fff5f5;
	color: #c92a2a;
}

.tms-live-subs-studio__status.is-ok {
	background: #ebfbee;
	color: #2b8a3e;
}

.tms-live-subs-studio__metrics {
	margin: 0 0 14px;
	padding: 12px;
	border: 1px solid #d8d3c8;
	border-radius: 8px;
	background: #eeeae0;
}

.tms-live-subs-studio__metrics-title {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #868e96;
}

.tms-live-subs-studio__metrics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 10px;
}

.tms-live-subs-studio__metric {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tms-live-subs-studio__metric-value {
	font-size: 18px;
	font-weight: 700;
	color: #212529;
	font-variant-numeric: tabular-nums;
}

.tms-live-subs-studio__metric-label {
	font-size: 11px;
	line-height: 1.3;
	color: #868e96;
}

.tms-live-subs-studio__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.tms-live-subs-card {
	border: 1px solid #d8d3c8;
	border-radius: 12px;
	padding: 14px;
	background: #fffcf5;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: none;
}

.tms-live-subs-card--tier-1 {
	border-top: 3px solid #ff9500;
}

.tms-live-subs-card--tier-2 {
	border-top: 3px solid #bf00ff;
}

.tms-live-subs-card--tier-3 {
	border-top: 3px solid #00e676;
}

.tms-live-subs-card__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tms-live-subs-card__title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.tms-live-subs-card__tier {
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.02em;
}

.tms-live-subs-card__preview {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tms-live-subs-card__badge-img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.tms-live-subs-card__badge-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	border-radius: 6px;
	background: #f1f3f5;
	font-size: 12px;
	font-weight: 700;
}

.tms-live-subs-card__name-sample {
	font-weight: 600;
	font-size: 13px;
}

.tms-live-subs-card__toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.tms-live-subs-card__subs {
	margin: 0;
	font-size: 12px;
	color: #868e96;
}

.tms-live-subs-card__warn {
	margin: 0;
	font-size: 12px;
	color: #e67700;
	background: #fff9db;
	padding: 6px 8px;
	border-radius: 6px;
}

.tms-live-subs-card__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: #495057;
	flex: 1;
}

.tms-live-subs-card__field input,
.tms-live-subs-card__field textarea,
.tms-live-subs-card__field select {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	font-size: 13px;
	font-family: inherit;
	background: #fff;
}

.tms-live-subs-card__row {
	display: flex;
	gap: 10px;
}

.tms-live-subs-card__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}

.tms-live-subs-card__save-state {
	font-size: 12px;
	color: #2b8a3e;
}

.tms-live-subs-card__save-state.is-error {
	color: #c92a2a;
}

@media (max-width: 960px) {
	.tms-live-subs-studio__grid {
		grid-template-columns: 1fr;
	}
}

/* —— Watch: Subscribe button + modal —— */
.tms-live-watch__subscribe-btn {
	min-height: 36px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1px solid #212529;
	background: #212529;
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

.tms-live-watch__subscribe-btn:hover {
	background: #343a40;
}

.tms-live-watch__subscribe-btn.is-subscribed {
	background: #fff;
	color: #7950f2;
	border-color: #7950f2;
}

.tms-live-watch__subscribe-btn:focus-visible {
	outline: 2px solid #228be6;
	outline-offset: 2px;
}

html.tms-live-subscribe-open {
	overflow: hidden;
}

.tms-live-subscribe-modal[hidden] {
	display: none !important;
}

.tms-live-subscribe-modal {
	--tms-sub-bg: #121212;
	--tms-sub-surface: #1a1a1a;
	--tms-sub-surface-2: #222;
	--tms-sub-border: #2e2e2e;
	--tms-sub-text: #f5f5f5;
	--tms-sub-muted: #9a9a9a;
	--tms-sub-gold: #e8b84a;
	--tms-sub-gold-hover: #f0c85c;
	--tms-sub-gold-ink: #1a1408;
	--tms-sub-green: #40c057;
	--tms-sub-danger: #ff6b8a;
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.tms-live-subscribe-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.tms-live-subscribe-modal__panel {
	position: relative;
	z-index: 1;
	width: min(640px, 100%);
	max-height: min(92vh, 780px);
	overflow: auto;
	padding: 20px 20px 18px;
	border: 1px solid var(--tms-sub-border);
	border-radius: 20px 20px 0 0;
	background: var(--tms-sub-bg);
	color: var(--tms-sub-text);
	box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.55);
}

.tms-live-subscribe-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.tms-live-subscribe-modal__identity {
	display: flex;
	gap: 12px;
	align-items: center;
	min-width: 0;
}

.tms-live-subscribe-modal__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--tms-sub-border);
	flex-shrink: 0;
	background: var(--tms-sub-surface-2);
}

.tms-live-subscribe-modal__heading {
	min-width: 0;
}

.tms-live-subscribe-modal__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--tms-sub-text);
}

.tms-live-subscribe-modal__page-name {
	margin: 2px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--tms-sub-gold);
}

.tms-live-subscribe-modal__sub {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__close {
	flex-shrink: 0;
	margin: 0;
	padding: 0 4px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--tms-sub-muted);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.tms-live-subscribe-modal__close:hover {
	color: var(--tms-sub-text);
	background: var(--tms-sub-surface-2);
}

.tms-live-subscribe-modal__balance {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0 0 14px;
}

.tms-live-subscribe-modal__balance-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__balance-value {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
	color: var(--tms-sub-text);
}

.tms-live-subscribe-modal__balance-coin {
	display: inline-block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, #ffe08a, var(--tms-sub-gold) 55%, #b8860b);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
	flex-shrink: 0;
}

.tms-live-subscribe-modal__error {
	margin: 0 0 10px;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(201, 42, 42, 0.16);
	color: #ff8787;
	font-size: 13px;
}

.tms-live-subscribe-modal__success {
	margin: 0 0 10px;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(64, 192, 87, 0.14);
	color: var(--tms-sub-green);
	font-size: 13px;
}

.tms-live-subscribe-modal__modes {
	display: flex;
	flex-wrap: nowrap;
	gap: 4px;
	margin: 0 0 16px;
	padding: 4px;
	border-radius: 999px;
	background: var(--tms-sub-surface);
	border: 1px solid var(--tms-sub-border);
	overflow-x: auto;
}

.tms-live-subscribe-modal__mode {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 9px 12px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--tms-sub-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
}

.tms-live-subscribe-modal__mode.is-active {
	background: var(--tms-sub-gold);
	color: var(--tms-sub-gold-ink);
}

.tms-live-subscribe-modal__mode:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.tms-live-subscribe-modal__gift {
	margin: 0 0 16px;
	padding: 12px;
	border: 1px solid var(--tms-sub-border);
	border-radius: 12px;
	background: var(--tms-sub-surface);
}

.tms-live-subscribe-modal__field-label {
	display: block;
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__gift-search,
.tms-live-subscribe-modal__gift-message {
	width: 100%;
	margin-bottom: 8px;
	padding: 10px 12px;
	border: 1px solid var(--tms-sub-border);
	border-radius: 10px;
	background: var(--tms-sub-surface-2);
	color: var(--tms-sub-text);
}

.tms-live-subscribe-modal__gift-search::placeholder,
.tms-live-subscribe-modal__gift-message::placeholder {
	color: #777;
}

.tms-live-subscribe-modal__gift-results {
	display: grid;
	gap: 6px;
	max-height: 180px;
	overflow: auto;
	margin-bottom: 8px;
}

.tms-live-subscribe-modal__gift-result {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 8px;
	border: 1px solid var(--tms-sub-border);
	border-radius: 10px;
	background: var(--tms-sub-bg);
	color: var(--tms-sub-text);
	text-align: left;
	cursor: pointer;
}

.tms-live-subscribe-modal__gift-result.is-selected {
	border-color: var(--tms-sub-gold);
	background: rgba(232, 184, 74, 0.1);
}

.tms-live-subscribe-modal__gift-result img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
}

.tms-live-subscribe-modal__gift-result strong {
	display: block;
	font-size: 13px;
}

.tms-live-subscribe-modal__gift-result span {
	font-size: 11px;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__gift-selected {
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--tms-sub-text);
}

.tms-live-subscribe-modal__community {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid var(--tms-sub-border);
	border-radius: 12px;
	background: var(--tms-sub-surface);
}

.tms-live-subscribe-modal__community-copy {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__qty {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	background: transparent;
}

.tms-live-subscribe-modal__qty-row {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.tms-live-subscribe-modal__qty-label {
	display: inline-block;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	color: var(--tms-sub-text);
}

.tms-live-subscribe-modal__qty-controls {
	display: inline-flex;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	align-items: stretch;
	width: auto;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 1px solid var(--tms-sub-border);
	border-radius: 999px;
	background: var(--tms-sub-surface);
	overflow: hidden;
}

.tms-live-subscribe-modal__qty-btn {
	box-sizing: border-box;
	display: inline-flex !important;
	flex: 0 0 40px !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	height: 40px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent;
	color: var(--tms-sub-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.tms-live-subscribe-modal__qty-btn:hover:not(:disabled) {
	background: var(--tms-sub-surface-2);
	color: var(--tms-sub-gold);
}

.tms-live-subscribe-modal__qty-btn:focus-visible {
	outline: 2px solid var(--tms-sub-gold);
	outline-offset: -2px;
	z-index: 1;
}

.tms-live-subscribe-modal__qty-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.tms-live-subscribe-modal__qty-input {
	box-sizing: border-box;
	flex: 0 0 48px !important;
	width: 48px !important;
	min-width: 48px !important;
	max-width: 48px !important;
	height: 40px;
	margin: 0 !important;
	padding: 0 2px !important;
	border: 0 !important;
	border-left: 1px solid var(--tms-sub-border) !important;
	border-right: 1px solid var(--tms-sub-border) !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--tms-sub-text) !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 40px;
	text-align: center;
	appearance: textfield;
	-moz-appearance: textfield;
}

.tms-live-subscribe-modal__qty-input::-webkit-outer-spin-button,
.tms-live-subscribe-modal__qty-input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.tms-live-subscribe-modal__qty-hint {
	position: relative;
	margin: 10px 0 0;
	padding-left: 12px;
	font-size: 12px;
	font-style: italic;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__qty-hint::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.15em;
	bottom: 0.15em;
	width: 2px;
	border-radius: 2px;
	background: var(--tms-sub-gold);
}

.tms-live-subscribe-modal__tiers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
	margin: 0 0 8px;
}

.tms-live-subscribe-modal__empty {
	margin: 0;
	padding: 16px;
	border-radius: 12px;
	background: var(--tms-sub-surface);
	color: var(--tms-sub-muted);
	font-size: 13px;
}

.tms-live-subscribe-modal__quote-meta {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: grid;
	gap: 6px;
	font-size: 13px;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__quote-meta li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px solid var(--tms-sub-border);
	color: var(--tms-sub-text);
}

.tms-live-subscribe-modal__quote-meta li:last-child {
	border-bottom: none;
}

.tms-live-subscribe-tier {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border: 1px solid var(--tms-sub-border);
	border-radius: 14px;
	background: var(--tms-sub-surface);
	overflow: hidden;
}

.tms-live-subscribe-tier.is-owned {
	border-color: var(--tms-sub-green);
	background:
		radial-gradient(circle at 90% 10%, rgba(64, 192, 87, 0.18), transparent 45%),
		var(--tms-sub-surface);
}

.tms-live-subscribe-tier.is-locked {
	opacity: 0.65;
}

.tms-live-subscribe-tier__status {
	margin-left: auto;
	align-self: flex-start;
	padding: 4px 8px;
	border-radius: 8px;
	background: rgba(64, 192, 87, 0.18);
	color: var(--tms-sub-green);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.tms-live-subscribe-tier__head {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.tms-live-subscribe-tier__badge {
	width: 28px;
	height: 28px;
	object-fit: contain;
	flex-shrink: 0;
}

.tms-live-subscribe-tier__badge-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 24px;
	padding: 0 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	font-weight: 800;
	font-size: 11px;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

.tms-live-subscribe-tier.is-owned .tms-live-subscribe-tier__badge-fallback {
	background: rgba(64, 192, 87, 0.16);
}

.tms-live-subscribe-tier__meta {
	min-width: 0;
	flex: 1 1 auto;
}

.tms-live-subscribe-tier__name {
	display: block;
	font-size: 15px;
	font-weight: 700;
}

.tms-live-subscribe-tier__price {
	margin: 6px 0 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--tms-sub-text);
}

.tms-live-subscribe-tier__period {
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-tier__desc {
	margin: 0;
	font-size: 13px;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-tier__benefits {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-tier__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 42px;
	margin: auto 0 0;
	padding: 10px 14px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.tms-live-subscribe-tier__action--primary {
	background: var(--tms-sub-gold);
	border-color: var(--tms-sub-gold);
	color: var(--tms-sub-gold-ink);
}

.tms-live-subscribe-tier__action--primary:hover:not(:disabled) {
	background: var(--tms-sub-gold-hover);
	border-color: var(--tms-sub-gold-hover);
}

.tms-live-subscribe-tier__action--outline {
	background: transparent;
	border-color: #5a5a5a;
	color: var(--tms-sub-text);
}

.tms-live-subscribe-tier__action--outline:hover:not(:disabled) {
	border-color: var(--tms-sub-gold);
	color: var(--tms-sub-gold);
}

.tms-live-subscribe-tier__action--owned {
	background: rgba(64, 192, 87, 0.18);
	border-color: transparent;
	color: var(--tms-sub-green);
	cursor: default;
}

.tms-live-subscribe-tier__action--muted {
	background: var(--tms-sub-surface-2);
	border-color: var(--tms-sub-border);
	color: var(--tms-sub-muted);
	cursor: not-allowed;
}

.tms-live-subscribe-tier__action:disabled {
	opacity: 1;
}

.tms-live-subscribe-modal__charge {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--tms-sub-text);
}

.tms-live-subscribe-modal__confirm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.tms-live-subscribe-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	margin: 0;
	padding: 10px 16px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.tms-live-subscribe-modal__btn--primary {
	background: var(--tms-sub-gold);
	border-color: var(--tms-sub-gold);
	color: var(--tms-sub-gold-ink);
}

.tms-live-subscribe-modal__btn--primary:hover:not(:disabled) {
	background: var(--tms-sub-gold-hover);
}

.tms-live-subscribe-modal__btn--primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.tms-live-subscribe-modal__btn--ghost {
	background: transparent;
	border-color: var(--tms-sub-border);
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__btn--ghost:hover {
	color: var(--tms-sub-text);
	border-color: #4a4a4a;
}

.tms-live-subscribe-modal__btn--danger-outline {
	background: transparent;
	border-color: var(--tms-sub-danger);
	color: var(--tms-sub-danger);
	white-space: nowrap;
}

.tms-live-subscribe-modal__btn--danger-outline:hover {
	background: rgba(255, 107, 138, 0.1);
}

.tms-live-subscribe-modal__manage {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin: 16px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--tms-sub-border);
}

.tms-live-subscribe-modal__manage-text {
	flex: 1 1 200px;
	min-width: 0;
}

.tms-live-subscribe-modal__manage-title {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	color: var(--tms-sub-text);
}

.tms-live-subscribe-modal__manage p {
	margin: 0;
	width: auto;
	font-size: 12px;
	line-height: 1.45;
	color: var(--tms-sub-muted);
}

.tms-live-subscribe-modal__disclaimer {
	margin: 14px 0 0;
	font-size: 11px;
	line-height: 1.45;
	color: #6b6b6b;
}

@media (min-width: 720px) {
	.tms-live-subscribe-modal {
		align-items: center;
	}

	.tms-live-subscribe-modal__panel {
		border-radius: 18px;
		max-height: min(86vh, 740px);
	}
}

@media (max-width: 520px) {
	.tms-live-subscribe-modal__qty-row {
		flex-wrap: wrap;
	}

	.tms-live-subscribe-modal__mode {
		font-size: 11px;
		padding: 8px 10px;
	}
}

@media (max-width: 480px) {
	.tms-live-watch__channel-actions {
		flex-wrap: wrap;
	}

	.tms-live-watch__subscribe-btn {
		flex: 1 1 auto;
	}
}
