.ygwx-share {
	--ygwx-ink: #273346;
	--ygwx-muted: #69758a;
	--ygwx-line: #dfe7ef;
	--ygwx-mint: #d8eee8;
	--ygwx-blue: #dbeaf6;
	--ygwx-paper: #f7f9fc;
	margin: 34px 0;
}

.ygwx-open,
.ygwx-action,
.ygwx-close {
	font: inherit;
}

.ygwx-open {
	display: inline-flex;
	min-height: 46px;
	align-items: center;
	gap: 10px;
	padding: 10px 19px;
	border: 1px solid rgba(109, 139, 151, 0.16);
	border-radius: 999px;
	background: var(--ygwx-mint);
	color: var(--ygwx-ink);
	box-shadow: 0 9px 24px rgba(54, 85, 93, 0.09);
	cursor: pointer;
	font-size: 14px;
	font-weight: 650;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.ygwx-open:hover {
	background: #cae8df;
	box-shadow: 0 12px 28px rgba(54, 85, 93, 0.13);
	transform: translateY(-2px);
}

.ygwx-open:focus-visible,
.ygwx-action:focus-visible,
.ygwx-close:focus-visible {
	outline: 3px solid rgba(96, 136, 173, .28);
	outline-offset: 3px;
}

.ygwx-wechat-icon {
	position: relative;
	display: inline-block;
	width: 25px;
	height: 22px;
}

.ygwx-wechat-icon i {
	position: absolute;
	display: block;
	width: 16px;
	height: 13px;
	border: 2px solid #53766c;
	border-radius: 50%;
}

.ygwx-wechat-icon i:first-child { left: 0; top: 1px; }
.ygwx-wechat-icon i:last-child { right: 0; bottom: 0; background: var(--ygwx-mint); }

.ygwx-modal[hidden] { display: none !important; }
.ygwx-modal { position: fixed; z-index: 100000; inset: 0; display: grid; place-items: center; padding: 24px; }
.ygwx-backdrop { position: absolute; inset: 0; background: rgba(25, 34, 48, .48); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ygwx-dialog { position: relative; width: min(720px, 100%); max-height: min(820px, calc(100vh - 48px)); overflow: auto; padding: 32px; border: 1px solid rgba(255,255,255,.8); border-radius: 28px; background: var(--ygwx-paper); color: var(--ygwx-ink); box-shadow: 0 30px 90px rgba(22, 33, 49, .24); }
.ygwx-modal-open { overflow: hidden; }
.ygwx-close { position: absolute; right: 18px; top: 17px; display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #59677a; cursor: pointer; font-size: 25px; line-height: 1; }
.ygwx-dialog-header { padding-right: 46px; }
.ygwx-dialog-kicker { color: #8090a5; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.ygwx-dialog h2 { margin: 6px 0 22px; color: var(--ygwx-ink); font-size: 30px; line-height: 1.25; }

.ygwx-preview { display: grid; grid-template-columns: 120px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--ygwx-line); border-radius: 20px; background: #fff; }
.ygwx-preview-image,
.ygwx-preview-placeholder { display: block; width: 120px; height: 120px; object-fit: cover; }
.ygwx-preview-placeholder { display: grid; place-items: center; background: linear-gradient(145deg, var(--ygwx-blue), var(--ygwx-mint)); color: #6c8298; font-size: 34px; font-weight: 700; }
.ygwx-preview-copy { min-width: 0; padding: 16px 18px; }
.ygwx-preview-copy strong { display: -webkit-box; overflow: hidden; color: var(--ygwx-ink); font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ygwx-preview-copy p { display: -webkit-box; overflow: hidden; margin: 7px 0 4px; color: var(--ygwx-muted); font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ygwx-preview-copy small { color: #95a0b0; font-size: 11px; }
.ygwx-wechat-tip { margin: 18px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--ygwx-mint); color: #46675e; font-size: 13px; }

.ygwx-share-methods { display: grid; min-width: 0; grid-template-columns: 248px minmax(0, 1fr); align-items: center; gap: 26px; margin-top: 24px; }
.ygwx-share-methods > * { min-width: 0; }
.ygwx-qr-wrap { padding: 16px; border: 1px solid var(--ygwx-line); border-radius: 20px; background: #fff; text-align: center; }
.ygwx-qr { display: grid; width: 216px; height: 216px; place-items: center; margin-inline: auto; overflow: hidden; }
.ygwx-qr img,
.ygwx-qr canvas,
.ygwx-qr svg { display: block; width: 216px !important; height: 216px !important; }
.ygwx-qr.is-error { padding: 20px; color: var(--ygwx-muted); font-size: 13px; }
.ygwx-qr-wrap p { margin: 10px 0 0; color: var(--ygwx-muted); font-size: 12px; }
.ygwx-link-wrap > p { margin: 0 0 12px; color: var(--ygwx-muted); font-size: 14px; }
.ygwx-link-line { overflow: hidden; padding: 11px 12px; border: 1px solid var(--ygwx-line); border-radius: 12px; background: #fff; color: #768397; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ygwx-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.ygwx-action { min-height: 42px; padding: 9px 16px; border: 1px solid var(--ygwx-line); border-radius: 999px; background: #fff; color: var(--ygwx-ink); cursor: pointer; font-size: 13px; font-weight: 650; }
.ygwx-action-primary { border-color: var(--ygwx-ink); background: var(--ygwx-ink); color: #fff; }
.ygwx-status { min-height: 21px; margin: 9px 0 0; color: #58776e; font-size: 12px; }

@media (max-width: 680px) {
	.ygwx-modal { align-items: end; padding: 12px; }
	.ygwx-dialog { max-height: calc(100vh - 24px); padding: 24px 18px; border-radius: 25px; }
	.ygwx-dialog h2 { font-size: 26px; }
	.ygwx-preview { grid-template-columns: 92px minmax(0, 1fr); }
	.ygwx-preview-image,
	.ygwx-preview-placeholder { width: 92px; height: 108px; }
	.ygwx-preview-copy { padding: 13px 14px; }
	.ygwx-share-methods { grid-template-columns: 1fr; gap: 16px; }
	.ygwx-qr-wrap { width: 248px; max-width: 100%; margin-inline: auto; }
	.ygwx-actions { display: grid; grid-template-columns: 1fr 1fr; }
	.ygwx-action:only-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	.ygwx-open { transition: none; }
}
