/**
 * Shared PDF tool shell — hub nav + split workspace.
 */

.sn-pdf-wrap {
	width: 100%;
	max-width: none;
	margin: 0;
}

/* Stage-head pilot: H1 lives above the tool — hide duplicate choose title. */
.sn-page-card--tool-stage-headed .sn-pdf-choose-head {
	display: none;
}

.sn-page-card--tool-stage-headed:has( [data-pdf-editor] ) {
	display: flex;
	flex-direction: column;
}

.sn-page-card--tool-stage-headed:has( [data-pdf-editor] ) .sn-page-card__inner--flush {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

/* Clip children to the card radius so corners stay clean. */
.sn-page-card--tool-stage:has( [data-pdf-editor] ) {
	overflow: hidden;
	border-radius: 1rem;
}

.sn-page-card--tool-stage:has( [data-pdf-editor] ) .sn-page-card__inner--flush {
	padding: 0;
	overflow: hidden;
}

/*
 * After a file is picked: fill the first viewport with equal gaps under the
 * sticky header and above the bottom edge (matches .sn-page-shell pt-3 / lg:pt-4).
 */
.sn-page-card--tool-stage:has( [data-pdf-editor][data-pdf-file-ready] ) {
	--sn-pdf-view-gap: 0.75rem;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	height: calc( 100dvh - var( --sn-header-height, 4.5rem ) - ( 2 * var( --sn-pdf-view-gap ) ) );
	min-height: calc( 100dvh - var( --sn-header-height, 4.5rem ) - ( 2 * var( --sn-pdf-view-gap ) ) );
	margin-bottom: var( --sn-pdf-view-gap );
}

@media (min-width: 1024px) {
	.sn-page-card--tool-stage:has( [data-pdf-editor][data-pdf-file-ready] ) {
		--sn-pdf-view-gap: 1rem;
	}
}

.sn-page-card--tool-stage:has( [data-pdf-editor][data-pdf-file-ready] ) .sn-page-card__inner--flush {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: 100%;
}

.sn-page-card--tool-stage:has( [data-pdf-editor][data-pdf-file-ready] ) .sn-pdf-wrap,
.sn-page-card--tool-stage:has( [data-pdf-editor][data-pdf-file-ready] ) .sn-pdf,
.sn-page-card--tool-stage:has( [data-pdf-editor][data-pdf-file-ready] ) .sn-pdf-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: 100%;
}

.sn-pdf {
	--sn-pdf-blue: #1800ac;
	--sn-pdf-toolbar-blue: #2b7ddb;
	--sn-pdf-blue-soft: #e8e6ff;
	--sn-pdf-yellow: #feb005;
	--sn-pdf-surface: #f4f6f8;
	--sn-pdf-border: #e2e8f0;
	--sn-pdf-text: #0f172a;
	--sn-pdf-muted: #64748b;
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	padding: 0;
	font-family: inherit;
	outline: none;
}

.sn-pdf [hidden] {
	display: none !important;
}

.sn-pdf-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
	min-height: 3rem;
	padding: 0.65rem 0.85rem;
	border-radius: 0;
	background: var(--sn-pdf-toolbar-blue);
	scrollbar-width: none;
}

.sn-pdf-toolbar::-webkit-scrollbar {
	display: none;
}

.sn-pdf-toolbar__item {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.25rem;
	min-height: 2.15rem;
	padding: 0.35rem 0.55rem;
	border-radius: 0.4rem;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.75rem;
	line-height: 1;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.sn-pdf-toolbar__item:hover {
	background: rgba(255, 255, 255, 0.22);
}

.sn-pdf-toolbar__item:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.sn-pdf-toolbar__item.is-active {
	background: var(--sn-pdf-yellow);
	color: var(--sn-pdf-blue);
}

.sn-pdf-toolbar__icon {
	font-size: 1.2rem;
	color: inherit;
}

.sn-pdf-toolbar__dropdown {
	position: relative;
	flex: 0 0 auto;
}

.sn-pdf-toolbar__trigger {
	border: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
}

.sn-pdf-toolbar__caret {
	font-size: 1.05rem;
	margin-left: 0.05rem;
	transition: transform 0.15s ease;
}

.sn-pdf-toolbar__dropdown:hover .sn-pdf-toolbar__caret,
.sn-pdf-toolbar__dropdown.is-open .sn-pdf-toolbar__caret {
	transform: rotate(180deg);
}

.sn-pdf-toolbar__menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	left: 0;
	z-index: 40;
	display: none;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 15.5rem;
	padding: 0.55rem;
	border-radius: 0.55rem;
	background: #fff;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
	color: var(--sn-pdf-text);
}

.sn-pdf-toolbar__dropdown:hover > .sn-pdf-toolbar__menu,
.sn-pdf-toolbar__dropdown.is-open > .sn-pdf-toolbar__menu {
	display: flex !important;
}

.sn-pdf-toolbar__menu-title {
	margin: 0 0 0.35rem;
	padding: 0.2rem 0.45rem 0.45rem;
	border-bottom: 1px solid var(--sn-pdf-border);
	color: var(--sn-pdf-muted);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.sn-pdf-toolbar__menu-item {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.45rem 0.5rem;
	border-radius: 0.4rem;
	color: var(--sn-pdf-text);
	text-decoration: none;
	font-weight: 700;
	font-size: 0.82rem;
	line-height: 1.2;
}

.sn-pdf-toolbar__menu-item:hover,
.sn-pdf-toolbar__menu-item:focus-visible {
	background: #f1f5f9;
	outline: none;
}

.sn-pdf-toolbar__menu-item.is-active {
	color: #dc2626;
	background: #fef2f2;
}

.sn-pdf-toolbar__badge {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 0.35rem;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1;
	position: relative;
	flex: 0 0 auto;
}

.sn-pdf-toolbar__badge--trigger {
	width: 1.35rem;
	height: 1.35rem;
	font-size: 0.55rem;
	border-radius: 0.25rem;
}

.sn-pdf-toolbar__badge--trigger::after {
	width: 0.7rem;
	height: 0.7rem;
	font-size: 0.45rem;
	right: -0.15rem;
	bottom: -0.15rem;
}

.sn-pdf-toolbar__badge--jpg {
	background: #f59e0b;
}

.sn-pdf-toolbar__badge--word {
	background: #2b579a;
}

.sn-pdf-toolbar__badge--ppt {
	background: #c43e1c;
}

.sn-pdf-toolbar__badge--excel {
	background: #217346;
}

.sn-pdf-toolbar__badge--html {
	background: #eab308;
	color: #1f2937;
	font-size: 0.55rem;
}

.sn-pdf-toolbar__badge::after {
	content: "↓";
	position: absolute;
	right: -0.2rem;
	bottom: -0.2rem;
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 0.2rem;
	background: inherit;
	color: #fff;
	font-size: 0.55rem;
	display: grid;
	place-items: center;
	box-shadow: 0 0 0 1px #fff;
}

.sn-pdf-toolbar__badge--html::after {
	color: #1f2937;
}

.sn-pdf-coming-soon {
	max-width: 28rem;
	margin: 0 auto;
	padding: 2rem 1.25rem;
	text-align: center;
	border: 1px dashed var(--sn-pdf-border);
	border-radius: 0.85rem;
	background: #f8fafc;
}

.sn-pdf-coming-soon__icon {
	font-size: 2.25rem;
	color: var(--sn-pdf-toolbar-blue);
}

.sn-pdf-coming-soon__title {
	margin: 0.75rem 0 0.35rem;
	font-family: var(--font-heading, Sora, sans-serif);
	font-size: 1.15rem;
	font-weight: 700;
}

.sn-pdf-coming-soon__text {
	margin: 0;
	color: var(--sn-pdf-muted);
	font-size: 0.92rem;
	line-height: 1.5;
}

.sn-pdf-convert-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	width: 100%;
	height: 100%;
	min-height: 7.5rem;
	border-radius: 0.35rem;
	background: #fff;
}

.sn-pdf-convert-badge__ext {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.1rem;
	padding: 0.15rem 0.4rem;
	border-radius: 0.2rem;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.sn-pdf-convert-badge__mark {
	display: grid;
	place-items: center;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 0.35rem;
	color: #fff;
	font-size: 1.35rem;
	font-weight: 800;
}

.sn-pdf-convert-badge--word .sn-pdf-convert-badge__ext,
.sn-pdf-convert-badge--word .sn-pdf-convert-badge__mark {
	background: #2b579a;
}

.sn-pdf-convert-badge--excel .sn-pdf-convert-badge__ext,
.sn-pdf-convert-badge--excel .sn-pdf-convert-badge__mark {
	background: #217346;
}

.sn-pdf-convert-badge--powerpoint .sn-pdf-convert-badge__ext,
.sn-pdf-convert-badge--powerpoint .sn-pdf-convert-badge__mark {
	background: #c43e1c;
}

.sn-pdf-btn__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	margin-left: 0.35rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
}

.sn-pdf-btn__arrow-icon {
	font-size: 0.95rem;
}

/* Image → PDF options */
.sn-pdf-panel--image .sn-pdf-panel__title {
	text-align: center;
	margin-bottom: 1rem;
}

.sn-pdf-img-opts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
	margin: 0 0 1.1rem;
}

.sn-pdf-img-opts--three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sn-pdf-img-opt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 5.5rem;
	padding: 0.65rem 0.4rem;
	border: 1.5px solid #dbe3ee;
	border-radius: 0.55rem;
	background: #fff;
	color: #64748b;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.sn-pdf-img-opt:hover {
	border-color: var(--sn-pdf-toolbar-blue);
	color: var(--sn-pdf-blue);
}

