.console-stage-header {
	background: var(--panel-shell);
	padding: 18px 22px;
	border-radius: var(--app-radius);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"copy toggle"
		"intro intro";
	align-items: start;
	gap: 18px;
}

.console-stage-header-copy {
	display: grid;
	grid-area: copy;
	min-width: 0;
	max-width: none;
}

.console-stage-kicker {
	margin: 0 0 8px;
	color: var(--panel-accent);
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

h1 {
	margin: 0;
	font-size: 46px;
	line-height: 0.98;
}

.console-stage-intro {
	grid-area: intro;
	width: 100%;
	max-width: none;
	margin: -4px 0 0;
	color: var(--panel-muted);
	line-height: 1.55;
}

.console-stage-view-toggle {
	display: inline-grid;
	grid-area: toggle;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 0;
	padding: 4px;
	justify-self: end;
	border-radius: 999px;
	border: 1px solid rgba(186, 136, 62, 0.34);
	background: rgba(15, 22, 25, 0.82);
	box-shadow: inset 0 0 0 1px rgba(255, 221, 168, 0.04);
}

.console-stage-view-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 66px;
	padding: 7px 12px;
	border-radius: 999px;
	border: 0;
	background: transparent;
	color: var(--panel-muted);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.console-stage-view-button:hover {
	transform: translateY(-1px);
	color: var(--panel-text);
}

.console-stage-view-button.is-active {
	background: linear-gradient(180deg, rgba(233, 197, 130, 0.96), rgba(180, 136, 67, 0.96));
	color: rgba(34, 22, 8, 0.96);
	box-shadow: 0 1px 0 rgba(255, 238, 203, 0.28) inset;
}

.console-panel-wrap {
	border: 1px solid var(--panel-border-strong);
	border-radius: var(--app-radius);
	background: linear-gradient(180deg, rgba(21, 32, 36, 0.98) 0%, rgba(12, 18, 21, 0.98) 100%);
	box-shadow: var(--panel-shadow);
	padding: 24px;
	min-height: 760px;
}

.status-stack {
	display: grid;
	gap: 8px;
}

.action-button,
.ghost-button,
.mini-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 10px 12px;
	border-radius: var(--app-radius);
	border: 1px solid var(--panel-border);
	background: var(--panel-surface);
	color: var(--panel-text);
	text-decoration: none;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.action-button:hover,
.ghost-button:hover,
.mini-button:hover {
	transform: translateY(-1px);
	border-color: var(--panel-border-strong);
}

.subnav-panel {
	display: none;
}

.subnav-panel.is-visible {
	display: block;
}

.debug-output--hidden {
	display: none;
}

.action-button {
	border: 0;
	background: linear-gradient(135deg, var(--panel-accent), var(--panel-accent-strong));
	color: #2a1600;
}

.action-button--compact {
	padding: 8px 10px;
	font-size: 13px;
}

.mini-button {
	font-size: 12px;
}

.mini-button.is-active {
	color: var(--panel-good);
	border-color: rgba(121, 223, 168, 0.35);
	background: rgba(121, 223, 168, 0.08);
}

.status-pill {
	padding: 11px 15px;
	border-radius: var(--app-radius);
	background: var(--panel-surface);
	border: 1px solid var(--panel-border);
	color: var(--panel-muted);
	box-shadow: var(--panel-shadow);
}

.status-pill.good {
	color: var(--panel-good);
}

.status-pill.warn {
	color: var(--panel-warn);
}

.status-pill.bad {
	color: var(--panel-bad);
}

.tab-panel,
.subtab-panel {
	display: none;
}

.tab-panel.is-active,
.subtab-panel.is-active {
	display: block;
}

.subtab-panel-wrap {
	display: grid;
}

.overview-grid,
.panel-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 16px;
}

.launchpad-grid {
	display: grid;
	gap: 16px;
}

.launchpad-control-card {
	display: grid;
	gap: 18px;
}

.panel-grid--themes {
	align-items: start;
}

.panel-card {
	grid-column: span 3;
	padding: 18px;
	border-radius: var(--app-radius);
	border: 1px solid var(--panel-border);
	background: var(--panel-surface);
	backdrop-filter: blur(8px);
}

.panel-card--hero {
	grid-column: span 7;
}

.panel-card--wide {
	grid-column: 1 / -1;
}

.panel-card h2 {
	margin: 0 0 16px;
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--panel-muted);
}

.launchpad-card-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.launchpad-card-header h2 {
	margin-bottom: 6px;
}

.launchpad-card-copy {
	margin: 0;
	color: var(--panel-muted);
	line-height: 1.45;
}

.launchpad-live-summary {
	display: grid;
	gap: 5px;
	min-width: 280px;
	padding: 14px 16px;
	border-radius: var(--app-radius);
	border: 1px solid rgba(255, 209, 102, 0.18);
	background: linear-gradient(180deg, rgba(24, 33, 38, 0.98), rgba(11, 17, 21, 0.98));
}

.launchpad-live-summary-label {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 209, 102, 0.78);
}

.launchpad-live-summary strong {
	font-size: 18px;
	line-height: 1.2;
	color: rgba(255, 247, 230, 0.98);
}

.launchpad-live-summary span:last-child {
	color: var(--panel-muted);
	line-height: 1.45;
}

.launchpad-overlay-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

.launchpad-overlay-card {
	display: grid;
	gap: 10px;
	padding: 12px;
	border-radius: var(--app-radius);
	border: 1px solid rgba(126, 92, 34, 0.78);
	background:
		linear-gradient(180deg, rgba(205, 182, 126, 0.98), rgba(158, 126, 67, 0.98));
	box-shadow:
		inset 0 0 0 1px rgba(255, 236, 191, 0.46),
		inset 0 -14px 24px rgba(99, 69, 24, 0.16),
		0 8px 18px rgba(0, 0, 0, 0.22);
	color: rgba(39, 27, 12, 0.98);
}

.launchpad-overlay-card.is-live {
	box-shadow:
		inset 0 0 0 1px rgba(191, 255, 220, 0.55),
		0 0 0 1px rgba(120, 220, 168, 0.3),
		0 8px 18px rgba(0, 0, 0, 0.22);
}

.launchpad-overlay-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.launchpad-overlay-card-badge {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(65, 109, 78, 0.98);
}

