.lpp-modal {
	--lpp-accent: #008599;
	--lpp-accent-dark: #006575;
	--lpp-ink: #0b0b0d;
	--lpp-muted: #6b6b74;
	--lpp-line: #dedee4;
	--lpp-soft: #f6f7f9;
	--lpp-white: #fff;
	--lpp-danger: #b42318;
	--lpp-radius-sm: 8px;
	--lpp-radius: 14px;
	--lpp-shadow: 0 28px 90px rgb(0 0 0 / 32%);
	color: var(--lpp-ink);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	inset: 0;
	position: fixed;
	z-index: 999999;
}

.lpp-modal[hidden] {
	display: none !important;
}

.lpp-modal [hidden] {
	display: none !important;
}

.lpp-modal *,
.lpp-modal *::before,
.lpp-modal *::after {
	box-sizing: border-box;
}

.lpp-modal button,
.lpp-modal input,
.lpp-modal select {
	font: inherit;
}

.lpp-modal textarea {
	font: inherit;
}

.lpp-modal .lpp-mobile-rail,
.lpp-modal .lpp-mobile-only {
	display: none;
}

/* Icon controls must not inherit the theme's 20px button padding or flex shrinking. */
#lpp-editor-modal .lpp-icon-button,
#lpp-editor-modal .lpp-zoom-controls button,
#lpp-editor-modal .lpp-segmented button {
	appearance: none;
	flex-shrink: 0;
	line-height: 1;
	margin: 0;
	min-height: 36px;
	min-width: 36px;
	padding: 0;
	text-transform: none;
}

#lpp-editor-modal .lpp-ui-icon {
	display: block;
	flex-shrink: 0;
	height: 20px;
	max-height: none;
	max-width: none;
	width: 20px;
}

#lpp-editor-modal .lpp-preview-sheet__detail-close .lpp-ui-icon {
	height: 24px;
	width: 24px;
}

#lpp-editor-modal .lpp-favorite-button {
	min-height: 28px;
	min-width: 28px;
	padding: 0;
}

#lpp-editor-modal .lpp-ui-icon,
#lpp-editor-modal .lpp-ui-icon path {
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.lpp-canvas-frame {
	background: var(--lpp-white);
	display: block;
	flex-shrink: 0;
	overflow: hidden;
	overflow: clip;
	position: relative;
}

.lpp-canvas-loading {
	align-items: center;
	background: var(--lpp-soft);
	color: var(--lpp-ink);
	display: none;
	flex-direction: column;
	gap: 16px;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: absolute;
	text-align: center;
	z-index: 5;
}

.lpp-editor.is-loading .lpp-canvas-loading {
	display: flex;
}

.lpp-editor.is-loading .lpp-canvas-shell {
	visibility: hidden;
}

.lpp-text-entry {
	color: var(--lpp-ink);
	display: grid;
	font-size: 13px;
	gap: 6px;
	margin: 12px 0 0;
}

#lpp-editor-modal [data-lpp-text-input] {
	appearance: none;
	background: #fff;
	border: 1px solid var(--lpp-line);
	border-radius: 8px;
	color: var(--lpp-ink);
	display: block;
	font-size: 16px;
	height: 76px;
	line-height: 1.4;
	margin: 0;
	min-height: 60px;
	padding: 10px;
	resize: vertical;
	touch-action: auto;
	width: 100%;
}

#lpp-editor-modal [data-lpp-text-input]:focus {
	border-color: var(--lpp-accent);
	outline: 2px solid rgb(0 133 153 / 20%);
}

.lpp-modal svg {
	fill: none;
	height: 20px;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 20px;
}

.lpp-modal [data-lpp-desktop-hidden] {
	display: none !important;
}

.lpp-modal button:focus-visible,
.lpp-modal input:focus-visible,
.lpp-modal select:focus-visible {
	outline: 3px solid rgb(0 133 153 / 35%);
	outline-offset: 2px;
}

.lpp-modal button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.lpp-modal__backdrop {
	backdrop-filter: blur(6px);
	background: rgb(11 11 13 / 76%);
	inset: 0;
	position: absolute;
}

.lpp-modal__dialog {
	background: var(--lpp-white);
	border: 1px solid rgb(255 255 255 / 20%);
	border-radius: 18px;
	box-shadow: var(--lpp-shadow);
	display: flex;
	flex-direction: column;
	inset: max(18px, 3vh) max(18px, 3vw);
	overflow: hidden;
	position: absolute;
}

.lpp-modal__header,
.lpp-modal__footer {
	align-items: center;
	background: var(--lpp-white);
	display: flex;
	flex: 0 0 auto;
	gap: 20px;
	justify-content: space-between;
	padding: 14px 22px;
}

.lpp-modal__header {
	border-bottom: 1px solid var(--lpp-line);
	min-height: 76px;
}

.lpp-modal__brand,
.lpp-modal__header-status,
.lpp-modal__footer-actions,
.lpp-modal__footer-tools {
	align-items: center;
	display: flex;
	gap: 12px;
}

.lpp-price-summary {
	background: var(--lpp-soft);
	border: 1px solid var(--lpp-line);
	border-radius: 10px;
	display: grid;
	font-size: 11px;
	gap: 3px;
	margin-left: auto;
	min-width: 230px;
	padding: 7px 10px;
}

.lpp-price-summary__base,
.lpp-price-summary__items > div,
.lpp-price-summary__total {
	align-items: center;
	display: flex;
	gap: 14px;
	justify-content: space-between;
}

.lpp-price-summary__breakdown {
	display: grid;
	gap: 2px;
}

.lpp-price-summary__items {
	color: var(--lpp-muted);
	display: grid;
	gap: 2px;
}

.lpp-price-summary__items:empty {
	display: none;
}

.lpp-price-summary__total {
	border-top: 1px solid var(--lpp-line);
	font-size: 13px;
	margin-top: 2px;
	padding-top: 4px;
}

.lpp-modal__mark {
	align-items: center;
	background: var(--lpp-ink);
	border-radius: 11px;
	color: var(--lpp-accent);
	display: flex;
	height: 44px;
	justify-content: center;
	width: 44px;
}

.lpp-modal__header h2,
.lpp-modal__header p {
	margin: 0;
}

.lpp-modal__header h2 {
	color: var(--lpp-ink);
	font-size: 20px;
	font-weight: 750;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.lpp-modal__eyebrow {
	color: var(--lpp-accent-dark);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

#lpp-editor-status {
	color: var(--lpp-muted);
	font-size: 13px;
	min-height: 1.4em;
	text-align: right;
}

#lpp-editor-status.is-error,
.lpp-editor-warning {
	color: var(--lpp-danger);
}

#lpp-editor-status.is-success {
	color: #166534;
}

#lpp-editor-status.is-loading::before {
	animation: lpp-spin 700ms linear infinite;
	border: 2px solid var(--lpp-line);
	border-radius: 50%;
	border-top-color: var(--lpp-accent-dark);
	content: "";
	display: inline-block;
	height: 12px;
	margin-right: 6px;
	vertical-align: -2px;
	width: 12px;
}

.lpp-zone-hint {
	color: var(--lpp-muted);
	font-size: 12px;
	margin: 0;
	padding: 8px 16px 0;
	text-align: center;
}

.lpp-icon-button,
.lpp-zoom-controls button,
.lpp-segmented button {
	align-items: center;
	background: var(--lpp-soft);
	border: 1px solid var(--lpp-line);
	color: var(--lpp-ink);
	cursor: pointer;
	display: inline-flex;
	justify-content: center;
}

.lpp-icon-button {
	border-radius: 50%;
	height: 42px;
	width: 42px;
}

.lpp-icon-button:hover,
.lpp-zoom-controls button:hover,
.lpp-segmented button:hover {
	background: #ececf0;
	border-color: #c4c4cb;
}

.lpp-editor {
	display: grid;
	flex: 1 1 auto;
	grid-template-columns: minmax(270px, 310px) minmax(0, 1fr);
	min-height: 0;
}

.lpp-toolbar {
	background: var(--lpp-white);
	border-right: 1px solid var(--lpp-line);
	overscroll-behavior: contain;
	overflow-y: auto;
	padding: 4px 18px 24px;
}

.lpp-toolbar__section {
	border-bottom: 1px solid var(--lpp-line);
	padding: 18px 0;
}

.lpp-toolbar__section:last-child {
	border-bottom: 0;
}

.lpp-section-title {
	display: grid;
	gap: 2px;
	margin-bottom: 12px;
}

.lpp-section-title strong {
	color: var(--lpp-ink);
	font-size: 13px;
	font-weight: 750;
}

.lpp-section-title small,
.lpp-add-tool small {
	color: var(--lpp-muted);
	font-size: 11px;
	font-weight: 450;
}

.lpp-add-tools,
.lpp-tool-group,
.lpp-properties {
	display: grid;
	gap: 8px;
}

.lpp-tool-group[hidden],
.lpp-properties[hidden] {
	display: none !important;
}

.lpp-add-tool {
	align-items: center;
	background: var(--lpp-white);
	border: 1px solid var(--lpp-line);
	border-radius: var(--lpp-radius-sm);
	color: var(--lpp-ink);
	cursor: pointer;
	display: grid;
	gap: 10px;
	grid-template-columns: 38px minmax(0, 1fr);
	margin: 0;
	min-height: 58px;
	padding: 9px 10px;
	text-align: left;
	width: 100%;
}

