/* Pretendard JP (Japanese Optimized) - with font-display: optional to prevent layout shifting and flicker */
@font-face {
	font-family: 'Pretendard JP';
	font-weight: 900;
	font-display: optional;
	src: local('Pretendard JP Black'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-Black.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-Black.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard JP';
	font-weight: 800;
	font-display: optional;
	src: local('Pretendard JP ExtraBold'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-ExtraBold.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-ExtraBold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard JP';
	font-weight: 700;
	font-display: optional;
	src: local('Pretendard JP Bold'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-Bold.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-Bold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard JP';
	font-weight: 600;
	font-display: optional;
	src: local('Pretendard JP SemiBold'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-SemiBold.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-SemiBold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard JP';
	font-weight: 500;
	font-display: optional;
	src: local('Pretendard JP Medium'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-Medium.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-Medium.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard JP';
	font-weight: 400;
	font-display: optional;
	src: local('Pretendard JP Regular'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-Regular.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-Regular.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard JP';
	font-weight: 300;
	font-display: optional;
	src: local('Pretendard JP Light'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-Light.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-Light.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard JP';
	font-weight: 200;
	font-display: optional;
	src: local('Pretendard JP ExtraLight'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-ExtraLight.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-ExtraLight.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard JP';
	font-weight: 100;
	font-display: optional;
	src: local('Pretendard JP Thin'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff2/PretendardJP-Thin.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard-jp/dist/web/static/woff/PretendardJP-Thin.woff') format('woff');
}

/* Pretendard (Standard) - with font-display: optional to prevent layout shifting and flicker */
@font-face {
	font-family: 'Pretendard';
	font-weight: 900;
	font-display: optional;
	src: local('Pretendard Black'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-Black.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-Black.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 800;
	font-display: optional;
	src: local('Pretendard ExtraBold'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-ExtraBold.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-ExtraBold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 700;
	font-display: optional;
	src: local('Pretendard Bold'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-Bold.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-Bold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 600;
	font-display: optional;
	src: local('Pretendard SemiBold'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-SemiBold.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-SemiBold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 500;
	font-display: optional;
	src: local('Pretendard Medium'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-Medium.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-Medium.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 400;
	font-display: optional;
	src: local('Pretendard Regular'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-Regular.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-Regular.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 300;
	font-display: optional;
	src: local('Pretendard Light'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-Light.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-Light.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 200;
	font-display: optional;
	src: local('Pretendard ExtraLight'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-ExtraLight.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-ExtraLight.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 100;
	font-display: optional;
	src: local('Pretendard Thin'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff2/Pretendard-Thin.woff2') format('woff2'), 
	     url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/static/woff/Pretendard-Thin.woff') format('woff');
}

:root {
	--bg-color: #0a0e27;
	--panel-bg: #1e2139;
	--text-color: #e8eaed;
	--text-sub: #b0b3c1;
	--highlight: #00A7E9;
	--highlight-hover: #00c4ff;
	--card-bg: #15182e;
	--card-hover: #1e2139;
	--card-selected: #2a2d45;
	--shadow: rgba(0, 0, 0, 0.4);
}

* {
	box-sizing: border-box;
	-webkit-user-select: none;
	user-select: none;
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	font-family: "Pretendard JP", sans-serif;
	background: var(--bg-color);
	color: var(--text-color);
	touch-action: pan-x pan-y;
}

/* --- Layout --- */
.app-container {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* --- Player Module (Top) --- */
.player-module {
	flex-shrink: 0;
	background: var(--panel-bg);
	height: 160px;
	padding: 8px 16px;
	box-shadow: 0 4px 12px var(--shadow);
	z-index: 100;
	display: flex;
	flex-direction: column;
}

/* Top Row: Title & Logo */
.player-top-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	width: 100%;
	margin-bottom: 0px;
}

/* Bottom Row: Controls & Photo */
.player-bottom-row {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex: 1;
	width: 100%;
	margin-bottom: 4px;
}

/* Visual Container Bottom */
.visual-bottom-container {
	position: absolute;
	right: 0;
	bottom: 8px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	flex-shrink: 0;
}

/* Hide channel name text in control panel */
#channel-name-text {
	display: none !important;
}

.p-photo {
	height: 80px;
	width: auto;
	object-fit: contain;
	background: none;
	border-radius: 4px;
}

.p-photo {
	height: 80px;
	width: auto;
	object-fit: contain;
	background: none;
	border-radius: 4px;
}

.p-logo {
	display: block;
	margin-bottom: 0;
	height: 36px;
	/* Standard sizing based on Tokyo FM */
	width: 72px;
	object-fit: contain;
	background: white;
	padding: 1px;
	border-radius: 4px;
	filter: none;
}

.progress-hitbox {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 20;
	cursor: pointer;
}

/* Info */
.info-group {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	margin-right: 100px;
	/* Space for photo on the right */
	overflow: hidden;
	/* Ensure container clips */
}

#program-title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	cursor: pointer;
	/* Indicate clickable */
}

#program-performer {
	margin: 2px 0 0 0;
	font-size: 0.85rem;
	font-weight: 400;
	color: var(--text-sub);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	cursor: pointer;
}

#program-date {
	margin: 2px 0 0 0;
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--highlight);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}

/* Marquee Animation */
.marquee-content {
	display: flex;
	width: fit-content;
	animation: scroll-left linear 1;
}

.marquee-content span {
	padding-right: 3rem;
	white-space: nowrap;
}

@keyframes scroll-left {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

/* Controls Group */
.controls-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ctl-btn {
	background: none;
	border: none;
	color: var(--text-color);
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.ctl-btn:disabled {
	opacity: 0.3;
	cursor: default;
}

.ctl-btn.lg {
	font-size: 2.5rem;
	color: var(--highlight);
}

.ctl-btn.lg:hover:not(:disabled) {
	transform: scale(1.1);
	color: var(--highlight-hover);
}

.ctl-btn.sm {
	font-size: 1.4rem;
	color: var(--text-sub);
}

.ctl-btn.sm:hover:not(:disabled) {
	color: #fff;
}

/* Heart button - positioned close to photo */
#heartBtn {
	margin-left: 8px;
	/* Add spacing between +30sec and heart */
}

.sub-controls {
	display: none;
	/* Hidden as per request to move buttons */
}

.ctl-icon {
	background: none;
	border: none;
	color: var(--text-sub);
	cursor: pointer;
	font-size: 1.4rem;
	opacity: 0.7;
}

.ctl-icon:hover {
	opacity: 1;
	color: var(--highlight);
}

/* Progress */
.progress-container {
	display: flex;
	align-items: center;
	gap: 10px;
}

.time-label {
	font-size: 0.75rem;
	color: var(--text-sub);
	font-variant-numeric: tabular-nums;
	width: 35px;
	text-align: center;
}

.progress-bar-wrapper {
	flex: 1;
	height: 6px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
	position: relative;
	overflow: hidden;
	/* For fill */
}

.progress-fill {
	height: 100%;
	background: var(--highlight);
	width: 0%;
	border-radius: 3px;
	transition: width 0.1s linear;
}

/* --- Content Area --- */
.content-area {
	flex: 1;
	overflow-y: hidden !important;
	/* Changed from auto to hidden for independent scrolling */
	position: relative;
	padding: 0;
}

/* Scrollbar - Apply to all scrollable elements */
::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.4);
}

/* Make views scroll independently */
.view {
	height: 100%;
}

.station-list,
#schedule-view,
#follows-view,
#search-view {
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* Station List */
.station-list {
	display: flex;
	flex-direction: column;
}

/* Area Filter Bar - sticky inside the station-list scroll container */
.area-filter-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--panel-bg);
	position: sticky;
	top: 0;
	z-index: 20;
	box-shadow: 0 2px 8px var(--shadow);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	flex-shrink: 0;
}

.area-filter-select {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	padding: 2px 4px;
	cursor: pointer;
	border-radius: 4px;
	outline: none;
	flex: 1;
}

.area-filter-select:hover {
	background: rgba(255, 255, 255, 0.05);
}

.area-filter-select option {
	background: var(--panel-bg);
	color: var(--text-color);
}


.station-card {
	display: flex;
	align-items: center;
	height: 72px;
	padding: 0 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	cursor: pointer;
	background: var(--card-bg);
	transition: background 0.2s;
	flex-shrink: 0;
	/* Prevent shrinking in scroll container */
	position: relative;
	overflow: hidden;
}

.station-card:hover {
	background: var(--card-hover);
}

.station-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background: var(--card-selected);
	z-index: 1;
	transform: translateX(-100%);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.station-card.selected::before {
	transform: translateX(0);
	opacity: 1;
}

.station-card.selected {
	background: var(--card-selected);
}

.station-card.selected::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: var(--highlight);
	z-index: 3;
	pointer-events: none;
}

.station-card.loading::before {
	opacity: 1;
	animation: loadProgressFill 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes loadProgressFill {
	0% {
		transform: translateX(-100%);
	}
	80% {
		transform: translateX(-15%);
	}
	100% {
		transform: translateX(0%);
	}
}

.card-logo {
	width: 72px;
	/* Standard Size */
	height: 36px;
	/* 2:1 ratio for wide logos */
	object-fit: contain;
	border-radius: 4px;
	flex-shrink: 0;
	margin-right: 16px;
	/* Solid rectangular white background */
	background: white;
	padding: 1px;
	filter: none;
	position: relative;
	z-index: 2;
}

.card-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
	/* Prevent font-swap from reflowing parent */
	will-change: contents;
	contain: content;
	position: relative;
	z-index: 2;
}

.card-name {
	font-size: 1.1rem;
	font-weight: 600;
	color: #fff;
	/* 22px is the fixed pixel slot — system-font and Pretendard JP
	   both render under this height, so no jump on font-swap */
	height: 22px;
	line-height: 22px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-shrink: 0;
}

.card-prog {
	font-size: 0.85rem;
	/* 17px fixed slot matches both system and Pretendard JP at 0.85rem */
	height: 17px;
	line-height: 17px;
	color: var(--text-sub);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-shrink: 0;
}

/* Schedule View */
#schedule-view.hidden {
	display: none;
}

#schedule-view {
	background: var(--bg-color);
	min-height: 100%;
}

.schedule-header {
	padding: 10px 16px;
	background: var(--panel-bg);
	display: flex;
	flex-direction: column;
	gap: 8px;
	position: sticky;
	top: 0;
	z-index: 10;
	box-shadow: 0 2px 8px var(--shadow);
}

.schedule-header-controls {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.back-btn {
	background: none;
	border: none;
	color: var(--highlight);
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	padding: 4px 8px;
	border-radius: 4px;
}

.back-btn:hover {
	background: rgba(0, 167, 233, 0.1);
}

.station-dropdown {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 1.1rem;
	font-weight: 700;
	padding: 4px 8px;
	flex: 1;
	min-width: 0;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	cursor: pointer;
	border-radius: 4px;
	outline: none;
}

.station-dropdown:hover {
	background: rgba(255, 255, 255, 0.05);
}

.station-dropdown option {
	background: var(--panel-bg);
	color: var(--text-color);
}

.date-select {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 4px 6px;
	cursor: pointer;
	border-radius: 4px;
	outline: none;
	flex-shrink: 0;
}

.date-select:hover {
	background: rgba(255, 255, 255, 0.05);
}

.date-select option {
	background: var(--panel-bg);
	color: var(--text-color);
}

.schedule-search-toggle-btn {
	background: transparent;
	border: none;
	color: var(--highlight, #00a7e9);
	font-size: 1.2rem;
	padding: 4px 8px;
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.2s, color 0.2s;
}

.schedule-search-toggle-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.search-box-row {
	width: 100%;
}

.search-box-row.hidden {
	display: none;
}

.schedule-header h3 {
	margin: 0;
	font-size: 1rem;
	color: #fff;
}

.schedule-list {
	padding-bottom: 20px;
}

/* Program Item (Schedule) */
.program-item {
	display: flex;
	align-items: center;
	height: 72px;
	padding: 0 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	background: var(--card-bg);
	position: relative;
}

.program-item.current {
	background: var(--card-selected);
}

.program-item.current::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: var(--highlight);
	z-index: 3;
	pointer-events: none;
}

.program-item.past {
	opacity: 0.7;
}

/* New Program Item Design (Reference App Style) */
.program-item-new {
	display: flex;
	align-items: center;
	padding: 0 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background: var(--card-bg);
	gap: 12px;
	height: 72px;
	/* Match live channel card height */
	position: relative;
}

.program-item-new.current {
	background: var(--card-selected);
}

.program-item-new.current::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: var(--highlight);
	z-index: 3;
	pointer-events: none;
}

/* Removed opacity for past items per user request */
.program-item-new.past {
	opacity: 1;
}

.program-item-new:active {
	background: var(--card-hover);
}

/* Program Photo Thumbnail - 16:9 ratio */
.prog-photo {
	width: 96px;
	/* 16:9 ratio at 54px height */
	height: 54px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.05);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	/* For heart badge positioning */
}

.prog-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Logo styling - solid white outline, sharp edges, fits shape */
.prog-photo img.logo-img {
	width: 72px !important;
	height: 36px !important;
	object-fit: contain;
	/* Solid white background */
	background: white;
	filter: none;
	padding: 1px;
}

.prog-photo-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(0, 167, 233, 0.1), rgba(0, 167, 233, 0.05));
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Heart badge on photo */
.prog-heart-badge {
	position: absolute;
	top: 4px;
	left: 4px;
	color: #ff4081;
	font-size: 14px;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
}

/* Program Info Section */
.prog-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	overflow: hidden;
	/* Prevent text overflow */
}

.prog-station {
	font-size: 0.75rem;
	color: var(--highlight);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.prog-time {
	font-size: 0.8rem;
	color: var(--text-sub);
	font-weight: 500;
}

.prog-title-new {
	font-size: 0.95rem;
	color: var(--text-color);
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	/* Single line */
}

.prog-performer {
	font-size: 0.8rem;
	color: var(--text-sub);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Program Actions */
.prog-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-shrink: 0;
}

.prog-play-btn,
.prog-delete-btn {
	background: none;
	border: none;
	color: var(--highlight);
	font-size: 32px;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s;
}

.prog-delete-btn {
	color: #ff6b6b;
	font-size: 24px;
}

.prog-play-btn:active,
.prog-delete-btn:active {
	transform: scale(0.9);
}

.prog-play-btn.played {
	opacity: 0.3;
}

/* Resume badge on program photo */
.resume-badge {
	position: absolute;
	bottom: 4px;
	right: 4px;
	background: rgba(0, 167, 233, 0.85);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	padding: 2px 5px;
	border-radius: 4px;
	z-index: 2;
	letter-spacing: 0.3px;
}

/* Has-resume play button - slightly different color */
.prog-play-btn.has-resume {
	color: #00c4ff;
}

/* Live broadcast button */
.prog-play-btn.live-btn {
	color: #ff4081;
	animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.6;
	}
}


/* Follows Item - uses same sizing as schedule */

.time-col {
	width: 50px;
	font-size: 0.8rem;
	color: var(--highlight);
	font-weight: 600;
	flex-shrink: 0;
	text-align: right;
	margin-right: 12px;
}

.prog-content {
	flex: 1;
	min-width: 0;
}

.prog-title {
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 4px;
	color: #fff;
}

.prog-pfm {
	font-size: 0.8rem;
	color: var(--text-sub);
}

.action-col {
	margin-left: 8px;
	display: flex;
	align-items: center;
}

.time-free-btn {
	background: var(--highlight);
	color: #fff;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1rem;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.time-free-btn:hover {
	transform: scale(1.1);
	background: var(--highlight-hover);
}

/* --- Bottom Navigation --- */
.bottom-nav {
	flex-shrink: 0;
	height: 60px;
	background: var(--panel-bg);
	display: flex;
	justify-content: space-around;
	align-items: center;
	box-shadow: 0 -2px 10px var(--shadow);
	z-index: 100;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
	background: none;
	border: none;
	color: var(--text-sub);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	gap: 4px;
	flex: 1;
	height: 100%;
	transition: color 0.2s;
}

.nav-item i {
	font-size: 1.4rem;
	margin-bottom: 2px;
}

.nav-item:hover {
	color: #fff;
}

.nav-item.active {
	color: var(--highlight);
}

/* Title Bar - hidden or overlaid */
.title-bar {
	display: none;
}

/* User didn't ask for it, "modular on top" replaces it */
.hidden {
	display: none !important;
}

/* Exit Toast Animations */
@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateX(-50%) translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

@keyframes fadeOut {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
	}
}

/* ─── Channel Simplifier: Toggle Switch ─────────────────────────────────── */
.tv-toggle-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex-shrink: 0;
	cursor: pointer;
}

.tv-toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.tv-toggle-slider {
	position: absolute;
	inset: 0;
	background: #444;
	border-radius: 26px;
	transition: background 0.25s;
}

.tv-toggle-slider::before {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.25s;
}

.tv-toggle-switch input:checked + .tv-toggle-slider {
	background: #00BFFF;
}

.tv-toggle-switch input:checked + .tv-toggle-slider::before {
	transform: translateX(20px);
}

/* ─── Channel Simplifier: Source badge on grid thumbnail ─────────────────── */
.source-badge {
	position: absolute;
	top: 4px;
	right: 4px;
	background: rgba(0, 191, 255, 0.88);
	color: #000;
	font-size: 9px;
	font-weight: 700;
	padding: 1px 5px;
	border-radius: 4px;
	line-height: 14px;
	pointer-events: none;
	letter-spacing: 0.3px;
	z-index: 50;
}

/* ─── Channel Simplifier: Source-switch notification banner ──────────────── */
#source-switch-banner {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.78);
	color: #00BFFF;
	font-size: 15px;
	font-weight: 700;
	padding: 10px 22px;
	border-radius: 10px;
	border: 1px solid rgba(0, 191, 255, 0.3);
	opacity: 0;
	transition: opacity 0.3s;
	pointer-events: none;
	z-index: 40;
	white-space: nowrap;
	letter-spacing: 0.5px;
}