/*
 * Free passport photo tool (board 98 screens; boards 99 and 100 for the tool page's start screen).
 * Loaded with /passport-photo-tool/, and on the photo guide only when "Check my photo" is tapped.
 */

/* ---------- Full-screen dialog (photo guide) ---------- */

html.pt-open {
	overflow: hidden;
}

.pt-dialog {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--c-pale);
	color: var(--c-charcoal);
}

.pt-dialog::backdrop {
	background: rgba(27, 36, 39, 0.55);
}

.pt-dialog .pt {
	height: 100%;
	max-width: 560px;
	margin: 0 auto;
	background: var(--c-white);
	box-shadow: 0 0 0 1px var(--c-border);
}

@supports (height: 100dvh) {
	.pt-dialog {
		height: 100dvh;
	}
}

/* ---------- The component ---------- */

.pt {
	display: flex;
	flex-direction: column;
	font-family: var(--font);
	color: var(--c-charcoal);
	background: var(--c-white);
}

.pt [hidden] {
	display: none !important;
}

.pt-bar {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px 10px 16px;
	border-bottom: 1px solid var(--c-border);
	background: var(--c-white);
}

.pt-bar__title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: var(--c-charcoal);
}

.pt-steps {
	display: flex;
	gap: 4px;
	padding-top: 4px;
}

.pt-steps span {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: #C9D6D8;
}

.pt-steps .is-done {
	background: var(--c-teal);
}

.pt-steps .is-current {
	width: 18px;
	background: var(--c-teal);
}

.pt-close {
	width: var(--tap);
	height: var(--tap);
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 12px;
	background: var(--c-pale);
	color: var(--c-charcoal);
	cursor: pointer;
}

.pt-close:hover {
	background: var(--c-pale-2);
}

.pt-screen {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.pt-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px;
}

.pt-foot {
	flex: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 16px 16px;
	border-top: 1px solid var(--c-border);
	background: var(--c-white);
}

.pt-btn {
	min-height: 50px;
	font-size: 16px;
}

.pt-link {
	align-self: center;
	min-height: var(--tap);
	padding: 6px 8px;
	border: 0;
	background: none;
	font: 700 14px var(--font);
	color: var(--c-teal);
	text-decoration: underline;
	cursor: pointer;
}

.pt-link:hover {
	color: var(--c-teal-hover);
}

.pt-small {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--c-muted);
}

.pt-h {
	margin: 0;
	text-align: center;
	font-size: 22px;
	font-weight: 800;
	color: var(--c-charcoal);
}

.pt-chip {
	margin: 0;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	color: var(--c-charcoal);
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
}

.pt-message {
	margin: 0;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--c-amber-tint);
	color: var(--c-charcoal);
	font-size: 14px;
	line-height: 1.5;
}

/* 1 · Take or upload */

.pt-start {
	overflow-y: auto;
}

.pt-start__text {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 18px;
}

.pt-start__art {
	width: 140px;
	height: 140px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--c-border);
	border-radius: 14px;
	background: var(--c-pale);
}

.pt-intro {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--c-body);
}

.pt-privacy {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}

.pt-privacy__icon {
	flex: none;
	padding-top: 1px;
	color: var(--c-teal);
}

/* 2 · Camera */

.pt-cam {
	background: #1B2427;
	color: #DCE6E7;
}

.pt-cam__stage {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 14px 30px 16px;
	overflow-y: auto;
}

.pt-cam__frame {
	position: relative;
	width: min(100%, 52vh, 480px);
	aspect-ratio: 1 / 1;
	border-radius: 6px;
	overflow: hidden;
	background: #11181A;
}

/* Sized and centred by photo-tool.js (layoutPreview), so the frame shows the middle of the
   camera's picture at the preview zoom on every phone (iPhone Safari ignores object-fit here). */
.pt-cam__frame video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	display: block;
}