.lpp-add-tool:hover {
	background: #f0f9fa;
	border-color: var(--lpp-accent);
}

/* Keep primary tool names readable even when the theme styles every button. */
#lpp-editor-modal .lpp-add-tool {
	display: grid;
	min-height: 58px;
	padding: 9px 10px;
	text-transform: none;
}

#lpp-editor-modal .lpp-add-tool strong {
	color: var(--lpp-ink);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.lpp-add-tool > span:last-child,
.lpp-add-tool label {
	display: grid;
	gap: 2px;
	margin: 0;
	min-width: 0;
}

.lpp-symbol-picker {
	position: relative;
}

.lpp-symbol-trigger {
	grid-template-columns: 38px minmax(0, 1fr) 18px;
}

.lpp-symbol-trigger__arrow {
	color: var(--lpp-muted);
	font-size: 18px;
	line-height: 1;
	transition: transform 160ms ease;
}

.lpp-symbol-trigger[aria-expanded="true"] {
	background: #f0f9fa;
	border-color: var(--lpp-accent);
}

.lpp-symbol-trigger[aria-expanded="true"] .lpp-symbol-trigger__arrow {
	transform: rotate(180deg);
}

.lpp-symbol-panel {
	background: var(--lpp-white);
	border: 1px solid var(--lpp-line);
	border-radius: 10px;
	box-shadow: 0 12px 28px rgb(11 11 13 / 14%);
	margin-top: 8px;
	overflow: hidden;
	padding: 10px;
}

.lpp-text-panel {
	overflow: visible;
}

.lpp-text-panel .lpp-properties {
	margin-top: 2px;
}

.lpp-modal .lpp-text-insert {
	margin-bottom: 10px;
	width: 100%;
}

.lpp-symbol-panel__header {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin: 0 0 8px;
}

.lpp-symbol-panel__header strong {
	font-size: 12px;
}

.lpp-modal .lpp-symbol-panel__header button {
	align-items: center;
	background: var(--lpp-soft);
	border: 0;
	border-radius: 50%;
	color: var(--lpp-ink);
	cursor: pointer;
	display: inline-flex;
	font-size: 18px;
	height: 28px;
	justify-content: center;
	line-height: 1;
	padding: 0 0 2px;
	width: 28px;
}

.lpp-symbol-search {
	display: block;
	margin-bottom: 9px;
}

.lpp-modal .lpp-symbol-search input {
	background: var(--lpp-soft);
	border: 1px solid var(--lpp-line);
	border-radius: 8px;
	box-shadow: none;
	color: var(--lpp-ink);
	height: 38px;
	padding: 0 10px;
	width: 100%;
}

.lpp-library-views {
	display: flex;
	gap: 5px;
	margin: 0 0 9px;
	overflow-x: auto;
	overscroll-behavior: contain;
}

.lpp-modal .lpp-library-views button {
	background: var(--lpp-soft);
	border: 1px solid var(--lpp-line);
	border-radius: 999px;
	color: var(--lpp-muted);
	cursor: pointer;
	flex: 0 0 auto;
	font-size: 10px;
	font-weight: 750;
	min-height: 30px;
	padding: 5px 10px;
}

.lpp-modal .lpp-library-views button:hover,
.lpp-modal .lpp-library-views button:focus-visible {
	border-color: var(--lpp-accent);
	color: var(--lpp-ink);
}

.lpp-modal .lpp-library-views button[aria-pressed="true"] {
	background: var(--lpp-ink);
	border-color: var(--lpp-ink);
	color: var(--lpp-white);
}

.lpp-library-card {
	min-width: 0;
	position: relative;
}

.lpp-library-card > .lpp-symbol-tile,
.lpp-library-card > .lpp-model-tile,
.lpp-library-card > .lpp-font-tile {
	width: 100%;
}

.lpp-modal .lpp-favorite-button {
	align-items: center;
	background: rgb(255 255 255 / 94%);
	border: 1px solid var(--lpp-line);
	border-radius: 50%;
	color: var(--lpp-muted);
	cursor: pointer;
	display: inline-flex;
	font-size: 14px;
	height: 24px;
	justify-content: center;
	line-height: 1;
	padding: 0 0 1px;
	position: absolute;
	right: 3px;
	top: 3px;
	width: 24px;
	z-index: 2;
}

.lpp-modal .lpp-favorite-button:hover,
.lpp-modal .lpp-favorite-button:focus-visible,
.lpp-modal .lpp-favorite-button[aria-pressed="true"] {
	background: #eaf7f9;
	border-color: var(--lpp-accent);
	color: #006575;
}

.lpp-symbol-grid {
	display: grid;
	gap: 7px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	max-height: 340px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1px 3px 1px 1px;
	scrollbar-gutter: stable;
	touch-action: pan-y;
}

.lpp-modal .lpp-symbol-tile {
	align-items: center;
	background: var(--lpp-soft);
	border: 1px solid transparent;
	border-radius: 8px;
	color: var(--lpp-ink);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 3px;
	justify-content: center;
	height: 55px;
	min-width: 0;
	padding: 6px 3px;
}

.lpp-modal .lpp-symbol-tile:hover,
.lpp-modal .lpp-symbol-tile:focus-visible {
	background: #eaf7f9;
	border-color: var(--lpp-accent);
}

.lpp-symbol-tile svg {
	height: 32px;
	stroke: none;
	width: 32px;
}

.lpp-symbol-tile svg path {
	fill: currentcolor;
}

.lpp-symbol-tile span {
	font-size: 9px;
	line-height: 1.1;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lpp-symbol-empty {
	color: var(--lpp-muted);
	font-size: 11px;
	margin: 12px 0 4px;
	text-align: center;
}

.lpp-model-categories {
	display: flex;
	gap: 6px;
	margin-bottom: 9px;
	overflow-x: auto;
	overscroll-behavior: contain;
	padding-bottom: 2px;
}

.lpp-model-panel .lpp-library-views {
	margin-bottom: 6px;
}

.lpp-modal .lpp-model-category {
	background: var(--lpp-soft);
	border: 1px solid var(--lpp-line);
	border-radius: 999px;
	color: var(--lpp-muted);
	cursor: pointer;
	flex: 0 0 auto;
	font-size: 10px;
	font-weight: 700;
	padding: 5px 9px;
}

.lpp-modal .lpp-model-category[aria-pressed="true"] {
	background: var(--lpp-ink);
	border-color: var(--lpp-ink);
	color: var(--lpp-white);
}

.lpp-model-grid {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	max-height: 340px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1px 3px 1px 1px;
	scrollbar-gutter: stable;
	touch-action: pan-y;
}

.lpp-modal .lpp-model-tile {
	background: var(--lpp-soft);
	border: 1px solid transparent;
	border-radius: 8px;
	color: var(--lpp-ink);
	cursor: pointer;
	display: grid;
	gap: 3px;
	min-width: 0;
	padding: 6px;
	text-align: left;
}

.lpp-modal .lpp-model-tile:hover,
.lpp-modal .lpp-model-tile:focus-visible {
	background: #eaf7f9;
	border-color: var(--lpp-accent);
}

.lpp-model-tile svg {
	background: var(--lpp-white);
	border-radius: 5px;
	height: auto;
	stroke: none;
	width: 100%;
}

.lpp-model-tile strong,
.lpp-model-tile small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lpp-model-tile strong {
	font-size: 10px;
}

.lpp-model-tile small {
	color: var(--lpp-muted);
	font-size: 8px;
	min-height: 1em;
}

.lpp-add-tool strong,
.lpp-add-tool small {
	display: block;
	line-height: 1.25;
}

.lpp-add-tool__icon {
	align-items: center;
	background: #eaf7f9;
	border-radius: 8px;
	color: var(--lpp-accent-dark);
	display: flex;
	height: 38px;
	justify-content: center;
	width: 38px;
}

.lpp-add-tool select {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--lpp-muted);
	font-size: 11px;
	height: 24px;
	max-width: 100%;
	min-height: 0;
	padding: 0 22px 0 0;
	width: 100%;
}

.lpp-modal .lpp-small-action {
	background: transparent;
	border: 0;
	color: var(--lpp-accent-dark);
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
	justify-self: end;
	padding: 2px;
}