.sn-pdf-img-opt.is-active {
	border-color: var(--sn-pdf-blue);
	color: var(--sn-pdf-blue);
	background: var(--sn-pdf-blue-soft);
}

.sn-pdf-img-opt__glyph {
	display: block;
	position: relative;
	border: 1.5px solid currentColor;
	border-radius: 0.15rem;
	background: transparent;
}

.sn-pdf-img-opt__glyph--portrait {
	width: 1.35rem;
	height: 1.85rem;
}

.sn-pdf-img-opt__glyph--landscape {
	width: 1.85rem;
	height: 1.35rem;
}

.sn-pdf-img-opt__glyph--margin-none,
.sn-pdf-img-opt__glyph--margin-small,
.sn-pdf-img-opt__glyph--margin-big {
	width: 1.7rem;
	height: 1.7rem;
	background: currentColor;
}

.sn-pdf-img-opt__glyph--margin-small::after,
.sn-pdf-img-opt__glyph--margin-big::after {
	content: "";
	position: absolute;
	inset: 18%;
	border: 1.5px dashed #fff;
	border-radius: 0.1rem;
}

.sn-pdf-img-opt__glyph--margin-big::after {
	inset: 28%;
}

.sn-pdf-img-opt.is-active .sn-pdf-img-opt__glyph--margin-none,
.sn-pdf-img-opt.is-active .sn-pdf-img-opt__glyph--margin-small,
.sn-pdf-img-opt.is-active .sn-pdf-img-opt__glyph--margin-big {
	background: var(--sn-pdf-blue);
}

.sn-pdf-field--select {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 0 1.1rem;
}

.sn-pdf-select {
	width: 100%;
	min-height: 2.5rem;
	padding: 0.55rem 2rem 0.55rem 0.75rem;
	border: 1px solid #dbe3ee;
	border-radius: 0.45rem;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
	color: var(--sn-pdf-text);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	appearance: none;
	cursor: pointer;
}

.sn-pdf-select:focus-visible {
	outline: 2px solid var(--sn-pdf-blue);
	outline-offset: 2px;
}

.sn-pdf-check--merge {
	margin: 0.25rem 0 1rem;
	font-weight: 600;
}

.sn-pdf-merge-card__page--image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 7.25rem;
	height: 9.65rem;
	padding: 0.45rem;
	background: #eef2f7;
	box-shadow: none;
	overflow: hidden;
	transition: width 0.18s ease, height 0.18s ease;
}

.sn-pdf-merge-card__page--image[data-page-size="fit"] {
	background: #e8edf5;
}

.sn-pdf-merge-card__page--image[data-page-size="letter"] {
	background: #eef1f6;
}

.sn-pdf-merge-card:has( .sn-pdf-merge-card__page--image ) .sn-pdf-merge-card__actions {
	top: 0.35rem;
	right: 0.35rem;
}

.sn-pdf-img-page {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: var(--sn-pdf-img-margin, 0%);
	background: #fff;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
	transition: padding 0.15s ease;
}

.sn-pdf-img-page__img {
	display: block;
	/* Match PDF export: fit image inside the page/margin box (scale up or down). */
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	pointer-events: none;
	user-select: none;
}

.sn-pdf-img-page__img.is-pixel {
	image-rendering: -webkit-optimize-contrast;
	image-rendering: crisp-edges;
}

.sn-pdf-main {
	width: 100%;
	min-width: 0;
	padding: 0.85rem 0.75rem 1rem;
}

@media (min-width: 640px) {
	.sn-pdf-toolbar {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}

	.sn-pdf-main {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}

@media (max-width: 639px) {
	.sn-pdf-toolbar {
		flex-wrap: nowrap;
		padding: 0.55rem 0.7rem;
		overflow-x: auto;
		overflow-y: hidden;
		border-radius: 0;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		scroll-snap-type: x proximity;
	}

	.sn-pdf-toolbar__item {
		min-width: 2.75rem;
		min-height: 2.75rem;
		padding: 0.45rem;
		justify-content: center;
		border-radius: 0.55rem;
		scroll-snap-align: start;
	}

	.sn-pdf-toolbar__label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.sn-pdf-toolbar__icon {
		font-size: 1.35rem;
	}

}

.sn-pdf-choose-head {
	text-align: center;
	margin: 0 0 1.75rem;
	padding-top: 0.5rem;
}

.sn-pdf-choose-head__title {
	margin: 0 0 0.55rem;
	font-family: var(--font-heading, Sora, sans-serif);
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 700;
	color: var(--sn-pdf-text);
	line-height: 1.2;
}

.sn-pdf-choose-head__sub {
	margin: 0 auto;
	max-width: 36rem;
	font-size: 1rem;
	color: var(--sn-pdf-muted);
	line-height: 1.5;
}

.sn-pdf-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.15rem;
	padding: 1.5rem 1rem 2rem;
	text-align: center;
}

.sn-pdf-drop__or {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-size: 0.9rem;
	color: var(--sn-pdf-muted);
}

.sn-pdf-drop__or-glyph {
	font-size: 1.1rem;
	color: var(--sn-pdf-muted);
}

.sn-pdf-drop.is-dragover {
	outline: 2px dashed var(--sn-pdf-blue);
	outline-offset: 4px;
	border-radius: 0.75rem;
}

.sn-pdf-drop__reject {
	margin: 0;
	color: #b42318;
	font-size: 0.9rem;
}

.sn-pdf-workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	min-height: 0;
	flex: 1 1 auto;
	height: 100%;
	overflow: visible;
}

@media (min-width: 960px) {
	.sn-pdf-workspace {
		grid-template-columns: minmax(0, 1fr) 300px;
		min-height: 0;
	}
}

.sn-pdf-preview {
	background: var(--sn-pdf-surface);
	border: 1px solid var(--sn-pdf-border);
	border-radius: 0.75rem;
	padding: 1rem 1.25rem 1.75rem;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	min-height: 0;
	position: relative;
	flex: 1 1 auto;
	overflow-x: visible;
	overflow-y: auto;
	flex-direction: column;
	gap: 0.75rem;
}

.sn-pdf-canvas-head {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 100%;
	flex: 0 0 auto;
	margin: 0;
	padding: 0.15rem 0 0.35rem;
	overflow: visible;
	background: transparent;
	pointer-events: none;
}

.sn-pdf-canvas-head__spacer {
	display: none;
}

.sn-pdf-canvas-head__tools {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 0.55rem;
	overflow: visible;
	pointer-events: auto;
	padding: 0.2rem;
	border-radius: 999px;
	background: rgba( 244, 246, 248, 0.94 );
	box-shadow: 0 4px 14px rgba( 15, 23, 42, 0.08 );
}

.sn-pdf-float-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	min-width: 2.65rem;
	height: 2.65rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
	overflow: visible;
}

/* Show tooltip briefly, then auto-hide (~1.5s visible) while still hovered. */
@keyframes sn-pdf-tooltip-auto-hide {
	0% {
		opacity: 0;
		visibility: hidden;
	}
	8% {
		opacity: 1;
		visibility: visible;
	}
	72% {
		opacity: 1;
		visibility: visible;
	}
	100% {
		opacity: 0;
		visibility: hidden;
	}
}

.sn-pdf-float-btn[data-tooltip]::after {
	content: attr( data-tooltip );
	position: absolute;
	top: 50%;
	right: calc( 100% + 0.55rem );
	bottom: auto;
	left: auto;
	transform: translateY( -50% );
	padding: 0.35rem 0.55rem;
	border-radius: 0.35rem;
	background: #0f172a;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba( 15, 23, 42, 0.18 );
	transition: none;
	z-index: 40;
}

.sn-pdf-float-btn[data-tooltip]::before {
	content: '';
	position: absolute;
	top: 50%;
	right: calc( 100% + 0.15rem );
	bottom: auto;
	left: auto;
	transform: translateY( -50% );
	border: 5px solid transparent;
	border-left-color: #0f172a;
	border-top-color: transparent;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: none;
	z-index: 40;
}

.sn-pdf-float-btn[data-tooltip]:hover::after,
.sn-pdf-float-btn[data-tooltip]:hover::before,
.sn-pdf-float-btn[data-tooltip]:focus-visible::after,
.sn-pdf-float-btn[data-tooltip]:focus-visible::before {
	animation: sn-pdf-tooltip-auto-hide 1.75s ease forwards;
}

.sn-pdf-float-btn--add {
	background: var(--sn-pdf-blue);
	color: #fff;
}

.sn-pdf-float-btn--sort {
	background: var(--sn-pdf-yellow);
	color: var(--sn-pdf-blue);
	border: 0;
}

.sn-pdf-float-btn__icon {
	font-size: 1.45rem;
	color: inherit;
}

.sn-pdf-float-btn__sort-az {
	display: inline-flex;
	align-items: center;
	gap: 0.15rem;
	color: inherit;
}

.sn-pdf-sort-az__arrow {
	font-size: 1.15rem !important;
	line-height: 1;
	color: inherit;
}

.sn-pdf-sort-az__arrow--flip {
	transform: scaleY(-1);
}

.sn-pdf-sort-az__letters {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	line-height: 0.9;
}

.sn-pdf-sort-az__letter {
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: inherit;
}