.launchpad-overlay-card-thumb {
	aspect-ratio: 16 / 9;
	border-radius: calc(var(--app-radius) - 2px);
	border: 1px solid rgba(34, 25, 14, 0.88);
	background:
		radial-gradient(circle at 24% 28%, rgba(196, 136, 39, 0.08), transparent 20%),
		linear-gradient(180deg, rgba(192, 196, 200, 0.96), rgba(128, 132, 136, 0.98));
	display: grid;
	place-items: center;
	box-shadow:
		inset 0 0 0 1px rgba(255, 231, 189, 0.08),
		inset 0 0 24px rgba(0, 0, 0, 0.36);
}

.launchpad-overlay-card-thumb span {
	font-size: 12px;
	font-weight: 700;
	color: rgba(255, 244, 229, 0.88);
}

.launchpad-overlay-card-copy {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.launchpad-overlay-card-copy strong {
	font-size: 13px;
	line-height: 1.3;
	color: rgba(38, 24, 8, 0.98);
}

.launchpad-overlay-card-copy span {
	font-size: 11px;
	line-height: 1.45;
	color: rgba(75, 54, 24, 0.88);
}

.launchpad-overlay-card-action {
	width: auto;
	min-width: 88px;
}

.launchpad-trigger-list {
	display: grid;
	gap: 10px;
	max-height: 520px;
	overflow-y: auto;
	padding-right: 4px;
}

.launchpad-trigger-list .action-button {
	text-align: left;
	justify-content: flex-start;
}

.launchpad-trigger-list .action-button.is-busy {
	filter: brightness(1.02);
	box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.22);
}

.launchpad-trigger-split {
	display: grid;
	gap: 5px;
}

.launchpad-trigger-split > span {
	color: var(--panel-muted);
	font-size: 11px;
	font-weight: 700;
}

.launchpad-trigger-split > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.launchpad-trigger-split button {
	min-width: 0;
	min-height: 34px;
	border: 0;
	background: linear-gradient(135deg, var(--panel-accent), var(--panel-accent-strong));
	color: #2a1600;
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
}

.launchpad-trigger-split button:first-child {
	border-radius: var(--app-radius) 0 0 var(--app-radius);
}

.launchpad-trigger-split button:last-child {
	border-left: 1px solid rgba(42, 22, 0, 0.32);
	border-radius: 0 var(--app-radius) var(--app-radius) 0;
}

.launchpad-trigger-split button:disabled {
	cursor: not-allowed;
	filter: grayscale(0.45) brightness(0.72);
}

.launchpad-trigger-list-empty {
	padding: 10px 12px;
	border-radius: var(--app-radius);
	border: 1px dashed var(--panel-border);
	background: var(--panel-surface-strong);
	color: var(--panel-muted);
	font-size: 12px;
	line-height: 1.45;
}

.launchpad-trigger-list-section {
	margin: 4px 0 0;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 209, 102, 0.76);
}

.launchpad-action-status {
	margin: 0;
	padding: 12px 14px;
	border-radius: var(--app-radius);
	border: 1px solid rgba(255, 209, 102, 0.18);
	background: rgba(14, 20, 24, 0.92);
	color: var(--panel-muted);
	line-height: 1.45;
}

.launchpad-action-status.is-working {
	border-color: rgba(255, 209, 102, 0.28);
	color: rgba(255, 226, 162, 0.94);
}

.launchpad-action-status.is-good {
	border-color: rgba(120, 220, 168, 0.26);
	color: rgba(176, 244, 204, 0.94);
}

.launchpad-action-status.is-bad {
	border-color: rgba(222, 95, 95, 0.3);
	color: rgba(255, 198, 198, 0.94);
}

.launchpad-sidebar-setting {
	display: grid;
	gap: 10px;
}

.launchpad-sidebar-setting-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.launchpad-sidebar-setting-label {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 209, 102, 0.82);
}

.launchpad-sidebar-setting-value {
	font-size: 16px;
	line-height: 1;
	color: var(--panel-text);
}

.launchpad-sidebar-range {
	width: 100%;
	accent-color: rgba(233, 197, 130, 0.96);
}

.launchpad-sidebar-setting-help {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--panel-muted);
}

.launchpad-footer-actions {
	display: flex;
	justify-content: flex-end;
}

.overlay-library-live-button {
	width: auto;
	min-width: 112px;
}

.overlay-library-live-button.is-active {
	background: rgba(120, 220, 168, 0.12);
	border-color: rgba(120, 220, 168, 0.35);
	color: var(--panel-good);
}

.overlay-library-live-button.is-active:hover {
	filter: none;
}

.detail-list {
	display: grid;
	grid-template-columns: 130px 1fr;
	gap: 10px 12px;
	margin: 0;
}

.detail-list--compact {
	grid-template-columns: 94px 1fr;
	font-size: 12px;
}

.detail-list dt {
	color: var(--panel-muted);
}

.detail-list dd {
	margin: 0;
	font-weight: 700;
	word-break: break-word;
}

#launchPadTriggerSummary dd {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.notes-list {
	margin: 0;
	padding-left: 18px;
	color: var(--panel-muted);
	line-height: 1.5;
}

.notes-list li + li {
	margin-top: 9px;
}

.action-stack,
.stack-list {
	display: grid;
	gap: 12px;
}

.stack-item {
	padding: 14px;
	border-radius: var(--app-radius);
	background: var(--panel-surface-strong);
	border: 1px solid var(--panel-border);
}

.stack-item strong {
	display: block;
	font-size: 17px;
}

.stack-item span,
.stack-item-meta {
	color: var(--panel-muted);
	line-height: 1.5;
}

.stack-item-row {
	display: flex;
	align-items: start;
	justify-content: space-between;
	gap: 12px;
}

.stack-item-meta {
	display: grid;
	gap: 6px;
}

.stack-item-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.asset-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.overlay-library-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	justify-content: stretch;
	align-content: start;
	max-height: 654px;
	overflow-y: auto;
	padding-right: 4px;
}

.overlay-library-grid--full {
	padding: 4px 0;
}

