@charset "utf-8";

/* ============================================================
   mmain18 — 모던 FM 스테이션형
   좌우 분할 + 주파수 드래그 채널 전환 인터랙션
   ============================================================ */

:root {
	--fm-panel: #ffffff;
	--fm-red: #e8002d;
	--fm-ink: #0a0a0a;
	--fm-muted: #888888;
	--fm-rule: #e8e8e8;
	--fm-track: rgba(0, 0, 0, 0.12);
}

body {
	background: var(--fm-panel);
}

body.page-light-header #header,
body.page-light-header #header.on,
body.page-light-header #header.act {
	background-color: var(--fm-panel) !important;
}

/* ── 분할 레이아웃 ── */
.fm-layout {
	display: flex;
	min-height: 100vh;
	padding-top: 90px;
}

/* ── 좌: 라디오 패널 ── */
.fm-panel {
	width: 50%;
	min-height: calc(100vh - 90px);
	background: var(--fm-panel);
	border-right: 1px solid var(--fm-rule);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 40px 52px;
	gap: 20px;
	position: sticky;
	top: 90px;
	height: calc(100vh - 90px);
	overflow-y: auto;
}

.fm-panel-hd {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.fm-brand {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-muted);
	font-weight: 500;
}
.fm-live {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-red);
	font-weight: 700;
}
.fm-live-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--fm-red);
	animation: fm-blink 1.2s ease-in-out infinite;
}
@keyframes fm-blink {
	0%,
	45% {
		opacity: 1;
	}
	55%,
	100% {
		opacity: 0.2;
	}
}

/* 채널 표시 */
.fm-station-row {
	display: flex;
	align-items: center;
}
.fm-ch-tag {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-red);
	font-weight: 700;
}

/* 카테고리 큰 표시 */
.fm-cat-display {
	overflow: hidden;
}
.fm-cat-big {
	display: block;
	font-size: clamp(40px, calc(14px + 5vw), 78px);
	color: var(--fm-ink);
	font-weight: 700;
	transition: opacity 0.2s;
}
.fm-cat-big.is-changing {
	opacity: 0.15;
}

/* 현재 기사 부제 */
.fm-subtitle {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-muted);
	border-left: 2px solid var(--fm-red);
	padding-left: 12px;
	transition: opacity 0.2s;
}

/* Canvas 파형 */
.fm-canvas {
	width: 100%;
	height: 48px;
	display: block;
}

/* ── 드래그 다이얼 ── */
.fm-dial-zone {
	cursor: grab;
	user-select: none;
}
.fm-dial-zone.is-dragging {
	cursor: grabbing;
}

.fm-dial-track {
	position: relative;
	height: 52px;
	display: flex;
	align-items: flex-start;
	padding-top: 8px;
}
.fm-dial-track::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: var(--fm-track);
	transform: translateY(-50%);
}

/* JS 주입 tick */
.fm-tick {
	position: absolute;
	top: 8px;
	transform: translateX(-50%);
	width: 1px;
	height: 10px;
	background: rgba(0, 0, 0, 0.15);
}
.fm-tick--major {
	height: 18px;
	background: rgba(0, 0, 0, 0.3);
}

/* 바늘 */
.fm-needle {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--fm-red);
	transform: translateX(-50%);
	box-shadow: 0 0 8px rgba(232, 0, 45, 0.5);
	will-change: left;
}
.fm-needle::before {
	content: "";
	position: absolute;
	top: -5px;
	left: 50%;
	transform: translateX(-50%);
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--fm-red);
}

.fm-dial-hint {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: rgba(0, 0, 0, 0.25);
	margin-top: 4px;
}