.pt-cam__frame video.is-mirrored {
	transform: scaleX(-1); /* The preview only, like a mirror; the photo itself is never flipped. */
}

.pt-oval {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.pt-cam__label {
	position: absolute;
	left: 6%;
	padding: 1px 5px;
	border-radius: 4px;
	background: rgba(27, 36, 39, 0.75);
	color: var(--c-amber);
	font-size: 11px;
	font-weight: 800;
}

.pt-cam__label--top {
	top: 3%;
}

.pt-cam__label--chin {
	top: 77%;
}

.pt-cam__tip {
	max-width: 330px;
	margin: 0;
	text-align: center;
	font-size: 13px;
	line-height: 1.5;
	color: #DCE6E7;
}

.pt-cam__tip--fallback {
	margin-top: -8px;
}

/* Phones and tablets (touch screens) see the camera app line; computers see the phone line. */
.pt-on-touch {
	display: none;
}

@media (hover: none) and (pointer: coarse) {
	.pt-on-touch {
		display: inline;
	}

	.pt-on-mouse {
		display: none;
	}
}

/* Three columns, the outer two equal, so the shutter stays centered between the labeled side buttons. */
.pt-cam__bar {
	flex: none;
	height: 130px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	padding: 0 12px;
	background: #11181A;
}

/* Board 98 (November 16): the whole column is the button; the 22 px top padding keeps the circle
   level with the shutter and the label hangs below. */
.pt-cam__side {
	width: 100%;
	min-height: 44px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 22px 0 0;
	border: 0;
	background: none;
	color: var(--c-white);
	font: inherit;
	cursor: pointer;
}

.pt-cam__side-label {
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.pt-round {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: var(--c-white);
	cursor: pointer;
}

.pt-cam__side[hidden] {
	display: none; /* Switch camera with only one camera; the grid keeps the shutter centered. */
}

.pt-shutter {
	width: 74px;
	height: 74px;
	border: 4px solid var(--c-white);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
	cursor: pointer;
}

.pt-shutter:active {
	background: rgba(255, 255, 255, 0.5);
}

.pt-cam button:focus-visible {
	outline: 3px solid var(--c-amber);
	outline-offset: 3px;
}

/* Checking */

.pt-checking {
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 40px 18px;
	text-align: center;
	font-size: 15px;
	color: var(--c-body);
}

.pt-checking p {
	margin: 0;
}

.pt-spinner {
	width: 36px;
	height: 36px;
	border: 4px solid var(--c-border);
	border-top-color: var(--c-teal);
	border-radius: 999px;
	animation: pt-spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.pt-spinner {
		animation-duration: 3s;
	}
}

/* 3 · Results */

.pt-thumb {
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	background: #F1EDE6;
}

.pt-thumb--52 {
	width: 52px;
	height: 52px;
}

.pt-thumb--72 {
	width: 72px;
	height: 72px;
}

.pt-summary {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 12px;
	border-radius: 14px;
	background: var(--c-amber-tint);
}

.pt-summary__title {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	color: var(--c-charcoal);
}

.pt-summary--small .pt-summary__title {
	font-size: 16px;
}

.pt-summary__sub {
	margin: 0;
	font-size: 13px;
	color: var(--c-body);
}

.pt-checks {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pt-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 9px 0;
	border-top: 1px solid var(--c-hairline);
}

.pt-check__icon {
	flex: none;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--c-good-bg);
	color: var(--c-good);
}

.pt-check.is-fail .pt-check__icon {
	background: #FBEAEA;
	color: #B42318;
}

.pt-check.is-unsure .pt-check__icon {
	background: var(--c-amber-tint);
	color: var(--c-warn);
}

.pt-check__label {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--c-charcoal);
}

.pt-check__tip {
	margin: 2px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c-body);
}

/* Opt-in plain background (November 16; no board yet). */
.pt-check__action {
	display: block;
	min-height: var(--tap);
	padding: 6px 0;
	text-align: left;
}

