/* Uthain Mourning Ribbon */
.utm-badge {
	position: absolute;
	z-index: var(--utm-z, 100);
	width: var(--utm-size, 56px);
	height: var(--utm-size, 56px);
	font-family: inherit;
	line-height: 1.5;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}
.utm-badge.utm-fixed { position: fixed; }
.utm-top { top: var(--utm-off, 16px); }
.utm-bottom { bottom: var(--utm-off, 16px); }
.utm-left { left: var(--utm-off, 16px); }
.utm-right { right: var(--utm-off, 16px); }

/* เว้นที่ให้แถบผู้ดูแลด้านบน */
.admin-bar .utm-top { top: calc(var(--utm-off, 16px) + 32px); }

/* วางในหัวเว็บ: ซ่อนไว้จนกว่าจะย้ายเข้าที่ (กันป้ายกระพริบที่มุมจอ) */
.utm-badge.utm-anchor { visibility: hidden; }
.utm-badge.utm-in,
.admin-bar .utm-badge.utm-in {
	position: absolute;
	top: 50%;
	bottom: auto;
	visibility: visible;
	transform: translateY(-50%);
}
.utm-badge.utm-in.utm-left { left: var(--utm-in-x, 0px); }
.utm-badge.utm-in.utm-right { right: var(--utm-in-x, 0px); }
.utm-host { position: relative; }

.utm-badge .utm-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--utm-fg, #000);
	font: inherit;
	line-height: 0;
	text-decoration: none;
	cursor: default;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
}
.utm-badge a.utm-btn,
.utm-badge button.utm-btn { cursor: pointer; }
.utm-circle .utm-btn { background: var(--utm-bg, #fff); }
.utm-circle.utm-shadow .utm-btn { box-shadow: 0 2px 10px rgba(0, 0, 0, .22); }
.utm-plain.utm-shadow .utm-svg { filter: drop-shadow(0 1px 1.5px rgba(255, 255, 255, .9)) drop-shadow(0 1px 3px rgba(0, 0, 0, .25)); }

.utm-badge .utm-svg {
	display: block;
	width: 70%;
	height: 70%;
	margin-top: 3%;
	overflow: visible;
}
.utm-plain .utm-svg { width: 100%; height: 100%; margin: 0; }

.utm-badge a.utm-btn,
.utm-badge button.utm-btn {
	transition: transform .15s ease;
}
.utm-badge a.utm-btn:hover,
.utm-badge button.utm-btn:hover { transform: scale(1.06); }
.utm-badge .utm-btn:focus-visible {
	outline: 2px solid var(--utm-fg, #000);
	outline-offset: 3px;
}

/* ข้อความเมื่อชี้ */
.utm-tip {
	position: absolute;
	z-index: 2;
	max-width: 240px;
	width: max-content;
	padding: 6px 10px;
	border-radius: 6px;
	background: rgba(17, 17, 17, .92);
	color: #fff;
	font-size: 13px;
	line-height: 1.45;
	text-align: center;
	white-space: normal;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease;
}
.utm-top .utm-tip { top: calc(100% + 8px); }
.utm-bottom .utm-tip { bottom: calc(100% + 8px); }
.utm-left .utm-tip { left: 0; }
.utm-right .utm-tip { right: 0; }
.utm-badge:hover .utm-tip,
.utm-badge .utm-btn:focus-visible + .utm-tip { opacity: 1; visibility: visible; }
.utm-badge.utm-open .utm-tip { opacity: 0; visibility: hidden; }

/* กล่องข้อความเมื่อกด */
.utm-pop {
	position: absolute;
	z-index: 3;
	box-sizing: border-box;
	width: 300px;
	max-width: calc(100vw - 2 * var(--utm-off, 16px));
	padding: 18px 40px 18px 18px;
	border-radius: 10px;
	background: #fff;
	color: #111;
	font-size: 15px;
	line-height: 1.6;
	text-align: left;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
.utm-pop[hidden] { display: none; }
.utm-top .utm-pop { top: calc(100% + 10px); }
.utm-bottom .utm-pop { bottom: calc(100% + 10px); }
.utm-left .utm-pop { left: 0; }
.utm-right .utm-pop { right: 0; }
.utm-pop .utm-msg { margin: 0; word-wrap: break-word; }
.utm-pop .utm-close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #555;
	font: 22px/30px Arial, sans-serif;
	cursor: pointer;
}
.utm-pop .utm-close:hover { background: #f0f0f0; color: #111; }

@media (max-width: 782px) {
	.utm-badge {
		width: var(--utm-size-m, 44px);
		height: var(--utm-size-m, 44px);
	}
	.utm-top { top: var(--utm-off-m, 10px); }
	.utm-bottom { bottom: var(--utm-off-m, 10px); }
	.utm-left { left: var(--utm-off-m, 10px); }
	.utm-right { right: var(--utm-off-m, 10px); }
	.admin-bar .utm-top { top: calc(var(--utm-off-m, 10px) + 46px); }
	.utm-badge.utm-in,
	.admin-bar .utm-badge.utm-in { top: 50%; bottom: auto; }
	.utm-badge.utm-in.utm-left { left: var(--utm-in-x, 0px); }
	.utm-badge.utm-in.utm-right { right: var(--utm-in-x, 0px); }
	.utm-pop { max-width: calc(100vw - 2 * var(--utm-off-m, 10px)); }
	.utm-hide-m { display: none !important; }
}

@media print {
	.utm-tip, .utm-pop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.utm-badge .utm-btn, .utm-tip { transition: none; }
}