.lpp-upload-button {
	overflow: hidden;
	position: relative;
	transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lpp-upload-button > span:nth-child(2) {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.lpp-upload-button__drop {
	color: var(--lpp-accent-dark) !important;
}

.lpp-upload-button.is-dragover {
	background: #edf8fa;
	border-color: var(--lpp-accent);
	box-shadow: 0 0 0 3px rgb(0 133 153 / 18%);
}

.lpp-upload-button input {
	cursor: pointer;
	inset: 0;
	opacity: 0;
	position: absolute;
}

.lpp-properties {
	grid-template-columns: minmax(0, 1fr) 92px;
}

.lpp-font-field {
	display: grid;
	gap: 5px;
	min-width: 0;
	position: relative;
}

.lpp-property-label {
	color: var(--lpp-muted);
	font-size: 11px;
	font-weight: 650;
}

.lpp-modal .lpp-font-trigger {
	align-items: center;
	background: var(--lpp-white);
	border: 1px solid var(--lpp-line);
	border-radius: 7px;
	color: var(--lpp-ink);
	cursor: pointer;
	display: flex;
	gap: 7px;
	height: 38px;
	justify-content: space-between;
	min-width: 0;
	padding: 0 9px;
	width: 100%;
}

.lpp-font-trigger > span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lpp-font-trigger[aria-expanded="true"] {
	border-color: var(--lpp-accent);
}

.lpp-font-panel {
	background: var(--lpp-white);
	border: 1px solid var(--lpp-line);
	border-radius: 10px;
	box-shadow: 0 12px 28px rgb(11 11 13 / 14%);
	grid-column: 1 / -1;
	margin-top: 3px;
	overflow: hidden;
	padding: 10px;
	position: absolute;
	top: 100%;
	width: min(280px, calc(100vw - 48px));
	z-index: 8;
}

.lpp-font-panel .lpp-symbol-search {
	margin-bottom: 0;
}

.lpp-font-panel .lpp-library-views {
	margin-top: 12px;
	padding-top: 2px;
}

.lpp-font-grid {
	display: grid;
	gap: 7px;
	max-height: 310px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1px 3px 1px 1px;
	scrollbar-gutter: stable;
	touch-action: pan-y;
}

.lpp-library-card--font .lpp-favorite-button {
	right: 6px;
	top: 7px;
}

.lpp-library-card--font .lpp-font-tile {
	padding-right: 38px;
}

.lpp-modal .lpp-font-tile {
	background: var(--lpp-soft);
	border: 1px solid transparent;
	border-radius: 8px;
	color: var(--lpp-ink);
	cursor: pointer;
	display: grid;
	gap: 3px;
	padding: 8px 10px;
	text-align: left;
}

.lpp-modal .lpp-font-tile:hover,
.lpp-modal .lpp-font-tile:focus-visible,
.lpp-modal .lpp-font-tile[aria-selected="true"] {
	background: #eaf7f9;
	border-color: var(--lpp-accent);
}

.lpp-font-tile strong {
	font-size: 19px;
	font-weight: 400;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lpp-font-tile small {
	color: var(--lpp-muted);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 9px;
}

.lpp-properties label {
	color: var(--lpp-muted);
	display: grid;
	font-size: 11px;
	font-weight: 650;
	gap: 5px;
	margin: 0;
}

.lpp-properties select,
.lpp-properties input[type="number"],
.lpp-zone-picker select {
	background: var(--lpp-white);
	border: 1px solid var(--lpp-line);
	border-radius: 7px;
	box-shadow: none;
	color: var(--lpp-ink);
	height: 38px;
	min-height: 38px;
	padding: 0 9px;
	width: 100%;
}

.lpp-segmented {
	display: grid;
	grid-column: 1 / -1;
	grid-template-columns: repeat(5, 1fr);
}

.lpp-segmented button {
	border-radius: 0;
	height: 36px;
	margin-left: -1px;
}

.lpp-segmented button:first-child {
	border-radius: 7px 0 0 7px;
	margin-left: 0;
}

.lpp-segmented button:last-child {
	border-radius: 0 7px 7px 0;
}

.lpp-segmented button[aria-pressed="true"] {
	background: var(--lpp-ink);
	border-color: var(--lpp-ink);
	color: var(--lpp-white);
}

.lpp-action-grid {
	display: grid;
	gap: 7px;
	grid-template-columns: 1fr 1fr;
}

.lpp-action-grid button {
	background: var(--lpp-soft);
	border: 1px solid var(--lpp-line);
	border-radius: 7px;
	color: var(--lpp-ink);
	cursor: pointer;
	font-size: 12px;
	padding: 8px;
}

.lpp-action-grid button:hover {
	border-color: var(--lpp-accent);
}

.lpp-workspace {
	background: #eeeff2;
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	overflow: hidden;
}

.lpp-layers-panel {
	background: var(--lpp-white);
	border-top: 1px solid var(--lpp-line);
	display: flex;
	flex-direction: column;
	margin-top: 8px;
	min-height: 0;
	overflow: hidden;
}

.lpp-layers-panel > header {
	align-items: center;
	border-bottom: 1px solid var(--lpp-line);
	display: flex;
	justify-content: space-between;
	min-height: 58px;
	padding: 9px 0;
}

.lpp-layers-panel > header div {
	display: grid;
	gap: 2px;
}

.lpp-layers-panel > header strong {
	font-size: 16px;
}

.lpp-layers-heading-icon {
	display: none;
}

@media (min-width: 901px) {
	#lpp-editor-modal .lpp-layers-panel {
		border: 1px solid #92ced7;
		border-radius: 12px;
		margin-top: 14px;
		padding: 0 10px;
	}

	#lpp-editor-modal .lpp-layers-panel > header {
		background: #edf8fa;
		border-bottom: 1px solid #b4dde4;
		gap: 8px;
		margin: 0 -10px;
		padding: 12px 10px;
	}

	#lpp-editor-modal .lpp-layers-panel .lpp-layers-heading {
		align-items: center;
		display: flex;
		gap: 8px;
		min-width: 0;
	}

	#lpp-editor-modal .lpp-layers-heading-icon {
		align-items: center;
		background: #d1edf1;
		border-radius: 8px;
		color: #006575;
		display: flex;
		flex: 0 0 34px;
		height: 34px;
		justify-content: center;
	}

	#lpp-editor-modal .lpp-layers-heading-icon svg {
		width: 24px;
		height: 24px;
	}

	#lpp-editor-modal .lpp-layers-panel > header strong {
		color: #006575;
		font-size: 18px;
		font-weight: 800;
		line-height: 1.25;
	}

	#lpp-editor-modal .lpp-layers-panel > header > [data-lpp-layers-count] {
		background: #008599;
		color: #0b0b0d;
		flex-shrink: 0;
		font-size: 13px;
		font-weight: 800;
	}
}

.lpp-layers-panel > header small,
.lpp-layers-empty {
	color: var(--lpp-muted);
	font-size: 10px;
}

.lpp-layers-panel > header > span {
	background: var(--lpp-soft);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 750;
	min-width: 28px;
	padding: 5px 8px;
	text-align: center;
}

.lpp-layers-list {
	display: grid;
	gap: 6px;
	overflow-y: auto;
	max-height: 240px;
	padding: 10px 0;
}

.lpp-layer-row {
	align-items: stretch;
	border: 1px solid var(--lpp-line);
	border-radius: 8px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 34px;
	overflow: hidden;
}

.lpp-layer-row[aria-selected="true"] {
	background: #f0f9fa;
	border-color: var(--lpp-accent);
}

.lpp-modal .lpp-layer-select,
.lpp-modal .lpp-layer-remove {
	background: transparent;
	border: 0;
	color: var(--lpp-ink);
	cursor: pointer;
}

.lpp-modal .lpp-layer-select {
	align-items: center;
	display: grid;
	font-size: 11px;
	gap: 7px;
	grid-template-columns: 26px minmax(0, 1fr);
	min-width: 0;
	padding: 7px;
	text-align: left;
}

.lpp-modal .lpp-layer-select > span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lpp-layer-type {
	align-items: center;
	background: var(--lpp-soft);
	border-radius: 6px;
	display: flex;
	font-weight: 800;
	height: 26px;
	justify-content: center;
}

.lpp-modal .lpp-layer-remove {
	border-left: 1px solid var(--lpp-line);
	font-size: 18px;
}

.lpp-modal .lpp-layer-remove:hover,
.lpp-modal .lpp-layer-remove:focus-visible {
	background: #eaf7f9;
	color: #006575;
}

.lpp-layers-empty {
	margin: 0;
	padding: 14px;
	text-align: center;
}

.lpp-workspace__topbar {
	align-items: center;
	background: var(--lpp-white);
	border-bottom: 1px solid var(--lpp-line);
	display: flex;
	flex: 0 0 auto;
	gap: 12px;
	justify-content: space-between;
	min-height: 58px;
	padding: 9px 16px;
}

.lpp-workspace__controls,
.lpp-face-tabs,
.lpp-zoom-controls,
.lpp-zone-picker {
	align-items: center;
	display: flex;
	gap: 7px;
}

.lpp-face-tabs {
	overflow-x: auto;
}

.lpp-face-tabs button {
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	color: var(--lpp-muted);
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	padding: 9px 10px 7px;
	white-space: nowrap;
}

.lpp-face-tabs button[aria-selected="true"] {
	border-bottom-color: var(--lpp-accent);
	color: var(--lpp-ink);
}

.lpp-zone-picker {
	color: var(--lpp-muted);
	font-size: 11px;
	font-weight: 700;
	margin: 0;
	white-space: nowrap;
}

.lpp-zone-picker select {
	min-width: 135px;
}

.lpp-zoom-controls {
	gap: 0;
}

.lpp-zoom-controls button {
	height: 36px;
	width: 36px;
}

.lpp-zoom-controls button:first-child {
	border-radius: 7px 0 0 7px;
}

.lpp-zoom-controls button:last-child {
	border-radius: 0 7px 7px 0;
	margin-left: -1px;
}

#lpp-editor-modal .lpp-canvas-viewport {
	position: relative;
	background: var(--lpp-soft);
	display: grid;
	flex: 1 1 0;
	min-height: 0;
	min-width: 0;
	overflow: hidden;
	overflow: clip;
	overscroll-behavior: contain;
	padding: 8px;
	place-items: center;
}

.lpp-canvas-shell {
	aspect-ratio: auto;
	background: var(--lpp-white);
	position: absolute;
}

.lpp-product-image,
.lpp-canvas-shell .canvas-container,
.lpp-zone-guide {
	inset: 0;
	position: absolute !important;
}