.pt-compare {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
}

.pt-compare figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pt-compare canvas {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	border: 1px solid var(--c-border);
	border-radius: 6px;
	background: var(--c-pale);
}

.pt-compare figcaption {
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	color: var(--c-charcoal);
}

.pt-check__tip strong {
	color: var(--c-charcoal);
}

.pt-check__confirm {
	display: flex;
	gap: 8px;
	align-items: center;
	min-height: var(--tap);
	font-size: 13px;
	font-weight: 700;
	color: var(--c-charcoal);
	cursor: pointer;
}

.pt-check__confirm input,
.pt-agree input {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--c-teal);
}

.pt-cant {
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--c-pale);
}

.pt-cant h3 {
	margin: 0;
	font-size: 13px;
	font-weight: 800;
	color: var(--c-charcoal);
}

.pt-cant ul {
	margin: 4px 0 0;
	padding-left: 18px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c-body);
}

.pt-cant li {
	margin: 0 0 4px;
}

/* 4 · Downloads */

.pt-downloads .pt-scroll {
	gap: 9px;
	padding: 12px 16px;
}

.pt-passed {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	border-radius: 14px;
	background: var(--c-good-bg);
}

.pt-passed__title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: var(--c-good);
}

.pt-passed p {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--c-body);
}

.pt-file {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 10px 12px;
	border: 1px solid var(--c-border);
	border-radius: 14px;
}

.pt-file__art {
	position: relative;
	flex: none;
	padding-top: 2px;
}

.pt-file__art canvas {
	display: block;
	width: 48px;
	height: 48px;
	border: 1px solid #C9D6D8;
	background: #F1EDE6;
}

.pt-sheet {
	width: 70px;
	height: 48px;
	display: flex;
	gap: 3px;
	align-items: center;
	justify-content: center;
	border: 1px solid #C9D6D8;
	border-radius: 4px;
	background: var(--c-white);
}

.pt-sheet canvas {
	width: 29px;
	height: 29px;
	border: 0;
}

.pt-file__badge {
	position: absolute;
	right: -6px;
	bottom: -6px;
	padding: 2px 4px;
	border-radius: 4px;
	background: var(--c-teal);
	color: var(--c-white);
	font-size: 9px;
	font-weight: 800;
}

/* Board 98 screens 4 and 4b (handoff update nov16c): title, what it's for, spec, then one Download. */
.pt-file__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pt-file__title {
	margin: 0;
	font-size: 14px;
	font-weight: 800;
	color: var(--c-charcoal);
}

.pt-file__purpose {
	margin: 2px 0 0;
	font-size: 13px;
	line-height: 1.4;
	font-weight: 600;
	color: var(--c-charcoal);
}

.pt-file__spec {
	margin: 2px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--c-muted);
}

.pt-file__note--plain {
	margin-top: 2px;
}

.pt-dl {
	width: 100%;
	min-height: var(--tap);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 14px;
	border: 2px solid var(--c-teal);
	border-radius: 10px;
	background: var(--c-white);
	color: var(--c-teal);
	font: 800 14px var(--font);
	cursor: pointer;
}

.pt-dl[hidden] {
	display: none;
}

/* Too small for online renewal (4b): in the button's place. */
.pt-toosmall {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	padding: 10px 12px;
	border-radius: 10px;
	background: #FDF4E3;
}

.pt-toosmall[hidden] {
	display: none;
}

.pt-toosmall__icon {
	flex: none;
	padding-top: 1px;
	color: #B7791F;
}

.pt-toosmall__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pt-toosmall__text {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c-charcoal);
}