.console-view-mode--landscape .overlay-library-grid--overlays {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overlay-library-card {
	width: 100%;
	min-height: 126px;
	border-radius: var(--app-radius);
	border: 1px solid rgba(126, 92, 34, 0.78);
	background:
		linear-gradient(180deg, rgba(205, 182, 126, 0.98), rgba(158, 126, 67, 0.98));
	box-shadow:
		inset 0 0 0 1px rgba(255, 236, 191, 0.46),
		inset 0 -14px 24px rgba(99, 69, 24, 0.16),
		0 8px 18px rgba(0, 0, 0, 0.22);
	padding: 10px;
	display: grid;
	gap: 8px;
	position: relative;
	color: rgba(39, 27, 12, 0.96);
}

.overlay-library-card--asset,
.overlay-library-card--empty {
	min-height: 0;
}

.overlay-library-card.is-active {
	border-color: rgba(121, 223, 168, 0.66);
	box-shadow:
		inset 0 0 0 1px rgba(228, 245, 236, 0.48),
		0 0 0 1px rgba(121, 223, 168, 0.16);
}

.overlay-library-card--create {
	border-style: dashed;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background:
		linear-gradient(180deg, rgba(205, 182, 126, 0.9), rgba(158, 126, 67, 0.92));
	color: rgba(39, 27, 12, 0.96);
	cursor: pointer;
}

.overlay-library-card--create:hover {
	border-color: var(--panel-border-strong);
	transform: translateY(-1px);
}

.overlay-library-create-mark {
	font-size: 36px;
	line-height: 1;
	color: var(--panel-accent);
}

.overlay-library-create-label {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.overlay-library-thumb {
	aspect-ratio: 16 / 9;
	border-radius: var(--app-radius);
	border: 1px solid rgba(34, 25, 14, 0.88);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	color: rgba(255, 245, 224, 0.82);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	position: relative;
	overflow: hidden;
	background:
		linear-gradient(180deg, rgba(192, 196, 200, 0.96), rgba(128, 132, 136, 0.98));
	box-shadow:
		inset 0 0 0 1px rgba(255, 231, 189, 0.08),
		inset 0 0 24px rgba(0, 0, 0, 0.36);
}

.overlay-library-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.overlay-library-card--tone-1 .overlay-library-thumb {
	background:
		radial-gradient(circle at 20% 25%, rgba(255, 209, 102, 0.16), transparent 24%),
		radial-gradient(circle at 72% 36%, rgba(139, 243, 255, 0.16), transparent 26%),
		linear-gradient(180deg, rgba(192, 196, 200, 0.96), rgba(128, 132, 136, 0.98));
}

.overlay-library-card--tone-2 .overlay-library-thumb {
	background:
		radial-gradient(circle at 28% 62%, rgba(255, 111, 168, 0.16), transparent 25%),
		radial-gradient(circle at 76% 22%, rgba(141, 255, 177, 0.16), transparent 24%),
		linear-gradient(180deg, rgba(192, 196, 200, 0.96), rgba(128, 132, 136, 0.98));
}

.overlay-library-card--tone-3 .overlay-library-thumb {
	background:
		radial-gradient(circle at 18% 28%, rgba(122, 162, 255, 0.16), transparent 24%),
		radial-gradient(circle at 70% 68%, rgba(255, 209, 102, 0.14), transparent 26%),
		linear-gradient(180deg, rgba(192, 196, 200, 0.96), rgba(128, 132, 136, 0.98));
}

.overlay-library-card--tone-4 .overlay-library-thumb {
	background:
		radial-gradient(circle at 24% 32%, rgba(139, 243, 255, 0.16), transparent 24%),
		radial-gradient(circle at 74% 64%, rgba(255, 159, 104, 0.16), transparent 26%),
		linear-gradient(180deg, rgba(192, 196, 200, 0.96), rgba(128, 132, 136, 0.98));
}

.overlay-library-meta {
	display: grid;
	gap: 4px;
	padding: 2px 2px 0;
	align-content: start;
}

.overlay-library-meta strong {
	display: -webkit-box;
	font-size: 13px;
	line-height: 1.2;
	color: rgba(38, 24, 8, 0.98);
	min-height: 2.4em;
	overflow: hidden;
	overflow-wrap: anywhere;
	word-break: break-word;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.overlay-library-meta span {
	display: block;
	color: rgba(75, 54, 24, 0.86);
	line-height: 1.35;
	font-size: 11px;
	overflow-wrap: anywhere;
}

.overlay-library-action-row {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: nowrap;
	gap: 6px;
	position: relative;
	z-index: 3;
}

.overlay-library-url-button {
	margin-right: auto;
	min-height: 24px;
	padding: 0 10px;
	font-size: 11px;
	line-height: 1;
}

.overlay-library-action-row .overlay-thumb-action,
.overlay-thumb-action--library {
	position: static !important;
	width: 24px;
	height: 24px;
	border-radius: var(--app-radius);
	flex: 0 0 24px;
}

.overlay-thumb-action--library.is-active {
	color: rgba(255, 208, 102, 0.96);
}

.overlay-thumb-action--library:disabled {
	opacity: 0.34;
	cursor: not-allowed;
}

.overlay-thumb-action--library:disabled:hover {
	background: rgba(8, 12, 15, 0.72);
}

.console-view-mode--portrait .overlay-library-thumb,
.console-view-mode--portrait .overlay-asset-card-preview {
	aspect-ratio: 9 / 16;
}

.console-view-mode--portrait .overlay-library-card {
	align-content: start;
}

.preview-shell {
	display: grid;
	gap: 14px;
}

.preview-frame-wrap {
	border-radius: var(--app-radius);
	border: 1px solid var(--panel-border);
	background: #000;
	padding: 10px;
	min-height: 420px;
}

.preview-frame {
	display: block;
	width: 100%;
	height: 520px;
	border: 0;
	border-radius: var(--app-radius);
	background: #000;
}

.overlay-editor-workspace {
	display: grid;
	align-content: start;
	gap: 12px;
	min-height: 760px;
	margin-left: -15px;
}

body {
	--overlay-editor-stage-bg: #000;
	--overlay-editor-stage-ruler-text: rgba(255, 255, 255, 0.62);
	--overlay-editor-stage-ruler-line-minor: rgba(255, 255, 255, 0.08);
	--overlay-editor-stage-ruler-line-major: rgba(255, 255, 255, 0.16);
	--overlay-editor-stage-ruler-line-center: rgba(255, 255, 255, 0.3);
	--overlay-editor-stage-ruler-label-minor: rgba(196, 221, 255, 0.72);
	--overlay-editor-stage-ruler-label-strong: rgba(196, 221, 255, 0.92);
	--overlay-editor-stage-grid-micro: rgba(255, 255, 255, 0.035);
	--overlay-editor-stage-grid-minor: rgba(255, 255, 255, 0.08);
	--overlay-editor-stage-grid-major: rgba(255, 255, 255, 0.16);
	--overlay-editor-stage-grid-center: rgba(255, 255, 255, 0.3);
}

body.console-stage-theme--light {
	--overlay-editor-stage-bg: rgba(150, 150, 150, 0.98);
	--overlay-editor-stage-grid-micro: rgba(0, 0, 0, 0.05);
	--overlay-editor-stage-grid-minor: rgba(0, 0, 0, 0.12);
	--overlay-editor-stage-grid-major: rgba(0, 0, 0, 0.22);
	--overlay-editor-stage-grid-center: rgba(0, 0, 0, 0.38);
}

.overlay-editor-stage-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 34px;
	gap: 12px;
}

.overlay-editor-stage-meta {
	display: grid;
	gap: 2px;
	min-width: 0;
	padding-left: 40px;
}

.overlay-editor-stage-meta strong {
	color: rgba(245, 247, 248, 0.96);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.2;
}

.overlay-editor-stage-meta span {
	color: rgba(176, 208, 222, 0.88);
	font-size: 12px;
	line-height: 1.2;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.overlay-editor-stage-viewport-toggle {
	display: none;
	align-items: center;
	gap: 0;
	padding: 4px;
	border-radius: 999px;
	border: 1px solid rgba(186, 136, 62, 0.34);
	background: rgba(15, 22, 25, 0.82);
	box-shadow: inset 0 0 0 1px rgba(255, 221, 168, 0.04);
}

.console-view-mode--portrait .overlay-editor-stage-viewport-toggle {
	display: inline-grid;
	grid-template-columns: 1fr 1fr;
	margin-right: 30px;
}

.overlay-editor-stage-viewport-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	padding: 6px 12px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--panel-muted);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.overlay-editor-stage-viewport-button:hover {
	transform: translateY(-1px);
	color: var(--panel-text);
}

.overlay-editor-stage-viewport-button.is-active {
	background: linear-gradient(180deg, rgba(233, 197, 130, 0.96), rgba(180, 136, 67, 0.96));
	color: rgba(34, 22, 8, 0.96);
	box-shadow: 0 1px 0 rgba(255, 238, 203, 0.28) inset;
}

.overlay-editor-stage-wrap {
	width: 100%;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
}

.overlay-editor-stage-viewport {
	width: 100%;
	overflow: visible;
}

.console-view-mode--portrait.console-overlay-viewport--compact .overlay-editor-stage-wrap {
	padding-right: 10px;
}

.overlay-editor-stage-shell {
	--overlay-ruler-left: 36px;
	--overlay-ruler-gap: 6px;
	--overlay-ruler-bottom: 38px;
	display: grid;
	grid-template-columns: calc(var(--overlay-ruler-left) + var(--overlay-ruler-gap)) minmax(0, 1fr);
	grid-template-rows: minmax(0, auto) var(--overlay-ruler-bottom);
	width: 100%;
	max-width: 100%;
	align-items: stretch;
}

.overlay-editor-stage-scrollframe {
	grid-column: 1 / span 2;
	grid-row: 1;
	position: relative;
	display: grid;
	grid-template-columns: calc(var(--overlay-ruler-left) + var(--overlay-ruler-gap)) minmax(0, 1fr);
	align-items: stretch;
}

.console-view-mode--portrait.console-overlay-viewport--compact .overlay-editor-stage-scrollframe {
	max-height: min(760px, calc(100vh - 320px));
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 10px;
	scrollbar-gutter: stable;
}

.overlay-editor-stage {
	grid-column: 2;
	grid-row: 1;
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 100%;
	margin: 0;
	border-radius: var(--app-radius);
	border: 1px solid rgba(255, 209, 102, 0.16);
	background: var(--overlay-editor-stage-bg);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.03) inset,
		0 20px 44px rgba(0, 0, 0, 0.34);
	overflow: hidden;
}

.overlay-editor-stage-zones {
	position: absolute;
	left: calc(var(--overlay-ruler-left) + var(--overlay-ruler-gap));
	right: 0;
	top: 0;
	bottom: 0;
	overflow: visible;
	pointer-events: none;
	z-index: 4;
}

.overlay-editor-stage-zone-clips {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

.overlay-editor-stage-composition,
.overlay-editor-stage-grid {
	position: absolute;
	inset: 0;
}

.overlay-editor-stage-composition {
	z-index: 2;
	pointer-events: auto;
}

.overlay-editor-stage-grid {
	z-index: 3;
	pointer-events: none;
}

.overlay-editor-stage-asset {
	position: absolute;
}

.overlay-editor-launch-zone {
	position: absolute;
	border: 1px dashed rgba(255, 255, 255, 0.88);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.06),
		0 0 0 1px rgba(0, 0, 0, 0.22);
	transform-origin: center center;
	cursor: move;
	pointer-events: auto;
	user-select: none;
}

.overlay-editor-launch-zone.is-selected {
	border-style: dashed;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.48),
		0 0 18px rgba(255, 255, 255, 0.12);
}