.lpp-modal .lpp-product-image {
	display: block;
	height: 100% !important;
	max-height: none;
	max-width: none;
	object-fit: contain;
	pointer-events: none;
	width: 100% !important;
}

.lpp-canvas-shell .canvas-container {
	height: 100% !important;
	width: 100% !important;
}

.lpp-canvas-shell canvas {
	height: 100% !important;
	touch-action: none;
	width: 100% !important;
}

.lpp-canvas-frame.is-pannable .upper-canvas {
	cursor: grab;
}

.lpp-canvas-frame.is-panning .upper-canvas {
	cursor: grabbing;
}

.lpp-zone-guide {
	background: rgb(0 133 153 / 5%);
	border: 2px dashed var(--lpp-accent);
	pointer-events: none;
}

.lpp-zone-guide span {
	background: var(--lpp-accent);
	border-radius: 4px 4px 0 0;
	bottom: 100%;
	color: var(--lpp-white);
	font-size: 10px;
	font-weight: 750;
	left: -2px;
	letter-spacing: 0.03em;
	padding: 3px 6px;
	position: absolute;
	white-space: nowrap;
}

.lpp-editor-warning {
	background: var(--lpp-white);
	flex: 0 0 auto;
	font-size: 12px;
	margin: 0;
	min-height: 28px;
	padding: 5px 16px;
}

.lpp-editor-warning[data-state="warning"] {
	background: #fffbeb;
	border-top: 1px solid #fde68a;
	color: #92400e;
}

.lpp-editor-warning:empty {
	display: none;
}

.lpp-modal__footer {
	border-top: 1px solid var(--lpp-line);
	min-height: 70px;
}

.lpp-modal .lpp-link-button {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--lpp-muted);
	cursor: pointer;
	display: inline-flex;
	font-size: 12px;
	gap: 5px;
	padding: 8px 4px;
}

.lpp-link-button:hover {
	color: var(--lpp-ink);
}

.lpp-modal .lpp-button {
	align-items: center;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	font-size: 13px;
	font-weight: 750;
	gap: 7px;
	justify-content: center;
	min-height: 42px;
	padding: 0 18px;
}

.lpp-modal .lpp-button.is-loading::before {
	animation: lpp-spin 700ms linear infinite;
	border: 2px solid currentcolor;
	border-radius: 50%;
	border-right-color: transparent;
	content: "";
	height: 14px;
	margin-right: 7px;
	width: 14px;
}

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

.lpp-button--secondary {
	background: var(--lpp-white);
	border: 1px solid var(--lpp-line);
	color: var(--lpp-ink);
}

.lpp-button--primary {
	background: var(--lpp-accent);
	border: 1px solid var(--lpp-accent);
	color: var(--lpp-ink);
}

.lpp-button--primary:hover {
	background: #009bb2;
	border-color: #009bb2;
}

.lpp-product-actions {
	align-items: center;
	display: flex;
	gap: 10px;
	margin: 0 0 14px;
}