.pt-toosmall__link {
	align-self: flex-start;
	min-height: var(--tap);
	margin: -8px 0 -12px -6px;
	padding: 0 6px;
	border: 0;
	background: none;
	color: var(--c-teal);
	font: 800 13px var(--font);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.pt-dl-main {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.pt-dl:hover {
	background: var(--c-pale);
}

.pt-print {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	border: 2px solid var(--c-teal);
	border-radius: 14px;
	background: var(--c-pale);
}

.pt-print__top {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.pt-print__icon {
	flex: none;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--c-border);
	border-radius: 10px;
	background: var(--c-white);
	color: var(--c-teal);
}

.pt-print__title {
	margin: 0;
	font-size: 14px;
	font-weight: 800;
	color: var(--c-charcoal);
}

.pt-print p {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--c-body);
}

.pt-print__button {
	min-height: var(--tap);
	border: 0;
	border-radius: 10px;
	background: var(--c-teal);
	color: var(--c-white);
	font: 800 14px var(--font);
	cursor: pointer;
}

.pt-print__button:hover {
	background: var(--c-teal-hover);
}

.pt-print[data-added] .pt-print__button,
.pt-print__button[hidden] {
	display: none;
}

/* "Add to my order" opens the consent in the box (Roman, November 17): the attorney-approved
   text, the "I agree" box and a small amber "Start order". */
.pt-print__consent {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--c-border);
}

.pt-print__consent[hidden] {
	display: none;
}

.pt-print .pt-consent__text {
	font-size: 13px;
	line-height: 1.5;
}

.pt-print__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	align-items: center;
}

/* "Cancel" beside "Start order" (November 17): a plain text link that closes the box. */
.pt-print__cancel {
	min-height: var(--tap);
	padding: 0;
	border: 0;
	background: none;
	color: var(--c-teal);
	font: 700 14px var(--font);
	text-decoration: underline;
	cursor: pointer;
}

.pt-print__added {
	font-weight: 700;
	color: var(--c-good) !important;
}

.pt-ordering {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--c-body);
}

.pt-ordering strong {
	color: var(--c-charcoal);
}

/* The consent inside "We print it for you" */

.pt-consent__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--c-body);
}

.pt-agree {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	min-height: var(--tap);
	font-size: 14px;
	line-height: 1.5;
	color: var(--c-charcoal);
	cursor: pointer;
}

.pt-agree input {
	margin-top: 1px;
}

.pt-send-note {
	margin: 0;
	font-size: 13px;
	color: #B42318;
}

.pt-send-note:empty {
	display: none;
}

[data-pt-send]:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------- In place on /passport-photo-tool/ (boards 99 and 100) ---------- */

.pt--inline {
	border: 1px solid var(--c-border);
	border-radius: 20px;
	overflow: hidden;
	/* clip keeps the rounded corners without making the card a scroll box, so the downloads
	   footer can stick to the bottom of the screen (browsers without clip keep hidden). */
	overflow: clip;
}

.pt--inline[data-screen="start"] .pt-bar {
	display: none;
}

.pt--inline .pt-screen:not(.pt-start) {
	min-height: min(760px, 88vh);
}

.pt--inline .pt-screen:not(.pt-start) > * {
	width: 100%;
	max-width: 560px;
	margin-inline: auto;
}

.pt--inline .pt-cam > .pt-cam__bar {
	max-width: none;
}

@media (min-width: 768px) {
	.pt--inline {
		border-radius: 22px;
	}

	.pt--inline .pt-start {
		display: grid;
		grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
		gap: 28px;
		align-items: center;
		padding: 24px;
	}

	.pt--inline .pt-start__text {
		gap: 12px;
		padding: 0;
	}

	.pt--inline .pt-h {
		text-align: left;
	}

	.pt--inline .pt-intro {
		font-size: 15px;
	}

	.pt--inline .pt-start .pt-small:first-of-type {
		font-size: 13px;
	}

	.pt-start__preview {
		position: relative;
		height: 420px;
		border-radius: 18px;
		overflow: hidden;
		background: #1B2427;
	}

	.pt-start__preview .pt-chip {
		position: absolute;
		top: 12px;
		left: 50%;
		z-index: 1;
		transform: translateX(-50%);
		padding: 6px 12px;
	}

	.pt-start__face {
		position: absolute;
		top: 50px;
		left: calc(50% - 175px);
		width: 350px;
		height: 350px;
		border-radius: 6px;
		overflow: hidden;
		background: #F1EDE6;
	}

	.pt-start__face img {
		display: block;
		width: 100%;
		height: 100%;
	}
}