.overlay-editor-launch-zone-clip {
	position: absolute;
	border: 2px solid rgba(255, 209, 102, 0.88);
	background: linear-gradient(180deg, rgba(255, 209, 102, 0.08), rgba(255, 209, 102, 0.02));
	box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.12);
	transform-origin: center center;
	pointer-events: none;
}

.overlay-editor-launch-zone-clip.is-selected {
	border-color: rgba(255, 221, 148, 0.98);
	box-shadow:
		inset 0 0 0 1px rgba(255, 209, 102, 0.18),
		0 0 18px rgba(255, 209, 102, 0.16);
}

.overlay-editor-launch-zone-label {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	padding: 2px 6px;
	border-radius: 999px;
	background: rgba(8, 12, 15, 0.78);
	color: rgba(255, 223, 155, 0.92);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
}

.overlay-editor-stage-asset--frame {
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
	pointer-events: none;
	transform-origin: center center;
}

.overlay-editor-stage-asset--sprite {
	width: 120px;
	height: 120px;
	transform-origin: center center;
	cursor: move;
	pointer-events: auto;
	user-select: none;
	-webkit-user-drag: none;
}

.overlay-editor-stage-sprite-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

.overlay-editor-stage-asset.is-selected {
	filter: drop-shadow(0 0 14px rgba(255, 209, 102, 0.42));
	outline: 2px solid rgba(255, 209, 102, 0.7);
	outline-offset: 2px;
}

