#main_popup[data-popup-display] {
	--popup-radius: 16px;
	--popup-layer-max-width: 800px;
	--popup-layer-backdrop: #000000;
	--popup-layer-opacity: 0.85;
	--popup-action-snooze-bg: #ffffff;
	--popup-action-snooze-text: #57534e;
	--popup-action-snooze-hover-bg: #f5f5f4;
	--popup-action-snooze-hover-text: #746457;
	--popup-action-close-bg: #746457;
	--popup-action-close-text: #ffffff;
	--popup-action-close-hover-bg: #5e5045;
	--popup-action-close-hover-text: #ffffff;
	position: fixed;
	inset: 0;
	z-index: 9000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 3vw, 32px);
	pointer-events: none;
	box-sizing: border-box;
}

#main_popup[data-popup-display]:not([data-popup-ready]) {
	visibility: hidden;
}

#main_popup[data-popup-display][hidden],
#main_popup[data-popup-display] [hidden] {
	display: none !important;
}

#main_popup[data-popup-display],
#main_popup[data-popup-display] * {
	box-sizing: border-box;
}

#main_popup[data-popup-mode="card"] > div {
	max-width: 100%;
	max-height: 100%;
	overflow: auto;
}

#main_popup[data-popup-mode="card"] > div > ul {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#main_popup[data-popup-mode="card"] > div > ul > li {
	max-width: 100%;
	pointer-events: auto;
}

#main_popup .popup,
#main_popup .popup_fullscreen_panel {
	position: relative;
	width: fit-content;
	max-width: 100%;
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	overflow: auto;
	background: #ffffff;
	border-radius: var(--popup-radius);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
	color: #292524;
	line-height: 1.5;
}

#main_popup .popup > div,
#main_popup .popup_fullscreen_panel > div,
#main_popup .popup_tab_panel > div {
	max-width: 100% !important;
}

#main_popup .popup_media-link,
#main_popup .popup_media,
#main_popup .img_max {
	display: block;
	max-width: 100%;
	height: auto;
}

#main_popup .popup_comment_frame {
	display: block;
	width: 100%;
	min-height: 180px;
	border: 0;
}

#main_popup .popup_actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	width: 100%;
	border-top: 1px solid #e7e5e4;
}

#main_popup .popup_action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 0;
	min-height: 48px;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	transition: background-color 160ms ease, color 160ms ease;
}

#main_popup .popup_action-snooze {
	background: var(--popup-action-snooze-bg);
	color: var(--popup-action-snooze-text);
}

#main_popup .popup_action-snooze:hover,
#main_popup .popup_action-snooze:focus-visible {
	background: var(--popup-action-snooze-hover-bg);
	color: var(--popup-action-snooze-hover-text);
}

#main_popup .popup_action-close {
	background: var(--popup-action-close-bg);
	color: var(--popup-action-close-text);
}

#main_popup .popup_action-close:hover,
#main_popup .popup_action-close:focus-visible {
	background: var(--popup-action-close-hover-bg);
	color: var(--popup-action-close-hover-text);
}

/* 전역 font-family !important 규칙과 무관하게 표시되는 내장 SVG 마스크 아이콘 */
#main_popup .popup_action > i {
	display: inline-block;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	font-size: 0;
	line-height: 0;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

#main_popup .popup_action-snooze > i {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 7v5l3 2' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 7v5l3 2' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
}

#main_popup .popup_action-close > i {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.4'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.4'/%3E%3C/svg%3E");
}

#main_popup .popup_fullscreen {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 3vw, 32px);
	pointer-events: auto;
}

#main_popup .popup_fullscreen::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--popup-layer-backdrop);
	opacity: var(--popup-layer-opacity);
}

#main_popup .popup_fullscreen_queue {
	position: relative;
	z-index: 1;
	width: fit-content;
	max-width: min(var(--popup-layer-max-width), 100%);
	max-height: 100%;
}

#main_popup .popup_fullscreen_panel {
	width: 100%;
	margin: 0 auto;
	pointer-events: auto;
}

#main_popup .popup_layer_title {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

#main_popup .popup_tabs {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(var(--popup-tab-width, 1200px), 100%);
	max-height: min(var(--popup-tab-max-height, 500px), calc(100vh - 24px));
	max-height: min(var(--popup-tab-max-height, 500px), calc(100dvh - 24px));
	overflow: hidden;
	border-radius: var(--popup-radius);
	background: #ffffff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
	pointer-events: auto;
}

#main_popup .popup_tabs[data-tab-position="top-center"] {
	align-self: flex-start;
}

#main_popup .popup_tabs[data-tab-position="bottom-center"] {
	align-self: flex-end;
}

#main_popup .popup_tab_list {
	display: flex;
	flex: 0 0 auto;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	background: var(--popup-tab-bg, #ffffff);
}

#main_popup .popup_tab_list button {
	flex: 1 1 0;
	min-width: 0;
	padding: var(--popup-tab-padding-y, 10px) var(--popup-tab-padding-x, 20px);
	border: 0;
	background: var(--popup-tab-bg, #ffffff);
	color: var(--popup-tab-text, #475569);
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

#main_popup .popup_tabs[data-tab-width-mode="content"] .popup_tab_list button {
	flex: 0 0 auto;
}

#main_popup .popup_tabs[data-tab-title-align="left"] .popup_tab_list button {
	text-align: left;
}

#main_popup .popup_tabs[data-tab-title-align="right"] .popup_tab_list button {
	text-align: right;
}

#main_popup .popup_tab_list button[aria-selected="true"] {
	background: var(--popup-tab-active-bg, #111827);
	color: var(--popup-tab-active-text, #ffffff);
}

#main_popup .popup_tab_panels {
	min-height: 0;
	overflow-x: hidden;
	overflow-y: hidden;
	touch-action: pan-y;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

#main_popup .popup_tab_track {
	display: flex;
	align-items: stretch;
	width: 100%;
	min-height: 0;
	will-change: transform;
	transition: transform var(--popup-tab-transition, 400ms) ease;
}

#main_popup .popup_tab_panels[data-popup-dragging] {
	user-select: none;
	cursor: grabbing;
}

#main_popup .popup_tab_clone {
	pointer-events: none;
}

#main_popup .popup_tab_panels::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

#main_popup .popup_tab_panel {
	flex: 0 0 100%;
	min-width: 0;
	max-height: min(var(--popup-tab-max-height, 500px), calc(100dvh - 100px));
	overflow-y: auto;
	background: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
	#main_popup .popup_tab_track { transition-duration: 0ms !important; }
}

#main_popup .popup_tabs_x {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.68);
	color: #ffffff;
	cursor: pointer;
	font: 700 24px/1 var(--cella-font, sans-serif);
}

@media (max-width: 640px) {
	#main_popup[data-popup-display] {
		padding: 10px;
	}

	#main_popup[data-popup-mode="card"] > div > ul {
		gap: 10px;
	}

	#main_popup .popup,
	#main_popup .popup_fullscreen_panel,
	#main_popup .popup_tabs {
		max-width: calc(100vw - 20px);
		max-height: calc(100vh - 20px);
		max-height: calc(100dvh - 20px);
	}

	#main_popup .popup_action {
		min-height: 46px;
		padding: 9px 8px;
		font-size: 12px;
	}
}