/* ---------- The /passport-photo-tool/ page around the tool ---------- */

.photo-tool-hero {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.photo-tool-hero > * {
	max-width: 1000px; /* Board 99: the intro block is 1,000 px wide at most. */
}

.photo-tool-hero h1,
.photo-tool-hero p {
	margin: 0;
}

.photo-tool-hero__rules {
	font-size: 14px;
	font-weight: 700;
	color: var(--c-teal);
}

.photo-tool-wrap {
	padding-bottom: 24px;
}

.photo-tool-below {
	padding-bottom: 28px;
}

.photo-tool-below__note {
	margin: 0;
	padding: 14px;
	border: 1.5px dashed var(--c-field);
	border-radius: 16px;
	background: var(--c-pale);
	font-size: 13px;
	line-height: 1.55;
	color: var(--c-body);
}

.photo-tool-below__note strong {
	color: var(--c-charcoal);
}

@media (min-width: 768px) {
	.photo-tool-hero__rules {
		font-size: 16px;
	}

	.photo-tool-wrap {
		padding-bottom: 32px;
	}

	.photo-tool-below {
		padding-bottom: 48px;
	}

	.photo-tool-below__note {
		padding: 18px 22px;
		font-size: 15px;
	}
}

/* The local test readout (?pt-debug=1, local and test copies only). */
.pt-debug {
	margin: 0;
	padding: 10px;
	border-radius: 8px;
	background: #11181A;
	color: #DCE6E7;
	font: 11px/1.4 ui-monospace, Menlo, monospace;
	white-space: pre-wrap;
	overflow-x: auto;
}

/* "Check this yourself" line under the summary, and the online renewal row's note (November 10). */
.pt-summary__line {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c-body);
}

.pt-file__note {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--c-warn);
}

.pt-link:disabled {
	color: var(--c-muted);
	text-decoration: none;
	cursor: not-allowed;
}

/* The status line takes focus for screen readers; it is not a control, so no focus ring. */
.pt-checking p:focus,
.pt-summary__title:focus,
.pt-passed__title:focus {
	outline: none;
}

/* ---------- The large photo view (board 106, handoff update nov16b) ---------- */

/* The thumbnail opens it: a zoom badge on its corner, and "View larger" beside it. */
.pt-thumb-btn {
	position: relative;
	flex: none;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: none;
	cursor: zoom-in;
}

.pt-thumb-btn .pt-thumb {
	display: block;
}

.pt-thumb-btn__badge {
	position: absolute;
	right: -6px;
	bottom: -6px;
	width: 24px;
	height: 24px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--c-white);
	border-radius: 999px;
	background: var(--c-teal);
	color: var(--c-white);
}

.pt-summary__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pt-view-larger {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: var(--tap);
	margin: -10px 0 -12px -8px;
	padding: 0 8px;
	border: 0;
	background: none;
	color: var(--c-teal);
	font: 800 13px var(--font, 'Plus Jakarta Sans', sans-serif);
	cursor: pointer;
}

.pt-view-larger:hover {
	text-decoration: underline;
}

html.pt-zoom-open {
	overflow: hidden;
}

/* Phones: the view fills the screen. */
.pt-zoom {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--c-white);
	color: var(--c-charcoal);
	font-family: inherit;
}

@supports (height: 100dvh) {
	.pt-zoom {
		height: 100dvh;
	}
}

.pt-zoom[open] {
	display: flex;
	flex-direction: column;
}

.pt-zoom::backdrop {
	background: rgba(17, 24, 26, 0.55);
}