.overlay-editor-stage-asset.is-hidden {
	display: none;
}

.overlay-editor-stage-asset.is-locked {
	cursor: default;
}

.overlay-editor-stage-handle {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 999px;
	border: 1px solid rgba(255, 209, 102, 0.82);
	background: rgba(16, 24, 28, 0.92);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.34);
	color: rgba(255, 209, 102, 0.94);
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	pointer-events: auto;
}

.overlay-editor-stage-reset {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border-radius: 999px;
	border: 1px solid rgba(255, 106, 106, 0.92);
	background: rgba(103, 16, 16, 0.94);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
	color: rgba(255, 235, 235, 0.96);
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	pointer-events: auto;
}

.overlay-editor-stage-handle--scale {
	right: -14px;
	bottom: -14px;
	cursor: nwse-resize;
}

.overlay-editor-stage-handle--rotate {
	left: 50%;
	top: -30px;
	transform: translateX(-50%);
	cursor: grab;
}

.overlay-editor-stage-handle--zone-rotate {
	left: 50%;
	top: -32px;
	transform: translateX(-50%);
	cursor: grab;
}

.overlay-editor-stage-handle--zone-width {
	right: -14px;
	top: 50%;
	transform: translateY(-50%);
	cursor: ew-resize;
}

.overlay-editor-stage-reset--rotate {
	left: calc(50% + 28px);
	top: -34px;
	transform: translateX(-50%);
}

.overlay-editor-stage-reset--scale {
	right: -38px;
	bottom: -10px;
}

.overlay-editor-stage-reset--zone-rotate {
	left: calc(50% + 34px);
	top: -36px;
	transform: translateX(-50%);
}

.overlay-editor-stage-reset--zone-width {
	right: -40px;
	top: 50%;
	transform: translateY(-50%);
}

.overlay-editor-stage-asset.is-locked .overlay-editor-stage-handle {
	opacity: 0.4;
	cursor: default;
}

.overlay-editor-stage-asset.is-locked .overlay-editor-stage-reset {
	opacity: 0.4;
	cursor: default;
}

