/* Click a figure to see it large. Pairs with zoom.js. */
.post figure.zoomable > svg, .post figure.zoomable > img { cursor: zoom-in; }
.post figure.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
dialog.zoom {
	width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
	margin: 0; padding: 1rem; border: 0;
	background: color-mix(in srgb, var(--bg) 94%, transparent);
	overflow: auto; cursor: zoom-out;
}
dialog.zoom::backdrop { background: var(--bg); }
dialog.zoom[open] { display: flex; }
dialog.zoom > svg, dialog.zoom > img {
	margin: auto; display: block; background: #fff; border-radius: 6px;
	/* Fit the viewport first. A second click switches to full size and scrolls. */
	width: auto; height: auto; max-width: 100%; max-height: 100%;
}
dialog.zoom.full > svg, dialog.zoom.full > img { max-width: none; max-height: none; width: max(100%, 1800px); flex: none; }
dialog.zoom .hint {
	position: fixed; left: 50%; bottom: 0.75rem; transform: translateX(-50%);
	padding: 0.15rem 0.8rem; border-radius: 999px; font-size: 0.85rem;
	background: var(--fg); color: var(--bg); opacity: 0.8; pointer-events: none;
}
html:has(dialog.zoom[open]) { overflow: hidden; }