.pt-zoom__bar {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px 10px 16px;
	border-bottom: 1px solid var(--c-border);
}

.pt-zoom__title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: var(--c-charcoal);
}

.pt-zoom__close-text {
	display: none;
}

.pt-zoom__body {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.pt-zoom__media {
	flex: none;
	background: #1B2427;
}

.pt-zoom__stage {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #F1EDE6;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	cursor: zoom-in;
}

.pt-zoom__stage.is-zoomed {
	cursor: grab;
}

.pt-zoom__stage canvas {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	transform-origin: 0 0;
	-webkit-touch-callout: none;
}

.pt-zoom__chip {
	position: absolute;
	left: 12px;
	bottom: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(17, 24, 26, 0.78);
	color: var(--c-white);
	font-size: 12px;
	font-weight: 800;
	pointer-events: none;
}

.pt-zoom__reset {
	position: absolute;
	right: 12px;
	bottom: 12px;
	min-height: 36px;
	padding: 0 12px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	color: var(--c-teal);
	font: 800 13px var(--font, 'Plus Jakarta Sans', sans-serif);
	cursor: pointer;
}

/* The chip, the reset pill and the hidden attribute: hidden wins. */
.pt-zoom__chip[hidden],
.pt-zoom__reset[hidden],
.pt-zoom__checks[hidden] {
	display: none;
}

.pt-zoom__controls {
	display: none;
}

.pt-zoom__side {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px 16px 0;
}

.pt-zoom__hint {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--c-muted);
	text-align: center;
}

.pt-zoom__checks-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.pt-zoom__checks-head h3 {
	margin: 0;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--c-muted);
}

.pt-zoom__checks-head span {
	font-size: 13px;
	font-weight: 700;
	color: var(--c-teal);
}

.pt-zoom__checks ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pt-zoom__item {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--tap);
	padding: 4px 0;
	border-top: 1px solid var(--c-hairline);
	font-size: 14px;
	font-weight: 700;
	color: var(--c-charcoal);
	cursor: pointer;
}

.pt-zoom__item input {
	flex: none;
	width: 24px;
	height: 24px;
	margin: 0;
	accent-color: var(--c-teal);
}

.pt-zoom__item-text {
	display: flex;
	flex-direction: column;
}

/* Phones show the item names only; the computer dialog adds each item's line. */
.pt-zoom__item-desc {
	display: none;
}

.pt-zoom__foot {
	position: sticky;
	bottom: 0;
	margin: auto -16px 0;
	padding: 10px 16px 16px;
	border-top: 1px solid var(--c-border);
	background: var(--c-white);
}

.pt-zoom__foot .pt-btn {
	gap: 6px;
}