.overlay-editor-ruler {
	position: relative;
	color: var(--overlay-editor-stage-ruler-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	pointer-events: none;
}

.overlay-editor-ruler--left {
	grid-column: 1;
	grid-row: 1;
	margin-right: 0;
}

.overlay-editor-ruler--bottom {
	grid-column: 2;
	grid-row: 2;
	width: 100%;
	margin-left: 0;
	margin-top: 8px;
}

.console-view-mode--portrait.console-overlay-viewport--compact .overlay-editor-ruler--bottom {
	margin-top: 4px;
	width: calc(100% - 10px - var(--app-scrollbar-size));
}

.overlay-editor-ruler-mark {
	position: absolute;
}

.overlay-editor-ruler-mark--left {
	left: 0;
	right: 0;
	height: 0;
	border-bottom: 1px solid var(--overlay-editor-stage-ruler-line-minor);
}

.overlay-editor-ruler-mark--left span {
	position: absolute;
	right: 4px;
	bottom: -8px;
	transform: translateY(50%);
}

.overlay-editor-ruler-mark--bottom {
	top: 0;
	bottom: 0;
	width: 0;
	border-left: 1px solid var(--overlay-editor-stage-ruler-line-minor);
}

.overlay-editor-ruler-mark--bottom span {
	position: absolute;
	top: 10px;
	left: 0;
	transform: translateX(-50%);
}

.overlay-editor-grid-line {
	position: absolute;
	background: var(--overlay-editor-stage-grid-minor);
}

.overlay-editor-grid-line--micro {
	background: var(--overlay-editor-stage-grid-micro);
}

.overlay-editor-grid-line--vertical {
	top: 0;
	bottom: 0;
	width: 1px;
	transform: translateX(-0.5px);
}

.overlay-editor-grid-line--horizontal {
	left: 0;
	right: 0;
	height: 1px;
	transform: translateY(0.5px);
}

.overlay-editor-grid-line--major {
	background: var(--overlay-editor-stage-grid-major);
}

.overlay-editor-grid-line--center {
	background: var(--overlay-editor-stage-grid-center);
}

.overlay-editor-ruler-mark--minor {
	border-color: var(--overlay-editor-stage-ruler-line-minor);
}

.overlay-editor-ruler-mark--major {
	border-color: var(--overlay-editor-stage-ruler-line-major);
}

.overlay-editor-ruler-mark--center {
	border-color: var(--overlay-editor-stage-ruler-line-center);
}

.overlay-editor-ruler-mark--minor span {
	color: var(--overlay-editor-stage-ruler-label-minor);
}

.overlay-editor-ruler-mark--major span,
.overlay-editor-ruler-mark--center span {
	color: var(--overlay-editor-stage-ruler-label-strong);
}

.overlay-editor-ruler-mark--center span {
	font-weight: 800;
}

.overlay-editor-sidebar-stack {
	display: grid;
	gap: 12px;
}

.overlay-save-status {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}

.overlay-save-status.working {
	color: var(--panel-muted);
}

.overlay-save-status.good {
	color: var(--app-good);
}

.overlay-save-status.bad {
	color: var(--app-bad);
}

.overlay-editor-primary-actions {
	display: grid;
	gap: 8px;
}

.sidebar-panel--compact {
	padding-top: 12px;
	padding-bottom: 12px;
}

.overlay-stage-theme-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.overlay-stage-theme-label {
	color: var(--panel-muted);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.overlay-stage-theme-toggle {
	display: inline-grid;
	grid-template-columns: 1fr 1fr;
	padding: 3px;
	border-radius: 999px;
	border: 1px solid rgba(186, 136, 62, 0.34);
	background: rgba(15, 22, 25, 0.82);
	box-shadow: inset 0 0 0 1px rgba(255, 221, 168, 0.04);
}

.overlay-stage-theme-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 54px;
	padding: 5px 10px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--panel-muted);
	font: inherit;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.overlay-stage-theme-button:hover {
	transform: translateY(-1px);
	color: var(--panel-text);
}

.overlay-stage-theme-button.is-active {
	background: linear-gradient(180deg, rgba(233, 197, 130, 0.96), rgba(180, 136, 67, 0.96));
	color: rgba(34, 22, 8, 0.96);
	box-shadow: 0 1px 0 rgba(255, 238, 203, 0.28) inset;
}

.sidebar-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.sidebar-panel-body {
	display: grid;
	gap: 12px;
}

.sidebar-panel.is-collapsed .sidebar-title-row {
	margin-bottom: 0;
}

.sidebar-panel.is-collapsed .sidebar-panel-body {
	display: none;
}

.sidebar-title-row .sidebar-title {
	margin-bottom: 0;
}

.sidebar-title-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border-radius: var(--app-radius);
	border: 1px solid var(--panel-border);
	background: var(--panel-surface);
	color: var(--panel-text);
	cursor: pointer;
	transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sidebar-title-action:hover {
	transform: translateY(-1px);
	border-color: var(--panel-border-strong);
	background: var(--panel-surface-strong);
}

.sidebar-title-action svg {
	width: 15px;
	height: 15px;
}

.sidebar-panel-toggle svg {
	transition: transform 0.18s ease;
}

.sidebar-panel.is-collapsed .sidebar-panel-toggle svg {
	transform: rotate(90deg);
}

.overlay-editor-help {
	margin: 0;
	color: var(--panel-muted);
	font-size: 12px;
	line-height: 1.5;
}

.overlay-editor-field-label {
	display: block;
	color: var(--panel-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.overlay-editor-name-input,
.overlay-editor-select {
	width: 100%;
	padding: 10px 12px;
	border-radius: var(--app-radius);
	border: 1px solid var(--panel-border);
	background: var(--panel-surface);
	color: var(--panel-text);
	font: inherit;
}

.overlay-editor-name-input[readonly] {
	cursor: pointer;
	color: rgba(232, 238, 236, 0.82);
	background: rgba(23, 33, 38, 0.92);
}

.overlay-editor-name-input::placeholder {
	color: rgba(159, 180, 174, 0.72);
}

.overlay-name-modal-actions {
	display: grid;
	gap: 10px;
	margin-top: 18px;
}

.segmented-action-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0;
}

.segmented-action-button {
	border-radius: 0;
}

.segmented-action-button--left {
	border-top-left-radius: var(--app-radius);
	border-bottom-left-radius: var(--app-radius);
}

.segmented-action-button--right {
	border-top-right-radius: var(--app-radius);
	border-bottom-right-radius: var(--app-radius);
	border-left-width: 0;
}

.segmented-action-button--danger {
	color: #f6d7d1;
	background: rgba(117, 38, 31, 0.78);
	border-color: rgba(194, 86, 72, 0.82);
}

.segmented-action-button--danger:hover {
	background: rgba(141, 46, 38, 0.88);
	border-color: rgba(215, 103, 88, 0.92);
}

.segmented-action-button:disabled {
	border-left-width: 1px;
}

.overlay-editor-resolution-meta {
	color: var(--panel-muted);
	line-height: 1.5;
}

.overlay-frame-crop-shell {
	display: grid;
	gap: 12px;
}

.overlay-frame-crop-shell[hidden] {
	display: none !important;
}

.overlay-frame-crop-layout {
	display: grid;
	gap: 14px;
	align-items: start;
}

.overlay-frame-crop-controls {
	display: grid;
	gap: 12px;
	align-content: start;
}

.overlay-frame-crop-preview-column {
	display: flex;
	justify-content: center;
}

.overlay-frame-crop-viewport {
	position: relative;
	width: 100%;
	max-width: 300px;
	border-radius: var(--app-radius);
	border: 1px solid rgba(255, 209, 102, 0.22);
	background:
		linear-gradient(180deg, rgba(17, 24, 28, 0.96), rgba(10, 15, 18, 0.98));
	overflow: hidden;
	cursor: grab;
	touch-action: none;
}

.overlay-frame-crop-viewport[data-orientation="landscape"] {
	aspect-ratio: 16 / 9;
}

.overlay-frame-crop-viewport[data-orientation="portrait"] {
	aspect-ratio: 9 / 16;
	max-height: 220px;
	justify-self: center;
}

.overlay-frame-crop-viewport.is-dragging {
	cursor: grabbing;
}

.overlay-frame-crop-image {
	position: absolute;
	top: 0;
	left: 0;
	transform-origin: top left;
	user-select: none;
	pointer-events: none;
	-webkit-user-drag: none;
}

.overlay-frame-crop-zoom {
	width: 100%;
}

.sidebar-action-stack {
	margin-top: 12px;
	display: grid;
	gap: 10px;
}

.overlay-sidebar-asset-grid {
	margin-top: 14px;
	display: grid;
	gap: 10px;
	max-height: 420px;
	overflow-y: auto;
	padding-right: 4px;
}

.overlay-asset-card {
	cursor: grab;
	padding: 14px;
	border-radius: var(--app-radius);
	border: 1px solid rgba(126, 92, 34, 0.78);
	background:
		linear-gradient(180deg, rgba(205, 182, 126, 0.98), rgba(158, 126, 67, 0.98));
	box-shadow:
		inset 0 0 0 1px rgba(255, 236, 191, 0.46),
		inset 0 -14px 24px rgba(99, 69, 24, 0.16),
		0 8px 18px rgba(0, 0, 0, 0.22);
	display: grid;
	gap: 12px;
	position: relative;
	color: rgba(39, 27, 12, 0.96);
}

.overlay-asset-card:active {
	cursor: grabbing;
}

.overlay-asset-card.is-empty {
	border-style: dashed;
	color: rgba(88, 61, 20, 0.9);
	align-items: center;
	justify-items: start;
}

.overlay-asset-card.is-empty strong {
	color: rgba(56, 35, 10, 0.98);
}

.overlay-asset-card.is-empty span {
	color: rgba(92, 66, 28, 0.92);
}

.overlay-asset-card-preview {
	aspect-ratio: 16 / 9;
	border-radius: var(--app-radius);
	border: 1px solid rgba(34, 25, 14, 0.88);
	background:
		radial-gradient(circle at 24% 28%, rgba(196, 136, 39, 0.08), transparent 20%),
		linear-gradient(180deg, rgba(192, 196, 200, 0.96), rgba(128, 132, 136, 0.98));
	overflow: hidden;
	box-shadow:
		inset 0 0 0 1px rgba(255, 231, 189, 0.08),
		inset 0 0 24px rgba(0, 0, 0, 0.36);
}

.overlay-asset-card-preview img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.overlay-asset-card-copy {
	display: grid;
	gap: 5px;
}

.overlay-asset-card-copy strong {
	font-size: 14px;
	color: rgba(38, 24, 8, 0.98);
}

.overlay-asset-card-copy span {
	color: rgba(75, 54, 24, 0.86);
	font-size: 12px;
	line-height: 1.45;
}

.overlay-thumb-action {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: var(--app-radius);
	background: rgba(8, 12, 15, 0.72);
	color: rgba(255, 244, 244, 0.88);
	cursor: pointer;
	z-index: 3;
}

.overlay-thumb-action:hover {
	background: rgba(128, 39, 39, 0.84);
}

.overlay-thumb-action svg {
	width: 15px;
	height: 15px;
}

.overlay-thumb-action--asset {
	top: 10px;
	right: 10px;
}

.overlay-layer-stack {
	display: grid;
	gap: 10px;
}

.overlay-layer-item {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) auto;
	gap: 6px;
	align-items: center;
	padding: 3px;
	border-radius: var(--app-radius);
	border: 1px solid var(--panel-border);
	background: var(--panel-surface-strong);
	cursor: grab;
	transition:
		margin 0.14s ease,
		transform 0.14s ease,
		opacity 0.14s ease,
		border-color 0.14s ease,
		box-shadow 0.14s ease;
}

.overlay-layer-item.is-selected {
	border-color: rgba(255, 209, 102, 0.45);
	box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.16) inset;
}