.lpp-product-actions .lpp-open-editor.button,
.lpp-product-actions .lpp-open-editor.button.alt {
	align-items: center;
	background: #008599;
	border: 2px solid #008599;
	border-radius: 10px;
	box-shadow: 0 7px 18px rgb(0 133 153 / 24%);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-size: 16px;
	font-weight: 750;
	justify-content: center;
	letter-spacing: 0.01em;
	line-height: 1.2;
	min-height: 52px;
	padding: 13px 26px;
	text-decoration: none;
	transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.lpp-product-actions .lpp-open-editor.button:hover,
.lpp-product-actions .lpp-open-editor.button.alt:hover {
	background: #006575;
	border-color: #006575;
	box-shadow: 0 9px 22px rgb(0 133 153 / 32%);
	color: #fff;
	transform: translateY(-1px);
}

.lpp-product-actions .lpp-open-editor.button:active,
.lpp-product-actions .lpp-open-editor.button.alt:active {
	box-shadow: 0 3px 10px rgb(0 133 153 / 25%);
	transform: translateY(0);
}

.lpp-product-actions .lpp-open-editor.button:focus-visible,
.lpp-product-actions .lpp-open-editor.button.alt:focus-visible {
	outline: 3px solid rgb(0 133 153 / 35%);
	outline-offset: 3px;
}

.lpp-design-state {
	color: #166534;
	font-size: 13px;
}

.lpp-modal-open {
	overflow: hidden;
}

.lpp-help-sheet {
	align-items: center;
	background: rgb(11 11 13 / 48%);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: absolute;
	z-index: 20;
}

.lpp-help-sheet[hidden] {
	display: none !important;
}

.lpp-help-sheet > div {
	background: var(--lpp-white);
	border: 1px solid var(--lpp-line);
	border-radius: var(--lpp-radius);
	box-shadow: 0 22px 70px rgb(0 0 0 / 24%);
	max-width: 480px;
	padding: 26px;
	width: 100%;
}

.lpp-help-sheet h3 {
	font-size: 22px;
	margin: 5px 0 16px;
}

.lpp-help-sheet li {
	margin-bottom: 9px;
}

.lpp-preview-sheet {
	align-items: center;
	background: rgb(11 11 13 / 82%);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: absolute;
	z-index: 25;
}

.lpp-preview-sheet__dialog {
	background: var(--lpp-white);
	border: 1px solid rgb(255 255 255 / 20%);
	border-radius: 16px;
	box-shadow: 0 24px 80px rgb(0 0 0 / 38%);
	display: flex;
	flex-direction: column;
	max-height: calc(100% - 20px);
	max-width: 1080px;
	overflow: hidden;
	width: min(92vw, 1080px);
}

.lpp-preview-sheet__header,
.lpp-preview-sheet__footer {
	align-items: center;
	background: var(--lpp-white);
	display: flex;
	flex: 0 0 auto;
	gap: 18px;
	justify-content: space-between;
	padding: 15px 18px;
}

.lpp-preview-sheet__header {
	border-bottom: 1px solid var(--lpp-line);
}

.lpp-preview-sheet__header h3,
.lpp-preview-sheet__header p,
.lpp-preview-sheet__footer p {
	margin: 0;
}

.lpp-preview-sheet__header h3 {
	font-size: 20px;
	margin-top: 3px;
}

.lpp-preview-sheet__header [data-lpp-preview-face] {
	color: var(--lpp-muted);
	font-size: 12px;
	margin-top: 3px;
}

.lpp-preview-sheet__stage {
	align-items: center;
	align-items: safe center;
	background-color: #e9eaed;
	background-image:
		linear-gradient(45deg, #ddd 25%, transparent 25%),
		linear-gradient(-45deg, #ddd 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #ddd 75%),
		linear-gradient(-45deg, transparent 75%, #ddd 75%);
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
	background-size: 16px 16px;
	display: flex;
	flex: 1 1 auto;
	justify-content: center;
	min-height: 0;
	overflow: auto;
	padding: 18px;
}

.lpp-preview-sheet__stage > p {
	background: var(--lpp-white);
	border-radius: 999px;
	color: var(--lpp-muted);
	font-size: 12px;
	margin: 0;
	padding: 8px 12px;
}

.lpp-preview-sheet__stage img {
	background: var(--lpp-white);
	box-shadow: 0 12px 36px rgb(11 11 13 / 18%);
	display: block;
	height: auto;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.lpp-preview-sheet__gallery {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	width: 100%;
}

.lpp-preview-sheet__gallery figure {
	margin: 0;
}

.lpp-preview-sheet__face-button {
	background: transparent;
	border: 0;
	border-radius: 10px;
	cursor: zoom-in;
	display: block;
	font: inherit;
	padding: 0;
	text-align: inherit;
	width: 100%;
}

.lpp-preview-sheet__face-button:focus-visible {
	box-shadow: 0 0 0 4px rgb(0 133 153 / 38%);
	outline: 2px solid var(--lpp-accent);
	outline-offset: 3px;
}

.lpp-preview-sheet__gallery img {
	width: 100%;
}

.lpp-preview-sheet__gallery figcaption {
	background: var(--lpp-ink);
	border-radius: 0 0 8px 8px;
	color: var(--lpp-white);
	font-size: 12px;
	font-weight: 750;
	padding: 7px 10px;
	text-align: center;
}

.lpp-preview-sheet__detail {
	align-items: center;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	justify-content: center;
	position: relative;
	width: 100%;
}

.lpp-preview-sheet__detail[hidden] {
	display: none;
}

.lpp-preview-sheet__detail img {
	max-height: calc(100vh - 245px);
	max-width: 100%;
	width: auto;
}

.lpp-preview-sheet__detail p {
	background: var(--lpp-ink);
	border-radius: 0 0 8px 8px;
	color: var(--lpp-white);
	font-size: 13px;
	font-weight: 750;
	margin: 0;
	padding: 8px 14px;
	text-align: center;
}

.lpp-preview-sheet__detail-toolbar {
	align-self: stretch;
	display: flex;
	flex-shrink: 0;
	justify-content: space-between;
	gap: 8px;
	padding-bottom: 12px;
	position: sticky;
	top: 0;
	 z-index: 2;
}

.lpp-modal .lpp-preview-sheet__detail-close {
	align-items: center;
	appearance: none;
	background: var(--lpp-ink);
	border: 2px solid var(--lpp-white);
	border-radius: 999px;
	box-shadow: 0 5px 18px rgb(0 0 0 / 28%);
	color: var(--lpp-white);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	gap: 8px;
	height: auto;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
	min-height: 48px;
	min-width: 48px;
	padding: 10px 16px;
	position: static;
	text-transform: none;
	width: auto;
}

.lpp-modal .lpp-preview-sheet__detail-close svg {
	display: block;
	flex: 0 0 24px;
	height: 24px;
	width: 24px;
}

.lpp-modal .lpp-preview-sheet__detail-close:hover {
	background: var(--lpp-accent-dark);
	color: var(--lpp-white);
}

.lpp-preview-sheet.is-detail .lpp-preview-sheet__dialog {
	height: 100%;
}

.lpp-preview-sheet.is-detail .lpp-preview-sheet__stage {
	overflow: hidden;
	padding: 8px;
}

.lpp-preview-sheet.is-detail .lpp-preview-sheet__detail {
	height: 100%;
	min-height: 0;
}

.lpp-preview-viewport {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	min-height: 60px;
	overflow: hidden;
	touch-action: none;
	overscroll-behavior: contain;
	background: white;
	cursor: zoom-in;
}

.lpp-preview-viewport.is-zoomed {
	cursor: grab;
}

.lpp-modal .lpp-preview-viewport img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-height: none;
	max-width: none;
	object-fit: contain;
	transform-origin: center;
	box-shadow: none;
	pointer-events: none;
	user-select: none;
}

.lpp-preview-zoom-controls {
	display: flex;
	gap: 4px;
	align-items: center;
	flex-shrink: 0;
}

#lpp-editor-modal [data-lpp-preview-zoom] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	min-width: 48px;
	height: 48px;
	min-height: 48px;
	padding: 0;
	margin: 0;
	border: 1px solid var(--lpp-line);
	border-radius: 8px;
	background: white;
	color: var(--lpp-ink);
	font: 700 14px/1 sans-serif;
	touch-action: manipulation;
}

#lpp-editor-modal [data-lpp-preview-zoom="reset"] {
	width: 60px;
}

#lpp-editor-modal [data-lpp-preview-zoom] svg {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

.lpp-preview-sheet__footer {
	border-top: 1px solid var(--lpp-line);
}

.lpp-preview-sheet__footer p {
	color: var(--lpp-muted);
	font-size: 11px;
	max-width: 620px;
}

@media (max-width: 900px) {
	.lpp-modal [data-lpp-desktop-hidden] {
		display: revert !important;
	}

	.lpp-tool-group[data-lpp-mobile-hidden] {
		display: none !important;
	}

	.lpp-modal [data-lpp-mobile-hidden] {
		display: none !important;
	}

	.lpp-modal__dialog {
		border-radius: 0;
		inset: 0;
	}

	.lpp-modal__header {
		min-height: 64px;
		padding: 9px 12px;
	}

	.lpp-modal__mark,
	.lpp-modal__eyebrow {
		display: none;
	}

	#lpp-editor-status {
		max-width: 180px;
	}

	.lpp-editor {
		display: flex;
		flex-direction: column-reverse;
	}

	.lpp-layers-panel {
		border-bottom: 1px solid var(--lpp-line);
		border-left: 0;
		flex: 0 0 auto;
		max-height: 170px;
	}

	.lpp-layers-list {
		grid-auto-columns: minmax(180px, 230px);
		grid-auto-flow: column;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.lpp-toolbar {
		border-right: 0;
		border-top: 1px solid var(--lpp-line);
		display: flex;
		gap: 18px;
		max-height: 38vh;
		overflow: auto;
		padding: 0 14px;
	}

	.lpp-workspace {
		flex: 1 1 auto;
		min-height: 0;
	}

	.lpp-toolbar__section {
		border-bottom: 0;
		flex: 0 0 270px;
		padding: 14px 0;
	}

	.lpp-symbol-grid {
		max-height: 250px;
	}

	.lpp-canvas-viewport {
		min-height: clamp(120px, 22vh, 230px);
		padding: 18px 10px;
	}

	.lpp-workspace__topbar {
		align-items: center;
		flex-direction: row;
		min-height: 58px;
		padding: 6px 10px;
	}

	.lpp-workspace__controls {
		flex: 1 1 auto;
		justify-content: flex-end;
		min-width: 0;
	}

	.lpp-face-tabs {
		flex: 0 1 auto;
		max-width: 34%;
	}

	.lpp-zone-picker {
		flex: 1 1 auto;
		min-width: 0;
	}

	.lpp-zone-picker select {
		min-width: 0;
	}

	.lpp-modal__footer {
		align-items: stretch;
		flex-direction: column;
		gap: 6px;
		padding: 8px 12px max(8px, env(safe-area-inset-bottom));
	}

	.lpp-modal__footer-tools,
	.lpp-modal__footer-actions {
		justify-content: center;
	}

	.lpp-modal__footer-tools {
		overflow-x: auto;
		overscroll-behavior: contain;
	}

	.lpp-price-summary {
		align-items: center;
		display: flex;
		gap: 10px;
		margin-left: 0;
		min-width: 0;
		overflow: hidden;
		padding: 7px 9px;
		width: 100%;
	}

	.lpp-price-summary__breakdown {
		align-items: center;
		display: flex;
		flex: 1 1 auto;
		gap: 10px;
		min-width: 0;
		overflow-x: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}

	.lpp-price-summary__base,
	.lpp-price-summary__items > div,
	.lpp-price-summary__total {
		flex: 0 0 auto;
		gap: 5px;
		white-space: nowrap;
	}

	.lpp-price-summary__items {
		display: flex;
		flex: 0 0 auto;
		gap: 10px;
	}

	.lpp-price-summary__total {
		border-left: 1px solid var(--lpp-line);
		border-top: 0;
		margin: 0;
		padding: 0 0 0 10px;
	}

	.lpp-modal__footer-actions .lpp-button {
		flex: 1;
	}

	.lpp-help-sheet {
		align-items: flex-end;
		padding: 0;
	}

	.lpp-help-sheet > div {
		border-radius: 18px 18px 0 0;
		max-width: none;
		padding-bottom: max(24px, env(safe-area-inset-bottom));
	}

	.lpp-preview-sheet {
		padding: 0;
	}

	.lpp-preview-sheet__dialog {
		border-radius: 0;
		height: 100%;
		max-height: none;
		width: 100%;
	}

	.lpp-preview-sheet__stage {
		padding: 8px;
	}

	.lpp-preview-sheet__gallery {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.lpp-preview-sheet__header,
	.lpp-preview-sheet__footer {
		padding: 8px 10px;
		gap: 6px;
	}

	.lpp-preview-sheet__header h3 {
		font-size: 16px;
	}

	.lpp-preview-sheet.is-detail .lpp-preview-sheet__footer p {
		display: none;
	}

	.lpp-preview-sheet__detail-close span {
		display: none;
	}

	.lpp-modal .lpp-preview-sheet__detail-close {
		padding: 10px;
	}

	.lpp-preview-sheet__footer {
		align-items: stretch;
		flex-direction: column;
		padding-bottom: max(15px, env(safe-area-inset-bottom));
	}

	.lpp-preview-sheet__footer .lpp-button {
		width: 100%;
	}
}

@media (max-width: 900px) and (max-height: 700px) {
	.lpp-toolbar {
		max-height: 30vh;
	}

	.lpp-canvas-viewport {
		min-height: 96px;
		padding: 10px 6px;
	}

	.lpp-zone-hint {
		font-size: 10px;
		padding-top: 4px;
	}
}

@media (max-width: 520px) {
	.lpp-modal__header h2 {
		font-size: 16px;
	}

	#lpp-editor-status {
		display: none;
	}

	.lpp-modal__footer-tools .lpp-link-button:nth-child(3) {
		display: none;
	}

	.lpp-button {
		padding: 0 12px;
	}
}

/* Mobile tools occupy their own grid track; they never cover the product photo. */
@media (max-width: 900px) {
	#lpp-editor-modal #lpp-editor-status.is-error {
		background: #fff1f0;
		border: 1px solid #b42318;
		border-radius: 8px;
		color: #b42318;
		display: block;
		left: 8px;
		max-width: none;
		padding: 8px;
		pointer-events: none;
		position: absolute;
		right: 8px;
		top: 56px;
		z-index: 30;
	}

	#lpp-editor-modal {
		bottom: auto;
		height: var(--lpp-visible-height, 100dvh);
		top: var(--lpp-visible-top, 0px);
	}

	#lpp-editor-modal .lpp-modal__dialog {
		border: 0;
		height: 100%;
		inset: 0;
		max-height: none;
		width: 100%;
	}

	#lpp-editor-modal .lpp-modal__header {
		gap: 8px;
		min-height: 52px;
		padding: max(4px, env(safe-area-inset-top)) 8px 4px;
	}

	#lpp-editor-modal .lpp-modal__header h2 {
		font-size: 16px;
	}

	#lpp-editor-modal .lpp-modal__header-status {
		flex-shrink: 0;
		gap: 6px;
	}

	#lpp-editor-modal .lpp-icon-button,
	#lpp-editor-modal .lpp-zoom-controls button {
		height: 44px;
		min-width: 44px;
		width: 44px;
	}

	#lpp-editor-status {
		display: none;
	}

	#lpp-editor-modal .lpp-editor {
		display: grid;
		grid-template-columns: 64px minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr);
		position: relative;
	}

	#lpp-editor-modal .lpp-editor.has-tool-panel {
		grid-template-rows: minmax(0, 1fr) minmax(180px, 40%);
	}

	#lpp-editor-modal .lpp-mobile-rail {
		align-content: start;
		background: #fff;
		border-right: 1px solid var(--lpp-line);
		display: grid;
		gap: 4px;
		grid-column: 1;
		grid-row: 1 / -1;
		min-height: 0;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 6px 4px;
		touch-action: pan-y;
	}

	#lpp-editor-modal .lpp-mobile-rail button {
		align-items: center;
		appearance: none;
		background: #fff;
		border: 1px solid transparent;
		border-radius: 9px;
		box-shadow: none;
		color: var(--lpp-ink);
		display: flex;
		flex-direction: column;
		font-size: 10px;
		font-weight: 600;
		gap: 4px;
		justify-content: center;
		line-height: 1.1;
		margin: 0;
		min-height: 54px;
		min-width: 0;
		padding: 5px 1px;
		text-transform: none;
		width: 100%;
	}

	#lpp-editor-modal .lpp-mobile-rail button:focus-visible,
	#lpp-editor-modal .lpp-mobile-rail button[aria-expanded="true"] {
		background: #edf8fa;
		border-color: var(--lpp-accent);
		color: #006575;
	}

	#lpp-editor-modal .lpp-toolbar,
	#lpp-editor-modal .lpp-toolbar__section,
	#lpp-editor-modal .lpp-add-tools,
	#lpp-editor-modal .lpp-add-tools > .lpp-tool-group,
	#lpp-editor-modal .lpp-symbol-picker {
		display: contents;
	}

	#lpp-editor-modal .lpp-toolbar .lpp-section-title,
	#lpp-editor-modal .lpp-add-tool,
	#lpp-editor-modal .lpp-toolbar .lpp-action-grid {
		display: none;
	}

	#lpp-editor-modal .lpp-workspace {
		grid-column: 2;
		grid-row: 1;
		min-height: 0;
	}

	#lpp-editor-modal .lpp-workspace__topbar {
		align-items: stretch;
		flex-wrap: wrap;
		gap: 4px;
		min-height: 0;
		padding: 4px 8px;
	}

	#lpp-editor-modal .lpp-face-tabs {
		flex: 1 1 100%;
		flex-wrap: wrap;
		max-width: none;
		overflow: visible;
	}

	#lpp-editor-modal .lpp-face-tabs button {
		flex: 1 1 60px;
		font-size: 12px;
		min-height: 40px;
		padding: 6px;
		text-transform: none;
		white-space: normal;
	}

	#lpp-editor-modal .lpp-zone-picker {
		flex: 1;
		gap: 4px;
	}

	#lpp-editor-modal .lpp-zone-picker select {
		font-size: 16px;
		max-width: 100%;
		width: 100%;
	}

	#lpp-editor-modal .lpp-mobile-elements-trigger {
		align-items: center;
		appearance: none;
		background: #fff;
		border: 1px solid var(--lpp-line);
		border-radius: 8px;
		color: var(--lpp-ink);
		cursor: pointer;
		font-size: 11px;
		font-weight: 700;
		gap: 5px;
		height: 44px;
		justify-content: center;
		margin: 0;
		min-width: 98px;
		padding: 0 8px;
		text-transform: none;
	}

	#lpp-editor-modal .lpp-mobile-elements-trigger strong {
		align-items: center;
		background: var(--lpp-accent);
		border-radius: 999px;
		color: #fff;
		display: inline-flex;
		font-size: 10px;
		height: 20px;
		justify-content: center;
		min-width: 20px;
		padding: 0 5px;
	}

	#lpp-editor-modal .lpp-mobile-elements-trigger[aria-expanded="true"] {
		background: #edf8fa;
		border-color: var(--lpp-accent);
	}

	#lpp-editor-modal .lpp-canvas-viewport {
		min-height: 0;
		padding: 8px;
		place-items: safe center;
	}

	#lpp-editor-modal .lpp-canvas-frame {
		display: block;
		flex-shrink: 0;
		overflow: clip;
		position: relative;
	}

	#lpp-editor-modal .lpp-canvas-shell {
		aspect-ratio: auto;
		box-shadow: none;
		max-width: none;
		position: absolute;
	}

	#lpp-editor-modal .lpp-zone-hint {
		display: none;
	}

	#lpp-editor-modal .has-single-zone .lpp-workspace__topbar {
		flex-wrap: nowrap;
	}

	#lpp-editor-modal .has-single-zone .lpp-face-tabs {
		flex: 1 1 auto;
	}

	#lpp-editor-modal .has-single-zone .lpp-workspace__controls {
		flex: 0 0 auto;
	}

	#lpp-editor-modal .has-single-zone .lpp-zone-picker {
		display: none;
	}

	#lpp-editor-modal .lpp-symbol-panel,
	#lpp-editor-modal .lpp-layers-panel.is-open {
		background: #fff;
		border: 0;
		border-top: 1px solid var(--lpp-line);
		border-radius: 0;
		box-shadow: none;
		grid-column: 2;
		grid-row: 2;
		inset: auto;
		isolation: isolate;
		margin: 0;
		max-height: none;
		min-height: 0;
		min-width: 0;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 8px;
		position: relative;
		touch-action: pan-y;
		z-index: auto;
	}

	#lpp-editor-modal .lpp-symbol-panel:not(.lpp-text-panel),
	#lpp-editor-modal .lpp-font-panel {
		display: flex;
		flex-direction: column;
	}

	#lpp-editor-modal .lpp-symbol-panel__header {
		background: #fff;
		flex: 0 0 auto;
		gap: 8px;
		margin-bottom: 4px;
		min-height: 44px;
		position: sticky;
		top: -8px;
		z-index: 3;
	}

	#lpp-editor-modal .lpp-symbol-search,
	#lpp-editor-modal .lpp-library-views,
	#lpp-editor-modal .lpp-model-categories {
		flex: 0 0 auto;
	}

	#lpp-editor-modal .lpp-symbol-panel__header button {
		flex: 0 0 44px;
		height: 44px;
		min-height: 44px;
		padding: 0;
		width: 44px;
	}

	#lpp-editor-modal .lpp-symbol-search input,
	#lpp-editor-modal .lpp-properties input {
		font-size: 16px;
	}

	#lpp-editor-modal .lpp-font-field {
		position: static;
	}

	#lpp-editor-modal .lpp-font-panel {
		border: 0;
		border-radius: 0;
		box-shadow: none;
		inset: 0;
		margin: 0;
		overflow-y: auto;
		padding: 8px;
		width: 100%;
		z-index: 15;
	}

	#lpp-editor-modal .lpp-font-grid,
	#lpp-editor-modal .lpp-symbol-grid,
	#lpp-editor-modal .lpp-model-grid {
		flex: 1 1 auto;
		max-height: none;
		min-height: 72px;
	}

	#lpp-editor-modal .lpp-symbol-grid,
	#lpp-editor-modal .lpp-model-grid {
		align-content: start;
	}

	#lpp-editor-modal [data-lpp-text-input] {
		resize: none;
	}

	#lpp-editor-modal .lpp-segmented button {
		min-height: 44px;
	}

	#lpp-editor-modal .lpp-layers-panel {
		display: none;
	}

	#lpp-editor-modal .lpp-layers-panel.is-open {
		display: flex;
	}

	#lpp-editor-modal .lpp-layers-panel > header {
		background: #fff;
		flex: 0 0 auto;
		padding: 0 4px;
	}

	#lpp-editor-modal .lpp-mobile-only {
		display: inline-flex;
	}

	#lpp-editor-modal .lpp-mobile-layer-actions {
		display: grid;
		gap: 6px;
		grid-template-columns: 1fr 1fr;
		padding: 8px 12px;
	}

	#lpp-editor-modal .lpp-mobile-layer-actions button {
		background: var(--lpp-soft);
		border: 1px solid var(--lpp-line);
		border-radius: 8px;
		color: var(--lpp-ink);
		font-size: 12px;
		min-height: 44px;
		padding: 6px;
		text-transform: none;
	}

	#lpp-editor-modal .lpp-layers-list {
		grid-auto-flow: row;
		grid-auto-columns: auto;
		overflow-x: hidden;
		overflow-y: auto;
	}

	#lpp-editor-modal .lpp-modal__footer {
		display: grid;
		gap: 6px;
		grid-template-columns: auto minmax(0, 1fr);
		padding: 6px 8px max(6px, env(safe-area-inset-bottom));
	}

	#lpp-editor-modal .lpp-price-summary {
		align-items: center;
		grid-column: 1 / -1;
		grid-row: 1;
	}

	#lpp-editor-modal .lpp-price-summary__breakdown,
	#lpp-editor-modal .lpp-price-summary__items {
		flex-wrap: wrap;
		gap: 3px 8px;
		max-height: 52px;
		overflow-x: hidden;
		overflow-y: auto;
	}

	#lpp-editor-modal .lpp-modal__footer-tools {
		grid-column: 1;
		grid-row: 2;
		overflow: visible;
	}

	#lpp-editor-modal .lpp-modal__footer-tools [data-lpp-action="undo"],
	#lpp-editor-modal .lpp-modal__footer-tools [data-lpp-action="redo"],
	#lpp-editor-modal .lpp-modal__footer-tools [data-lpp-action="reset"] {
		display: none;
	}

	#lpp-editor-modal .lpp-modal__footer-actions {
		gap: 4px;
		grid-column: 2;
		grid-row: 2;
		min-width: 0;
	}

	#lpp-editor-modal .lpp-modal__footer .lpp-link-button,
	#lpp-editor-modal .lpp-modal__footer .lpp-button {
		font-size: 12px;
		min-height: 44px;
		padding: 8px;
		text-transform: none;
		white-space: normal;
	}
}