/* ── 프리셋 버튼 ── */
.fm-presets {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.fm-preset {
	padding: 7px 13px;
	background: transparent;
	border: 1px solid var(--fm-rule);
	border-radius: 4px;
	color: var(--fm-muted);
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	cursor: pointer;
	transition:
		border-color 0.2s,
		color 0.2s,
		background 0.2s;
	font-variant-numeric: tabular-nums;
}
.fm-preset:hover {
	border-color: rgba(0, 0, 0, 0.35);
	color: var(--fm-ink);
}
.fm-preset--on {
	border-color: var(--fm-red);
	color: var(--fm-red);
	background: rgba(232, 0, 45, 0.06);
}

/* ── 편성 가이드 ── */
.fm-guide {
	border-top: 1px solid var(--fm-rule);
}
.fm-guide-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	border-bottom: 1px solid var(--fm-rule);
	cursor: pointer;
	transition: background 0.15s;
}
.fm-guide-row:hover {
	background: #f5f5f5;
}
.fm-guide-row--on {
	background: rgba(232, 0, 45, 0.05);
}
.fm-guide-cat {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-muted);
	width: 180px;
	flex-shrink: 0;
}
.fm-guide-row--on .fm-guide-cat {
	color: var(--fm-ink);
	font-weight: 600;
}
.fm-guide-title {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.fm-guide-row--on .fm-guide-title {
	color: var(--fm-ink);
}

/* ── 우: 기사 콘텐츠 ── */
.fm-content {
	width: 50%;
	min-height: calc(100vh - 90px);
	position: relative;
	overflow: hidden;
}

.fm-art {
	width: 100%;
	height: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
}
.fm-art-img-wrap {
	flex: 1;
	overflow: hidden;
}
.fm-art-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.8s ease;
}
.fm-art:hover .fm-art-img {
	transform: scale(1.04);
}

.fm-art-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 48px 52px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
	color: #fff;
}
.fm-art-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}
.fm-art-ch {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-red);
	font-weight: 700;
}
.fm-art-cat {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: rgba(255, 255, 255, 0.6);
}
.fm-art-tit {
	font-size: clamp(22px, calc(14px + 2vw), 40px);
	color: #fff;
	font-weight: 700;
	margin-bottom: 12px;
}
.fm-art-exc {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: rgba(255, 255, 255, 0.72);
	margin-bottom: 24px;
}
.fm-art-btn {
	display: inline-block;
	padding: 12px 28px;
	background: var(--fm-red);
	color: #fff;
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	font-weight: 600;
	text-decoration: none;
	border-radius: 4px;
	transition: opacity 0.2s;
}
.fm-art-btn:hover {
	opacity: 0.85;
}

/* ── CTA ── */
.fm-cta {
	background: #f8f8f8;
	padding: 80px 0;
	border-top: 1px solid var(--fm-rule);
}
.fm-cta-inner {
	max-width: 540px;
	margin: 0 auto;
	text-align: center;
	padding: 0 24px;
}
.fm-cta-tag {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-red);
	font-weight: 600;
	margin-bottom: 16px;
}
.fm-cta-tit {
	font-size: clamp(22px, calc(14px + 2vw), 40px);
	color: var(--fm-ink);
	font-weight: 700;
	margin-bottom: 12px;
}
.fm-cta-desc {
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	color: var(--fm-muted);
	margin-bottom: 32px;
}
.fm-cta-form {
	display: flex;
	max-width: 420px;
	margin: 0 auto;
}
.fm-cta-input {
	flex: 1;
	padding: 14px 20px;
	border: 1px solid #ddd;
	border-right: none;
	border-radius: 4px 0 0 4px;
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	outline: none;
	color: var(--fm-ink);
	background: #fff;
}
.fm-cta-input:focus {
	border-color: var(--fm-red);
}
.fm-cta-input::placeholder {
	color: #bbb;
}
.fm-cta-btn {
	padding: 14px 24px;
	background: var(--fm-red);
	border: 1px solid var(--fm-red);
	border-radius: 0 4px 4px 0;
	color: #fff;
	font-size: clamp(14px, calc(10px + 0.8vw), 18px);
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 0.2s;
}
.fm-cta-btn:hover {
	opacity: 0.85;
}