.overlay-layer-item.is-locked {
	background: rgba(37, 45, 50, 0.94);
}

.overlay-layer-item:active {
	cursor: grabbing;
}

.overlay-layer-item.is-dragging {
	opacity: 0.42;
	transform: scale(0.98);
}

.overlay-layer-item.is-drop-before {
	margin-top: 14px;
}

.overlay-layer-item.is-drop-after {
	margin-bottom: 14px;
}

.overlay-layer-item--empty {
	grid-template-columns: 1fr;
	cursor: default;
}

.overlay-layer-item--zone {
	cursor: pointer;
}

.overlay-layer-thumb {
	aspect-ratio: 1;
	border-radius: var(--app-radius);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.06);
	background: rgba(10, 15, 19, 0.98);
}

.overlay-layer-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.overlay-layer-thumb--zone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, rgba(87, 66, 24, 0.98), rgba(49, 37, 13, 0.98));
	border-color: rgba(255, 209, 102, 0.24);
	color: rgba(255, 223, 155, 0.94);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.overlay-layer-copy {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.overlay-layer-copy strong {
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 110px;
}

.overlay-layer-actions {
	display: flex;
	justify-items: end;
}

.overlay-layer-segmented-actions {
	display: inline-flex;
	align-items: stretch;
	border-radius: 999px;
	overflow: hidden;
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.18),
		0 1px 0 rgba(255, 240, 207, 0.06);
}

.overlay-layer-segmented-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 22px;
	padding: 0;
	border: 0;
	color: rgba(33, 20, 6, 0.98);
	cursor: pointer;
}

.overlay-layer-segmented-button svg {
	width: 14px;
	height: 14px;
}

.overlay-layer-segmented-button--visibility {
	width: 30px;
	background: linear-gradient(180deg, rgba(214, 183, 111, 0.98), rgba(181, 142, 69, 0.98));
}

.overlay-layer-segmented-button--delete {
	width: 24px;
	background: linear-gradient(180deg, rgba(223, 84, 67, 0.98), rgba(177, 47, 37, 0.98));
	color: rgba(255, 245, 245, 0.98);
}

.overlay-layer-segmented-button--visibility:hover {
	filter: brightness(1.05);
}

.overlay-layer-segmented-button--delete:hover {
	filter: brightness(1.08);
}

.overlay-layer-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border-radius: var(--app-radius);
	border: 0;
	background: transparent;
	color: var(--panel-text);
	font: inherit;
	cursor: pointer;
}

.overlay-layer-icon-button:hover {
	background: rgba(255, 255, 255, 0.06);
}

.overlay-layer-icon-button svg {
	width: 13px;
	height: 13px;
}

.overlay-layer-icon-button--danger {
	color: rgba(255, 142, 142, 0.94);
}

.overlay-layer-icon-button--danger:hover {
	background: rgba(124, 30, 30, 0.28);
}

.overlay-layer-inspector {
	display: grid;
	gap: 10px;
	padding-top: 4px;
}

.overlay-layer-inspector-group {
	display: grid;
	gap: 10px;
}

.overlay-layer-frame-actions {
	display: grid;
	gap: 10px;
}

.app-modal-shell {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: grid;
	place-items: center;
}

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

.app-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 8, 10, 0.76);
	backdrop-filter: blur(4px);
}

.app-modal-card {
	position: relative;
	width: min(520px, calc(100vw - 40px));
	padding: 22px;
	border-radius: var(--app-radius);
	border: 1px solid var(--panel-border-strong);
	background: linear-gradient(180deg, rgba(21, 32, 36, 0.98) 0%, rgba(12, 18, 21, 0.98) 100%);
	box-shadow: var(--panel-shadow);
	display: grid;
	gap: 18px;
}

.app-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--panel-border);
	border-radius: var(--app-radius);
	background: var(--panel-surface);
	color: var(--panel-muted);
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.app-modal-close:hover {
	border-color: var(--panel-border-strong);
	color: var(--panel-text);
}

.app-modal-card--busy {
	width: min(360px, calc(100vw - 40px));
	padding: 28px 24px;
	justify-items: center;
	text-align: center;
}