/* Computers: a 1000 px dialog, the photo at 560 px with − / + under it, the items beside it. */
@media (min-width: 768px) {
	.pt-zoom {
		width: min(1000px, calc(100% - 32px));
		height: auto;
		max-height: calc(100% - 48px);
		margin: auto;
		border-radius: 22px;
		box-shadow: 0 24px 64px rgba(17, 24, 26, 0.35);
		overflow: hidden;
	}

	.pt-zoom__bar {
		padding: 14px 16px 14px 28px;
	}

	.pt-zoom__title {
		font-size: 20px;
	}

	.pt-zoom__close {
		width: auto;
		gap: 6px;
		padding: 0 12px;
		font: 800 14px var(--font, 'Plus Jakarta Sans', sans-serif);
	}

	.pt-zoom__close-text {
		display: inline;
	}

	.pt-zoom__body {
		display: grid;
		grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
		gap: 32px;
		padding: 24px 28px 28px;
	}

	.pt-zoom__media {
		display: flex;
		flex-direction: column;
		gap: 12px;
		background: none;
	}

	.pt-zoom__stage {
		border-radius: 8px;
	}

	/* On computers the zoom shows between − and +, and there's no reset pill. */
	.pt-zoom__chip,
	.pt-zoom__reset {
		display: none;
	}

	.pt-zoom__controls {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		flex-wrap: wrap;
	}

	.pt-zoom__step {
		width: var(--tap);
		height: var(--tap);
		border: 1.5px solid var(--c-border);
		border-radius: 12px;
		background: var(--c-white);
		color: var(--c-charcoal);
		font: 800 20px var(--font, 'Plus Jakarta Sans', sans-serif);
		cursor: pointer;
	}

	.pt-zoom__step:disabled {
		color: var(--c-border);
		cursor: default;
	}

	.pt-zoom__pct {
		min-width: 64px;
		text-align: center;
		font-size: 14px;
		font-weight: 800;
		color: var(--c-charcoal);
	}

	.pt-zoom__controls-hint {
		margin-left: 8px;
		font-size: 13px;
		color: var(--c-muted);
	}

	.pt-zoom__side {
		gap: 10px;
		padding: 0;
	}

	.pt-zoom__hint {
		font-size: 13px;
		text-align: left;
	}

	.pt-zoom__item {
		align-items: flex-start;
		padding: 10px 0;
		font-size: 15px;
	}

	.pt-zoom__item-desc {
		display: block;
		margin-top: 2px;
		font-size: 13px;
		font-weight: 500;
		line-height: 1.45;
		color: var(--c-body);
	}

	.pt-zoom__foot {
		position: static;
		margin: auto 0 0;
		padding: 0;
		border: 0;
	}
}

/* ---------- Downloads layout (board 98 screens 4 and 4c, handoff update nov16c) ---------- */

/* A wide tool card on the page: one column, as on the earlier board (Roman, November 17: board
   98 screen 4c's right-hand column is gone), with "We print it for you" and its small print under
   the rows; each row is the thumbnail (90 px), the text and the Free download (180 px) side by side, 20 px apart (board 98 4c, November 17). */
@media (min-width: 1100px) {
	.pt--inline .pt-downloads > .pt-scroll {
		max-width: none;
		gap: 12px;
		padding: 24px;
	}

	.pt--inline .pt-dl-main {
		gap: 12px;
	}

	.pt--inline .pt-downloads .pt-print {
		gap: 10px;
		padding: 16px;
	}

	.pt--inline .pt-downloads .pt-print__title {
		font-size: 16px;
	}

	.pt--inline .pt-downloads .pt-print p,
	.pt--inline .pt-downloads .pt-ordering {
		font-size: 14px;
		line-height: 1.5;
	}

	.pt--inline .pt-downloads .pt-print__button {
		font-size: 16px;
		min-height: 48px;
	}

	.pt--inline .pt-downloads .pt-passed {
		gap: 14px;
		padding: 12px 14px;
	}

	.pt--inline .pt-downloads .pt-passed__title {
		font-size: 18px;
	}

	.pt--inline .pt-downloads .pt-passed p {
		font-size: 13px;
	}

	.pt--inline .pt-file {
		display: grid;
		grid-template-columns: 90px minmax(0, 1fr) auto;
		gap: 20px;
		align-items: center;
		padding: 14px 18px;
	}

	.pt--inline .pt-file__art {
		display: flex;
		justify-content: center;
		padding-top: 0;
	}

	.pt--inline .pt-file__art canvas {
		width: 52px;
		height: 52px;
	}

	.pt--inline .pt-sheet {
		width: 86px;
		height: 56px;
	}

	.pt--inline .pt-sheet canvas {
		width: 36px;
		height: 36px;
	}

	/* The text and the Download (or the too-small note) become the row's 2nd and 3rd columns. */
	.pt--inline .pt-file__body {
		display: contents;
	}

	.pt--inline .pt-dl {
		width: 180px; /* Board 98 4c, November 17. */
	}

	.pt--inline .pt-toosmall {
		width: 320px;
		box-sizing: border-box;
	}
}