.sn-pdf-float-btn__badge {
	position: absolute;
	top: -0.2rem;
	left: -0.2rem;
	min-width: 1.2rem;
	height: 1.2rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: var(--sn-pdf-yellow);
	color: var(--sn-pdf-blue);
	font-size: 0.68rem;
	font-weight: 800;
	line-height: 1.2rem;
	text-align: center;
}

.sn-pdf-preview__empty {
	margin: 0;
	color: var(--sn-pdf-muted);
	text-align: center;
}

.sn-pdf-preview__ranges {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	align-items: start;
	padding-top: 0;
}

.sn-pdf-preview-range {
	min-width: 0;
	width: 100%;
}

.sn-pdf-preview-range__label {
	margin: 0 0 0.65rem;
	font-weight: 600;
	color: var(--sn-pdf-text);
	text-align: center;
}

.sn-pdf-preview-range__strip {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 0.35rem;
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.55rem 0.55rem;
	border: 2px dashed #cbd5e1;
	border-radius: 0.65rem;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sn-pdf-preview-range:hover .sn-pdf-preview-range__strip {
	border-color: rgba(43, 125, 219, 0.7);
	background: #ffffff;
}

.sn-pdf-preview-range.is-hovered .sn-pdf-preview-range__strip {
	border-color: rgba(43, 125, 219, 0.8);
	box-shadow: 0 0 0 3px rgba(43, 125, 219, 0.12);
}

.sn-pdf-preview-range__thumb {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
	flex: 1 1 0;
	max-width: 6.5rem;
}

.sn-pdf-preview-range__frame,
.sn-pdf-preview-range__thumb > span:first-child {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 3 / 4.2;
	height: auto;
	max-height: 9.5rem;
	border-radius: 0.2rem;
	background: #fff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
	overflow: hidden;
	box-sizing: border-box;
}

.sn-pdf-preview-range__frame canvas,
.sn-pdf-preview-range__thumb canvas {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	display: block;
	border-radius: 0.15rem;
	max-width: calc( 100% - 0.5rem );
	max-height: calc( 100% - 0.5rem );
	width: auto;
	height: auto;
	object-fit: contain;
}

.sn-pdf-preview-range__num {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--sn-pdf-muted);
	line-height: 1;
}

.sn-pdf-preview-range__dots {
	flex: 0 0 auto;
	font-size: 1.25rem;
	color: var(--sn-pdf-muted);
	line-height: 1;
	align-self: center;
	/* Sit beside page frames, not beside page numbers */
	margin-bottom: 1.1rem;
	padding: 0 0.05rem;
}

.sn-pdf-panel {
	background: #fff;
	border: 1px solid var(--sn-pdf-border);
	border-radius: 0.75rem;
	padding: 1.15rem 1.1rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	min-height: 0;
	max-height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
	-webkit-overflow-scrolling: touch;
}

.sn-pdf-panel__title {
	margin: 0;
	text-align: center;
	font-size: 1.35rem;
	font-weight: 800;
}

.sn-pdf-modes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.55rem;
}

.sn-pdf-mode {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 0.7rem 0.35rem;
	border: 1px solid var(--sn-pdf-border);
	border-radius: 0.8rem;
	background: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--sn-pdf-muted);
	cursor: pointer;
}

.sn-pdf-mode__icon {
	font-size: 1.35rem;
}

.sn-pdf-mode.is-active {
	border-color: var(--sn-pdf-blue);
	color: var(--sn-pdf-blue);
	box-shadow: inset 0 0 0 1px var(--sn-pdf-blue);
}

.sn-pdf-field__label {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
}

.sn-pdf-field__hint {
	margin: 0;
	font-size: 0.82rem;
	color: var(--sn-pdf-muted);
	line-height: 1.45;
}

.sn-pdf-seg {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.sn-pdf-seg--pill {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem;
}

.sn-pdf-seg--pill .sn-pdf-seg__btn {
	flex: none;
	width: 100%;
	min-width: 0;
}

.sn-pdf-seg__btn {
	flex: 1 1 auto;
	min-width: 4.5rem;
	padding: 0.4rem 0.55rem;
	border: 1px solid var(--sn-pdf-border);
	border-radius: 999px;
	background: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--sn-pdf-muted);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
}

.sn-pdf-seg__btn.is-active {
	border-color: var(--sn-pdf-blue);
	color: var(--sn-pdf-blue);
}

.sn-pdf-range-row {
	padding: 0.8rem;
	border: 1px solid var(--sn-pdf-border);
	border-radius: 0.85rem;
	background: #f8fafc;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	margin-bottom: 0.6rem;
}

.sn-pdf-range-row:hover {
	background: rgba(232, 230, 255, 0.55);
	border-color: rgba(43, 125, 219, 0.45);
}

.sn-pdf-range-row.is-hovered {
	background: rgba(232, 230, 255, 0.72);
	border-color: rgba(43, 125, 219, 0.65);
	box-shadow: 0 0 0 3px rgba(43, 125, 219, 0.1);
}

.sn-pdf-range-row__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.65rem;
}

.sn-pdf-range-row__title {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 700;
}

.sn-pdf-range-row__drag {
	color: var(--sn-pdf-muted);
	font-size: 0.95rem;
	letter-spacing: -0.1em;
}

.sn-pdf-range-row__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

.sn-pdf-range-row__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.85rem;
	height: 1.85rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #b42318;
	cursor: pointer;
}

.sn-pdf-range-row__remove:hover,
.sn-pdf-range-row__remove:focus-visible {
	background: rgba(180, 35, 24, 0.1);
	outline: none;
}

.sn-pdf-range-row__remove-icon {
	font-size: 1.1rem;
}

.sn-pdf-range-row.is-dragging,
.sn-pdf-range-row.is-dragover {
	border-color: var(--sn-pdf-blue);
	box-shadow: 0 0 0 2px rgba(43, 125, 219, 0.16);
}