.console-busy-spinner {
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 3px solid rgba(255, 209, 102, 0.18);
	border-top-color: rgba(255, 209, 102, 0.96);
	animation: consoleBusySpin 0.9s linear infinite;
}

@keyframes consoleBusySpin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.app-modal-copy {
	display: grid;
	gap: 8px;
}

.app-modal-kicker {
	margin: 0;
	color: var(--panel-accent);
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.app-modal-copy h2 {
	margin: 0;
	font-size: 28px;
}

.app-modal-copy p {
	margin: 0;
	color: var(--panel-muted);
	line-height: 1.55;
}

.overlay-asset-modal-form {
	display: grid;
	gap: 14px;
	max-height: calc(100vh - 240px);
	overflow-y: auto;
	padding-right: 6px;
}

.app-modal-card--asset {
	max-height: calc(100vh - 48px);
	overflow-y: auto;
}

.app-modal-card--asset-browser {
	width: min(1180px, calc(100vw - 48px));
	max-height: calc(100vh - 48px);
	overflow: hidden;
	display: grid;
	gap: 14px;
}

.console-view-mode--portrait .app-modal-card--asset {
	width: min(820px, calc(100vw - 48px));
}

.console-view-mode--portrait .app-modal-card--asset-browser {
	width: min(980px, calc(100vw - 48px));
}

.overlay-fetch-asset-toolbar {
	display: flex;
	justify-content: flex-start;
}

.sidebar-subnav-stack--modal {
	grid-template-columns: repeat(3, minmax(0, auto));
}

.overlay-library-grid--modal {
	max-height: calc(100vh - 280px);
	padding-right: 6px;
}

.console-view-mode--portrait .overlay-frame-crop-layout {
	grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
	gap: 18px;
}

.console-view-mode--portrait .overlay-frame-crop-viewport {
	max-width: 240px;
}

.console-view-mode--portrait .overlay-frame-crop-viewport[data-orientation="portrait"] {
	max-height: 420px;
}

.overlay-asset-modal-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.asset-card {
	padding: 12px;
	border-radius: var(--app-radius);
	background: var(--panel-surface-strong);
	border: 1px solid var(--panel-border);
}

.asset-preview {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--app-radius);
	background: rgba(6, 11, 14, 0.72);
	margin-bottom: 10px;
}

.empty-state {
	padding: 14px;
	border-radius: var(--app-radius);
	border: 1px dashed var(--panel-border);
	background: var(--panel-surface-strong);
	color: var(--panel-muted);
}

.debug-output {
	margin: 0;
	padding: 16px;
	border-radius: var(--app-radius);
	background: var(--panel-surface-strong);
	border: 1px solid var(--panel-border);
	color: #d6e3df;
	white-space: pre-wrap;
	word-break: break-word;
}

code {
	font-family: "Courier New", monospace;
	color: var(--panel-accent);
}

@media (max-width: 1100px) {
	.launchpad-card-header {
		flex-direction: column;
	}

	.launchpad-live-summary {
		min-width: 0;
		width: 100%;
	}

	.launchpad-overlay-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}
}
/* Overlay Lab library landing cleanup */
.overlay-library-grid--overlays,
.console-view-mode--landscape .overlay-library-grid--overlays {
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
	align-items: start;
}

.overlay-library-grid--overlays .overlay-library-card {
	min-height: 0;
	padding: 12px;
	gap: 10px;
	align-content: start;
	background: linear-gradient(180deg, rgba(205, 182, 126, 0.94), rgba(158, 126, 67, 0.94));
}

.overlay-library-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-width: 0;
}

.overlay-library-live-badge {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	max-width: 120px;
	padding: 0 10px;
	border-radius: 999px;
	border: 1px solid rgba(48, 34, 12, 0.18);
	background: rgba(25, 18, 8, 0.12);
	color: rgba(52, 35, 10, 0.9);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.overlay-library-live-badge.is-active {
	border-color: rgba(62, 126, 88, 0.32);
	background: rgba(121, 223, 168, 0.18);
	color: rgba(34, 99, 60, 0.98);
}

.overlay-library-grid--overlays .overlay-library-action-row {
	margin-left: auto;
	gap: 6px;
}

.overlay-library-grid--overlays .overlay-library-url-button {
	width: auto;
	min-height: 26px;
	margin: 0;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 11px;
}

.overlay-library-grid--overlays .overlay-thumb-action--library {
	width: 26px;
	height: 26px;
	flex-basis: 26px;
	border-radius: 999px;
}

.overlay-library-grid--overlays .overlay-library-thumb {
	border-radius: calc(var(--app-radius) - 2px);
}

.overlay-library-grid--overlays .overlay-library-meta {
	gap: 3px;
}

.overlay-library-grid--overlays .overlay-library-meta strong {
	min-height: 0;
	font-size: 14px;
}

.overlay-library-grid--overlays .overlay-library-meta span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.overlay-library-grid--overlays .overlay-library-live-button {
	width: 100%;
	min-height: 34px;
	margin-top: 2px;
	border-radius: calc(var(--app-radius) - 2px);
}
/* Overlay Lab library edit affordance */
.overlay-library-grid--overlays .overlay-library-card {
	cursor: pointer;
}

.overlay-library-grid--overlays .overlay-library-card button {
	cursor: pointer;
}

.overlay-library-card-footer {
	display: grid;
	grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
	gap: 8px;
	margin-top: 2px;
}

.overlay-library-grid--overlays .overlay-library-live-button,
.overlay-library-grid--overlays .overlay-library-edit-button {
	width: 100%;
	min-height: 34px;
	border-radius: calc(var(--app-radius) - 2px);
}

.overlay-library-grid--overlays .overlay-library-live-button {
	margin-top: 0;
}

.overlay-library-grid--overlays .overlay-library-edit-button {
	border-color: rgba(48, 34, 12, 0.22);
	background: rgba(255, 255, 255, 0.08);
	color: rgba(38, 24, 8, 0.98);
}
/* Overlay Lab library footer button sizing fix */
.overlay-library-card-footer {
	grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr);
	align-items: stretch;
}

.overlay-library-card-footer .ghost-button {
	min-width: 0;
	box-sizing: border-box;
	padding-left: 10px;
	padding-right: 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.overlay-library-card-footer .overlay-library-live-button,
.overlay-library-card-footer .overlay-library-edit-button {
	min-width: 0;
}