@media (max-width: 360px) {
	#lpp-editor-modal .lpp-symbol-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Leave room for both the whole photo and typing when the on-screen keyboard opens. */
@media (max-width: 599px) {
	#lpp-editor-modal.lpp-compact-input .lpp-modal__footer {
		display: block;
		min-height: 0;
		padding: 4px 8px;
	}

	#lpp-editor-modal.lpp-compact-input .lpp-price-summary {
		display: block;
		padding: 4px 8px;
	}

	#lpp-editor-modal.lpp-compact-input .lpp-price-summary__total {
		border: 0;
		padding: 0;
	}

	#lpp-editor-modal.lpp-compact-input .lpp-price-summary__breakdown,
	#lpp-editor-modal.lpp-compact-input .lpp-modal__footer-tools,
	#lpp-editor-modal.lpp-compact-input .lpp-modal__footer-actions,
	#lpp-editor-modal.lpp-compact-input .lpp-workspace__controls,
	#lpp-editor-modal.lpp-compact-input .lpp-zone-hint,
	#lpp-editor-modal.lpp-compact-input .lpp-zone-guide span {
		display: none;
	}
}

@media (min-width: 600px) and (max-width: 900px) and (max-height: 500px) {
	#lpp-editor-modal .lpp-editor.has-tool-panel {
		grid-template-columns: 64px minmax(0, 1fr) minmax(260px, 38%);
		grid-template-rows: minmax(0, 1fr);
	}

	#lpp-editor-modal .lpp-symbol-panel,
	#lpp-editor-modal .lpp-layers-panel.is-open {
		border-left: 1px solid var(--lpp-line);
		border-top: 0;
		grid-column: 3;
		grid-row: 1;
	}

	#lpp-editor-modal .lpp-workspace__topbar {
		flex-wrap: nowrap;
	}

	#lpp-editor-modal .lpp-face-tabs {
		flex: 1 1 auto;
	}

	#lpp-editor-modal .lpp-modal__footer {
		grid-template-columns: minmax(0, 1fr) auto auto;
	}

	#lpp-editor-modal .lpp-price-summary {
		grid-column: 1;
		grid-row: 1;
	}

	#lpp-editor-modal .lpp-modal__footer-tools {
		grid-column: 2;
		grid-row: 1;
	}

	#lpp-editor-modal .lpp-modal__footer-actions {
		grid-column: 3;
		grid-row: 1;
	}
}