.sn-pdf-inline {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.sn-pdf-fixed {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sn-pdf-inline--fixed {
	align-items: flex-start;
}

.sn-pdf-inline--fixed .sn-pdf-input {
	width: 5.5rem;
}

.sn-pdf-inline__label {
	font-size: 0.72rem;
	color: var(--sn-pdf-muted);
}

.sn-pdf-input {
	width: 100%;
	padding: 0.45rem 0.5rem;
	border: 1px solid var(--sn-pdf-border);
	border-radius: 0.4rem;
	font-size: 0.95rem;
	font-weight: 600;
}

.sn-pdf-check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.82rem;
	cursor: pointer;
	padding-top: 0.8rem;
}

.sn-pdf-check input {
	margin-top: 0.15rem;
	accent-color: var(--sn-pdf-blue);
}

.sn-pdf-field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.sn-pdf-pages-select {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.sn-pdf-input--compact {
	width: 5.5rem;
	flex: 0 0 auto;
}

.sn-pdf-size-meta {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.sn-pdf-size-meta__row {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	font-size: 0.9rem;
	color: var(--sn-pdf-ink, #0f172a);
}

.sn-pdf-size-meta__row strong {
	font-weight: 700;
}

.sn-pdf-size-controls {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.sn-pdf-unit-toggle {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem;
	border-radius: 999px;
	background: #e8edf5;
	gap: 0.15rem;
}

.sn-pdf-unit-toggle__btn {
	min-width: 2.75rem;
	padding: 0.35rem 0.7rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--sn-pdf-muted);
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
}

.sn-pdf-unit-toggle__btn.is-active {
	background: #fff;
	color: var(--sn-pdf-ink, #0f172a);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.sn-pdf-info {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	padding: 0.75rem 0.85rem;
	border-radius: 0.65rem;
	background: #e8f1ff;
	color: #1d4ed8;
}

.sn-pdf-info__icon {
	flex: 0 0 auto;
	font-size: 1.15rem;
	line-height: 1;
	margin-top: 0.05rem;
}

.sn-pdf-info__text {
	margin: 0;
	font-size: 0.84rem;
	line-height: 1.45;
	color: #1e3a8a;
}

.sn-pdf-info__text strong {
	font-weight: 800;
}

.sn-pdf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.55rem 0.85rem;
	border-radius: 0.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
}

.sn-pdf-btn--outline {
	width: 100%;
	border-color: var(--sn-pdf-blue);
	color: var(--sn-pdf-blue);
	background: #fff;
}

.sn-pdf-panel__body {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.sn-pdf-btn--tiny {
	width: auto;
	align-self: center;
	margin: 0.1rem auto 0;
	padding: 0.38rem 0.85rem;
	font-size: 0.78rem;
	border-radius: 999px;
}

.sn-pdf-btn--ghost {
	border-color: var(--sn-pdf-border);
	background: #fff;
}

.sn-pdf-btn--primary {
	width: 100%;
	background: var(--sn-pdf-blue);
	color: #fff;
}

.sn-pdf-btn--primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	box-shadow: none;
}

.sn-pdf-panel__actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: auto;
	flex: 0 0 auto;
	position: sticky;
	bottom: 0;
	z-index: 3;
	padding-top: 0.65rem;
	padding-bottom: 0.15rem;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 28%, #fff 100%);
}

.sn-pdf-page-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 0.75rem;
	max-height: none;
	overflow: visible;
}

.sn-pdf-page-thumb {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem;
	border: 2px solid transparent;
	border-radius: 0.75rem;
	background: var(--sn-pdf-surface);
	cursor: pointer;
}

.sn-pdf-page-thumb.is-selected {
	border-color: var(--sn-pdf-blue);
	background: var(--sn-pdf-blue-soft);
}

.sn-pdf-page-thumb:hover {
	border-color: rgba(43, 125, 219, 0.55);
	background: #fff;
}

.sn-pdf-page-thumb__frame {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 7.25rem;
	height: 10.25rem;
	background: #fff;
	border-radius: 0.55rem;
	padding: 0.4rem;
	overflow: hidden;
}

.sn-pdf-page-thumb__frame canvas {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.sn-pdf-page-thumb__num {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sn-pdf-muted);
}

.sn-pdf-error {
	margin: 0;
	font-size: 0.85rem;
	color: #b42318;
}

.sn-pdf-stage--editor {
	position: relative;
	flex: 1 1 auto;
	height: auto;
	min-height: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.sn-pdf-stage--download {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	-webkit-overflow-scrolling: touch;
}

.sn-page-card--tool-stage:has( [data-pdf-editor][data-pdf-download-ready] ) .sn-pdf-main {
	overflow: hidden;
}

.sn-pdf-stage--choose,
.sn-pdf-hub {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

/* Choose-file stage: taller card + more air above the tool title. */
.sn-pdf-stage--choose {
	min-height: 26rem;
	padding-top: 1.75rem;
	padding-bottom: 2rem;
	box-sizing: border-box;
}

@media (min-width: 640px) {
	.sn-pdf-stage--choose {
		min-height: 28rem;
		padding-top: 2.25rem;
		padding-bottom: 2.5rem;
	}
}

.sn-pdf-busy {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	background: rgba(255, 255, 255, 0.88);
	border-radius: 0.75rem;
}

.sn-pdf-busy[hidden] {
	display: none !important;
}

.sn-pdf-busy__spinner {
	width: 2rem;
	height: 2rem;
	border: 3px solid var(--sn-pdf-border);
	border-top-color: var(--sn-pdf-blue);
	border-radius: 50%;
	animation: sn-pdf-spin 0.8s linear infinite;
}

@keyframes sn-pdf-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sn-pdf-busy__spinner {
		animation: none;
	}
}

/* Match Choose File button to the PDF toolbar blue (not brand indigo). */
.sn-pdf-drop .sn-file-choose-wrap {
	--sn-file-choose-blue: var(--sn-pdf-toolbar-blue);
	--sn-file-choose-blue-hover: #1f6bc0;
	--sn-file-choose-blue-soft: rgba(43, 125, 219, 0.22);
	width: min(100%, 24rem);
}

.sn-pdf-drop .sn-file-choose {
	min-height: 4.5rem;
	font-size: 1.2rem;
	box-shadow: 0 8px 22px rgba(43, 125, 219, 0.28);
}

.sn-pdf-drop .sn-file-choose__main {
	padding: 1.15rem 1.65rem;
}

.sn-pdf-drop .sn-file-choose__caret {
	min-width: 3.5rem;
	padding: 0 1.1rem;
}

.sn-pdf-hub__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-width: 36rem;
	margin-inline: auto;
}

.sn-pdf-hub__card {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.85rem 1rem;
	border: 1px solid var(--sn-pdf-border);
	border-radius: 0.65rem;
	background: #fff;
	text-decoration: none;
	color: var(--sn-pdf-text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sn-pdf-hub__card:hover {
	border-color: var(--sn-pdf-blue);
	box-shadow: 0 2px 8px rgba(24, 0, 172, 0.08);
}

.sn-pdf-hub__glyph {
	font-size: 1.6rem;
	color: var(--sn-pdf-blue);
}

.sn-pdf-hub__body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	flex: 1;
	min-width: 0;
}

.sn-pdf-hub__label {
	font-weight: 700;
	font-size: 1rem;
}

.sn-pdf-hub__meta {
	font-size: 0.8rem;
	color: var(--sn-pdf-muted);
}

.sn-pdf-hub__arrow {
	font-size: 1.25rem;
	color: var(--sn-pdf-muted);
}

.sn-pdf-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sn-pdf-preview--manage {
	align-items: flex-start;
	justify-content: flex-start;
	overflow-x: hidden;
	overflow-y: auto;
	flex-direction: column;
	padding-top: 1rem;
	padding-bottom: 1.75rem;
}

.sn-pdf-merge-add {
	width: 100%;
	border: 1px solid var(--sn-pdf-blue);
	border-radius: 0.55rem;
	background: #fff;
	color: var(--sn-pdf-blue);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 0.75rem 1rem;
	cursor: pointer;
	font-weight: 800;
}

.sn-pdf-merge-add--toolbar {
	width: auto;
	padding: 0.35rem;
	border-radius: 999px;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.sn-pdf-merge-add__plus {
	width: 2.15rem;
	height: 2.15rem;
	border-radius: 999px;
	background: var(--sn-pdf-blue);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.sn-pdf-merge-add__plus span,
.sn-pdf-merge-add__plus svg {
	font-size: 1.2rem;
}

.sn-pdf-merge-add__badge {
	min-width: 1.55rem;
	height: 1.55rem;
	padding: 0 0.4rem;
	border-radius: 999px;
	background: var(--sn-pdf-blue-soft);
	color: var(--sn-pdf-blue);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: 900;
}

.sn-pdf-merge-add__label {
	white-space: nowrap;
}

.sn-pdf-merge-add--toolbar .sn-pdf-merge-add__label {
	display: none;
}

.sn-pdf-file-list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	width: 100%;
}

.sn-pdf-merge-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1.1rem;
	width: 100%;
	align-items: start;
	padding-top: 0;
	isolation: isolate;
}

.sn-pdf-merge-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.55rem;
	min-width: 0;
	cursor: grab;
	z-index: 1;
	transition: transform 0.18s ease;
}

.sn-pdf-merge-card:hover,
.sn-pdf-merge-card:focus-within {
	z-index: 40;
}

.sn-pdf-merge-card.is-dragging,
.sn-pdf-merge-card.is-placeholder {
	cursor: grabbing;
	z-index: 25;
	opacity: 1;
}

.sn-pdf-merge-card.is-placeholder .sn-pdf-merge-card__page,
.sn-pdf-merge-card.is-placeholder .sn-pdf-merge-card__actions,
.sn-pdf-merge-card.is-placeholder .sn-pdf-merge-card__name {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.sn-pdf-merge-card.is-placeholder .sn-pdf-merge-card__shell {
	border: 2px dashed #94a3b8;
	background: rgba( 248, 250, 252, 0.9 );
	box-shadow: none;
}

.sn-pdf-merge-card.is-placeholder .sn-pdf-merge-card__shell[data-tooltip]::after,
.sn-pdf-merge-card.is-placeholder .sn-pdf-merge-card__shell[data-tooltip]::before {
	opacity: 0 !important;
	visibility: hidden !important;
}

.sn-pdf-merge-drag-ghost {
	cursor: grabbing;
	opacity: 0.95;
	box-shadow: 0 12px 28px rgba( 15, 23, 42, 0.18 );
	pointer-events: none !important;
}

.sn-pdf-merge-drag-ghost .sn-pdf-merge-card__actions,
.sn-pdf-merge-drag-ghost .sn-pdf-merge-card__shell[data-tooltip]::after,
.sn-pdf-merge-drag-ghost .sn-pdf-merge-card__shell[data-tooltip]::before {
	display: none !important;
}

.sn-pdf-merge-drag-ghost .sn-pdf-merge-card__shell {
	border-color: rgba( 24, 0, 172, 0.45 );
	background: #fff;
}

.sn-pdf-merge-card.is-dragover .sn-pdf-merge-card__shell {
	border-color: rgba(43, 125, 219, 0.75);
}

.sn-pdf-merge-card__shell {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 12.75rem;
	min-height: 12.75rem;
	padding: 0.85rem;
	border: 2px dashed #cbd5e1;
	border-radius: 0.65rem;
	background: #fff;
	overflow: visible;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sn-pdf-merge-card:hover .sn-pdf-merge-card__shell,
.sn-pdf-merge-card:focus-within .sn-pdf-merge-card__shell {
	border-color: rgba(24, 0, 172, 0.45);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.sn-pdf-merge-card__shell[data-tooltip]::after {
	content: attr( data-tooltip );
	position: absolute;
	left: 50%;
	top: auto;
	bottom: calc( 100% + 0.5rem );
	transform: translateX( -50% );
	padding: 0.4rem 0.65rem;
	border-radius: 0.4rem;
	background: #0f172a;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba( 15, 23, 42, 0.2 );
	transition: none;
	z-index: 50;
}

.sn-pdf-merge-card__shell[data-tooltip]::before {
	content: '';
	position: absolute;
	left: 50%;
	top: auto;
	bottom: calc( 100% + 0.15rem );
	transform: translateX( -50% );
	border: 5px solid transparent;
	border-top-color: #0f172a;
	border-bottom-color: transparent;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: none;
	z-index: 50;
}

.sn-pdf-merge-card:hover .sn-pdf-merge-card__shell[data-tooltip]::after,
.sn-pdf-merge-card:hover .sn-pdf-merge-card__shell[data-tooltip]::before {
	animation: sn-pdf-tooltip-auto-hide 1.75s ease forwards;
}

.sn-pdf-merge-card:has( .sn-pdf-merge-card__btn:hover ) .sn-pdf-merge-card__shell[data-tooltip]::after,
.sn-pdf-merge-card:has( .sn-pdf-merge-card__btn:hover ) .sn-pdf-merge-card__shell[data-tooltip]::before,
.sn-pdf-merge-card:has( .sn-pdf-merge-card__btn:focus-visible ) .sn-pdf-merge-card__shell[data-tooltip]::after,
.sn-pdf-merge-card:has( .sn-pdf-merge-card__btn:focus-visible ) .sn-pdf-merge-card__shell[data-tooltip]::before {
	animation: none;
	opacity: 0;
	visibility: hidden;
}

.sn-pdf-merge-card__page {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 6.85rem;
	height: 9.65rem;
	padding: 0.35rem;
	border-radius: 0.2rem;
	background: #fff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
	overflow: hidden;
	transform: rotate( var( --sn-pdf-merge-rotation, 0deg ) );
	transition: transform 0.18s ease;
}

.sn-pdf-merge-card__page canvas {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
}

.sn-pdf-merge-card__actions {
	position: absolute;
	top: 0.45rem;
	right: 0.45rem;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY( -2px );
	transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
	z-index: 10;
}

.sn-pdf-merge-card:hover .sn-pdf-merge-card__actions,
.sn-pdf-merge-card:focus-within .sn-pdf-merge-card__actions {
	opacity: 1;
	visibility: visible;
	transform: translateY( 0 );
}

.sn-pdf-merge-card__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--sn-pdf-text);
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
	overflow: visible;
	z-index: 11;
}

.sn-pdf-merge-card__btn-icon {
	font-size: 1.1rem !important;
	line-height: 1;
	color: inherit;
}

.sn-pdf-merge-card__btn--rotate:hover,
.sn-pdf-merge-card__btn--rotate:focus-visible {
	background: var(--sn-pdf-blue);
	color: #fff;
	outline: none;
}

.sn-pdf-merge-card__btn--remove:hover,
.sn-pdf-merge-card__btn--remove:focus-visible {
	background: var(--sn-pdf-yellow);
	color: var(--sn-pdf-blue);
	outline: none;
}

.sn-pdf-merge-card__btn[data-tooltip]::after {
	content: attr( data-tooltip );
	position: absolute;
	top: 50%;
	right: calc( 100% + 0.45rem );
	bottom: auto;
	left: auto;
	transform: translateY( -50% );
	padding: 0.35rem 0.55rem;
	border-radius: 0.35rem;
	background: #0f172a;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba( 15, 23, 42, 0.2 );
	transition: none;
	z-index: 30;
}

.sn-pdf-merge-card__btn[data-tooltip]::before {
	content: '';
	position: absolute;
	top: 50%;
	right: calc( 100% + 0.1rem );
	bottom: auto;
	left: auto;
	transform: translateY( -50% );
	border: 5px solid transparent;
	border-left-color: #0f172a;
	border-top-color: transparent;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: none;
	z-index: 30;
}

.sn-pdf-merge-card__btn[data-tooltip]:hover::after,
.sn-pdf-merge-card__btn[data-tooltip]:hover::before,
.sn-pdf-merge-card__btn[data-tooltip]:focus-visible::after,
.sn-pdf-merge-card__btn[data-tooltip]:focus-visible::before {
	animation: sn-pdf-tooltip-auto-hide 1.75s ease forwards;
}

.sn-pdf-merge-card__name {
	display: block;
	width: 100%;
	max-width: 11.5rem;
	overflow: hidden;
	color: var(--sn-pdf-text);
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sn-pdf-merge-sortbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	margin-bottom: 0.75rem;
	position: sticky;
	top: 0;
	z-index: 2;
	padding-bottom: 0.3rem;
	background: linear-gradient(to bottom, var(--sn-pdf-surface), rgba(244, 246, 248, 0.92));
}

.sn-pdf-merge-sortbar__label {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--sn-pdf-text);
}

.sn-pdf-merge-sortbar__buttons {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.sn-pdf-merge-sortbar__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.55rem 0.7rem;
	border-radius: 999px;
	border: 1px solid var(--sn-pdf-border);
	background: #fff;
	cursor: pointer;
	font-weight: 700;
	color: var(--sn-pdf-blue);
	font-size: 0.8rem;
}

.sn-pdf-merge-sortbar__btn:hover,
.sn-pdf-merge-sortbar__btn:focus-visible {
	border-color: var(--sn-pdf-blue);
	outline: none;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(43, 125, 219, 0.35);
}

.sn-pdf-merge-sortbar__icon {
	font-size: 1.05rem;
}

.sn-pdf-merge-sortbar__text {
	white-space: nowrap;
}

.sn-pdf-file-item {
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 1fr) auto;
	gap: 0.75rem;
	align-items: center;
	width: 100%;
	padding: 0.65rem;
	border: 1px solid var(--sn-pdf-border);
	border-radius: 0.55rem;
	background: #fff;
}

.sn-pdf-file-item:hover {
	border-color: rgba(43, 125, 219, 0.55);
}

.sn-pdf-file-item.is-dragover {
	outline: 2px dashed var(--sn-pdf-blue);
	outline-offset: 0;
}

.sn-pdf-file-item.is-dragging {
	border-color: var(--sn-pdf-blue);
	background: var(--sn-pdf-blue-soft);
}

.sn-pdf-page-card.is-dragging {
	opacity: 0.65;
}

.sn-pdf-file-item__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 4.5rem;
	border-radius: 0.35rem;
	background: var(--sn-pdf-surface);
	overflow: hidden;
}