/* ═══════════════════════════════════════════
   반응형
   ═══════════════════════════════════════════ */
@media (max-width: 999px) {
	.fm-layout {
		padding-top: 70px;
		flex-direction: column;
		min-height: none;
	}
	.fm-panel {
		width: 100%;
		height: auto;
		min-height: auto;
		position: static;
		padding: 32px 24px;
		gap: 16px;
		overflow-y: visible;
	}
	.fm-content {
		width: 100%;
		aspect-ratio: 16 / 7;
		min-height: auto;
	}
	.fm-art-info {
		padding: 32px;
	}
	.fm-guide {
		display: none;
	}
}

@media (max-width: 768px) {
	.fm-panel {
		padding: 28px 20px;
		gap: 14px;
	}
	.fm-art-info {
		padding: 24px;
	}
	.fm-cta {
		padding: 48px 0;
	}
	.fm-cta-form {
		flex-direction: column;
	}
	.fm-cta-input {
		border-right: 1px solid #ddd;
		border-bottom: none;
		border-radius: 4px 4px 0 0;
	}
	.fm-cta-btn {
		border-radius: 0 0 4px 4px;
	}
}

@media (max-width: 499px) {
	.fm-panel {
		padding: 20px 16px;
		gap: 12px;
	}
	.fm-art-info {
		padding: 20px;
	}
	.fm-presets {
		gap: 5px;
	}
	.fm-preset {
		padding: 6px 10px;
	}
}

/* ── 다크모드 ── */
body.dark .fm-panel {
	background: #111;
	border-right-color: #222;
}
body.dark .fm-brand {
	color: rgba(255, 255, 255, 0.45);
}
body.dark .fm-cat-tag {
	color: rgba(255, 255, 255, 0.45);
}
body.dark .fm-cat-big {
	color: rgba(255, 255, 255, 0.92);
}
body.dark .fm-subtitle {
	color: rgba(255, 255, 255, 0.45);
}
body.dark .fm-dial-track::before {
	background: rgba(255, 255, 255, 0.12);
}
body.dark .fm-tick {
	background: rgba(255, 255, 255, 0.15);
}
body.dark .fm-tick--major {
	background: rgba(255, 255, 255, 0.3);
}
body.dark .fm-dial-labels span {
	color: rgba(255, 255, 255, 0.3);
}
body.dark .fm-dial-hint {
	color: rgba(255, 255, 255, 0.2);
}
body.dark .fm-preset {
	border-color: #333;
	color: rgba(255, 255, 255, 0.45);
}
body.dark .fm-preset:hover {
	border-color: #555;
	color: #fff;
}
body.dark .fm-guide {
	border-top-color: #222;
}
body.dark .fm-guide-row {
	border-bottom-color: #222;
}
body.dark .fm-guide-row:hover {
	background: #1a1a1a;
}
body.dark .fm-guide-row--on {
	background: rgba(232, 0, 45, 0.08);
}
body.dark .fm-guide-freq,
body.dark .fm-guide-cat,
body.dark .fm-guide-title {
	color: rgba(255, 255, 255, 0.4);
}
body.dark .fm-guide-row--on .fm-guide-cat,
body.dark .fm-guide-row--on .fm-guide-title {
	color: rgba(255, 255, 255, 0.85);
}
body.dark .fm-cta {
	background: #0d0d0d;
	border-top-color: #222;
}
body.dark .fm-cta-tit {
	color: rgba(255, 255, 255, 0.9);
}
body.dark .fm-cta-desc {
	color: rgba(255, 255, 255, 0.45);
}
body.dark .fm-cta-input {
	background: #1a1a1a;
	border-color: #333;
	color: #fff;
}
body.dark .fm-cta-input::placeholder {
	color: #555;
}
body.dark .fm-cta-input:focus {
	border-color: var(--fm-red);
}
