/* Popup Tool Styles */
.popup-tool-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.55);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
	font-family: 'Noto Sans JP', system-ui, sans-serif;
}
.popup-tool-overlay.open { opacity: 1; pointer-events: auto; z-index: 9999; }

.popup-tool {
	background: #fff;
	width: min(90vw, 420px);
	max-width: 480px;
	border-radius: 12px;
	box-shadow: 0 10px 35px rgba(0,0,0,0.25);
	position: relative;
	transform: translateY(12px) scale(.96);
	opacity: 0;
	transition: transform .35s cubic-bezier(.16,.84,.44,1), opacity .35s ease;
}
.popup-tool-overlay.open .popup-tool { transform: translateY(0) scale(1); opacity: 1; }

.popup-tool-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 50%;
	font-size: 22px;
	font-weight: bold;
	line-height: 1;
	color: #333;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}
.popup-tool-close:hover, .popup-tool-close:focus { 
	background: rgba(255, 255, 255, 1);
	transform: scale(1.1);
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}
.popup-tool-close:active { 
	transform: scale(0.95);
	background: rgba(240, 240, 240, 1);
}
button.popup-tool-close:focus-visible {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

.popup-tool-body { text-align: center; }

.popup-tool-ad img { 
	width: 100%;
	border-radius: 8px;
	display: block;
	margin: 0 auto;
    object-fit: cover;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (prefers-reduced-motion: reduce) {
	.popup-tool-overlay, .popup-tool { transition: none !important; }
}