/* A compact editing dock and centred thumb tools; no empty instruction track. */
@media (max-width: 900px) {
	#lpp-editor-modal .lpp-editor,
	#lpp-editor-modal .lpp-editor.has-tool-panel {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr) 132px 72px;
	}

	#lpp-editor-modal .lpp-workspace {
		grid-column: 1;
		grid-row: 1;
	}

	#lpp-editor-modal .lpp-mobile-rail {
		display: flex;
		justify-content: center;
		grid-column: 1;
		grid-row: 3;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		border-right: 0;
		border-top: 1px solid var(--lpp-line);
		padding: 2px 4px;
		gap: 2px;
		overflow: hidden;
	}

	#lpp-editor-modal .lpp-mobile-rail button {
		position: relative;
		flex: 1 1 0;
		max-width: 140px;
		min-height: 66px;
		font-size: 13px;
		text-align: center;
	}

	#lpp-editor-modal .lpp-mobile-rail button svg {
		width: 28px;
		height: 28px;
		flex-shrink: 0;
	}

	#lpp-editor-modal .lpp-editor:not(.has-selection):not(.has-tool-panel) {
		grid-template-rows: minmax(0, 1fr) 0 72px;
	}

	#lpp-editor-modal .lpp-editor:not(.has-selection) .lpp-mobile-adjust {
		display: none;
	}

	#lpp-editor-modal .lpp-mobile-rail button:nth-child(n+6),
	#lpp-editor-modal .lpp-mobile-elements-trigger {
		display: none;
	}

	#lpp-editor-modal .lpp-mobile-rail small {
		position: absolute;
		top: 1px;
		right: 6px;
		background: var(--lpp-accent);
		color: white;
		border-radius: 12px;
		min-width: 18px;
		line-height: 18px;
		font-size: 10px;
	}

	#lpp-editor-modal .lpp-workspace__topbar,
	#lpp-editor-modal .has-single-zone .lpp-workspace__topbar {
		flex-wrap: wrap;
		padding: 2px 6px;
		gap: 2px;
	}

	#lpp-editor-modal .lpp-face-tabs {
		flex: 1 1 auto;
	}

	#lpp-editor-modal .lpp-workspace__controls {
		flex: 0 1 auto;
	}

	#lpp-editor-modal .lpp-canvas-viewport {
		padding: 4px;
	}

	#lpp-editor-modal .lpp-zone-guide span {
		display: none;
	}

	#lpp-editor-modal .lpp-symbol-panel,
	#lpp-editor-modal .lpp-layers-panel.is-open,
	#lpp-editor-modal .lpp-mobile-adjust {
		grid-column: 1;
		grid-row: 2;
		border-left: 0;
		border-top: 1px solid var(--lpp-line);
		padding: 6px;
		min-width: 0;
		min-height: 0;
		max-height: 132px;
		background: white;
	}

	#lpp-editor-modal .lpp-symbol-panel,
	#lpp-editor-modal .lpp-layers-panel.is-open {
		z-index: 2;
	}

	#lpp-editor-modal .lpp-symbol-panel__header {
		top: -6px;
		margin: 0;
		min-height: 44px;
	}

	#lpp-editor-modal .lpp-symbol-panel:not(.lpp-text-panel) .lpp-library-views,
	#lpp-editor-modal .lpp-font-panel .lpp-library-views {
		flex-wrap: nowrap;
	}

	#lpp-editor-modal .lpp-text-panel {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: 58px 50px;
		gap: 4px;
		overflow: hidden;
	}

	#lpp-editor-modal .lpp-text-panel > .lpp-symbol-panel__header,
	#lpp-editor-modal .lpp-text-panel .lpp-property-label,
	#lpp-editor-modal .lpp-text-panel .lpp-properties > label,
	#lpp-editor-modal .lpp-text-panel .lpp-segmented {
		display: none;
	}

	#lpp-editor-modal .lpp-text-entry {
		position: relative;
		grid-row: 1;
		margin: 0;
		font-size: 0;
		gap: 0;
		display: block;
	}

	#lpp-editor-modal .lpp-text-entry-label {
		display: none;
	}

	#lpp-editor-modal [data-lpp-text-input] {
		box-sizing: border-box;
		height: 56px;
		min-height: 56px;
		max-height: 56px;
		padding: 6px 10px;
		font-size: 16px;
		line-height: 21px;
		border-radius: 9px;
	}

	#lpp-editor-modal .lpp-text-panel .lpp-properties {
		grid-row: 2;
		grid-column: 1;
		display: block;
		margin: 0;
		width: calc(100% - 184px);
		min-width: 64px;
	}

	#lpp-editor-modal .lpp-text-panel .lpp-font-trigger {
		min-height: 48px;
		height: 48px;
		padding: 4px 7px;
		font-size: 12px;
	}

	#lpp-editor-modal .lpp-mobile-text-actions {
		grid-row: 2;
		grid-column: 1;
		justify-self: end;
		display: flex;
		gap: 4px;
	}

	#lpp-editor-modal .lpp-mobile-text-actions button,
	#lpp-editor-modal .lpp-mobile-adjust button {
		appearance: none;
		background: var(--lpp-soft);
		border: 1px solid var(--lpp-line);
		border-radius: 8px;
		color: var(--lpp-ink);
		min-width: 44px;
		min-height: 48px;
		padding: 4px 6px;
		font-size: 13px;
		line-height: 1.1;
		text-transform: none;
		margin: 0;
		touch-action: manipulation;
	}

	#lpp-editor-modal .lpp-text-panel.has-more .lpp-properties {
		grid-row: 1;
		width: 100%;
	}

	#lpp-editor-modal .lpp-text-panel.has-more .lpp-text-entry,
	#lpp-editor-modal .lpp-text-panel.has-more .lpp-font-field {
		display: none;
	}

	#lpp-editor-modal .lpp-text-panel.has-more .lpp-segmented {
		display: flex;
		margin: 0;
	}

	#lpp-editor-modal .lpp-font-panel {
		max-height: 132px;
	}

	#lpp-editor-modal .lpp-mobile-adjust {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 4px;
	}

	#lpp-editor-modal .lpp-selection-label {
		font-size: 12px;
		line-height: 16px;
		text-align: center;
		color: var(--lpp-ink);
	}

	#lpp-editor-modal .lpp-mobile-adjust-row {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
		gap: 4px;
	}

	#lpp-editor-modal .lpp-mobile-start-hint {
		margin: 0 auto;
		max-width: 280px;
		text-align: center;
		font-size: 14px;
		line-height: 1.5;
		color: var(--lpp-muted);
	}

	#lpp-editor-modal .has-selection .lpp-mobile-start-hint,
	#lpp-editor-modal .lpp-editor:not(.has-selection) .lpp-mobile-adjust-row {
		display: none;
	}

	#lpp-editor-modal .has-tool-panel .lpp-mobile-adjust {
		visibility: hidden;
	}

	#lpp-editor-modal .lpp-mobile-adjust button:disabled {
		opacity: 0.4;
	}

	#lpp-editor-modal .lpp-layers-list,
	#lpp-editor-modal .lpp-mobile-layer-actions {
		flex: 0 0 auto;
		max-height: none;
		overflow: visible;
	}

	#lpp-editor-modal .lpp-layers-panel > header {
		position: sticky;
		top: -6px;
		z-index: 3;
	}

	#lpp-editor-modal .lpp-symbol-panel:not(.lpp-text-panel),
	#lpp-editor-modal .lpp-font-panel {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 96px 44px;
		grid-template-rows: 44px minmax(0, 1fr);
		gap: 4px;
		overflow: hidden;
	}

	#lpp-editor-modal .lpp-symbol-panel:not(.lpp-text-panel) > .lpp-symbol-panel__header,
	#lpp-editor-modal .lpp-font-panel > .lpp-symbol-panel__header {
		grid-column: 3;
		grid-row: 1;
		position: static;
	}

	#lpp-editor-modal .lpp-symbol-panel:not(.lpp-text-panel) > .lpp-symbol-panel__header strong,
	#lpp-editor-modal .lpp-font-panel > .lpp-symbol-panel__header strong,
	#lpp-editor-modal .lpp-symbol-panel:not(.lpp-text-panel) > .lpp-library-views,
	#lpp-editor-modal .lpp-font-panel > .lpp-library-views {
		display: none;
	}

	#lpp-editor-modal .lpp-symbol-search {
		grid-column: 1;
		grid-row: 1;
		margin: 0;
		min-width: 0;
	}

	#lpp-editor-modal .lpp-symbol-search input {
		height: 44px;
		min-height: 44px;
		padding: 4px 8px;
	}

	#lpp-editor-modal .lpp-mobile-library-filter {
		grid-column: 2;
		grid-row: 1;
		width: 96px;
		min-width: 0;
		height: 44px;
		font-size: 16px;
		padding: 4px;
		border: 1px solid var(--lpp-line);
		border-radius: 8px;
		background: white;
		color: var(--lpp-ink);
	}

	#lpp-editor-modal .lpp-symbol-grid,
	#lpp-editor-modal .lpp-model-grid,
	#lpp-editor-modal .lpp-font-grid {
		grid-column: 1 / -1;
		grid-row: 2;
		min-height: 0;
		height: 100%;
		overflow-y: auto;
		margin: 0;
	}

	#lpp-editor-modal .lpp-model-categories {
		display: none;
	}

	#lpp-editor-modal .lpp-symbol-empty {
		grid-column: 1 / -1;
		grid-row: 2;
		margin: 4px;
	}

	#lpp-editor-modal .lpp-modal__footer {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 2px;
		padding: 2px 6px max(2px, env(safe-area-inset-bottom));
	}

	#lpp-editor-modal .lpp-price-summary {
		grid-column: 1 / -1;
		grid-row: 1;
		padding: 3px 6px;
		height: 32px;
		min-height: 32px;
		box-sizing: border-box;
		overflow: hidden;
	}

	#lpp-editor-modal .lpp-price-summary__breakdown {
		height: 20px;
		max-height: 20px;
		font-size: 10px;
		line-height: 20px;
		align-content: start;
		row-gap: 0;
	}

	#lpp-editor-modal .lpp-price-summary__base,
	#lpp-editor-modal .lpp-price-summary__items > div {
		line-height: 20px;
		min-height: 20px;
	}

	#lpp-editor-modal .lpp-price-summary__total {
		font-size: 13px;
	}

	#lpp-editor-modal .lpp-modal__footer-tools {
		grid-column: 1;
		grid-row: 2;
	}

	#lpp-editor-modal .lpp-modal__footer-actions {
		grid-column: 2;
		grid-row: 2;
	}

	#lpp-editor-modal.lpp-compact-input .lpp-editor {
		grid-template-rows: minmax(0, 1fr) 132px;
	}

	#lpp-editor-modal.lpp-compact-input .lpp-mobile-rail {
		display: none;
	}
}