.sn-pdf-file-item__thumb canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

.sn-pdf-file-item__body {
	min-width: 0;
}

.sn-pdf-file-item__name {
	display: block;
	overflow: hidden;
	color: var(--sn-pdf-text);
	font-size: 0.88rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sn-pdf-file-item__meta,
.sn-pdf-manage-status {
	margin: 0.2rem 0 0;
	color: var(--sn-pdf-muted);
	font-size: 0.78rem;
}

.sn-pdf-remove-list {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.sn-pdf-remove-list__label {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--sn-pdf-text);
}

.sn-pdf-remove-list__items {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.sn-pdf-remove-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.45rem 0.65rem;
	border-radius: 999px;
	border: 1px solid var(--sn-pdf-border);
	background: #fff;
	color: var(--sn-pdf-blue);
	font-weight: 800;
	cursor: pointer;
}

.sn-pdf-remove-chip:hover,
.sn-pdf-remove-chip:focus-visible {
	border-color: var(--sn-pdf-blue);
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(43, 125, 219, 0.25);
	outline: none;
}

.sn-pdf-remove-chip__x {
	color: #b42318;
	font-weight: 900;
}

.sn-pdf-item-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem;
}

.sn-pdf-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 1px solid var(--sn-pdf-border);
	border-radius: 0.35rem;
	background: #fff;
	color: var(--sn-pdf-blue);
	cursor: pointer;
}

.sn-pdf-icon-btn--round {
	width: 2.35rem;
	height: 2.35rem;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.sn-pdf-icon-btn:hover,
.sn-pdf-icon-btn:focus-visible {
	border-color: var(--sn-pdf-blue);
	background: var(--sn-pdf-blue-soft);
	outline: none;
}

.sn-pdf-icon-btn:focus-visible {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sn-pdf-blue);
}

.sn-pdf-icon-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.sn-pdf-icon-btn__icon {
	font-size: 1.15rem;
}

.sn-pdf-manage-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
	gap: 0.9rem;
	width: 100%;
}

.sn-pdf-page-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.sn-pdf-page-card--remove.is-selected .sn-pdf-page-card__page canvas {
	opacity: 0.38;
}

.sn-pdf-page-card--remove.is-selected .sn-pdf-page-card__number {
	opacity: 0.45;
}

.sn-pdf-page-card--remove:hover .sn-pdf-page-card__shell {
	border-color: rgba(43, 125, 219, 0.55);
}

.sn-pdf-remove-x {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #e5322d;
	opacity: 0;
	pointer-events: none;
	z-index: 3;
}

.sn-pdf-remove-x__icon {
	font-size: 2.75rem !important;
	font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 48;
	font-weight: 700;
	line-height: 1;
	color: inherit;
}

.sn-pdf-page-card--remove.is-selected .sn-pdf-remove-x {
	opacity: 1;
}

.sn-pdf-page-card--extract.is-selected .sn-pdf-page-card__shell {
	border-color: rgba(24, 0, 172, 0.45);
}

.sn-pdf-page-card--extract .sn-pdf-page-card__select:disabled {
	cursor: default;
}

.sn-pdf-extract-tick {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #16a34a;
	opacity: 0;
	pointer-events: none;
}

.sn-pdf-page-card--extract.is-selected .sn-pdf-extract-tick {
	opacity: 1;
}

.sn-pdf-page-card--extract.is-selected .sn-pdf-page-card__page canvas {
	opacity: 0.38;
}

.sn-pdf-extract-tick__icon {
	font-size: 2.75rem !important;
	font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 48;
	font-weight: 700;
	line-height: 1;
	color: inherit;
}

.sn-pdf-preview__pages {
	width: 100%;
}

.sn-pdf-preview__file {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	width: 100%;
	/* Room above the card so size/pages tooltip is not clipped */
	padding: 2.75rem 0.35rem 1.25rem;
	overflow: visible;
}

.sn-pdf-merge-card--size-source {
	cursor: default;
	max-width: 11rem;
	overflow: visible;
	z-index: 2;
}

.sn-pdf-merge-card--size-source .sn-pdf-merge-card__shell {
	overflow: visible;
}

.sn-pdf-merge-card--size-source .sn-pdf-merge-card__actions {
	display: none;
}

