/* Tuhorn Simple Popups – 가볍고 단순한 스타일. 테마 변수로 쉽게 바꿀 수 있음. */
:root {
	--tsp-bg: #fff;
	--tsp-text: #1d1d1f;
	--tsp-muted: #767676;
	--tsp-accent: #1d1d1f;
	--tsp-accent-text: #fff;
	--tsp-radius: 12px;
	--tsp-shadow: 0 10px 40px rgba(0, 0, 0, .18);
}

.tsp-overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	transition: opacity .2s ease;
}
.tsp-overlay.tsp-noov { background: transparent; pointer-events: none; }
.tsp-overlay.tsp-noov .tsp-box { pointer-events: auto; }

.tsp-stack {
	position: fixed;
	z-index: 99997;
	display: flex;
	flex-direction: column;
	gap: 12px;
	pointer-events: none;
}
.tsp-stack > * { pointer-events: auto; }
.tsp-stack.tsp-bottom-right { right: 16px; bottom: 16px; align-items: flex-end; }
.tsp-stack.tsp-bottom-left { left: 16px; bottom: 16px; align-items: flex-start; }
.tsp-stack.tsp-top-bar { top: 0; left: 0; right: 0; gap: 0; }
.tsp-stack.tsp-bottom-bar { bottom: 0; left: 0; right: 0; gap: 0; }

.tsp-box {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 24px;
	color: var(--tsp-text);
	background: var(--tsp-bg);
	border-radius: var(--tsp-radius);
	box-shadow: var(--tsp-shadow);
	font-size: 15px;
	line-height: 1.55;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease;
}
.tsp-overlay.tsp-in,
.tsp-box.tsp-in { opacity: 1; }
.tsp-box.tsp-in { transform: none; }

.tsp-bar { border-radius: 0; box-shadow: 0 0 20px rgba(0, 0, 0, .12); padding: 12px 48px 12px 20px; max-width: none !important; }
.tsp-bar .tsp-body { display: inline; }
.tsp-bar .tsp-body > *:last-child { display: inline; }
.tsp-bar .tsp-actions { display: inline-flex; margin: 0 0 0 12px; vertical-align: middle; }
.tsp-bar .tsp-links { display: inline-flex; margin: 0 0 0 16px; }

.tsp-body > *:first-child { margin-top: 0; }
.tsp-body > *:last-child { margin-bottom: 0; }
.tsp-body img { max-width: 100%; height: auto; }

/* 이미지 · 표 (사이즈 차트, 사용법 등) */
.tsp-body figure { margin: 12px 0; }
.tsp-body img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.tsp-body figcaption { margin-top: 6px; font-size: 12.5px; color: var(--tsp-muted); text-align: center; }
.tsp-body h2, .tsp-body h3 { margin: 0 0 10px; font-size: 1.2em; line-height: 1.3; }
.tsp-tablewrap { overflow-x: auto; margin: 12px 0; -webkit-overflow-scrolling: touch; }
.tsp-body table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.tsp-body figure.wp-block-table { margin: 12px 0; }
.tsp-body th, .tsp-body td { padding: 8px 10px; border: 1px solid #e3e3e3; text-align: center; white-space: nowrap; }
.tsp-body th { background: #f6f6f6; font-weight: 600; }
.tsp-body tbody tr:nth-child(even) td { background: #fafafa; }
.tsp-body td:first-child, .tsp-body th:first-child { text-align: left; }
.tsp-open { cursor: pointer; }

.tsp-x {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--tsp-muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.tsp-x:hover, .tsp-x:focus-visible { background: rgba(0, 0, 0, .06); color: var(--tsp-text); }
.tsp-bar .tsp-x { top: 50%; transform: translateY(-50%); }

.tsp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tsp-btn {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 8px;
	border: 1px solid var(--tsp-accent);
	background: var(--tsp-accent);
	color: var(--tsp-accent-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}
.tsp-btn:nth-child(2) { background: transparent; color: var(--tsp-accent); }
.tsp-btn:hover { opacity: .85; }

.tsp-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 14px; }
.tsp-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--tsp-muted);
	font-size: 12.5px;
	text-decoration: underline;
	cursor: pointer;
}
.tsp-link:hover { color: var(--tsp-text); }

@media (max-width: 600px) {
	.tsp-stack.tsp-bottom-right, .tsp-stack.tsp-bottom-left { left: 12px; right: 12px; align-items: stretch; }
	.tsp-box { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.tsp-overlay, .tsp-box { transition: none; transform: none; }
}