@media (min-width: 600px) and (max-width: 900px) and (max-height: 500px) {
	#lpp-editor-modal .lpp-editor,
	#lpp-editor-modal .lpp-editor.has-tool-panel {
		grid-template-columns: minmax(0, 1fr) 320px;
		grid-template-rows: minmax(0, 1fr) 72px;
	}

	#lpp-editor-modal .lpp-workspace {
		grid-row: 1 / -1;
	}

	#lpp-editor-modal .lpp-symbol-panel,
	#lpp-editor-modal .lpp-layers-panel.is-open,
	#lpp-editor-modal .lpp-mobile-adjust {
		grid-column: 2;
		grid-row: 1;
		max-height: none;
	}

	#lpp-editor-modal .lpp-mobile-rail {
		grid-column: 2;
		grid-row: 2;
	}
}

/* Browsing gets more space; typing retains the compact 132px dock. */
@media (max-width: 900px) {
	#lpp-editor-modal .lpp-editor.has-library-panel {
		grid-template-rows: minmax(0, 1fr) min(300px, 52%) 72px;
	}

	#lpp-editor-modal .has-library-panel > .lpp-symbol-panel,
	#lpp-editor-modal .has-library-panel > .lpp-layers-panel {
		max-height: none;
	}

	#lpp-editor-modal .has-library-panel > .lpp-symbol-panel:not(.lpp-text-panel) {
		grid-template-columns: minmax(0, 1fr) 90px 44px;
	}

	#lpp-editor-modal .has-library-panel .lpp-mobile-library-filter {
		width: 90px;
	}

	#lpp-editor-modal .has-library-panel > .lpp-symbol-panel:not(.lpp-text-panel) > .lpp-symbol-panel__header {
		display: flex;
		gap: 4px;
	}

	#lpp-editor-modal .has-library-panel .lpp-font-panel {
		max-height: none;
	}

	#lpp-editor-modal .lpp-font-grid {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-rows: max-content;
		align-content: start;
		gap: 6px;
	}

	#lpp-editor-modal .lpp-font-tile {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		justify-items: start;
		align-content: center;
		text-align: left;
		text-transform: none;
		min-height: 64px;
		padding: 8px 50px 8px 12px;
		border: 1px solid var(--lpp-line);
	}

	#lpp-editor-modal .lpp-font-tile strong {
		font-size: 22px;
		max-width: 100%;
	}

	#lpp-editor-modal .lpp-font-tile small {
		font-size: 12px;
	}

	#lpp-editor-modal .lpp-font-tile[aria-selected="true"] {
		border-color: var(--lpp-accent);
		box-shadow: inset 3px 0 var(--lpp-accent);
	}

	#lpp-editor-modal .lpp-library-card--font .lpp-favorite-button {
		top: 10px;
		right: 4px;
		width: 44px;
		height: 44px;
		min-width: 44px;
		min-height: 44px;
	}

	#lpp-editor-modal.lpp-compact-input .lpp-editor.has-library-panel {
		grid-template-rows: minmax(0, 1fr) min(300px, 65%);
	}
}

@media (min-width: 600px) and (max-width: 900px) and (max-height: 500px) {
	#lpp-editor-modal .lpp-editor.has-library-panel {
		grid-template-rows: minmax(0, 1fr) 72px;
	}
}

/* Keep every cost visible: product/total above, itemized engraving below. */
@media (max-width: 599px) and (max-height: 650px) {
	#lpp-editor-modal:not(.lpp-compact-input) .lpp-editor.has-font-panel {
		grid-template-rows: minmax(0, 1fr) min(180px, 35%) 72px;
	}
}

@media (max-width: 900px) {
	#lpp-editor-modal:not(.lpp-compact-input) .lpp-price-summary {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 2px 8px;
		height: auto;
		min-height: 52px;
		overflow: visible;
		padding: 4px 6px;
	}

	#lpp-editor-modal:not(.lpp-compact-input) .lpp-price-summary__breakdown {
		display: contents;
	}

	#lpp-editor-modal:not(.lpp-compact-input) .lpp-price-summary__base {
		grid-column: 1;
		grid-row: 1;
		font-size: 12px;
		justify-content: flex-start;
	}

	#lpp-editor-modal:not(.lpp-compact-input) .lpp-price-summary__total {
		grid-column: 2;
		grid-row: 1;
		border: 0;
		padding: 0;
	}

	#lpp-editor-modal:not(.lpp-compact-input) .lpp-price-summary__items {
		grid-column: 1 / -1;
		grid-row: 2;
		display: flex;
		flex-wrap: wrap;
		gap: 2px 10px;
		height: auto;
		max-height: none;
		overflow: visible;
		font-size: 11px;
	}

	#lpp-editor-modal:not(.lpp-compact-input) .lpp-price-summary__items > div {
		white-space: normal;
		flex-wrap: wrap;
	}
}

@media (min-width: 600px) and (max-width: 900px) and (max-height: 500px) {
	#lpp-editor-modal .lpp-editor:not(.has-selection):not(.has-tool-panel) {
		grid-template-rows: minmax(0, 1fr) 72px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lpp-modal *,
	.lpp-modal *::before,
	.lpp-modal *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

@font-face {
	font-display: swap;
	font-family: "DejaVu Sans";
	src: url("../../dist/fonts/DejaVuSans.ttf") format("truetype");
}

@font-face {
	font-display: swap;
	font-family: "DejaVu Serif";
	src: url("../../dist/fonts/DejaVuSerif.ttf") format("truetype");
}