.sn-pdf-page-card__select {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.45rem;
	align-items: center;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.sn-pdf-page-card__select:hover {
	background: transparent;
}

.sn-pdf-page-card__shell {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 12.5rem;
	padding: 0.85rem;
	border: 2px dashed #cbd5e1;
	border-radius: 0.65rem;
	background: transparent;
}

.sn-pdf-page-card__page {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 7.25rem;
	height: 10.25rem;
	padding: 0.4rem;
	border-radius: 0.2rem;
	background: #fff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
	overflow: hidden;
	transform: rotate(var(--sn-pdf-page-rotation, 0deg));
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.sn-pdf-page-card__page canvas {
	display: block;
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: opacity 0.18s ease;
}

.sn-pdf-page-card__number {
	color: var(--sn-pdf-muted);
	font-size: 0.78rem;
	font-weight: 600;
	transition: opacity 0.18s ease;
}

.sn-pdf-item-actions--page {
	justify-content: center;
}

.sn-pdf-item-actions--page .sn-pdf-icon-btn {
	width: 1.75rem;
	height: 1.75rem;
}

/* ————— Organize PDF (multi-file) ————— */

.sn-pdf-canvas-head--organize {
	position: sticky;
	top: 0;
	align-items: flex-start;
}

.sn-pdf-float-btn--mini {
	min-width: 2.35rem;
	height: 2.35rem;
	background: #fff;
	color: var(--sn-pdf-text);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

.sn-pdf-float-btn--mini:hover,
.sn-pdf-float-btn--mini:focus-visible {
	background: var(--sn-pdf-blue);
	color: #fff;
	outline: none;
}

.sn-pdf-mix-glyph {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	line-height: 1;
	color: inherit;
}

.sn-pdf-mix-glyph__row {
	font-size: 0.6rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: inherit;
}

.sn-pdf-manage-grid--organize {
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1.1rem 1.35rem;
	padding-left: 3.1rem;
	padding-right: 3.1rem;
	isolation: isolate;
}

.sn-pdf-org-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
	cursor: grab;
	z-index: 1;
}

.sn-pdf-org-card:hover,
.sn-pdf-org-card:focus-within {
	z-index: 40;
}

.sn-pdf-org-card__shell {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 12.5rem;
	padding: 0.85rem;
	border: 2px solid var(--sn-org-c, #cbd5e1);
	border-radius: 0.75rem;
	background: #fff;
	overflow: visible;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sn-pdf-org-card:hover .sn-pdf-org-card__shell,
.sn-pdf-org-card:focus-within .sn-pdf-org-card__shell,
.sn-pdf-org-card.is-file-hot .sn-pdf-org-card__shell {
	box-shadow: 0 0 0 2px var(--sn-org-c, #cbd5e1), 0 8px 20px rgba(15, 23, 42, 0.1);
}

.sn-pdf-org-card__page {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 7.25rem;
	height: 10.25rem;
	padding: 0.4rem;
	border-radius: 0.2rem;
	background: #fff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
	overflow: hidden;
	transform: rotate(var(--sn-pdf-page-rotation, 0deg));
	transition: transform 0.18s ease;
}

.sn-pdf-org-card__page canvas {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.sn-pdf-org-card--blank .sn-pdf-org-card__page {
	border: 1px solid var(--sn-pdf-border);
	box-shadow: none;
	color: var(--sn-pdf-muted);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: lowercase;
}

.sn-pdf-org-card__number {
	color: var(--sn-pdf-muted);
	font-size: 0.78rem;
	font-weight: 600;
	min-height: 1em;
}

.sn-pdf-org-card__actions {
	position: absolute;
	top: 0.4rem;
	right: 0.4rem;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-2px);
	transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
	z-index: 10;
}

.sn-pdf-org-card:hover .sn-pdf-org-card__actions,
.sn-pdf-org-card:focus-within .sn-pdf-org-card__actions {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* “Add a blank page” buttons on both left and right edges of a hovered card. */
.sn-pdf-org-card__gap {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.15rem;
	height: 2.15rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--sn-pdf-blue);
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease, background 0.15s ease, color 0.15s ease;
	z-index: 12;
}

.sn-pdf-org-card__gap--after {
	right: -1.45rem;
}

.sn-pdf-org-card__gap--before {
	left: -1.45rem;
}

.sn-pdf-org-card:hover .sn-pdf-org-card__gap,
.sn-pdf-org-card:focus-within .sn-pdf-org-card__gap,
.sn-pdf-org-card__gap:focus-visible {
	opacity: 1;
	visibility: visible;
}

.sn-pdf-org-card__gap:hover,
.sn-pdf-org-card__gap:focus-visible {
	background: var(--sn-pdf-blue);
	color: #fff;
	outline: none;
}

.sn-pdf-org-card__gap-icon {
	font-size: 1.15rem !important;
	line-height: 1;
	color: inherit;
}

.sn-pdf-org-card__gap[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 0.5rem);
	transform: translateX(-50%);
	padding: 0.35rem 0.55rem;
	border-radius: 0.35rem;
	background: #0f172a;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
	transition: none;
	z-index: 30;
}

.sn-pdf-org-card__gap[data-tooltip]:hover::after,
.sn-pdf-org-card__gap[data-tooltip]:focus-visible::after {
	animation: sn-pdf-tooltip-auto-hide 1.75s ease forwards;
}

/* Drag states — same ghost/placeholder logic as merge cards. */
.sn-pdf-org-card.is-dragging,
.sn-pdf-org-card.is-placeholder {
	cursor: grabbing;
	z-index: 25;
}

.sn-pdf-org-card.is-placeholder .sn-pdf-org-card__page,
.sn-pdf-org-card.is-placeholder .sn-pdf-org-card__actions,
.sn-pdf-org-card.is-placeholder .sn-pdf-org-card__gap,
.sn-pdf-org-card.is-placeholder .sn-pdf-org-card__number {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.sn-pdf-org-card.is-placeholder .sn-pdf-org-card__shell {
	border: 2px dashed #94a3b8;
	background: rgba(248, 250, 252, 0.9);
	box-shadow: none;
}

.sn-pdf-merge-drag-ghost .sn-pdf-org-card__shell {
	box-shadow: none;
}

.sn-pdf-merge-drag-ghost .sn-pdf-org-card__actions,
.sn-pdf-merge-drag-ghost .sn-pdf-org-card__gap {
	display: none !important;
}

/* Sidebar file list */
.sn-pdf-organize-files {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.sn-pdf-organize-files__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.sn-pdf-organize-files__label {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--sn-pdf-text);
}

.sn-pdf-organize-files__reset {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--sn-pdf-blue);
	font-size: 0.8rem;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.sn-pdf-organize-files__reset:hover,
.sn-pdf-organize-files__reset:focus-visible {
	color: #12007a;
	outline: none;
}

.sn-pdf-organize-files__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.sn-pdf-org-chip {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.6rem;
	border-radius: 0.35rem;
	border: 1px solid transparent;
	background: var(--sn-org-c-soft, #f1f5f9);
	color: var(--sn-pdf-text);
	font-size: 0.78rem;
	font-weight: 600;
	cursor: grab;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sn-pdf-org-chip.is-hot,
.sn-pdf-org-chip:hover {
	border-color: var(--sn-org-c, #cbd5e1);
	box-shadow: 0 0 0 1px var(--sn-org-c, #cbd5e1);
}

.sn-pdf-org-chip.is-dragging {
	opacity: 0.55;
	cursor: grabbing;
}

.sn-pdf-org-chip__handle {
	flex: 0 0 auto;
	font-size: 1rem !important;
	color: var(--sn-pdf-muted);
}

.sn-pdf-org-chip__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* URL dialog — multiple URL rows */
.sn-file-url-dialog__rows {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sn-file-url-dialog__row {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.sn-file-url-dialog__row .sn-file-url-dialog__input {
	flex: 1 1 auto;
	min-width: 0;
}

.sn-file-url-dialog__remove {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #b42318;
	cursor: pointer;
}

.sn-file-url-dialog__remove:hover,
.sn-file-url-dialog__remove:focus-visible {
	background: rgba(180, 35, 24, 0.1);
	outline: none;
}

.sn-file-url-dialog__remove-icon {
	font-size: 1.1rem;
}

.sn-file-url-dialog__add {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	align-self: flex-start;
	margin-top: 0.5rem;
	padding: 0.35rem 0.75rem;
	border: 1px solid var(--sn-pdf-blue, #1800ac);
	border-radius: 999px;
	background: #fff;
	color: var(--sn-pdf-blue, #1800ac);
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
}

.sn-file-url-dialog__add:hover,
.sn-file-url-dialog__add:focus-visible {
	background: var(--sn-pdf-blue-soft, #e8e6ff);
	outline: none;
}

.sn-file-url-dialog__add-icon {
	font-size: 1rem;
}

@media (max-width: 639px) {
	.sn-pdf-manage-grid--organize {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding-left: 1.9rem;
		padding-right: 1.9rem;
	}
}

@media (max-width: 1100px) {
	.sn-pdf-preview__ranges {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 800px) {
	.sn-pdf-preview__ranges {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 500px) {
	.sn-pdf-preview__ranges {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 639px) {
	.sn-pdf-file-item {
		grid-template-columns: 3rem minmax(0, 1fr);
	}

	.sn-pdf-file-item .sn-pdf-item-actions {
		grid-column: 1 / -1;
		justify-content: flex-end;
	}

	.sn-pdf-manage-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Compress PDF — compression level sidebar */
.sn-pdf-compress-levels {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0 0 1.1rem;
}

.sn-pdf-compress-level {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	width: 100%;
	margin: 0;
	padding: 0.8rem 0.85rem;
	border: 1.5px solid var(--sn-pdf-border);
	border-radius: 0.7rem;
	background: #fff;
	color: var(--sn-pdf-text);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.sn-pdf-compress-level:hover {
	border-color: var(--sn-pdf-blue);
}

.sn-pdf-compress-level:focus-visible {
	outline: 2px solid var(--sn-pdf-blue);
	outline-offset: 2px;
}

.sn-pdf-compress-level.is-active {
	border-color: var(--sn-pdf-blue);
	background: var(--sn-pdf-blue-soft);
	box-shadow: 0 1px 6px rgba(24, 0, 172, 0.12);
}

.sn-pdf-compress-level__icon {
	flex: 0 0 auto;
	font-size: 1.55rem;
	color: var(--sn-pdf-blue);
}

.sn-pdf-compress-level:nth-child(even) .sn-pdf-compress-level__icon {
	color: var(--sn-pdf-yellow);
}

.sn-pdf-compress-level__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.sn-pdf-compress-level__title {
	font-weight: 700;
	font-size: 0.82rem;
	line-height: 1.3;
	color: var(--sn-pdf-text);
}

.sn-pdf-compress-level.is-active .sn-pdf-compress-level__title {
	color: var(--sn-pdf-blue);
}

.sn-pdf-compress-level__hint {
	font-size: 0.76rem;
	line-height: 1.35;
	color: var(--sn-pdf-muted);
}

.sn-pdf-compress-level__radio {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	border: 1.5px solid var(--sn-pdf-border);
	border-radius: 9999px;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sn-pdf-compress-level.is-active .sn-pdf-compress-level__radio {
	border-color: var(--sn-pdf-blue);
	background: var(--sn-pdf-blue);
}

.sn-pdf-compress-level__check {
	font-size: 0.95rem;
	color: #fff;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.sn-pdf-compress-level.is-active .sn-pdf-compress-level__check {
	opacity: 1;
}

.sn-pdf-compress-stats {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin: 0 0 0.85rem;
	padding: 0.7rem 0.85rem;
	border-radius: 0.6rem;
	background: var(--sn-pdf-surface);
}

.sn-pdf-compress-stats__row {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--sn-pdf-muted);
}

.sn-pdf-compress-stats__row:empty {
	display: none;
}

.sn-pdf-compress-result {
	margin: 0 0 0.85rem;
	padding: 0.7rem 0.85rem;
	border-radius: 0.6rem;
	background: #e6f6ec;
	border: 1px solid #b7e4c7;
	font-size: 0.8rem;
	line-height: 1.45;
	font-weight: 600;
	color: #14532d;
}

/* Download view — shared by all PDF tools */
.sn-pdf-download {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.45rem;
	width: 100%;
	max-width: 42rem;
	margin: 0 auto;
	padding: 1.75rem 0.75rem 2rem;
	box-sizing: border-box;
}

.sn-pdf-download__title {
	margin: 0;
	text-align: center;
	font-family: var(--font-heading, Sora, sans-serif);
	font-size: clamp(1.35rem, 2.4vw, 1.85rem);
	font-weight: 800;
	line-height: 1.25;
	color: var(--sn-pdf-text);
}

.sn-pdf-download__toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.8rem;
	flex-wrap: wrap;
	width: 100%;
	max-width: 32rem;
}

.sn-pdf-download__back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	flex: 0 0 auto;
	border: 0;
	border-radius: 999px;
	background: #334155;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
	transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sn-pdf-download__back:hover,
.sn-pdf-download__back:focus-visible {
	background: #1e293b;
	transform: translateY(-1px);
	box-shadow: 0 9px 20px rgba(15, 23, 42, 0.18);
}

.sn-pdf-download__back:focus-visible {
	outline: 2px solid var(--sn-pdf-blue);
	outline-offset: 2px;
}

.sn-pdf-download__back-icon {
	font-size: 1.35rem;
	color: inherit;
}

.sn-pdf-download__cta {
	flex: 1 1 14rem;
	min-height: 3.15rem;
	max-width: 26rem;
	border-radius: 0.8rem;
	font-size: 1rem;
	background: var(--sn-pdf-toolbar-blue);
	box-shadow: 0 12px 24px rgba(43, 125, 219, 0.28);
	transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.sn-pdf-download__cta:hover,
.sn-pdf-download__cta:focus-visible {
	transform: translateY(-1px);
	background: #1f6bc0;
	box-shadow: 0 16px 30px rgba(43, 125, 219, 0.32);
}

.sn-pdf-download__stats {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.15rem;
	flex-wrap: wrap;
	width: 100%;
	max-width: 34rem;
	padding: 1rem 1.15rem;
	border: 1px solid rgba(24, 0, 172, 0.1);
	border-radius: 1rem;
	background:
		radial-gradient(circle at top left, rgba(254, 176, 5, 0.12), transparent 34%),
		linear-gradient(135deg, #fff 0%, #f8f7ff 100%);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
	box-sizing: border-box;
}

.sn-pdf-download__ring {
	--sn-pdf-saved: 0%;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 5.75rem;
	height: 5.75rem;
	border-radius: 999px;
	background: conic-gradient(var(--sn-pdf-toolbar-blue) var(--sn-pdf-saved), #e7f1fb 0);
	box-shadow: inset 0 0 0 1px rgba(43, 125, 219, 0.08), 0 8px 20px rgba(43, 125, 219, 0.12);
	transition: --sn-pdf-saved 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sn-pdf-download__ring::before {
	content: '';
	position: absolute;
	inset: 0.45rem;
	border-radius: inherit;
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(43, 125, 219, 0.06);
}

.sn-pdf-download__ring-value,
.sn-pdf-download__ring-label {
	position: relative;
	z-index: 1;
}

.sn-pdf-download__ring-value {
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--sn-pdf-toolbar-blue);
}

.sn-pdf-download__ring-label {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--sn-pdf-muted);
}

.sn-pdf-download__stats-text {
	margin: 0;
	flex: 1 1 12rem;
	font-size: 0.98rem;
	line-height: 1.45;
	font-weight: 700;
	color: var(--sn-pdf-text);
	text-align: left;
}

.sn-pdf-download__notice {
	margin: 0;
	width: 100%;
	max-width: 34rem;
	padding: 0.8rem 1rem;
	border-radius: 0.85rem;
	border: 1px solid rgba(254, 176, 5, 0.38);
	background: linear-gradient(135deg, #fffaf0 0%, #fff 100%);
	color: #7c4a03;
	font-size: 0.86rem;
	line-height: 1.45;
	font-weight: 600;
	text-align: center;
	box-sizing: border-box;
}

@media (max-width: 639px) {
	.sn-pdf-download {
		padding: 1.15rem 0.35rem 1.5rem;
		gap: 1.1rem;
	}

	.sn-pdf-download__toolbar {
		display: grid;
		grid-template-columns: 2.75rem minmax(0, 1fr);
		gap: 0.6rem;
	}

	.sn-pdf-download__cta {
		max-width: none;
	}

	.sn-pdf-download__stats-text {
		text-align: center;
	}
}

/* HTML → PDF */
.sn-pdf-workspace--html {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 20rem);
	gap: 0;
	/*
	 * Fill the tool stage like every other PDF workspace. A fixed vh height is
	 * taller than the stage on headed tool cards, so the stage clipped the
	 * bottom of the action bar.
	 */
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	align-items: stretch;
	overflow: hidden;
}

.sn-pdf-html-preview {
	position: relative;
	/* Stretch to the grid row; a min-height here would push past the stage. */
	min-height: 0;
	height: 100%;
	background:
		radial-gradient(circle at 20% 10%, rgba(148, 163, 184, 0.18), transparent 42%),
		#e8edf3;
	border-right: 1px solid #dbe3ee;
	overflow: auto;
}

.sn-pdf-html-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 28rem;
	padding: 2rem 1.5rem;
	text-align: center;
	box-sizing: border-box;
}

.sn-pdf-html-state[hidden] {
	display: none !important;
}

.sn-pdf-html-state--loading {
	background: #334155;
	color: #fff;
}

.sn-pdf-html-state--ready {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	padding: 0.85rem 1rem 1.15rem;
	min-height: 100%;
	height: 100%;
	box-sizing: border-box;
	text-align: left;
}

.sn-pdf-html-page-scaler {
	width: 100%;
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	min-height: 0;
	overflow: auto;
	padding-bottom: 0.5rem;
}

.sn-pdf-html-page-stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	margin: 0 auto;
}

.sn-pdf-html-page {
	position: relative;
	box-sizing: border-box;
	flex-shrink: 0;
	background: #fff;
	border: 1px solid #cbd5e1;
	box-shadow:
		0 1px 0 rgba(15, 23, 42, 0.04),
		0 12px 32px rgba(15, 23, 42, 0.12);
	overflow: hidden;
}

.sn-pdf-html-page.is-landscape {
	box-shadow:
		0 1px 0 rgba(15, 23, 42, 0.04),
		0 14px 36px rgba(15, 23, 42, 0.14);
}

.sn-pdf-html-page.is-long-page {
	overflow: visible;
}

.sn-pdf-html-page--ghost {
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		repeating-linear-gradient(
			-12deg,
			#f8fafc,
			#f8fafc 10px,
			#f1f5f9 10px,
			#f1f5f9 20px
		);
	color: #94a3b8;
	border-style: dashed;
}

.sn-pdf-html-page__ghost-label {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.sn-pdf-html-page__content {
	box-sizing: border-box;
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #fff;
}

.sn-pdf-html-page__content.is-long-page {
	overflow: visible;
	height: auto;
}

.sn-pdf-html-frame-viewport {
	position: relative;
	overflow: hidden;
	max-width: 100%;
}

.sn-pdf-html-page__content.is-long-page .sn-pdf-html-frame-viewport {
	overflow: visible;
}

.sn-pdf-html-frame-wrap {
	position: absolute;
	top: 0;
	left: 0;
	margin: 0;
	max-width: none;
	background: #fff;
	border: 0;
	box-shadow: none;
	overflow: hidden;
	transform-origin: top left;
	will-change: transform;
}

.sn-pdf-html-frame {
	display: block;
	width: 100%;
	min-height: 0;
	height: auto;
	border: 0;
	background: #fff;
	pointer-events: none;
}

.sn-pdf-html-state__icon {
	font-size: 2.5rem;
	color: #94a3b8;
}

.sn-pdf-html-state__icon--error {
	color: #e11d48;
}

.sn-pdf-html-state__title {
	margin: 0;
	font-family: var(--font-heading, Sora, sans-serif);
	font-size: 1.15rem;
	font-weight: 700;
	color: #1e293b;
}

.sn-pdf-html-state--loading .sn-pdf-html-state__title {
	color: #fff;
}

.sn-pdf-html-state__text,
.sn-pdf-html-state__status,
.sn-pdf-html-state__hint {
	margin: 0;
	max-width: 26rem;
	color: #64748b;
	font-size: 0.9rem;
	line-height: 1.5;
}

.sn-pdf-html-state--loading .sn-pdf-html-state__status {
	color: #e2e8f0;
	font-weight: 600;
}

.sn-pdf-html-state--loading .sn-pdf-html-state__hint {
	color: #94a3b8;
	font-size: 0.78rem;
}

.sn-pdf-html-spinner {
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--sn-pdf-yellow);
	animation: sn-pdf-html-spin 0.85s linear infinite;
}

@keyframes sn-pdf-html-spin {
	to {
		transform: rotate(360deg);
	}
}

.sn-pdf-panel--html {
	/* Options scroll inside .sn-pdf-panel__scroll so the action bar stays a footer. */
	overflow: hidden;
	max-height: calc(100vh - 8rem);
	padding-bottom: 1.15rem;
}

.sn-pdf-panel--html .sn-pdf-panel__scroll {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-right: 0.4rem;
	margin-right: -0.4rem;
}

.sn-pdf-panel--html .sn-pdf-panel__actions {
	position: static;
	padding-top: 0.9rem;
	padding-bottom: 0;
	border-top: 1px solid var(--sn-pdf-border);
	background: #fff;
}

.sn-pdf-panel--html .sn-pdf-error:not([hidden]) + .sn-pdf-panel__actions {
	padding-top: 0;
	border-top: 0;
}

.sn-pdf-panel--html .sn-pdf-panel__title {
	text-align: center;
	margin-bottom: 0.85rem;
}

.sn-pdf-html-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.3rem;
	margin: 0 0 0.85rem;
	padding: 0.25rem;
	border-radius: 0.55rem;
	background: #f1f5f9;
}

.sn-pdf-html-tab {
	border: 0;
	border-radius: 0.4rem;
	padding: 0.5rem 0.25rem;
	background: transparent;
	color: #64748b;
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
	line-height: 1.2;
}

.sn-pdf-html-tab.is-active {
	background: #fff;
	color: var(--sn-pdf-blue);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.sn-pdf-html-url {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: stretch;
	gap: 0;
	border: 1.5px solid #dbe3ee;
	border-radius: 0.5rem;
	overflow: hidden;
	background: #fff;
}

.sn-pdf-html-url__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 0.55rem;
	color: #94a3b8;
	background: #f8fafc;
	border-right: 1px solid #e2e8f0;
}

.sn-pdf-html-url__glyph {
	font-size: 1.1rem;
}

.sn-pdf-html-url__input {
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	min-width: 0;
}

.sn-pdf-html-url__refresh {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.55rem;
	border: 0;
	background: var(--sn-pdf-blue);
	color: #fff;
	cursor: pointer;
}

.sn-pdf-html-url__refresh:hover {
	background: #12007a;
}

.sn-pdf-html-url__refresh-icon {
	font-size: 1.15rem;
}

.sn-pdf-textarea,
.sn-pdf-html-code {
	display: block;
	width: 100%;
	min-height: 7.5rem;
	padding: 0.65rem 0.75rem;
	border: 1.5px solid #dbe3ee;
	border-radius: 0.5rem;
	background: #fff;
	color: #0f172a;
	font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	resize: vertical;
	box-sizing: border-box;
}

.sn-pdf-textarea:focus,
.sn-pdf-html-code:focus {
	outline: none;
	border-color: var(--sn-pdf-blue);
}

.sn-pdf-html-load-code-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	margin: 0.65rem 0 1rem;
	padding: 0.55rem 0.95rem;
	min-height: 2.35rem;
	border-radius: 999px;
	line-height: 1.2;
}

.sn-pdf-html-load-code-btn .sn-pdf-btn__icon {
	font-size: 1rem;
}

.sn-pdf-html-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-height: 8.5rem;
	padding: 1rem 0.85rem;
	border: 1.5px dashed #cbd5e1;
	border-radius: 0.65rem;
	background: #f8fafc;
	text-align: center;
	cursor: pointer;
	position: relative;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sn-pdf-html-drop:hover,
.sn-pdf-html-drop:focus-visible,
.sn-pdf-html-drop.is-dragover {
	border-color: var(--sn-pdf-blue);
	background: var(--sn-pdf-blue-soft);
	outline: none;
}

.sn-pdf-html-drop__icon {
	font-size: 1.75rem;
	color: var(--sn-pdf-blue);
}

.sn-pdf-html-drop__title {
	margin: 0;
	font-size: 0.86rem;
	font-weight: 700;
	color: #334155;
}

.sn-pdf-html-drop__hint {
	margin: 0;
	font-size: 0.75rem;
	color: #94a3b8;
}

.sn-pdf-html-drop__input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	font-size: 0;
}

.sn-pdf-html-file-name {
	margin: 0.55rem 0 0;
	font-size: 0.78rem;
	font-weight: 600;
	color: #475569;
	word-break: break-word;
}

.sn-pdf-html-file {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.4rem;
	margin: 0.65rem 0 0.85rem;
}

.sn-pdf-html-file__label {
	font-size: 0.78rem;
	font-weight: 600;
	color: #64748b;
}

.sn-pdf-check--html {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 1rem;
}

.sn-pdf-html-info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 1.05rem;
	height: 1.05rem;
	margin-left: 0.15rem;
	border: 0;
	border-radius: 999px;
	background: var(--sn-pdf-blue);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 800;
	line-height: 1;
	cursor: help;
	vertical-align: middle;
}

.sn-pdf-html-info[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	z-index: 30;
	right: 50%;
	bottom: calc(100% + 0.55rem);
	width: min(15rem, 70vw);
	padding: 0.5rem 0.65rem;
	border-radius: 0.5rem;
	background: #0f172a;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
	opacity: 0;
	pointer-events: none;
	transform: translate(50%, 0.25rem);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.sn-pdf-html-info[data-tooltip]::before {
	content: "";
	position: absolute;
	z-index: 31;
	right: 50%;
	bottom: calc(100% + 0.25rem);
	width: 0.55rem;
	height: 0.55rem;
	background: #0f172a;
	opacity: 0;
	pointer-events: none;
	transform: translate(50%, 0.25rem) rotate(45deg);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.sn-pdf-html-info[data-tooltip]:hover::after,
.sn-pdf-html-info[data-tooltip]:hover::before,
.sn-pdf-html-info[data-tooltip]:focus-visible::after,
.sn-pdf-html-info[data-tooltip]:focus-visible::before {
	opacity: 1;
	transform: translate(50%, 0) rotate(0);
}

.sn-pdf-html-info[data-tooltip]:hover::before,
.sn-pdf-html-info[data-tooltip]:focus-visible::before {
	transform: translate(50%, 0) rotate(45deg);
}

.sn-pdf-html-info:focus-visible {
	outline: 2px solid rgba(24, 0, 172, 0.35);
	outline-offset: 2px;
}

.sn-pdf-panel--html .sn-pdf-check input {
	accent-color: var(--sn-pdf-blue);
}

@media (max-width: 900px) {
	/*
	 * Stacked layout: scroll the stage instead of squeezing the options panel
	 * into the leftover strip under the preview.
	 */
	.sn-pdf[data-convert-kind="html"] .sn-pdf-stage--editor {
		overflow-x: hidden;
		overflow-y: auto;
	}

	.sn-pdf-workspace--html {
		grid-template-columns: 1fr;
		flex: 0 0 auto;
		height: auto;
		min-height: 0;
		overflow: visible;
	}

	.sn-pdf-html-preview {
		border-right: 0;
		border-bottom: 1px solid #dbe3ee;
		min-height: 22rem;
		height: auto;
		max-height: 70vh;
	}

	.sn-pdf-html-state,
	.sn-pdf-html-state--ready {
		min-height: 18rem;
		height: auto;
	}

	/* Panel grows to its full height; the stage scrolls, so nothing is clipped. */
	.sn-pdf-panel--html {
		max-height: none;
		overflow: visible;
	}

	/* No inner scroll box — the options run full height and the stage scrolls. */
	.sn-pdf-panel--html .sn-pdf-panel__scroll {
		display: contents;
	}
}
