/* OZB Engraving Studio. Brand tokens when the OZB Brand theme is active,
   with literal fallbacks for the classic theme. */
.ozb-es,
.ozb-es-cta {
	--es-ink: var(--ozb-ink, #1C1B19);
	--es-muted: var(--ozb-muted, #6E6B66);
	--es-line: var(--ozb-line, #E4E2DE);
	--es-field: var(--ozb-field, #8A8680);
	--es-red: var(--ozb-red, #C8202F);
	--es-char: var(--ozb-char, #1C1B19);
	--es-laser: #ff3b30;
	--es-i-pen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.4 3.6a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
	--es-i-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}
html.ozb-es-open { overflow: hidden; }

/* ---- The way in, inside the engraving box -------------------------- */
.ozb-es-cta { display: grid; gap: 6px; margin: 0 0 16px; }
.ozb-es-cta .ozb-es-cta__btn.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 50px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: var(--es-char);
	color: #fff;
	font-size: 15px;
	text-transform: none;
	letter-spacing: normal;
}
.ozb-es-cta .ozb-es-cta__btn.button:hover { background: #000; color: #fff; }
.ozb-es-cta__icon {
	width: 17px;
	height: 17px;
	background: currentColor;
	-webkit-mask: var(--es-i-pen) center / contain no-repeat;
	mask: var(--es-i-pen) center / contain no-repeat;
}
.ozb-es-cta__sub { color: var(--es-muted); font-size: 13px; text-align: center; }
.ozb-es-cta.is-done .ozb-es-cta__sub { color: var(--es-ink); font-weight: 600; }

/* ---- Dialog -------------------------------------------------------- */
.ozb-es {
	width: min(760px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100dvh - 48px);
	margin: auto;
	padding: 0;
	overflow: auto;
	border: 0;
	border-radius: 20px;
	background: #fff;
	color: var(--es-ink);
	box-shadow: 0 24px 70px rgba(10, 9, 8, .35);
	overscroll-behavior: contain;
}
.ozb-es::backdrop {
	background: rgba(20, 18, 16, .62);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.ozb-es[open] { animation: ozb-es-in .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes ozb-es-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }

.ozb-es__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 12px 20px;
}
.ozb-es__eyebrow {
	margin: 0 0 2px;
	color: var(--es-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.ozb-es .ozb-es__title {
	margin: 0;
	color: var(--es-ink);
	font-size: 18px;
	line-height: 1.25;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
}
.ozb-es .ozb-es__close {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--es-line);
	border-radius: 50%;
	background: #fff;
	color: var(--es-ink);
	cursor: pointer;
}
.ozb-es__close span {
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--es-i-x) center / contain no-repeat;
	mask: var(--es-i-x) center / contain no-repeat;
}
.ozb-es__close:focus-visible,
.ozb-es__go:focus-visible,
.ozb-es__input:focus-visible,
.ozb-es__style:has(input:focus-visible),
.ozb-es__check input:focus-visible {
	outline: 2px solid var(--es-ink);
	outline-offset: 2px;
}

/* ---- Stage ---------------------------------------------------------- */
.ozb-es__stage {
	position: relative;
	overflow: hidden;
	background: #2a2622;
}
.ozb-es__canvas { position: relative; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.ozb-es__photo { display: block; width: 100%; height: auto; margin: 0; }
/* Engraving fonts are set inline with !important by the script: the OZB
   Brand theme gives every element its font with !important. */
.ozb-es__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* Magnifier: hover zooms on a computer (zoom-in cursor); the round button
   zooms to the words on phones and from the keyboard. */
@media (hover: hover) and (pointer: fine) {
	.ozb-es__stage { cursor: zoom-in; }
	.ozb-es__stage.is-zoomed .ozb-es__canvas { transition: transform .3s ease-out; }
}
.ozb-es__zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	color: #161615;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
	cursor: pointer;
}
.ozb-es__zoom svg { width: 20px; height: 20px; }
.ozb-es__zoom[aria-pressed="true"] { background: #161615; color: #fff; }
.ozb-es__zoom:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px #161615; }
/* A computer has the hover zoom: the button only shows for the keyboard. */
@media (hover: hover) and (pointer: fine) {
	.ozb-es__zoom:not(:focus-visible) { opacity: 0; pointer-events: none; }
}
.ozb-es[data-state="burning"] .ozb-es__zoom { display: none; }
.ozb-es__hint {
	position: absolute;
	left: 50%;
	bottom: 12px;
	margin: 0;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(20, 18, 16, .66);
	color: #fff;
	font-size: 12.5px;
	line-height: 1.2;
	white-space: nowrap;
	transform: translateX(-50%);
	opacity: 0;
	transition: opacity .2s;
	pointer-events: none;
}
.ozb-es.is-empty .ozb-es__hint { opacity: 1; }

/* The drawing itself (laser, etch, sparks) is styled in engraver.css. */

/* ---- Controls ------------------------------------------------------- */
.ozb-es__controls { display: grid; gap: 14px; padding: 18px 20px 22px; }
.ozb-es__label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	color: var(--es-ink);
	font-size: 13px;
	font-weight: 600;
}
.ozb-es__styles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.ozb-es__styles legend { grid-column: 1 / -1; float: left; width: 100%; }
.ozb-es__style {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 64px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--es-line);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.ozb-es__style input { position: absolute; opacity: 0; pointer-events: none; }
.ozb-es__style.is-checked,
.ozb-es__style:has(input:checked) { border-color: var(--es-ink); box-shadow: 0 0 0 1px var(--es-ink); }
.ozb-es__sample {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	overflow: hidden;
	border-radius: 10px;
	background: #f2f1ef;
	color: var(--es-ink);
	font-size: 30px;
	line-height: 1;
}
.ozb-es__style-text { display: grid; gap: 2px; line-height: 1.2; }
.ozb-es__style-text strong { font-size: 14.5px; font-weight: 600; }
.ozb-es__style-text small { color: var(--es-muted); font-size: 12.5px; }
.ozb-es__styles[hidden],
.ozb-es__tip:empty { display: none; }
.ozb-es__tip { margin: -4px 0 0; color: var(--es-muted); font-size: 12.5px; line-height: 1.45; }

.ozb-es__field { margin: 0; }
.ozb-es__input-wrap { position: relative; }
.ozb-es .ozb-es__input {
	width: 100%;
	height: 54px;
	min-height: 54px;
	margin: 0;
	padding: 0 64px 0 16px;
	border: 1px solid var(--es-field);
	border-radius: 14px;
	background: #fff;
	box-shadow: none;
	color: var(--es-ink);
	font-size: 18px;
}
.ozb-es .ozb-es__input:focus { border-color: var(--es-ink); box-shadow: 0 0 0 1px var(--es-ink); }
.ozb-es__count {
	position: absolute;
	top: 50%;
	right: 16px;
	color: var(--es-muted);
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	transform: translateY(-50%);
	pointer-events: none;
}
.ozb-es__check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	font-size: 14.5px;
	cursor: pointer;
}
.ozb-es__check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--es-ink); }
.ozb-es__error { margin: -4px 0 0; color: var(--es-red); font-size: 13.5px; font-weight: 600; }
.ozb-es__error:empty { display: none; }
.ozb-es .ozb-es__go.button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 54px;
	margin: 2px 0 0;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: var(--es-red);
	color: #fff;
	font-size: 15.5px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
}
.ozb-es .ozb-es__go.button { position: relative; overflow: hidden; isolation: isolate; }
.ozb-es .ozb-es__go.button[aria-disabled="true"] { cursor: progress; }
.ozb-es__go-fill {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(0, 0, 0, .2);
	transform: scaleX(var(--es-p, 0));
	transform-origin: left;
}
#ozb-es.ozb-es[data-state="done"] .ozb-es__go.button { background: var(--es-ink); }
#ozb-es.ozb-es[data-state="done"] .ozb-es__go-fill { transform: none; background: transparent; }
.ozb-es__go-price { font-variant-numeric: tabular-nums; opacity: .92; }
.ozb-es__note { margin: 0; color: var(--es-muted); font-size: 12px; text-align: center; }

.ozb-es__flyer { z-index: 2147483000; margin: 0; overflow: hidden; border-radius: 14px; background: #2a2622; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); pointer-events: none; }
.ozb-es__flyer .ozb-es__canvas { transition: none; }
.ozb-es__flyer .ozb-es__photo { display: block; width: 100%; height: auto; }
.ozb-es__flyer .ozb-es__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ozb-es__flyer .ozb-es__hint { display: none; }

/* Desktop: the photo beside the controls, so the whole studio fits on one
   screen with the button in view. */
@media (min-width: 900px) {
	.ozb-es { width: min(1120px, calc(100% - 48px)); }
	.ozb-es__sheet {
		display: grid;
		grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr);
		grid-template-areas: "head head" "stage controls";
	}
	.ozb-es__head { grid-area: head; padding: 16px 18px 12px 24px; }
	.ozb-es__stage {
		grid-area: stage;
		align-self: start;
		margin: 0 0 24px 24px;
		border-radius: 16px;
	}
	.ozb-es__controls { grid-area: controls; align-content: start; padding: 0 24px 24px; }
}

/* Phones held sideways (short and wide): photo beside the controls, so it
   stays in view while typing. */
@media (min-width: 600px) and (max-width: 899px) and (max-height: 520px) {
	.ozb-es { width: 100%; height: 100%; max-height: 100dvh; border-radius: 0; }
	.ozb-es__sheet {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr);
		grid-template-areas: "head head" "stage controls";
	}
	.ozb-es__head { grid-area: head; padding: 6px 12px 6px 16px; }
	.ozb-es__stage { grid-area: stage; position: sticky; top: 0; align-self: start; margin: 0 0 12px 16px; border-radius: 12px; }
	.ozb-es__controls { grid-area: controls; padding: 0 16px 16px; }
	.ozb-es .ozb-es__title { font-size: 16px; }
}

/* Phones: a full-screen sheet; the photo stays on top while the keyboard is up. */
@media (max-width: 599px) {
	/* The sheet fills exactly the part of the screen the keyboard leaves
	   visible, so the pinned header cannot be slid off the top. */
	.ozb-es {
		inset: var(--es-vvt, 0px) 0 auto 0;
		width: 100%;
		height: var(--es-vvh, 100%);
		max-height: var(--es-vvh, 100dvh);
		margin: 0;
		border-radius: 0;
		padding-bottom: env(safe-area-inset-bottom);
	}
	.ozb-es[open] { animation-name: ozb-es-sheet; }
	@keyframes ozb-es-sheet { from { transform: translateY(40px); opacity: 0; } }
	/* The header with the close button stays pinned, slim, on top; the
	   photo pins just under it (owner, 9 Oct 2026: the close button
	   scrolled away once the words box had the keyboard). */
	.ozb-es__head {
		position: sticky;
		top: 0;
		z-index: 3;
		background: #fff;
		padding: 8px 12px 8px 16px;
		padding-top: max(8px, env(safe-area-inset-top));
	}
	.ozb-es__eyebrow { display: none; }
	/* One slim line: the OZB Brand theme sizes every h2 at 28px or more with
	   :root:not(#ozb), so this matches its weight. */
	:root:not(#ozb) .ozb-es .ozb-es__title { overflow: hidden; font-size: 17px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
	.ozb-es__stage { position: sticky; top: var(--es-head-h, 60px); z-index: 2; background: #fff; }
	/* The photo keeps its shape and fits a share of the visible screen:
	   smaller while the keyboard is up, so the words box stays in view. */
	.ozb-es__canvas { width: min(100%, calc(var(--es-vvh, 100svh) * .52 * var(--es-ar, 1))); margin-inline: auto; }
	.ozb-es.is-typing .ozb-es__canvas { width: min(100%, calc(var(--es-vvh, 100svh) * .34 * var(--es-ar, 1))); }
	.ozb-es__controls input[type="text"] { scroll-margin-top: calc(var(--es-head-h, 60px) + var(--es-stage-h, 0px) + 8px); }
	/* Room to scroll the last words box up above the keyboard. */
	.ozb-es.is-typing .ozb-es__controls { padding-bottom: calc(var(--es-vvh, 60svh) * .5); }
	.ozb-es__controls { padding: 16px 16px 24px; }
	.ozb-es__style { gap: 10px; padding: 8px 10px; }
	.ozb-es__sample { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	.ozb-es[open] { animation: none; }
	.ozb-es__burnt { transition: opacity .4s; }
}

/* Knife sets: same / different words, then one field per blade. */
.ozb-es__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.ozb-es__modes[hidden],
.ozb-es__blades[hidden],
.ozb-es__field[hidden] { display: none; }
.ozb-es__modes legend { grid-column: 1 / -1; float: left; width: 100%; }
.ozb-es__mode { min-height: 58px; }
.ozb-es__blades { display: grid; gap: 10px; }
.ozb-es__blades .ozb-es__tip { margin: 0; }
.ozb-es__blade { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; }
.ozb-es__blade .ozb-es__label { margin: 0; }
.ozb-es .ozb-es__input--blade { height: 48px; min-height: 48px; padding: 0 14px; font-size: 16px; }
.ozb-es.is-per-blade .oe-frame { pointer-events: all; cursor: pointer; }

/* Share (header) and the share link above the fields. */
.ozb-es__head > div:first-child { flex: 1 1 auto; min-width: 0; }
.ozb-es .ozb-es__share {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--es-line);
	border-radius: 999px;
	background: #fff;
	color: var(--es-ink);
	font-size: 13.5px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}
.ozb-es .ozb-es__share[hidden] { display: none; }
.ozb-es__share-icon {
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M16 6l-4-4-4 4'/%3E%3Cpath d='M12 2v13'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M16 6l-4-4-4 4'/%3E%3Cpath d='M12 2v13'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 380px) {
	.ozb-es__share-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.ozb-es .ozb-es__share { width: 40px; padding: 0; justify-content: center; }
}
.ozb-es-cta__share {
	justify-self: center;
	margin: 0;
	padding: 4px 8px;
	border: 0;
	background: none;
	color: var(--es-ink);
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.ozb-es-cta__share[hidden] { display: none; }

/* Word ideas: a quiet row of tap-to-try chips. */
.ozb-es__ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 0; }
.ozb-es__ideas[hidden] { display: none; }
.ozb-es__ideas-label { margin-right: 2px; color: var(--es-muted); font-size: 12.5px; }
.ozb-es .ozb-es__idea {
	min-height: 32px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--es-line);
	border-radius: 999px;
	background: #fff;
	color: var(--es-ink);
	font-size: 13px;
	font-weight: 500;
	line-height: 30px;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}
.ozb-es .ozb-es__idea:hover { border-color: var(--es-ink); }
.ozb-es__long { margin: -4px 0 0; color: var(--es-muted); font-size: 12.5px; line-height: 1.45; }
.ozb-es__long:empty { display: none; }

/* Lettering beyond the first two: tucked under "More lettering styles". */
.ozb-es__more { grid-column: 1 / -1; }
.ozb-es__more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--es-ink); font-size: 13.5px; font-weight: 600; cursor: pointer; list-style: none; }
.ozb-es__more > summary::-webkit-details-marker { display: none; }
.ozb-es__more > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.ozb-es__more[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.ozb-es__more[open] { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ozb-es__more[open] > summary { grid-column: 1 / -1; }
