/* ============================================
   에디터 공용 스타일 (TinyMCE + 모달)
   ============================================ */

/* ── TinyMCE 기본 ── */
.tox.tox-tinymce {
	border-radius: 0 !important;
	border: 1px solid #d1d5db !important;
}

.tox .tox-tbtn {
	font-size: 13px !important;
}

.tox .tox-tbtn--select,
.tox .tox-tbtn--bespoke {
	max-width: 100px !important;
}

/* ── TinyMCE 퀵바 ── */
.tox-pop .tox-toolbar {
	border: none !important;
}

.tox .tox-pop::before,
.tox .tox-pop::after,
.tox .tox-pop.tox-pop--bottom::before,
.tox .tox-pop.tox-pop--bottom::after {
	display: none !important;
}

.tox .tox-pop__dialog {
	border: 1px solid #d1d5db !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
	border-radius: 8px !important;
}

/* ── TinyMCE 다이얼로그 ── */
.tox .tox-dialog-wrap__backdrop {
	background: rgba(0, 0, 0, 0.45) !important;
}

.tox .tox-dialog {
	border-radius: 12px !important;
	border: none !important;
	overflow: hidden !important;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

.tox .tox-dialog__header {
	background: linear-gradient(135deg, #4a6cf7, #6366f1) !important;
	color: #fff !important;
	padding: 14px 20px !important;
	border-bottom: none !important;
}

.tox .tox-dialog__header .tox-dialog__title {
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.3px !important;
}

.tox .tox-dialog__title svg {
	vertical-align: -4px;
	margin-right: 6px;
}

.tox .tox-dialog__header .tox-button--naked {
	background: rgba(255, 255, 255, 0.2) !important;
	border: none !important;
	color: #fff !important;
	border-radius: 50% !important;
	width: 28px !important;
	height: 28px !important;
	padding: 0 !important;
}

.tox .tox-dialog__header .tox-button--naked:hover {
	background: rgba(255, 255, 255, 0.35) !important;
}

.tox .tox-dialog__header .tox-button--naked svg {
	fill: #fff !important;
}

.tox .tox-dialog__body {
	padding: 20px !important;
	overflow: hidden !important;
}

.tox .tox-dialog__body-content {
	padding: 0 !important;
	overflow: hidden !important;
}

.tox .tox-dialog__footer {
	border-top: 1px solid #e5e7eb !important;
	padding: 12px 20px !important;
	background: #f9fafb !important;
}

.tox .tox-dialog__footer .tox-button:not(.tox-button--secondary) {
	background: #4a6cf7 !important;
	border-color: #4a6cf7 !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
}

.tox .tox-dialog__footer .tox-button:not(.tox-button--secondary):hover {
	background: #3b5de7 !important;
}

.tox .tox-dialog__footer .tox-button--secondary {
	border: 1px solid #d1d5db !important;
	background: #fff !important;
	color: #374151 !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
}

.tox .tox-dialog__footer .tox-button--secondary:hover {
	background: #f3f4f6 !important;
}

/* ── TinyMCE 툴팁 ── */
.tox .tox-tooltip {
	animation: edm-tooltip-up 0.12s ease-out !important;
}

.tox .tox-tooltip__body {
	background: #1f2937 !important;
	color: #fff !important;
	border-radius: 6px !important;
	font-size: 12px !important;
	padding: 5px 10px !important;
	font-weight: 500 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
	letter-spacing: 0.2px !important;
}

@keyframes edm-tooltip-up {
	from {
		transform: translateY(6px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* ── 커스텀 JS 툴팁 ── */
.tmce-custom-tooltip {
	position: fixed;
	z-index: 100000;
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .12s ease-out, transform .12s ease-out;
	display: none;
}

.tmce-custom-tooltip.visible {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

.tmce-custom-tooltip__body {
	background: #1f2937;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	padding: 5px 10px;
	border-radius: 6px;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
	letter-spacing: .2px;
}

.tmce-custom-tooltip__arrow {
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid #1f2937;
	margin: 0 auto;
}

.tox .tox-statusbar a,
.tox .tox-statusbar__path-item,
.tox .tox-statusbar__wordcount {
	font-size: 12px !important;
}

/* ── Textarea 모드 ── */
textarea.editor-textarea {
	width: 100%;
	min-height: 400px;
	padding: 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	resize: vertical;
}

textarea.editor-textarea:focus {
	outline: none;
	border-color: #4a6cf7;
	box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}


/* ═══════════════════════════════════════════════
   공통 모달 (.edm-*)
   ═══════════════════════════════════════════════ */

@keyframes edm-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes edm-slide-up {
	from {
		transform: translateY(20px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.edm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	animation: edm-fade-in .2s ease;
}

.edm-hidden {
	display: none !important;
}

.edm-container {
	background: #fff;
	border-radius: 10px;
	max-width: 95vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
	overflow: hidden;
	animation: edm-slide-up .25s ease;
}

.edm-header {
	color: #fff;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 700;
	display: flex;
	justify-content: space-between;
	align-items: center;
	letter-spacing: .3px;
}

.edm-header svg {
	vertical-align: -2px;
	margin-right: 6px;
}

.edm-header--image {
	background: linear-gradient(135deg, #4a6cf7, #6366f1);
}

.edm-header--youtube {
	background: linear-gradient(135deg, #ff0000, #cc0000);
}

.edm-close {
	background: rgba(255, 255, 255, .2);
	border: none;
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background .15s;
}

.edm-close svg {
	display: block;
	width: 14px;
	height: 14px;
	margin: auto;
}

.edm-close:hover {
	background: rgba(255, 255, 255, .35);
}

.edm-body {
	padding: 16px 20px;
	overflow-y: auto;
	flex: 1;
}

.edm-footer {
	padding: 12px 20px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	background: #f9fafb;
	gap: 8px;
}

.edm-btn {
	padding: 8px 24px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .1s;
}

.edm-btn:active {
	transform: scale(.97);
}

.edm-btn--cancel {
	background: #f3f4f6;
	color: #374151;
}

.edm-btn--cancel:hover {
	background: #e5e7eb;
}

.edm-btn--primary {
	background: linear-gradient(135deg, #6366f1, #4f46e5);
	color: #fff;
}

.edm-btn--primary:hover {
	background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.edm-btn--primary:disabled {
	background: #c7d2fe;
	cursor: not-allowed;
}

.edm-btn--youtube {
	background: #ff0000;
	color: #fff;
}

.edm-btn--youtube:hover {
	background: #cc0000;
}

.edm-btn--youtube:disabled {
	background: #fca5a5;
	cursor: not-allowed;
}


/* ═══════════════════════════════════════════════
   이미지 업로드 모달 (.edm-img-*)
   ═══════════════════════════════════════════════ */

.edm-container--image {
	width: 680px;
}

.edm-img-help {
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 12px;
}

.edm-img-help svg {
	vertical-align: -2px;
}

.edm-img-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
}

.edm-img-add {
	border: 1px dashed #d1d5db;
	border-radius: 8px;
	width: 100%;
	height: auto;
	min-height: 0;
	aspect-ratio: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #9ca3af;
	font-size: 13px;
	transition: all .2s;
	box-sizing: border-box;
	overflow: hidden;
}

.edm-img-add:hover {
	border-color: #6366f1;
	color: #6366f1;
	background: #f5f3ff;
}

.edm-img-add__icon {
	font-size: 24px;
	line-height: 1;
	font-weight: 300;
	opacity: 0.6;
}

.edm-img-item {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	width: 100%;
	height: auto;
	min-height: 0;
	aspect-ratio: 1 / 1;
	border: 1px solid #e5e7eb;
	cursor: grab;
	transition: all .2s;
	box-sizing: border-box;
}

.edm-img-item:hover {
	border-color: #6366f1;
	box-shadow: 0 2px 8px rgba(99, 102, 241, .2);
}

.edm-img-item.dragging {
	opacity: .4;
	transform: scale(.95);
}

.edm-img-item img {
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.edm-img-item__remove {
	position: absolute;
	top: 6px;
	right: 6px;
	background: rgba(239, 68, 68, .85);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	opacity: 0;
	transition: opacity .15s, background .15s;
}
.edm-img-item__remove svg {
	display: block;
	width: 8px;
	height: 8px;
}
.edm-img-item__remove:hover {
	background: rgba(239, 68, 68, 1);
}

.edm-img-item:hover .edm-img-item__remove {
	opacity: 1;
}

.edm-img-item__order {
	position: absolute;
	bottom: 6px;
	left: 6px;
	background: rgba(0, 0, 0, .65);
	color: rgba(255, 255, 255, .85);
	border-radius: 3px;
	height: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
	font-size: 10px;
	line-height: 1;
	font-weight: 600;
	font-family: 'JetBrains Mono', monospace;
	letter-spacing: 0;
	box-sizing: border-box;
}

.edm-img-item__size {
	position: absolute;
	bottom: 6px;
	right: 6px;
	background: rgba(0, 0, 0, .65);
	color: rgba(255, 255, 255, .55);
	border-radius: 3px;
	height: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
	font-size: 10px;
	line-height: 1;
	font-weight: 500;
	font-family: 'JetBrains Mono', monospace;
	letter-spacing: -0.3px;
	box-sizing: border-box;
}

.edm-img-progress {
	margin: 12px 0 0;
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
	overflow: hidden;
	display: none;
}

.edm-img-progress.active {
	display: block;
}

.edm-img-progress__bar {
	height: 100%;
	background: linear-gradient(90deg, #6366f1, #818cf8);
	width: 0;
	transition: width .3s;
}

.edm-img-count {
	font-size: 13px;
	color: #6b7280;
	margin-right: auto;
	font-family: 'Pretendard', sans-serif;
	letter-spacing: -0.3px;
}

.edm-img-count strong {
	color: #6366f1;
	font-weight: 700;
	margin-left: 2px;
	margin-right: 3px;
}


/* ═══════════════════════════════════════════════
   유튜브 삽입 모달 (.edm-yt-*)
   ═══════════════════════════════════════════════ */

.edm-container--youtube {
	width: 560px;
}

.edm-yt-input-group {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.edm-yt-input {
	flex: 1;
	padding: 10px 14px;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	font-size: 14px;
	outline: none;
	transition: border-color .2s;
}

.edm-yt-input:focus {
	border-color: #ff0000;
}

.edm-yt-input.valid {
	border-color: #22c55e;
}

.edm-yt-input.invalid {
	border-color: #ef4444;
}

.edm-yt-error {
	color: #ef4444;
	font-size: 13px;
	margin-bottom: 12px;
	display: none;
}

.edm-yt-error.active {
	display: block;
}

.edm-yt-preview {
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 16px;
	display: none;
	aspect-ratio: 16/9;
}

.edm-yt-preview.active {
	display: block;
}

.edm-yt-preview iframe {
	width: 100%;
	height: 100%;
	border: none;
}


/* ═══════════════════════════════════════════════
   라이트박스 (.edm-lightbox-*)
   ═══════════════════════════════════════════════ */

.edm-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	cursor: zoom-out;
	animation: edm-fade-in .2s ease;
}

.edm-lightbox img {
	max-width: 92vw;
	max-height: 92vh;
	border-radius: 4px;
	box-shadow: 0 4px 32px rgba(0, 0, 0, .5);
}

.edm-lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: rgba(255, 255, 255, .2);
	border: none;
	color: #fff;
	font-size: 24px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s;
}

.edm-lightbox__close:hover {
	background: rgba(255, 255, 255, .4);
}

img[data-original] {
	cursor: zoom-in;
}


/* ═══════════════════════════════════════════════
   에디터 삽입 유튜브 반응형 (본문 내)
   ═══════════════════════════════════════════════ */

.edm-responsive-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	margin: 16px 0;
}

.edm-responsive-video iframe {
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 8px;
}



/* ═══════════════════════════════════════════════
   deng.gg 다크테마 오버라이드 — CSS Variables + Specificity Max
   ═══════════════════════════════════════════════ */

/* ── 0. CSS 변수 강제 주입 ── */
html body .tox:not([dir=rtl]),
html body .tox.tox-tinymce {
	--tox-color-border: #1f2530 !important;
	--tox-toolbar-background-color: #111519 !important;
	--tox-toolbar-border-color: #1f2530 !important;
	--tox-statusbar-background-color: #111519 !important;
	--tox-statusbar-border-color: #1f2530 !important;
	--tox-editor-header-background-color: #111519 !important;
	--tox-editor-header-border-color: #1f2530 !important;
	--tox-toolbar-button-background-color: transparent !important;
	--tox-toolbar-button-hover-background-color: #1c2127 !important;
	--tox-toolbar-button-active-background-color: rgba(240,185,11,0.1) !important;
	--tox-toolbar-button-icon-color: #6E7888 !important;
	--tox-toolbar-button-hover-icon-color: #EAECEF !important;
	--tox-toolbar-button-active-icon-color: #F0B90B !important;
	--tox-menu-background-color: #111519 !important;
	--tox-menu-border-color: #1f2530 !important;
	--tox-collection-item-background-color-hover: #1c2127 !important;
	--tox-collection-item-color-hover: #EAECEF !important;
	--tox-collection-item-background-color-active: rgba(240,185,11,0.08) !important;
	--tox-collection-item-color-active: #F0B90B !important;
}

/* ── 1. 컨테이너 프레임 ── */
html body .tox.tox-tinymce {
	background: #0a0d10 !important;
	background-color: #0a0d10 !important;
	background-image: none !important;
	border: 1px solid #1f2530 !important;
	border-radius: 8px !important;
	overflow: hidden !important;
}
html body .tox.tox-tinymce.tox-tinymce--focused {
	border-color: #F0B90B !important;
	box-shadow: 0 0 0 1px rgba(240,185,11,0.15) !important;
}

/* ── 2. 에디터 헤더 (툴바 래퍼) ── */
html body .tox .tox-editor-header,
html body .tox .tox-editor-container,
html body .tox.tox-tinymce {
	background: #111519 !important;
	background-color: #111519 !important;
	background-image: none !important;
	border-bottom: 1px solid #1f2530 !important;
	padding: 0 !important;
	box-shadow: none !important;
}

/* ── 3. 툴바 ── */
html body .tox .tox-toolbar__primary,
html body .tox .tox-toolbar__overflow,
html body .tox .tox-toolbar-overlord,
html body .tox .tox-toolbar,
html body .tox .tox-toolbar__bg,
html body .tox .tox-view-wrap,
html body .tox .tox-view-wrap__slot-container {
	background: #111519 !important;
	background-color: #111519 !important;
	background-image: none !important;
	padding: 4px 8px !important;
}

/* ── 4. 툴바 그룹 구분선 ── */
html body .tox .tox-toolbar__group {
	padding: 0 4px !important;
	border-right: 1px solid #1f2530 !important;
	background: transparent !important;
	background-image: none !important;
}
html body .tox .tox-toolbar__group:last-child {
	border-right: none !important;
}

/* ── 5. 툴바 버튼 (기본) ── */
html body .tox .tox-tbtn {
	background: transparent !important;
	background-image: none !important;
	color: #6E7888 !important;
	border: none !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	margin: 1px !important;
	transition: background 0.15s, color 0.15s !important;
}
html body .tox .tox-tbtn svg {
	fill: #6E7888 !important;
	transition: fill 0.15s !important;
}
html body .tox .tox-tbtn:hover {
	background: #1c2127 !important;
	background-color: #1c2127 !important;
	background-image: none !important;
	color: #EAECEF !important;
}
html body .tox .tox-tbtn:hover svg {
	fill: #EAECEF !important;
}
html body .tox .tox-tbtn:focus {
	background: #1c2127 !important;
}
html body .tox .tox-tbtn--enabled,
html body .tox .tox-tbtn--enabled:hover {
	background: rgba(240,185,11,0.1) !important;
	background-color: rgba(240,185,11,0.1) !important;
	background-image: none !important;
	color: #F0B90B !important;
}
html body .tox .tox-tbtn--enabled svg,
html body .tox .tox-tbtn--enabled:hover svg {
	fill: #F0B90B !important;
}

/* ── 6. 셀렉트 버튼 (단락, 고딕, 13px) ── */
html body .tox .tox-tbtn--select {
	background: #0a0d10 !important;
	background-color: #0a0d10 !important;
	background-image: none !important;
	border: 1px solid #1f2530 !important;
	border-radius: 6px !important;
	padding: 0 10px !important;
	min-width: auto !important;
}
html body .tox .tox-tbtn--select:hover {
	background: #1c2127 !important;
	background-color: #1c2127 !important;
	background-image: none !important;
	border-color: #2a3040 !important;
}
html body .tox .tox-tbtn__select-label {
	color: #B7BDC6 !important;
	font-family: 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
}
html body .tox .tox-tbtn--select:hover .tox-tbtn__select-label {
	color: #EAECEF !important;
}
html body .tox .tox-tbtn__select-chevron svg {
	fill: #6E7888 !important;
	width: 10px !important;
	height: 10px !important;
}
html body .tox .tox-tbtn--select:hover .tox-tbtn__select-chevron svg {
	fill: #B7BDC6 !important;
}

/* ── 7. 스플릿 버튼 ── */
html body .tox .tox-split-button {
	border: none !important;
	border-radius: 4px !important;
	box-shadow: none !important;
}
html body .tox .tox-split-button:hover {
	box-shadow: none !important;
}
html body .tox .tox-split-button__chevron {
	background: transparent !important;
	background-image: none !important;
}
html body .tox .tox-split-button__chevron svg {
	fill: #6E7888 !important;
}
html body .tox .tox-split-button:hover .tox-split-button__chevron svg {
	fill: #B7BDC6 !important;
}

/* ── 8. 드롭다운 메뉴 ── */
html body .tox .tox-menu,
html body .tox .tox-collection--list {
	background: #111519 !important;
	background-color: #111519 !important;
	background-image: none !important;
	border: 1px solid #1f2530 !important;
	border-radius: 8px !important;
	box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
	padding: 4px !important;
}
html body .tox .tox-collection__item {
	border-radius: 4px !important;
	padding: 6px 10px !important;
	color: #B7BDC6 !important;
	font-family: 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif !important;
	font-size: 13px !important;
	transition: background 0.12s !important;
}
html body .tox .tox-collection__item:hover,
html body .tox .tox-collection__item--active {
	background: #1c2127 !important;
	background-color: #1c2127 !important;
	background-image: none !important;
	color: #EAECEF !important;
}
html body .tox .tox-collection__item--enabled {
	background: rgba(240,185,11,0.08) !important;
	background-color: rgba(240,185,11,0.08) !important;
	background-image: none !important;
	color: #F0B90B !important;
}
html body .tox .tox-collection__item--enabled .tox-collection__item-checkmark svg {
	fill: #F0B90B !important;
}
html body .tox .tox-collection__item-label { color: inherit !important; }
html body .tox .tox-collection__item-accessory { color: #6E7888 !important; font-size: 11px !important; }
html body .tox .tox-collection__group-heading {
	color: #6E7888 !important;
	font-size: 11px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	padding: 8px 10px 4px !important;
}
html body .tox .tox-collection--list .tox-collection__group {
	border-bottom-color: #1f2530 !important;
}

/* ── 9. 컬러 피커 ── */
html body .tox .tox-swatches__picker-btn svg { fill: #6E7888 !important; }
html body .tox .tox-swatches__picker-btn:hover svg { fill: #EAECEF !important; }

/* ── 10. 상태바 ── */
html body .tox .tox-statusbar {
	background: #111519 !important;
	background-color: #111519 !important;
	background-image: none !important;
	border-top: none !important;
	padding: 0 12px !important;
	height: 28px !important;
}
html body .tox .tox-statusbar a,
html body .tox .tox-statusbar__path-item,
html body .tox .tox-statusbar__wordcount {
	color: #6E7888 !important;
	font-family: 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif !important;
	font-size: 11px !important;
}
html body .tox .tox-statusbar__path-item:hover { color: #B7BDC6 !important; }
html body .tox .tox-statusbar__resize-handle svg { fill: #6E7888 !important; }
html body .tox .tox-statusbar__resize-handle:hover svg { fill: #B7BDC6 !important; }

/* ── 11. 에디터 본문 래퍼 ── */
html body .tox .tox-edit-area,
html body .tox .tox-sidebar-wrap {
	background: #0a0d10 !important;
	background-color: #0a0d10 !important;
	background-image: none !important;
}
html body .tox .tox-edit-area__iframe {
	background: #0a0d10 !important;
	background-color: #0a0d10 !important;
	background-image: none !important;
}

/* ── 12. 퀵바 ── */
html body .tox .tox-pop__dialog {
	border: 1px solid #1f2530 !important;
	box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
	background: #171b22 !important;
	background-color: #171b22 !important;
	background-image: none !important;
	border-radius: 8px !important;
}
html body .tox .tox-pop.tox-pop--bottom::before,
html body .tox .tox-pop.tox-pop--top::before { border-color: #1f2530 transparent !important; }
html body .tox .tox-pop.tox-pop--bottom::after,
html body .tox .tox-pop.tox-pop--top::after { border-color: #171b22 transparent !important; }

/* ── 13. 툴팁 ── */
html body .tox .tox-tooltip__body {
	background: #171b22 !important;
	color: #B7BDC6 !important;
	border: 1px solid #1f2530 !important;
	border-radius: 4px !important;
	font-family: 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif !important;
	font-size: 11px !important;
	box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}

/* ── 14. 비활성 버튼 ── */
html body .tox .tox-tbtn--disabled,
html body .tox .tox-tbtn--disabled:hover {
	background: transparent !important;
	background-image: none !important;
	opacity: 0.3 !important;
	cursor: not-allowed !important;
}
html body .tox .tox-tbtn--disabled svg { fill: #6E7888 !important; }

/* ── 15. 다이얼로그 (프리미엄 툴 모달) ── */
html body .tox .tox-dialog {
	background: #111519 !important;
	background-color: #111519 !important;
	background-image: none !important;
	border: 1px solid #1f2530 !important;
	box-shadow: 0 10px 40px rgba(0,0,0,0.6) !important;
}
html body .tox .tox-dialog__footer {
	border-top: 1px solid #1f2530 !important;
	background: #0a0d10 !important;
	background-color: #0a0d10 !important;
	background-image: none !important;
}
html body .tox .tox-dialog__footer .tox-button:not(.tox-button--secondary) {
	background: linear-gradient(135deg, #F0B90B, #e6b800) !important;
	border-color: #F0B90B !important;
	color: #000 !important;
}
html body .tox .tox-dialog__footer .tox-button:not(.tox-button--secondary):hover {
	background: linear-gradient(135deg, #FFD54F, #F0B90B) !important;
}
html body .tox .tox-dialog__footer .tox-button--secondary {
	border: 1px solid #1f2530 !important;
	background: #171b22 !important;
	color: #B7BDC6 !important;
}
html body .tox .tox-dialog__footer .tox-button--secondary:hover {
	background: #1c2127 !important;
}


/* ── 공용 모달 (도구모음 패널 스타일) ── */
.edm-overlay { background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.edm-container {
	background: #111519;
	border: 1px solid #1f2530;
	border-radius: 12px;
	box-shadow: 0 16px 48px rgba(0,0,0,.7);
	width: 100%;
	max-width: 600px;
	overflow: hidden;
}
.edm-container--youtube { max-width: 520px; }
.edm-body { padding: 24px; color: #B7BDC6; }

/* 헤더 */
.edm-header {
	padding: 20px 24px;
	color: #EAECEF;
	background: #111519;
	border-bottom: 1px solid #1f2530;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.edm-header span {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.edm-header--image span svg { color: #F0B90B; width: 22px; height: 22px; stroke-width: 1.5px; }
.edm-header--youtube span svg { color: #EAECEF; width: 22px; height: 22px; stroke-width: 1.5px; }

/* 닫기 버튼 */
.edm-close {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255,255,255,.04) !important;
	color: #6E7888 !important;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
}
.edm-close svg { width: 16px; height: 16px; stroke-width: 2px; }
.edm-close:hover {
	background: rgba(255,255,255,.1) !important;
	color: #EAECEF !important;
}

/* 푸터 */
.edm-footer {
	padding: 16px 24px;
	border-top: 1px solid #1f2530;
	background: #0a0d10;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.edm-container--youtube .edm-footer {
	justify-content: flex-end;
	gap: 10px;
}

/* 공용 버튼 스타일 */
.edm-btn {
	height: 42px;
	padding: 0 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
}
.edm-btn--cancel {
	background: #171b22;
	border: 1px solid #1f2530;
	color: #848E9C;
}
.edm-btn--cancel:hover { background: #1c2127; color: #B7BDC6; }

.edm-btn--primary {
	background: linear-gradient(135deg, #F0B90B, #e6b800) !important;
	color: #000 !important;
	border: none;
	box-shadow: 0 2px 8px rgba(240,185,11,0.2);
}
.edm-btn--primary:hover {
	background: linear-gradient(135deg, #FFD54F, #F0B90B) !important;
	box-shadow: 0 4px 12px rgba(240,185,11,0.3);
}
.edm-btn--primary:disabled {
	background: rgba(240,185,11,0.2) !important;
	color: rgba(0,0,0,0.3) !important;
	box-shadow: none;
	cursor: not-allowed;
}

.edm-btn--youtube {
	background: #E50914;
	color: #fff;
	border: none;
}
.edm-btn--youtube:hover { background: #F6121D; }
.edm-btn--youtube:disabled {
	background: rgba(255,0,0,0.2);
	color: rgba(255,255,255,0.3);
	cursor: not-allowed;
}

/* ── 이미지 모달 ── */
.edm-img-help {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: rgba(240,185,11,0.04);
	border: 1px solid rgba(240,185,11,0.1);
	border-radius: 8px;
	color: #848E9C;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: -0.3px;
	margin-bottom: 20px;
}
.edm-img-help svg { color: #F0B90B; width: 16px; height: 16px; flex-shrink: 0; }

.edm-img-count { color: #6E7888; font-size: 13px; letter-spacing: -0.3px; }
.edm-img-count strong { color: #F0B90B !important; font-weight: 700; font-size: inherit; margin-left: 2px; margin-right: 3px; }

/* 추가 버튼 (점선 박스) */
.edm-img-add {
	border: 1px dashed #2a3040;
	border-radius: 8px;
	background: transparent;
	color: #6E7888;
	width: 100%;
	height: auto;
	min-height: 0 !important;
	aspect-ratio: 1 / 1;
	box-sizing: border-box;
	overflow: hidden;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: -0.3px;
	gap: 5px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.edm-img-add__icon {
	opacity: 0.5;
	margin-bottom: -1px;
}
.edm-img-add svg { width: 22px; height: 22px; stroke-width: 1.5px; }
.edm-img-add:hover {
	border-color: #F0B90B;
	color: #F0B90B;
	background: rgba(240,185,11,0.03);
}
.edm-img-add:hover .edm-img-add__icon { opacity: 0.8; }

.edm-img-item {
	border-color: #1f2530;
	border-radius: 8px;
	width: 100%;
	height: auto;
	min-height: 0 !important;
	aspect-ratio: 1 / 1;
	box-sizing: border-box;
}
.edm-img-item:hover {
	border-color: #F0B90B;
	box-shadow: 0 2px 8px rgba(240,185,11,.2);
}
.edm-img-progress {
	background: rgba(255,255,255,0.04);
	border-radius: 6px;
}
.edm-img-progress__bar {
	background: linear-gradient(90deg, #F0B90B, #FFD54F) !important;
}
.edm-img-item__order {
	background: rgba(0,0,0,.7);
}
.edm-img-item__size {
	background: rgba(0,0,0,.7);
	color: rgba(255,255,255,.5);
}

/* ── 유튜브 모달 ── */
.edm-yt-input-group { margin-bottom: 16px; }
.edm-yt-input {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	background: #0a0d10;
	border: 1px solid #1f2530;
	border-radius: 8px;
	color: #EAECEF;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.2s;
}
.edm-yt-input::placeholder { color: #6E7888; }
.edm-yt-input:focus { border-color: #E50914; outline: none; }
.edm-yt-input.valid { border-color: #0ECB81; }
.edm-yt-input.invalid { border-color: #F6465D; }
.edm-yt-preview { background: #0a0d10; border: 1px solid #1f2530; }

/* ── Textarea 다크 ── */
textarea.editor-textarea {
	background: #0a0d10;
	border: 1px solid #1f2530;
	color: #EAECEF;
	border-radius: 8px;
}
textarea.editor-textarea:focus {
	border-color: #F0B90B;
	box-shadow: 0 0 0 3px rgba(240,185,11,0.1);
}