/* ============================================
   EDITION-SPECIFIC HIDING (for dev mode with unprocessed HTML)
   ============================================ */

/* Full edition: Hide Mini tuning-type */
body[data-edition="full"] .tuning-type-mini {
	display: none !important;
}

/* ============================================
   ELECTRON DESKTOP TITLE BAR
   ============================================ */

#electron-titlebar {
	display: none;
	align-items: center;
	justify-content: space-between;
	height: 32px;
	background: #0f0f0f;
	border-bottom: 1px solid #1a1a1a;
	box-shadow: 0 1px 0 #000;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	-webkit-app-region: drag;
	user-select: none;
}

.titlebar-drag {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.titlebar-title-group {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	margin-top: 2px;
}

.titlebar-logo {
	width: 14px;
	height: 14px;
	opacity: 0.6;
	margin-right: 6px;
	margin-top: -3px;
}

.titlebar-title {
	font-family: 'Sulphur Point', sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: #666;
	letter-spacing: 1px;
}

.titlebar-controls {
	display: flex;
	height: 100%;
	-webkit-app-region: no-drag;
	flex-shrink: 0;
}

.titlebar-btn {
	width: 46px;
	height: 100%;
	border: none;
	background: transparent;
	color: #666;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.1s, color 0.1s;
	flex-shrink: 0;
	padding: 0;
	outline: 0;
}

.titlebar-btn svg {
	width: 10px;
	height: 10px;
	flex-shrink: 0;
}

.titlebar-btn:hover {
	background: #333;
	color: #fff;
}

.titlebar-btn.titlebar-close:hover {
	background: #e81123;
	color: #fff;
}

/* Custom scrollbar styling (WebKit browsers + Electron) */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
	background: #333;
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #444;
}

::-webkit-scrollbar-corner {
	background: #1a1a1a;
}

/* Universal styles */
* {
	scrollbar-width: thin;
	scrollbar-color: #333 #1a1a1a;
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

/* Electron app adjustments */
body.electron-app {
	--titlebar-height: 33px;
	padding-top: 33px;
}

body.electron-app #electron-titlebar {
	display: flex;
}

/* Offset fixed elements that sit below the header */
body.electron-app main .page {
	top: calc(48px + 33px);
}

/* Offset full-screen overlays */
body.electron-app .infoSection,
body.electron-app #startOverlay,
body.electron-app #analyzerOverlay,
body.electron-app .spectra-overlay,
body.electron-app .session-connect-overlay,
body.electron-app .tutorial-overlay,
body.electron-app .mobile-fallback {
	top: 33px;
	height: calc(100% - 33px);
}

body.electron-app .playback-options-menu {
	top: 65px;
}

body.electron-app .save-notification {
	top: 53px;
	bottom: auto;
}

body.electron-app .demo-mode-badge {
	top: 43px;
}

/* Hide cloud features in Electron (offline-first) */
body.electron-app .user-menu,
body.electron-app .project-sign-in-btn {
	display: none;
}

/* ============================================
   UNIFIED MODAL/OVERLAY DESIGN SYSTEM
   ============================================ */

/* Full-screen overlay backdrop */
.spectra-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	z-index: 10000;
	padding: 20px;
	overflow: auto;
}

.spectra-overlay.hidden {
	display: none;
}

/* Modal content container */
.spectra-modal {
	position: relative;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 25px;
	max-width: 90vw;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Modal close button */
.spectra-modal-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	background: transparent;
	border: none;
	color: #666;
	font-size: 16px;
	cursor: pointer;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
}

.spectra-modal-close:hover {
	background: #333;
	color: #fff;
}

/* Modal header */
.spectra-modal h2,
.spectra-modal h3 {
	margin: 0 0 15px 0;
	padding: 0 0 10px 0;
	font-size: 18px;
	font-weight: 400;
	color: #fff;
	border-bottom: 1px solid #333;
}

/* Modal description text */
.spectra-modal-desc {
	color: #888;
	font-size: 13px;
	margin-bottom: 20px;
}

/* Modal actions row */
.spectra-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #333;
}

.spectra-modal-actions button {
	padding: 8px 18px;
	border: none;
	border-radius: 2px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.15s;
}

.spectra-modal-actions .btn-primary {
	background: #444;
	color: #fff;
}

.spectra-modal-actions .btn-primary:hover {
	background: #1b4891;
}

.spectra-modal-actions .btn-secondary {
	background: #333;
	color: #aaa;
}

.spectra-modal-actions .btn-secondary:hover {
	background: #444;
	color: #fff;
}

.spectra-modal-actions .btn-danger {
	background: #333;
	color: #aaa;
}

.spectra-modal-actions .btn-danger:hover {
	background: #c44;
	color: #fff;
}

/* ============================================ */

html, body {
	margin: 0;
	padding: 0;
	overscroll-behavior-x: none;
}

button, input {
	transition: all 0.1s;
	outline-color: transparent;
}

input[type='button'],
button,
#analyzerOverlay input[type='button'],
#analyzerOverlay button {
	padding: 8px 6px;
	border: none;
	border: 2px solid #252525;
	background: linear-gradient(180deg, #282828 0%, #1e1e1e 100%);
	color: #999;
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

input[type='button']:hover,
button:hover,
#analyzerOverlay input[type='button']:hover,
#analyzerOverlay button:hover {
	border-color: #0b7dda;
	background: linear-gradient(180deg, #1090e0 0%, #0b7dda 100%);
	color: #ffffff;
}

input[type='button']:disabled,
button:disabled,
#analyzerOverlay input[type='button']:disabled,
#analyzerOverlay button:disabled {
	background: #ccc;
	cursor: not-allowed;
}



body {
	background: #111;
	font-family: 'Lato', sans-serif;
	font-weight: 400;
	font-size: 15px;
	color: #fff;
	letter-spacing: 0.5px;
}

/* ============================================
	HEADER
	============================================ */
header {
	display: flex;
	width: 100%;
	height: 48px;
	background: #0f0f0f;
	border-bottom: 1px solid #1a1a1a;
	box-shadow: 0 1px 0 #000;
	position: relative;
}

/* Film grain noise overlay for header */
header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 0;
	opacity: 0.025;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
	background-size: 500px 500px;
	background-repeat: repeat;
}

header > * {
	position: relative;
	z-index: 1;
}

header .header-section-tabs {
	display: flex;
	flex-shrink: 0;
	align-items: stretch;
}

header .header-section-ui {
	display: flex;
	flex: 1;
	justify-content: space-between;
	align-items: stretch;
}

header .header-section-left {
	display: flex;
	align-items: center;
	gap: 7px;
	padding-left: 8px;
}

header .header-section-left .write-ui {
	display: flex;
	align-items: center;
	gap: 8px;
}

.button-group {
	display: flex;
}

header .header-section-middle {
	display: flex;
	align-items: center;
}

header .header-section-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Header logo - hidden in browser */
header .header-logo {
	display: none;
}

/* Header tab buttons (I/O, Setup, Write) */
header .header-button {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	border: none;
	border-bottom: 2px solid transparent;
	background: transparent;
	font-size: 12px;
	font-weight: 400;
	color: #555;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	padding: 0;
	box-sizing: border-box;
	transition: color 0.15s, border-color 0.15s;
}

header .header-button#header-io {
	width: 59px;
}

header .header-button#header-setup {
	width: 78px;
}

header .header-button#header-write {
	width: 80px;
}

header .header-button:hover {
	background: transparent;
	color: #999;
}

header .header-button.s {
	background: transparent;
	color: #fff;
	font-weight: 600;
	border-bottom: 2px solid #4a9eff;
}

header .header-button.s:hover {
	background: transparent;
	color: #fff;
}

header .header-button#header-back {
	width: 36px;
	padding: 0;
	color: #555;
}

header .header-button#header-back:hover {
	color: #aaa;
}

/* Divider between tabs and tools */
header .header-divider {
	width: 1px;
	height: 24px;
	background: #333;
	margin: 0 12px;
	align-self: center;
}

/* Header icon buttons */
header .header-button-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 28px;
	width: 30px;
	padding: 0;
	border: none;
	font-size: 15px;
	border-radius: 2px;
	background: linear-gradient(180deg, #282828 0%, #1e1e1e 100%);
	color: #888;
	cursor: pointer;
	border-right: none !important;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.3);
}

header .header-button-icon:hover {
	background: linear-gradient(180deg, #353535 0%, #2a2a2a 100%);
	color: #fff;
}

header .header-button-icon.s {
	background: #30a456;
	color: #fff;
}

header .header-button-icon.s:hover {
	background: #248243;
}

/* Header right section with user menu */
header .header-name {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-right: 10px;
}

/* Info/help button */
header .infoButton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 2px;
	background: #222;
	color: #777;
	font-size: 14px;
	font-weight: 900;
	cursor: pointer;
	padding: 0;
}

header .infoButton:hover {
	background: #333;
	color: #eee;
}

/* Legacy header text (if still used) */
header h2 {
	margin: 0;
	font-family: 'Sulphur Point', sans-serif;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 2px;
	color: #555;
}

header h3 {
	margin: 0;
	font-size: 13px;
	color: #444;
}

.infoSection {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99;
	display: grid;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 20px 0;
	background: rgba(0, 0, 0, 0.85);
	overflow: auto;
}

.infoSection.hidden {
	display: none;
}

.infoPane {
	position: relative;
	width: 500px;
	padding: 25px;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
	font-weight: 400;
}

.infoSection .close,
.analyzerOverlayWindow .close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	padding: 0;
	background: transparent;
	border: none;
	color: #666;
	font-size: 16px;
	cursor: pointer;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
}

.infoSection .close:hover,
.analyzerOverlayWindow .close:hover {
	background: #333;
	color: #fff;
}

/* Help Pane - Multi-column layout */
.help-pane {
	width: 900px;
	max-width: 95vw;
	padding: 20px 25px;
}

.help-header {
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid #333;
}

.help-header h2 {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 400;
	color: #fff;
}

.help-desc {
	margin: 0;
	font-size: 11px;
	color: #666;
}

.help-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 25px;
}

.help-column {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.help-section {
	background: rgba(255,255,255,0.02);
	padding: 12px;
	border-radius: 2px;
}

.help-section h4 {
	margin: 0 0 8px 0;
	font-size: 11px;
	font-weight: 600;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.help-item {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 4px 0;
	font-size: 11px;
	color: #888;
}

.help-item kbd {
	display: inline-block;
	min-width: 50px;
	padding: 2px 5px;
	background: #252525;
	border: 1px solid #333;
	border-radius: 2px;
	color: #999;
	font-family: 'Lato', sans-serif;
	font-size: 10px;
	text-align: center;
	flex-shrink: 0;
}

.help-item kbd.key {
	background: rgba(74, 158, 255, 0.1);
	border-color: rgba(74, 158, 255, 0.25);
	color: #6ab0ff;
}

.help-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #333;
}

.help-tutorial-buttons {
	display: flex;
	gap: 10px;
}

.help-footer .show-tutorial-btn,
.help-footer .show-interactive-tutorial-btn {
	padding: 8px 14px;
	background: rgba(74, 158, 255, 0.15);
	border: 1px solid rgba(74, 158, 255, 0.4);
	border-radius: 2px;
	color: #6ab0ff;
	font-size: 11px;
	cursor: pointer;
	transition: all 0.15s;
}

.help-footer .show-tutorial-btn:hover,
.help-footer .show-interactive-tutorial-btn:hover {
	background: rgba(74, 158, 255, 0.25);
	color: #8cc4ff;
}

.help-footer .show-interactive-tutorial-btn {
	background: rgba(255, 149, 0, 0.15);
	border-color: rgba(255, 149, 0, 0.4);
	color: #ffb340;
}

.help-footer .show-interactive-tutorial-btn:hover {
	background: rgba(255, 149, 0, 0.25);
	color: #ffc560;
}

.help-links {
	display: flex;
	align-items: center;
	gap: 15px;
	font-size: 11px;
}

.help-links .help-version {
	color: #555;
}

.help-links a {
	color: #666;
	text-decoration: none;
	transition: color 0.15s;
}

.help-links a:hover {
	color: #fff;
}

.help-links .support-link {
	color: #ff8570;
}

.help-links .support-link:hover {
	color: #ffb3a7;
}

@media (max-width: 800px) {
	.help-pane {
		width: 95vw;
	}
	.help-grid {
		grid-template-columns: 1fr;
	}
}

.analyzer-container {
	font-size: 12px;
	color: #aaa;
}

main .page {
	position: fixed;
	top: 48px;
	bottom: 0;
	height: auto;
	width: 100%;
	background: #111;
}

main .page .left {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 200px;
	height: auto;
	padding-bottom: 10px;
	background: #0d0d0d;
	border-right: 1px solid #1a1a1a;
	box-shadow: 1px 0 0 #000;
	overflow-y: scroll;
	scrollbar-color: #333 #0d0d0d;
	z-index: 50;
}

/* Film grain noise overlay for left panel */
main .page .left::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 100;
	opacity: 0.03;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
	background-size: 500px 500px;
	background-repeat: repeat;
}

main .page .center {
	position: absolute !important;
	left: 200px;
	right: 15px;
	width: auto;
	height: 100%;
	z-index: 1;
}

main .pane {
	position: relative;
}

main .pane h2 {
	margin: 0;
	padding: 8px 0;
	background: linear-gradient(180deg, #252525 0%, #1e1e1e 100%);
	font-size: 10px;
	text-align: center;
	font-weight: 600;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	border-bottom: 1px solid #2a2a2a;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

main .pane .pane-toggle {
	position: absolute;
	left: 10px;
	top: 4px;
	padding: 4px 5px;
	cursor: pointer;
	transform: none;
	transform-origin: center center;
}

main .pane .pane-toggle.s {
	padding-top: 7px;
	transform: rotateZ(90deg);
}

main .pane .pane-content {
	position: relative;
}

main .pane .pane-content.global {
	padding: 8px 14px 12px;
}

main .pane .pane-content.global input,
main .pane .pane-content.global select {
	padding: 4px 8px;
	font-size: 12px;
}

main .pane .pane-content.closed {
	display: none;
}

main .pane .pane-item {
	padding: 4px 0;
	font-size: 12px;
}

main .pane .pane-item-text {
	margin-bottom: 4px;
	/*color: #aaa;*/
}

main .pane .pane-instrument {
	position: relative;
	padding: 8px 14px 12px;
	border-bottom: 1px solid #222;
}

main .pane .pane-instrument.selected {
	background: #1a1a1a;
}

main .pane .pane-instrument.primary {
	border-left: 3px solid #888;
	background: #222;
}

main .pane .pane-instrument-name {
	width: 120px;
	margin-bottom: 8px;
	margin-top: 2px;
	padding: 2px 4px;
	border: none;
	background: transparent;
	font-family: 'Lato', sans-serif;
	font-weight: 400;
	font-size: 15px;
	color: #eee;
	outline: none;
}

main .pane .pane-instrument-name:read-only {
	background: transparent !important;
	cursor: default;
}

main .pane input,
main .pane select {
	width: 100%;
	padding: 7px 8px;
	border: 0px solid #484848;
	background: transparent;
	font-family: 'Lato', sans-serif;
	font-size: 14px;
	border-left: 5px solid #484848;
	/*margin-bottom: 5px;*/
	color: #dbdbdb;
}

main .pane input:focus,
main .pane input:hover,
main .pane select:focus,
main .pane select:hover {
	color: #fff;
	border-left-color: #aaa;
}

main .pane input:focus,
main .pane select:focus {
	background: #1a1a1a;
	border-left-color: rgb(48, 86, 147);
	outline: none;
}

main .pane .pane-instrument-close {
	position: absolute;
	right: 14px;
	top: 10px;
	padding: 1px 6px 2px;
	background: transparent;
	color: #777;
	font-size: 14px;
	cursor: pointer;
}

main .pane .pane-instrument-close:hover {
	background: #222;
	color: #eee;
}

main .pane .pane-instrument.selected .pane-instrument-close:hover,
main .pane .pane-instrument.selected .pane-instrument-close:focus {
	background: #333;
}

main .pane .pane-instrument-strip {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 5px;
	height: auto;
}

main .pane .pane-instrument-spectrum {
	width: 100%;
	margin-bottom: 0;
	border: none;
	background: #111;
	color: #ccc;
}

main .pane .pane-instrument-spectrum:hover,
main .pane .pane-instrument-spectrum:focus {
	border: none;
	background: #1a1a1a;
	color: #fff;
}

main .pane .add-instrument {
	display: inline-block;
	margin: 6px 15px 12px;
	padding: 0px 10px 1px;
	background: #222;
	color: #999;
	font-size: 20px;
	font-weight: 800;
	cursor: pointer;
}

main .pane .add-instrument:hover {
	background: #444;
	color: #eee;
}

.instrumentColorPicker {
	position: absolute;
	left: 0;
	top: -10px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

#canvasElement {
	background: linear-gradient(180deg, #181818 0%, #141414 100%);
	outline: none;
}

/* Frequency scale indicator - left edge gradient hint */
.center::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 2px;
	height: 100%;
	background: linear-gradient(180deg,
		rgba(100, 140, 180, 0.15) 0%,
		rgba(140, 120, 100, 0.08) 50%,
		rgba(180, 120, 80, 0.12) 100%
	);
	z-index: 10;
	pointer-events: none;
}


.info-window {
	padding: 8px 10px;
	border: 1px solid #2a2a2a;
	border-radius: 2px;
	background: linear-gradient(180deg, rgba(30,30,30,0.95) 0%, rgba(20,20,20,0.95) 100%);
	color: #888;
	font-size: 10px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.info-window div, .partial-window div {
	margin-bottom: 2px;
}

.info-window span, .partial-window span {
	font-weight: 900;
	font-size: 9px;
	color: #aaa;
	user-select: text;
	cursor: text;
}

.partial-window-selected .content {
	user-select: text;
	cursor: text;
}
.partial-window hr, .partial-window-selected hr {
	border: 1px solid #444;
	border-bottom: none;
}

/*.partial-window {
	display: none;
}*/


.right-opener {
	position: absolute;
	right: 0;
	display: grid;
	width: 15px;
	height: 100%;
	padding-left: 2px;
	background: #0f0f0f;
	color: #fff;
	font-size: 12px;
	align-content: center;
	cursor: pointer;
	z-index: 5;
}

.right-opener .right-opener-closed {
	display: none;
}

.right-opener .right-opener-open {
	display: inline-block;
}

.right-opener.closed .right-opener-closed {
	display: inline-block;
}

.right-opener.closed .right-opener-open {
	display: none;
}

.right {
	position: absolute;
	top: 0;
	right: 0;
	width: 500px;
	height: 100%;
	background: linear-gradient(180deg, #101010 0%, #0a0a0a 100%);
	border-left: 1px solid #1a1a1a;
}

.right.closed {
	display: none;
}

.right-resize-handle {
	position: absolute;
	left: 0;
	top: 0;
	width: 5px;
	height: 100%;
	cursor: ew-resize;
	background: transparent;
	z-index: 10;
	transition: background 0.1s;
}

.right-resize-handle:hover,
.right-resize-handle.active {
	background: #0b7dda;
}

/* Split panel layout */
.right-top {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 50%;
	overflow: hidden;
}

.right-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 24px;
	background: linear-gradient(180deg, #1e1e1e 0%, #171717 100%);
	border-bottom: 1px solid #252525;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
}

.right-view-toggle {
	display: flex;
	background: linear-gradient(180deg, #252525 0%, #1c1c1c 100%);
	border: 1px solid #333;
	border-radius: 2px;
	padding: 0;
	cursor: pointer;
	overflow: hidden;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.right-view-toggle span {
	padding: 3px 8px;
	font-size: 9px;
	color: #777;
	background: transparent;
	transition: background 0.1s, color 0.1s;
}

.right-view-toggle span.active {
	background: #2a4a6a;
	color: #fff;
}

.right-view-toggle span:hover:not(.active) {
	background: #333;
	color: #aaa;
}

.composite-autoscale-label {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: 8px;
	font-size: 9px;
	color: #777;
	cursor: pointer;
}

.composite-autoscale-label input {
	width: 12px;
	height: 12px;
	margin: 0;
	cursor: pointer;
}

.composite-autoscale-label span {
	user-select: none;
}

.right canvas#spectrogram {
	position: absolute;
	top: 24px;
	left: 0;
	right: 0;
	bottom: 0;
}

.right-split-handle {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 5px;
	margin-top: -2px;
	background: #222;
	border-top: 1px solid #333;
	border-bottom: 1px solid #333;
	cursor: ns-resize;
	z-index: 5;
	transition: background 0.1s;
}

.right-split-handle:hover,
.right-split-handle.active {
	background: #0b7dda;
}

.right-bottom {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	bottom: 0;
	background: #111;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.right-bottom-header {
	height: 28px;
	background: linear-gradient(180deg, #1e1e1e 0%, #171717 100%);
	border-bottom: 1px solid #252525;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
	display: flex;
	align-items: center;
	padding: 0 8px;
	gap: 10px;
	flex-shrink: 0;
}

.right-editor-toggle {
	display: flex;
	background: linear-gradient(180deg, #252525 0%, #1c1c1c 100%);
	border: 1px solid #333;
	border-radius: 2px;
	padding: 0;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
	overflow: hidden;
}

.right-editor-toggle span {
	padding: 3px 8px;
	font-size: 10px;
	color: #666;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.right-editor-toggle span:hover {
	color: #aaa;
}

.right-editor-toggle span.active {
	background: #0b7dda;
	color: #fff;
}

.right-editor-timbre-name {
	font-size: 10px;
	color: #666;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.right-editor-content {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
	scrollbar-width: thin;
	scrollbar-color: #444 #1a1a1a;
}

.right-editor-content::-webkit-scrollbar {
	width: 8px;
}

.right-editor-content::-webkit-scrollbar-track {
	background: #1a1a1a;
}

.right-editor-content::-webkit-scrollbar-thumb {
	background: #444;
	border-radius: 2px;
}

.right-editor-content::-webkit-scrollbar-thumb:hover {
	background: #555;
}

/* Timbre Editor */
.right-timbre-editor {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	overflow: hidden;
}

.right-timbre-presets {
	display: flex;
	gap: 4px;
}

.right-timbre-presets button {
	flex: 1;
	background: #222;
	border: 1px solid #333;
	border-radius: 2px;
	color: #888;
	font-size: 9px;
	padding: 4px 6px;
	cursor: pointer;
	transition: background 0.1s, color 0.1s;
}

.right-timbre-presets button:hover {
	background: #333;
	color: #aaa;
}

.right-partials-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 10px;
	color: #888;
	margin-bottom: 4px;
}

.right-partials-count {
	width: 50px;
	background: #222;
	border: 1px solid #333;
	border-radius: 2px;
	color: #aaa;
	font-size: 10px;
	padding: 2px 4px;
	text-align: center;
}

.right-partials-chart {
	background: #0a0a0a;
	border: 1px solid #222;
	border-radius: 2px;
	height: 300px;
	position: relative;
}

.right-partials-chart canvas {
	width: 100%;
	height: 100%;
}

.right-partials-list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2px;
	max-height: 120px;
	overflow-y: auto;
	margin-top: 8px;
}

.right-partial-item {
	display: flex;
	flex-direction: column;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 3px;
	font-size: 9px;
}

.right-partial-item label {
	color: #666;
	margin-bottom: 2px;
}

.right-partial-item input {
	width: 100%;
	background: #222;
	border: 1px solid #333;
	border-radius: 1px;
	color: #aaa;
	font-size: 9px;
	padding: 2px;
	text-align: center;
}

/* Tuning Editor */
.right-tuning-editor {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	overflow: hidden;
}

.right-tuning-info {
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	color: #888;
}

.right-tuning-degrees {
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow-y: auto;
	flex: 1;
}

.right-tuning-degree {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 4px 8px;
	font-size: 10px;
}

/* Partials table for timbre editor */
.right-partials-table {
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow-y: auto;
	flex: 1;
	margin-top: 8px;
}

.right-partial-row {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 3px 6px;
	font-size: 9px;
}

.right-partial-row span {
	color: #666;
	min-width: 20px;
}

.right-partial-row input {
	width: 60px;
	background: #222;
	border: 1px solid #333;
	border-radius: 1px;
	color: #aaa;
	font-size: 9px;
	padding: 2px 4px;
}

.right-partial-row label {
	color: #555;
	font-size: 8px;
}

.right-tuning-degree span {
	color: #666;
	min-width: 20px;
}

.right-tuning-degree input {
	flex: 1;
	background: #222;
	border: 1px solid #333;
	border-radius: 1px;
	color: #aaa;
	font-size: 9px;
	padding: 2px;
	text-align: right;
	min-width: 0;
}

.load-midi {
	position: absolute;
	left: -9999px;
}

#startOverlay {
	position: fixed;
	z-index: 99999;
	left: 0;
	top: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(180deg, #131313 0%, #0e0e0e 100%);
	text-align: center;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 50px;
}

/* Subtle noise texture for overlay - reduced for smoother void surface */
#startOverlay::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0.015;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

#startOverlay .startOverlayCenter {
	font-size: 20px;
}

/* --- Setup section --- */
.setup-container {
	display: flex;
	min-height: 100%;
	padding: 30px 15vw 30px;
	/*gap: 20px;*/
	align-items: flex-start;
	position: relative;
}

/* Film grain noise overlay for setup container */
.setup-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 0;
	opacity: 0.025;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
	background-size: 500px 500px;
	background-repeat: repeat;
}

.setup-container > *:not(.editor-list-container) {
	position: relative;
	z-index: 1;
}

input[type="button"].setup-tab {
	width: 130px;
	margin-bottom: 2px;
	padding: 9px 5px;
	border: 0;
	background: #111;
	font-size: 17px;
	color: #ccc;
	float: left;
	cursor: pointer;
}

input[type="button"].setup-tab.selected,
input[type="button"].setup-tab.secondary.selected {
	background: #333;
	color: #fff;
}

input[type="button"].setup-tab:hover,
input[type="button"].setup-tab:focus {
	background: #242424;
	border-color: #242424;
	color: #fff;
}

input[type="button"].setup-tab.selected:hover,
input[type="button"].setup-tab.selected:focus {
	background: #333;
	border-color: #333;
	color: #eee;
}
input[type="button"].setup-tab.secondary {
	color: #555;
}
input[type="button"].setup-tab.secondary:hover,
input[type="button"].setup-tab.secondary:focus,
input[type="button"].setup-tab.secondary.selected:hover,
input[type="button"].setup-tab.secondary.selected:focus {
	color: #fff;
}

.setup-tabs hr {
	border: 1px solid #222;
	margin-bottom: 0 0 2px;
}

/* I/O Tab Styles */
input[type="button"].io-tab {
	width: 100px;
	margin-bottom: 2px;
	padding: 9px 5px;
	border: 0;
	background: #111;
	font-size: 15px;
	color: #ccc;
	float: left;
	cursor: pointer;
}

input[type="button"].io-tab.selected {
	background: #333;
	color: #fff;
}

input[type="button"].io-tab:hover,
input[type="button"].io-tab:focus {
	background: #242424;
	border-color: #242424;
	color: #fff;
}

input[type="button"].io-tab.selected:hover,
input[type="button"].io-tab.selected:focus {
	background: #333;
	border-color: #333;
	color: #eee;
}

.io-tabs {
	width: 100px;
	flex-shrink: 0;
}

.io-section {
	display: none;
	width: 50%;
	min-height: 100%;
	background: #151515;
	flex: 1;
	padding: 30px 40px 50px;
	border-left: 2px solid #333;
	position: relative;
}

.io-section.active {
	display: block;
}

.io-section h3 {
	margin-top: 0;
	margin-bottom: 10px;
	padding-bottom: 10px;
	color: #fff;
	font-size: 40px;
	border-bottom: 2px solid #555;
}

.io-setup-container {
	display: flex;
	/*height: 100%;*/
}

.setup-section {
	display: none;
	width: 50%;
	min-height: 100%;
	background: #151515;
	flex: 1;
	/*border: 1px solid #ddd;*/
	padding: 30px 40px 50px;
	border-left: 2px solid #333;
	position: relative;
}

.setup-section h3,
#analyzerOverlay h3 {
	margin-top: 0;
	margin-bottom: 10px;
	padding-bottom: 10px;
	color: #fff;
	font-size: 40px;
	border-bottom: 2px solid #555;
}

.setup-section h4 {
	margin-bottom: 10px;
	color: #555;
}

.setup-section label {
	display: block;
	margin-bottom: 5px;
	color: #333;
}

.param-label {
	display: inline-block;
	min-width: 150px;
	margin-right: 10px;
}

.param-label-inline {
	display: inline-block;
	margin-right: 10px;
}

input[type='number'] {
	-moz-appearance: textfield;
}

input[type='number'],
input[type='text'],
select,
textarea {
	margin-bottom: 5px;
	padding: 7px 8px;
	border: 0px solid #484848;
	background: #222;
	font-family: 'Lato', sans-serif;
	font-size: 14px;
	color: #dbdbdb;
	border-left: 5px solid #aaa;
}

input:focus,
input:hover,
select:focus,
select:hover {
	color: #fff;
	border-left-color: #aaa;
}

input:focus,
select:focus {
	background: #333;
	border-left-color: rgb(48, 86, 147);
	outline: none;
}

.setup-section input[type='button']:focus {
	outline: none;
}

.select-yellow {
	background: #ae9538 !important;
	color: #000 !important;
	border-left-color: #6f5a2c !important;
}

.select-yellow:hover {
	background: #c2a744 !important;
	border-left-color: #665227 !important;
}







/*
 * SETUP TAB > TUNING + TIMBRE
 * Tuning+Timbre-specific CSS
 */
.h3-select {
	position: relative;
	top: 9px;
	display: inline-block;
	text-align: right;
	float: right;
}





/*
 * SETUP TAB > TUNING
 * Tuning-specific CSS
 */
.tuning-save {
	margin-top: 15px;
	padding: 8px 16px;
	background: #4CAF50;
	color: white;
}

.timbre-select,
.tuning-load-select {
	float: right;
}

.microtune-editor {
	display: none;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #ddd;
}

.tuning-preview {
	margin-top: 20px;
	border: 1px solid #222;
	display: flex;
	background: #0a0a0a;
}

.tuning-preview-content {
	width: 200px;
	min-width: 200px;
	max-height: 120px;
	font-size: 11px;
	padding: 10px;
	background: #0a0a0a;
	color: #aaa;
	font-family: monospace;
	white-space: pre;
	overflow-y: auto;
	border-right: 1px solid #222;
	scrollbar-width: thin;
	scrollbar-color: #333 #0a0a0a;
}

.tuning-preview-content::-webkit-scrollbar {
	width: 6px;
}

.tuning-preview-content::-webkit-scrollbar-track {
	background: #0a0a0a;
}

.tuning-preview-content::-webkit-scrollbar-thumb {
	background: #333;
	border-radius: 2px;
}

.tuning-visual-preview {
	flex: 1;
	height: 120px;
	overflow: hidden;
	position: relative;
	cursor: grab;
}

.tuning-visual-preview:active {
	cursor: grabbing;
}

.tuning-visual-canvas {
	display: block;
}





/*
 * SETUP TAB > TIMBRE
 * Timbre-specific CSS
 */
.timbre-save {
	margin-top: 15px;
	padding: 8px 16px;
	background: #4CAF50;
	color: white;
}

.timbre-delete {
	margin-top: 15px;
	margin-left: 10px;
	padding: 8px 16px;
	background: #f44336;
	color: white;
}

.timbreChart {
	background: #111;
	border: 1px solid #222;
	border-radius: 2px;
}

.partials-table {
	width: 100%;
	background: #1a1a1a;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 10px;
}

.partials-table th {
	padding: 4px 6px;
	background: #252525;
	text-align: center;
	font-size: 9px;
	color: #888;
	text-transform: uppercase;
	border-bottom: 1px solid #333;
}

.partials-table td {
	text-align: center;
	padding: 2px 3px;
	border-bottom: 1px solid #222;
}

.partials-table th:nth-child(1),
.partials-table td:nth-child(1) {
	width: 30px;
	color: #555;
}

.partials-table th:nth-child(2),
.partials-table td:nth-child(2) {
	width: auto;
}

.partials-table th:nth-child(3),
.partials-table td:nth-child(3) {
	width: auto;
}

.partials-table input {
	width: 100%;
	padding: 3px 4px;
	font-size: 10px;
	background: #111;
	border: 1px solid #333;
	color: #ccc;
	border-radius: 2px;
	text-align: center;
}

.partials-table input:focus {
	border-color: #4a7a9e;
	outline: none;
}

/* Timbre Editor Layout */
.timbre-editor-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.timbre-name-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.timbre-name-row input {
	flex: 1;
	max-width: 250px;
}

.timbre-keypoints-section {
	background: rgba(255,255,255,0.02);
	border-radius: 2px;
	padding: 12px;
}

.timbre-keypoints-header {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 8px;
}

.timbre-section-label {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.timbre-keypoints-hint {
	font-size: 10px;
	color: #555;
}

.timbre-keypoints-list {
	max-height: 120px;
	overflow-y: auto;
	background: #1a1a1a;
	border-radius: 2px 2px 0 0;
	min-height: 30px;
	padding: 0 0 4px;
}

.timbre-keypoint-add {
	width: 100%;
	padding: 6px;
	font-size: 18px;
	line-height: 1;
	background: #252525;
	border: none;
	border-radius: 0 0 2px 2px;
	color: #666;
	cursor: pointer;
	margin-bottom: 10px;
}

.timbre-keypoint-add:hover {
	background: #2a2a2a;
	color: #888;
}

.timbre-action-row {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.timbre-action-row input {
	padding: 6px 12px;
	font-size: 11px;
}

.timbre-chart-table-row {
	display: flex;
	gap: 12px;
}

.timbre-chart-section {
	flex: 1;
	min-width: 0;
}

.timbre-chart-wrapper {
	height: 300px;
	position: relative;
}

.timbre-chart-wrapper canvas {
	width: 100% !important;
	height: 100% !important;
}

.timbre-table-section {
	flex: 1;
	min-width: 0;
	max-height: 300px;
	overflow-y: auto;
	background: #1a1a1a;
	border-radius: 2px;
}

.timbre-partials-controls {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.timbre-partials-count-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.timbre-partials-count-row span {
	font-size: 10px;
	color: #888;
}

.timbre-partials-count-row input[type="number"] {
	width: 60px;
	padding: 4px 6px;
	font-size: 10px;
}

.timbre-partials-count-row input[type="button"] {
	padding: 4px 10px;
	font-size: 10px;
}

.timbre-presets-row {
	display: flex;
	gap: 4px;
}

.timbre-presets-row input {
	padding: 4px 8px;
	font-size: 10px;
	flex: 1;
}

/* Play Timbre button - higher semantic weight */
input.playTimbre {
	padding-left: 20px;
	padding-right: 20px;
	background: linear-gradient(180deg, #2a2a2a 0%, #222 100%);
	border: 1px solid #333;
	border-radius: 2px;
	color: #aaa;
	cursor: pointer;
	transition: all 0.08s ease-out;
}

input.playTimbre:hover {
	background: linear-gradient(180deg, #333 0%, #2a2a2a 100%);
	border-color: #444;
	color: #fff;
	box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.05);
}

input.playTimbre:active {
	background: #252525;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}


/*
 * SETUP TAB > TIMBRE > Analyzer
 * Uses unified spectra-overlay design
 */
#analyzerOverlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	z-index: 10000;
	padding: 20px;
	overflow: auto;
}

#analyzerOverlay.hidden {
	display: none;
}

.tuning-settings.hidden {
	display: none !important;
}

.analyzerOverlayWindow {
	position: relative;
	width: auto;
	max-width: 90%;
	margin: auto;
	padding: 25px;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.analyzer-spectrum-container {
	position: relative;
	height: 250px;
	overflow: hidden;
}

#analyzerChart {
	display: block;
	width: 100%;
	height: 100%;
	border: 1px solid #111;
	background: #1a1a1a;
	cursor: crosshair;
}

#analyzerWaveform {
	display: block;
	width: 100%;
	height: 50px;
	margin-bottom: 10px;
	border: 1px solid #111;
	background: #111;
	cursor: crosshair;
	border-top: none;
}

.analyzer-freq-labels {
	display: flex;
	justify-content: space-between;
	padding: 4px 0;
	font-size: 10px;
	color: #666;
	border-left: 1px solid #111;
	border-right: 1px solid #111;
	background: #1a1a1a;
}

.analyzer-freq-labels span {
	text-align: center;
	min-width: 30px;
}

.analyzer-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 300px;
	height: 4px;
	background: #333;
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}

.analyzer-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 12px;
	height: 12px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s;
	margin-top: -4px;
}

.analyzer-slider::-webkit-slider-thumb:hover {
	background: #aaa;
}

.analyzer-slider::-moz-range-thumb {
	width: 12px;
	height: 12px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	border: none;
}

.analyzer-slider::-moz-range-thumb:hover {
	background: #aaa;
}

.analyzer-outputs {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.analyzer-midi-output,
.analyzer-freq-output {
	flex: 1;
	height: 100px;
	padding: 8px;
	background: #222;
	border: 1px solid #333;
	overflow-y: auto;
	cursor: pointer;
	font-size: 11px;
	font-family: monospace;
	line-height: 1.4;
	scrollbar-width: thin;
	scrollbar-color: #333 #121212;
}

.analyzer-midi-output::-webkit-scrollbar,
.analyzer-freq-output::-webkit-scrollbar {
	width: 8px;
}

.analyzer-midi-output::-webkit-scrollbar-track,
.analyzer-freq-output::-webkit-scrollbar-track {
	background: #121212;
}

.analyzer-midi-output::-webkit-scrollbar-thumb,
.analyzer-freq-output::-webkit-scrollbar-thumb {
	background: #333;
	border-radius: 2px;
}

.analyzer-midi-output::-webkit-scrollbar-thumb:hover,
.analyzer-freq-output::-webkit-scrollbar-thumb:hover {
	background: #444;
}

.analyzer-midi-output:hover,
.analyzer-freq-output:hover {
	background: #282828;
}

.analyzer-midi-output::before,
.analyzer-freq-output::before {
	display: block;
	font-size: 9px;
	color: #666;
	margin-bottom: 4px;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.analyzer-midi-output::before {
	content: 'MIDI';
}

.analyzer-freq-output::before {
	content: 'Frequencies';
}




/*
 * UI Components
 * -------------
 * Switch
*/

.switch {
	position: relative;
	z-index: 1;
	display: flex;
}
/* Zero border radius on touching sides for grouped buttons */
.switch-scrolling .switch-checkbox + label {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}
.switch-magnet .switch-checkbox + label {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}
.switch-headphones .switch-checkbox + label {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}
.switch-fletcher-munson .switch-checkbox + label {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}
.menu-ui-label {
	font-size: 13px;
}

.switch-checkbox {
	position: absolute;
	z-index: 0;
	-webkit-appearance: none;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.switch-checkbox + label {
	/*position: relative;
	left: 3px;*/
	z-index: 5;
	display: flex;
	border-radius: 2px;
	background: #222;
	font-weight: 900;
	font-size: 10px;
	color: #888;
	cursor: pointer;
	border: 1px solid transparent;
	min-width: 25px;
	height: 28px;
	align-items: center;
	justify-content: center;
}

.switch-checkbox:checked + label {
	background: #444;
	color: #fff;
}

.switch-checkbox:hover + label {
	background: #1b4891;
}

.switch-checkbox:not(:checked):hover + label {
	background: #333;
}

.switch-midi-partial + label,
.switch-computer-keyboard + label,
.switch-headphones + label,
.switch-magnet + label,
.switch-T + label,
.selection-mode-radio + label {
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.switch-computer-keyboard + label {
	font-size: 14px;
}

.switch-midi-partial + label svg {
	display: block;
	margin: auto;
}


/*
 * UI Components
 * -------------
 * Menu Radio
*/
.menu-ui.radio {
	position: relative;
	display: flex;
	border-radius: 2px;
}

.menu-ui .radio-button {
	width: 26px;
	height: 28px;
	padding: 5px;
	border: none;
	background: #222;
	font-size: 13px;
	font-family: 'Lato';
	font-weight: 400;
	color: #888;
	cursor: pointer;
}

.menu-ui .radio-button.selected {
	background: #444;
	color: #fff;
}

.menu-ui .radio-button.selected:hover {
	background: #1b4891;
	color: #fff;
}

.menu-ui .radio-button:hover {
	background: #333;
}

/* Selection Mode Tooltips */
.menu-ui.radio.selection-mode-radio {
	overflow: visible;
}

.radio-btn-wrapper {
	position: relative;
	float: left;
}

.radio-btn-wrapper:first-child .radio-button {
	border-radius: 2px 0 0 2px;
}

.radio-btn-wrapper:last-child .radio-button {
	border-radius: 0 2px 2px 0;
}

.radio-btn-wrapper::after {
	content: attr(data-tooltip);
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 6px;
	padding: 4px 8px;
	background: #222;
	color: #ccc;
	font-size: 11px;
	white-space: nowrap;
	border-radius: 2px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s, visibility 0.15s;
	pointer-events: none;
	z-index: 1000;
}

.radio-btn-wrapper:hover::after {
	opacity: 1;
	visibility: visible;
}

/* Switch Tooltips */
.menu-ui.switch[data-tooltip] {
	position: relative;
	overflow: visible;
}

.menu-ui.switch[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 6px;
	padding: 4px 8px;
	background: #222;
	color: #ccc;
	font-size: 11px;
	white-space: nowrap;
	border-radius: 2px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s, visibility 0.15s;
	pointer-events: none;
	z-index: 1000;
}

.menu-ui.switch[data-tooltip]:hover::after {
	opacity: 1;
	visibility: visible;
}


/*
 * UI Components
 * -------------
 * Playback Controls
*/
.playback-ui {
	display: flex;
	align-items: center;
	gap: 8px;
}

.playback-ui > span {
	display: flex;
	align-items: center;
}

/* Group play + options together (no gap between them) */
.playback-ui .playback-ui-play,
.playback-ui .playback-options {
	margin: 0;
}

.playback-ui .playback-options {
	margin-left: -8px; /* Compensate for gap to sit right next to play */
}

input[type="button"].button-red,
button.button-red {
}

input[type="button"].button-red:hover,
button.button-red:hover,
input[type="button"].button-red:focus,
button.button-red:focus {
	border-color: #da0b0b;
	background: #da0b0b;
}

.switch.playback-ui-play[data-playing="true"] .playback-play {
	background: #1b8230;
	color: #fff;
}

.switch.playback-ui-play .switch-checkbox + label {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.playback-ui button.playback-play {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.switch.playback-options {
	display: flex;
	align-items: center;
}

.switch.playback-options .switch-checkbox + label {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
	padding: 7px 5px;
}

.switch.playback-options label {
	margin-left: -1px;
}

.switch.playback-record button {
	padding: 8px 10px;
}

.switch.playback-loop label {
	font-size: 12px;
	padding: 5.5px 6px;
	margin-left: -1px;
}

.switch.playback-stop label {
	margin-left: -1px;
}

.playback-time {
	display: flex;
	align-items: center;
	padding: 0 10px;
	background: #222;
	color: #bbb;
	height: 28px;
	font-size: 13px;
	border-radius: 2px;
	border: 1px solid transparent;
}

.metronome-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 27px;
	height: 28px;
	background: #222;
	color: #888;
	border: none;
	border-radius: 2px;
	cursor: pointer;
	font-size: 25px;
	transition: background 0.15s, color 0.15s;
}

.metronome-btn:hover {
	background: #333;
	color: #bbb;
}

.metronome-btn.active {
	background: #444;
	color: #4a9eff;
}

.metronome-btn.active:hover {
	background: #555;
}

.playback-options-menu {
	position: fixed;
	width: 120px;
	z-index: 1002;
	top: 35px;
	background: #1a1a1a;
	font-size: 11px;
	padding: 6px 10px 8px;
	border-radius: 2px;
	border: 1px solid #333;
	color: #666;
}

.playback-options-menu-item {
	cursor: pointer;
	margin-bottom: 2px;
	transition: all 0.1s;
}

.playback-options-menu-item:hover,
.playback-options-menu-item:focus {
	color: #aaa;
}

.playback-options-menu-item.selected {
	color: #ddd;
}

.playback-options-menu span {
	margin-bottom: 2px;
	display: inline-block;
	font-size: 9px;
}

.playback-ui button:not(.metronome-btn) {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	border-radius: 2px;
	background: #222;
	font-weight: 900;
	font-size: 10px;
	color: #888;
	cursor: pointer;
	border: none;
	height: 28px;
}

.playback-ui button:not(.metronome-btn):hover {
	background: #333;
}

.playback-ui button.playback-options-caret {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
	/*margin-right: 6px;*/
	margin-left: -1px;
	padding: 7px 4px;
	height: 28px;
	line-height: 1;
}

.playback-ui button.playback-options-caret:before {
	content: '';
	display: block;
}

.playback-ui button.playback-stop-button {
	border: 1px solid transparent;
	padding: 7px 9px;
}
/* Record and loop buttons use gap spacing from parent */

.playback-ui-play[data-type="continue"] + .playback-options button.playback-options-caret:before {
	content: 'c';
}

.playback-ui-play[data-type="return"] + .playback-options button.playback-options-caret:before {
	content: 'r';
}


/*
 * UI Components
 * -------------
 * Export Modal
*/
.exportSection .infoPane {
	max-width: 450px;
}

.exportSection p {
	margin: 8px 0 5px;
	color: #888;
	font-size: 12px;
}

/* Choice buttons */
.ui-choice {
	display: flex;
	align-items: stretch;
	gap: 5px;
	margin: 8px 0;
}

.ui-choice-option {
	flex-grow: 1;
	padding: 7px 12px;
	border: none;
	border-radius: 2px;
	background: #222;
	font-size: 11px;
	font-weight: 400;
	color: #888;
	cursor: pointer;
}

.ui-choice-option:hover {
	background: #333;
}

.ui-choice-option.selected {
	background: #444;
	color: #fff;
}

.ui-choice-option.selected:hover {
	background: #1b4891;
}

/* Custom option containers */
.ui-choice-custom {
	display: none;
	background: #1a1a1a;
	border-left: 5px solid #444;
	padding: 10px 12px;
	margin: 8px 0;
}

/* Track list */
.export-tracks-list {
	max-height: 180px;
	overflow-y: auto;
}

.export-tracks-container {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* Export checkboxes - similar to switch-checkbox + label */
.export-checkbox-item {
	display: flex;
	align-items: center;
	padding: 5px 8px;
	cursor: pointer;
	border-radius: 2px;
}

.export-checkbox-item:hover {
	background: #252525;
}

.export-checkbox-item input[type="checkbox"] {
	position: absolute;
	left: -9999px;
	opacity: 0;
}

.export-checkbox-item input[type="checkbox"] + .checkbox-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-right: 10px;
	border-radius: 2px;
	background: #222;
	font-size: 10px;
	color: transparent;
	border: 1px solid transparent;
}

.export-checkbox-item input[type="checkbox"]:checked + .checkbox-icon {
	background: #444;
	color: #fff;
}

.export-checkbox-item input[type="checkbox"]:not(:checked):hover + .checkbox-icon,
.export-checkbox-item:hover input[type="checkbox"]:not(:checked) + .checkbox-icon {
	background: #333;
}

.export-checkbox-item .checkbox-label {
	flex: 1;
	font-size: 12px;
	color: #ccc;
}

.export-checkbox-item .checkbox-color-strip {
	width: 4px;
	height: 16px;
	border-radius: 2px;
	margin-left: 8px;
}

/* Partials textarea */
.export-partials-input {
	width: 100%;
	min-height: 50px;
	padding: 8px;
	border: none;
	border-left: 5px solid #444;
	background: #222;
	font-family: 'Lato', sans-serif;
	font-size: 13px;
	color: #ccc;
	resize: vertical;
}

.export-partials-input:focus {
	background: #333;
	border-left-color: rgb(48, 86, 147);
	outline: none;
}

/* Export button */
.export-button {
	padding: 10px 24px;
	border: none;
	border-radius: 2px;
	background: #2a6a2a;
	font-size: 14px;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s;
}

.export-button:hover {
	background: #3a8a3a;
}

/*
 * UI Components
 * -------------
 * Volume Control
*/
.volume-control {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-right: 15px;
	position: relative;
	margin-right: 6px;
}

.volume-control::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 24px;
	background: #333;
}

.volume-mute-btn {
	background: #222;
	border: none;
	color: #888;
	cursor: pointer;
	padding: 6px;
	border-radius: 2px;
	font-size: 14px;
	transition: all 0.15s;
	width: 30px;
	text-align: center;
	height: 28px;
}

.volume-mute-btn:hover {
	background: #333;
	color: #fff;
}

.volume-mute-btn.muted {
	color: #f55;
}

.volume-mute-btn.muted:hover {
	background: #422;
}

/* Reverb toggle button - temporarily hidden */
.reverb-indicator {
	display: none !important;
	background: #222;
	border: none;
	color: #555;
	cursor: pointer;
	padding: 6px;
	border-radius: 2px;
	font-size: 14px;
	transition: all 0.15s;
	width: 30px;
	text-align: center;
	height: 28px;
	margin-right: 8px;
}

.reverb-indicator:hover {
	background: #333;
	color: #888;
}

.reverb-indicator.active {
	color: #6cf;
	background: #234;
}

.reverb-indicator.active:hover {
	background: #345;
	color: #8df;
}

.volume-slider-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.volume-slider {
	width: 80px;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: #333;
	border-radius: 2px;
	outline: none !important;
	cursor: pointer;
}

.volume-slider::-webkit-slider-runnable-track {
	height: 4px;
	background: #333;
	border-radius: 2px;
}

.volume-slider::-moz-range-track {
	height: 4px;
	background: #333;
	border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 10px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s;
	margin-top: -3px;
}

.volume-slider::-webkit-slider-thumb:hover {
	background: #aaa;
}

.volume-slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	border: none;
}

.volume-slider::-moz-range-thumb:hover {
	background: #aaa;
}

.volume-meter {
	width: 80px;
	height: 4px;
	background: #1a1a1a;
	border-radius: 2px;
	overflow: hidden;
	position: relative;
}

.volume-meter-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(to right, #4a4, #aa4 70%, #a44 90%);
	background-size: 80px 100%;
	transition: width 0.05s ease-out;
	border-radius: 2px;
}

.volume-meter-peak {
	position: absolute;
	top: 0;
	width: 2px;
	height: 100%;
	background: #fff;
	opacity: 0;
	left: 0%;
	transition: left 0.05s ease-out;
}

.volume-value {
	font-size: 10px;
	color: #666;
	font-family: monospace;
	min-width: 55px;
	text-align: center;
}

/* Brightness Offset Control */
.brightness-offset-control {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-right: 6px;
	padding-right: 12px;
	float: right;
	position: relative;
}

.brightness-offset-control::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 24px;
	background: #333;
}

.brightness-offset-slider-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	margin-top: 8px;
}

.brightness-offset-slider {
	width: 60px;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: #333;
	border-radius: 2px;
	outline: none !important;
	cursor: pointer;
}

.brightness-offset-slider::-webkit-slider-runnable-track {
	height: 4px;
	background: #333;
	border-radius: 2px;
}

.brightness-offset-slider::-moz-range-track {
	height: 4px;
	background: #333;
	border-radius: 2px;
}

.brightness-offset-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 10px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s;
	margin-top: -3px;
}

.brightness-offset-slider::-webkit-slider-thumb:hover {
	background: #aaa;
}

.brightness-offset-slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	border: none;
}

.brightness-offset-slider::-moz-range-thumb:hover {
	background: #aaa;
}

.brightness-offset-value {
	font-size: 10px;
	color: #666;
	font-family: monospace;
	min-width: 40px;
	text-align: center;
}

/* ============================================
	PROJECT MANAGER STYLES
	============================================ */

/* Loading bar styles */
.project-loading-container {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	min-width: 350px;
}

.project-loading-container.visible {
	display: block;
}

.project-loading-title {
	color: #fff;
	font-size: 18px;
	font-weight: 300;
	margin-bottom: 20px;
	letter-spacing: 1px;
}

.project-loading-bar-bg {
	width: 100%;
	height: 6px;
	background: #333;
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 12px;
}

.project-loading-bar-fill {
	height: 100%;
	width: 0%;
	background: #0b7dda;
	border-radius: 2px;
	transition: width 0.2s ease-out;
}

.project-loading-status {
	color: #888;
	font-size: 12px;
}

.project-select-container {
	display: block;
	/*min-width: 402px;*/
	max-width: 331px;
	position: relative;
	z-index: 1;
	flex: 1;
}

.project-select-header {
	text-align: left;
	margin-right: 100px;
}

.project-select-header h1 {
	font-family: 'Sulphur Point', sans-serif;
	font-size: 80px;
	font-weight: 900;
	margin: 0 0 40px;
	letter-spacing: 3px;
	position: relative;
	text-shadow:
		0px -20px 2px rgba(255,255,255,0.08),
		0px -40px 2px rgba(255,255,255,0.05),
		0px -60px 2px rgba(255,255,255,0.03),
		0px -80px 2px rgba(255,255,255,0.015);
	background: linear-gradient(
		90deg,
		#999 0%,
		#ccc 25%,
		#fff 50%,
		#ccc 75%,
		#999 100%
	);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	animation: spectral-shimmer 12s ease-in-out infinite;
}

@keyframes spectral-shimmer {
	0%, 100% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
}

/*.project-select-header h1::after {
	content: '';
	position: absolute;
	bottom: -12px;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.4), transparent);
}*/

.project-select-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid #2a2a2a;
	margin-bottom: 20px;
}

.project-tab {
	flex: 1;
	padding: 12px 20px;
	background: transparent;
	border: none;
	color: #666;
	font-size: 13px;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.2s;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.project-tab:hover {
	color: #aaa;
}

.project-tab.active {
	color: #fff;
	border-bottom-color: rgba(255, 140, 0, 0.6);
}

.project-select-content {
	display: block;
}

.new-project-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	margin-bottom: 20px;
	margin-top: 30px;
}

.new-project-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 auto;
	height: 40px;
	padding: 0 24px;
	border-radius: 2px;
	background: transparent;
	border: 1px solid #444;
	color: #888;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	transition: all 0.2s;
	box-sizing: border-box;
}

.new-project-btn .new-project-icon {
	font-size: 18px;
	font-weight: 300;
	line-height: 1;
}

.new-project-btn .new-project-text {
	letter-spacing: 0.3px;
}

.new-project-btn:hover {
	background: transparent;
	border-color: #555;
	color: #aaa;
}

.new-project-inline {
	display: flex;
	align-items: center;
	position: relative;
	margin: 0 auto;
	width: 90%;
}

.new-project-inline input {
	width: 100%;
	height: 40px;
	padding: 0 44px 0 16px;
	margin: 0;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	color: #fff;
	font-size: 14px;
	box-sizing: border-box;
}

.new-project-inline input:focus {
	border-color: #444;
	outline: none;
}

.new-project-inline .create-project-btn {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	padding: 3px 0 0;
	border-radius: 2px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 20px;
	font-weight: 300;
	display: flex;
	justify-content: center;
	transition: all 0.2s;
	color: #5a5;
}

.new-project-inline .create-project-btn:hover {
	background: rgba(90, 170, 90, 0.15);
	color: #6b6;
}

.project-list {
	max-height: 400px;
	overflow-y: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.project-list::-webkit-scrollbar {
	display: none;
}

.spectra-intro {
	color: #aaa;
	font-size: 14px;
	line-height: 1.6;
	padding: 10px 0;
	text-align: left;
	max-width: 330px;
	position: relative;
	margin-top: -60px;
}

.spectra-intro::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0%;
	transform: translateY(-50%);
	width: 407%;
	height: 407%;
	background: url('../i/spectra-three-notes.png') center center no-repeat;
	background-size: contain;
	opacity: 0.15;
	pointer-events: none;
	z-index: -1;
	mix-blend-mode: lighten;
}

.spectra-intro p {
	margin: 0 0 12px;
}

.spectra-intro p:first-of-type {
	color: #eee;
}

.spectra-intro p:last-child {
	margin-bottom: 0;
}

.project-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 15px;
	background: linear-gradient(180deg, #1e1e1e 0%, #171717 100%);
	border-radius: 2px;
	margin-bottom: 8px;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.04),
		inset 0 -1px 0 rgba(0,0,0,0.2),
		0 1px 2px rgba(0,0,0,0.2);
}

.project-list-item:hover {
	background: linear-gradient(180deg, #252525 0%, #1e1e1e 100%);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.06),
		inset 0 -1px 0 rgba(0,0,0,0.2),
		0 2px 4px rgba(0,0,0,0.3);
}

.project-item-info {
	flex: 1;
}

.project-item-name {
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 4px;
}

.project-item-date {
	color: #555;
	font-size: 11px;
}

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

.project-rename-btn,
.project-delete-btn {
	padding: 6px 10px;
	background: transparent;
	border: 1px solid #333;
	border-radius: 2px;
	color: #888;
	cursor: pointer;
	transition: all 0.2s;
}

.project-rename-btn:hover {
	background: #0b7dda;
	border-color: #0b7dda;
	color: #fff;
}

.project-delete-btn:hover {
	background: #c44;
	border-color: #c44;
	color: #fff;
}

.no-projects,
.loading-text {
	color: #666;
	text-align: center;
	padding: 40px 20px;
	font-size: 14px;
}

.new-project-form {
	padding: 20px 0;
}

.new-project-form label {
	display: block;
	color: #888;
	font-size: 12px;
	margin-bottom: 8px;
}

.new-project-form input {
	width: 100%;
	padding: 12px 15px;
	background: #252525;
	border: 1px solid #444;
	border-radius: 2px;
	color: #fff;
	font-size: 14px;
	margin-bottom: 20px;
	box-sizing: border-box;
}

.new-project-form input:focus {
	outline: none;
	border-color: #0b7dda;
}

.create-project-btn {
	width: 100%;
	padding: 12px 20px;
	background: #0b7dda;
	border: none;
	border-radius: 2px;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s;
}

.create-project-btn:hover {
	background: #3a8eef;
}

/* Support Link in Help */
.support-link {
	color: #ff8570;
	text-decoration: none;
	transition: color 0.2s;
}

.support-link:hover {
	color: #ffb3a7;
}

.support-link i {
	margin-right: 4px;
}

/* ============================================
	MOBILE FALLBACK
	============================================ */
.mobile-fallback {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 40px;
	text-align: center;
	z-index: 999999;
}

.mobile-fallback h1 {
	font-family: 'Sulphur Point', sans-serif;
	font-size: 42px;
	font-weight: 400;
	letter-spacing: 3px;
	color: #fff;
	margin: 0 0 20px 0;
}

.mobile-fallback p {
	color: #888;
	font-size: 16px;
	line-height: 1.6;
	margin: 0 0 15px 0;
	max-width: 300px;
}

.mobile-fallback .icon {
	font-size: 48px;
	color: #0b7dda;
	margin-bottom: 30px;
}

/* ============================================
	EMPTY STATE HINT
	============================================ */
.canvas-empty-hint {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	pointer-events: none;
	z-index: 100;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.canvas-empty-hint.visible {
	opacity: 1;
}

.canvas-empty-hint-text {
	color: #555;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 1px;
	margin-bottom: 8px;
}

.canvas-empty-hint-subtext {
	color: #444;
	font-size: 12px;
}

/* ============================================
	DEMO MODE BADGE
	============================================ */
.demo-mode-badge {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 12px 20px;
	background: rgba(0, 0, 0, 0.85);
	border: 1px solid #333;
	border-radius: 2px;
	z-index: 1000;
	backdrop-filter: blur(10px);
}

.demo-mode-badge span {
	color: #888;
	font-size: 13px;
}

.demo-mode-badge button {
	padding: 8px 16px;
	background: #0b7dda;
	border: none;
	border-radius: 2px;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.2s;
}

.demo-mode-badge button:hover {
	background: #444;
}

/* ============================================
	FIRST-RUN HINTS
	============================================ */
.first-run-hint {
	position: absolute;
	padding: 10px 15px;
	background: rgba(74, 158, 255, 0.95);
	color: #fff;
	font-size: 13px;
	border-radius: 2px;
	pointer-events: none;
	z-index: 1001;
	animation: hint-pulse 2s ease-in-out infinite;
	box-shadow: 0 4px 20px rgba(74, 158, 255, 0.4);
}

.first-run-hint::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid rgba(74, 158, 255, 0.95);
}

@keyframes hint-pulse {
	0%, 100% { transform: translateY(0); opacity: 1; }
	50% { transform: translateY(-5px); opacity: 0.9; }
}

/* ============================================
	SESSION CONNECT OVERLAY
	============================================ */
.session-connect-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #111;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	z-index: 10000;
}

.session-connect-overlay.connecting {
	cursor: default;
}

.session-connect-overlay h1 {
	color: #fff;
	font-size: 48px;
	margin-bottom: 20px;
	font-weight: 400;
	font-family: 'Sulphur Point', sans-serif;
	letter-spacing: 3px;
}

.session-connect-overlay p {
	color: #888;
	font-size: 18px;
	margin-bottom: 30px;
}

.session-connect-overlay p.session-join-status {
	font-size: 16px;
}

.session-connect-overlay p.session-join-substatus {
	color: #666;
	font-size: 13px;
	margin-top: 10px;
	margin-bottom: 0;
}

.session-connect-badge {
	padding: 15px 40px;
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 2px;
	color: #0b7dda;
	font-size: 16px;
}

.session-connect-badge i {
	margin-right: 8px;
}

/* ============================================
	NO PROJECTS / TRY DEMO
	============================================ */
.no-projects-container {
	text-align: center;
	padding: 20px 0;
}

.no-projects {
	color: #888;
	font-size: 13px;
	margin-bottom: 10px;
}

.no-projects.small {
	padding: 10px;
	color: #666;
	font-size: 12px;
}

.try-demo-btn {
	margin: 15px auto;
	display: block;
	padding: 12px 24px;
	background: #0b7dda;
	border: none;
	border-radius: 2px;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}

.try-demo-btn:hover {
	background: #444;
}

.no-projects-hint {
	color: #666;
	font-size: 12px;
	text-align: center;
}

/* ============================================
	PROJECT BUTTONS CONTAINER
	============================================ */
.project-buttons-container {
	display: flex;
	justify-content: center;
	gap: 20px;
	/*margin-top: 15px;*/
	padding-top: 15px;
	/*border-top: 1px solid #222;*/
}

.open-project-file-btn,
.project-sign-in-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	background: transparent;
	border: none;
	padding: 8px 0;
	font-size: 12px;
	cursor: pointer;
	color: #555;
	transition: background 0.2s, color 0.2s;
}

.open-project-file-btn:hover,
.project-sign-in-btn:hover {
	background: #353535;
	color: #fff;
}

.open-project-file-btn i,
.project-sign-in-btn i {
	margin-right: 6px;
}

/* ============================================
	PROJECT MANAGER - GLOBAL TOGGLE
	============================================ */
.global-toggle {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	padding: 2px 6px;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.2s;
}

.global-toggle:hover {
	opacity: 1;
}

.global-toggle input[type="checkbox"] {
	display: none;
}

.global-toggle i {
	font-size: 12px;
	color: #666;
	transition: color 0.2s;
}

.global-toggle input:checked + i {
	color: #0b7dda;
}

/* ============================================
	EDITOR LIST STYLES (tuning/timbre/grid)
	============================================ */
.editor-list-container {
	margin: 0;
	gap: 8px;
	width: 220px;
	right: 40px;
	background: transparent;
	padding: 0 20px;
	top: 30px;
}

.editor-list {
	width: 100%;
	max-height: calc(100vh - 150px);
	overflow-y: auto;
	background: linear-gradient(180deg, #1c1c1c 0%, #161616 100%);
	display: block;
	padding: 0px;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.editor-list-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	cursor: pointer;
	border-bottom: 1px solid #333;
	font-size: 12px;
	transition: background 0.15s;
}

.editor-list-item:last-child {
	border-bottom: none;
}

.editor-list-item:hover {
	background: #2a2a2a;
}

.editor-list-item.selected {
	background: #4a9eff;
	color: #fff;
}

.editor-list-item-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
}

.editor-list-item.is-global {
	border-left: 2px solid #0b7dda;
	padding-left: 8px;
}

/* Category headers for hover submenu system */
.editor-list-category {
	position: relative;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 500;
	color: #aaa;
	background: #1e1e1e;
	border-bottom: 1px solid #333;
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: background 0.15s, color 0.15s;
}

.editor-list-category:hover {
	background: #2a2a2a;
	color: #fff;
}

.editor-list-category-label {
	flex: 1;
}

.editor-list-category::after {
	content: '\f105';
	font-family: 'FontAwesome';
	font-size: 11px;
	color: #666;
	transition: color 0.15s;
	margin-left: 8px;
}

.editor-list-category:hover::after {
	color: #aaa;
}

.editor-list-category.has-selected {
	color: #4a9eff;
}

.editor-list-category.has-selected::after {
	color: #4a9eff;
}

/* Submenu container - uses fixed positioning to escape overflow clipping */
.editor-list-submenu {
	position: fixed;
	top: 0;
	left: auto;
	right: auto;
	min-width: 180px;
	max-width: 250px;
	max-height: 400px;
	overflow-y: auto;
	background: linear-gradient(180deg, #222 0%, #1a1a1a 100%);
	border: 1px solid #444;
	box-shadow: 4px 4px 12px rgba(0,0,0,0.5);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s, visibility 0.15s;
}

.editor-list-submenu.visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Submenu scrollbar */
.editor-list-submenu::-webkit-scrollbar {
	width: 6px;
}

.editor-list-submenu::-webkit-scrollbar-track {
	background: #1a1a1a;
}

.editor-list-submenu::-webkit-scrollbar-thumb {
	background: #444;
	border-radius: 3px;
}

.editor-list-submenu::-webkit-scrollbar-thumb:hover {
	background: #555;
}

/* Items in submenu */
.editor-list-submenu .editor-list-item {
	border-bottom: 1px solid #2a2a2a;
}

.editor-list-submenu .editor-list-item:last-child {
	border-bottom: none;
}

.editor-list-buttons {
	display: flex;
	flex-direction: row;
	gap: 4px;
}

.editor-list-buttons button {
	width: 30px;
	height: 30px;
	border-radius: 0;
	background: #333;
	color: #ccc;
	cursor: pointer;
	margin-top: 5px;
	padding: 6px;
	border: none;
}

.editor-list-buttons button:hover {
	background: #3a3a3a;
	border-color: #777;
}

/* Save Project button in export section */
.save-project-button {
	padding: 10px 20px;
	background: #444;
	border: none;
	border-radius: 2px;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.2s;
}

.save-project-button:hover {
	background: #555;
}

/* Canvas navigation buttons */
.canvas-nav-btn {
	position: absolute;
	padding: 0;
	border: none;
	border-radius: 2px;
	background: #333;
	color: #999;
	font-size: 11px;
	font-weight: bold;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	transition: background 0.15s, color 0.15s;
}

.canvas-nav-btn:hover {
	background: #555;
	color: #fff;
}

.canvas-nav-btn:active {
	background: #666;
}

.canvas-nav-btn i {
	font-size: 8px;
}

/* Keyboard area - navigation arrows */
.canvas-nav-kbd-up,
.canvas-nav-kbd-down {
	left: 40px;
	width: 20px;
	height: 14px;
}

.canvas-nav-kbd-up {
	top: 50px;
}

.canvas-nav-kbd-down {
	bottom: 0;
}

/* Keyboard zoom buttons group - bottom left, stacked */
.canvas-nav-kbd-zoom-group {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 100;
	opacity: 0;
	transition: opacity 0.15s;
}

.canvas-nav-kbd-zoom-in,
.canvas-nav-kbd-zoom-out {
	position: relative;
	left: auto;
	bottom: auto;
	width: 20px;
	height: 14px;
	display: block;
}

/* Show zoom buttons via JS-added class or when hovering the group itself */
.canvas-nav-kbd-zoom-group.visible,
.canvas-nav-kbd-zoom-group:hover {
	opacity: 1;
}

/* Timeline area - navigation arrows */
.canvas-nav-time-left,
.canvas-nav-time-right {
	bottom: 0;
	width: 14px;
	height: 16px;
}

.canvas-nav-time-left {
	left: 60px;
}

.canvas-nav-time-right {
	right: 0;
}

/* Timeline zoom buttons group - together, after left arrow */
.canvas-nav-time-zoom-group {
	position: absolute;
	left: 74px;
	bottom: 0;
	display: flex;
	z-index: 100;
	opacity: 0;
	transition: opacity 0.15s;
}

.canvas-nav-time-zoom-in,
.canvas-nav-time-zoom-out {
	position: relative;
	left: auto;
	bottom: auto;
	width: 14px;
	height: 16px;
}

/* Show zoom buttons via JS-added class or when hovering the group itself */
.canvas-nav-time-zoom-group.visible,
.canvas-nav-time-zoom-group:hover {
	opacity: 1;
}

/* Dynamic timbre keypoint styles */
.timbre-keypoint-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-left: 2px solid #666;
	cursor: pointer;
	transition: background 0.15s;
}

.timbre-keypoint-item:hover {
	background: rgba(255,255,255,0.05);
}

.timbre-keypoint-item.selected {
	background: rgba(74, 158, 255, 0.2);
}

.timbre-keypoint-item .kp-color {
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.timbre-keypoint-item .kp-pitch {
	background: transparent;
	border: 1px solid #444;
	color: #fff;
	padding: 2px 4px;
	border-radius: 2px;
}

.timbre-keypoint-item .kp-partials {
	color: #888;
	font-size: 11px;
	flex: 1;
}

.timbre-keypoint-item .kp-remove {
	background: transparent;
	border: none;
	color: #666;
	font-size: 16px;
	cursor: pointer;
	padding: 2px 8px;
	line-height: 1;
}

.timbre-keypoint-item .kp-remove:hover {
	color: #c66;
}

/* ============================================
	SAVE NOTIFICATION TOAST
	============================================ */
.save-notification {
	position: fixed;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: #1a5c1a;
	color: #fff;
	padding: 10px 24px;
	border-radius: 2px;
	font-size: 14px;
	font-weight: 500;
	z-index: 10000;
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.save-notification.visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.save-notification.error {
	background: #8b2222;
}

/* ============================================
	PROJECT MANAGER - CLOUD/LOCAL SECTIONS
	============================================ */
.project-section {
	margin-bottom: 15px;
}

.project-section-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	color: #888;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
	border-bottom: 1px solid #333;
	margin-bottom: 8px;
}

.project-section-header i {
	font-size: 12px;
}

.cloud-projects .project-section-header {
	color: #0b7dda;
	border-bottom-color: #3a5a7a;
}

.cloud-projects .project-list-item {
	border-left: 2px solid #0b7dda;
}

.local-projects .project-section-header {
	color: #888;
}

.project-move-btn {
	padding: 6px 10px;
	background: transparent;
	border: 1px solid #333;
	border-radius: 2px;
	color: #888;
	cursor: pointer;
	transition: all 0.2s;
}

.cloud-project .project-move-btn:hover {
	background: #2a4a2a;
	border-color: #3a6a3a;
	color: #6c6;
}

.local-project .project-move-btn:hover {
	background: #2a4a6a;
	border-color: #3a5a7a;
	color: #6af;
}

/* Feedback Section - Left Pane Footer */
.feedback-section {
	 margin-top: auto;
	 padding: 10px 15px;
	 border-top: 1px solid #222;
	 position: relative;
	 z-index: 100;
}

.feedback-toggle {
	 background: transparent;
	 border: 1px solid #333;
	 color: #666;
	 padding: 6px 12px;
	 font-size: 12px;
	 cursor: pointer;
	 width: 100%;
	 text-align: left;
	 border-radius: 2px;
}

.feedback-toggle:hover {
	 border-color: #444;
	 color: #888;
	 background: transparent;
}

.feedback-form {
	 margin-top: 10px;
	 position: relative;
	 z-index: 101;
}

.feedback-textarea {
	 width: 100%;
	 height: 80px;
	 background: #1a1a1a;
	 border: 1px solid #333;
	 color: #ccc;
	 padding: 8px;
	 font-size: 12px;
	 font-family: inherit;
	 resize: vertical;
	 border-radius: 2px;
}

.feedback-textarea:focus {
	 border-color: #666;
	 outline: none;
}

.feedback-textarea::placeholder {
	 color: #555;
}

/* Honeypot - hidden from humans */
.feedback-hp {
	 position: absolute;
	 left: -9999px;
	 opacity: 0;
	 height: 0;
	 width: 0;
	 pointer-events: none;
}

.feedback-submit {
	 margin-top: 8px;
	 padding: 6px 16px;
	 font-size: 12px;
	 background: #333;
	 border: none;
	 color: #aaa;
}

.feedback-submit:hover {
	 background: #3a5a8a;
	 color: #fff;
}

.feedback-submit:disabled {
	 opacity: 0.5;
	 cursor: not-allowed;
}

.feedback-status {
	 display: none;
	 margin-top: 8px;
	 padding: 6px 10px;
	 font-size: 11px;
	 border-radius: 2px;
	 position: relative;
	 z-index: 102;
}

.feedback-status.success {
	 background: rgba(74, 158, 100, 0.2);
	 color: #6c6;
}

.feedback-status.error {
	 background: rgba(200, 80, 80, 0.2);
	 color: #c66;
}
/* I/O Flow Diagram */
.io-flow-diagram {
	margin: 0;
	padding: 12px 15px;
	background: #1a1a1a;
	border-bottom: 1px solid #333;
	position: relative;
}

/* Film grain noise overlay for I/O flow diagram */
.io-flow-diagram::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 0;
	opacity: 0.025;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.io-flow-diagram > * {
	position: relative;
	z-index: 1;
}

.io-flow-container {
	 display: flex;
	 align-items: stretch;
	 justify-content: center;
	 gap: 6px;
	 font-size: 11px;
}

.io-flow-inputs,
.io-flow-outputs {
	 display: flex;
	 flex-direction: column;
	 gap: 3px;
	 min-width: 90px;
}

.io-flow-input,
.io-flow-output {
	 padding: 3px 6px;
	 background: #222;
	 border: 1px solid #333;
	 color: #555;
	 text-align: left;
	 font-size: 9px;
}

.io-flow-input .io-flow-label,
.io-flow-output .io-flow-label {
	 color: #666;
	 font-size: 8px;
	 text-transform: uppercase;
	 display: block;
}

.io-flow-input .io-flow-device,
.io-flow-output .io-flow-device {
	 color: #555;
	 font-size: 9px;
}

.io-flow-input.active,
.io-flow-output.active {
	 background: #1a2a3a;
	 border-color: #3a5a8a;
}

.io-flow-input.active .io-flow-label,
.io-flow-output.active .io-flow-label {
	 color: #666;
}

.io-flow-input.active .io-flow-device,
.io-flow-output.active .io-flow-device {
	 color: #8ac;
}

.io-flow-arrow {
	 color: #333;
	 font-size: 14px;
	 display: flex;
	 align-items: center;
	 padding: 0 2px;
}

.io-flow-arrow.active {
	 color: #4a7a9a;
}

.io-flow-core {
	 padding: 10px 16px;
	 background: #252525;
	 border: 1px solid #444;
	 color: #aaa;
	 font-weight: 900;
	 text-align: center;
	 display: flex;
	 align-items: center;
	 justify-content: center;
}

.io-flow-filter {
	 padding: 6px 10px;
	 background: #222;
	 border: 1px solid #333;
	 color: #666;
	 font-size: 9px;
	 text-align: center;
	 min-width: 80px;
	 display: flex;
	 flex-direction: column;
	 justify-content: center;
}

.io-flow-filter.has-filter {
	 border-color: #4a6a4a;
	 background: #1a2a1a;
}

.io-flow-filter.has-filter .io-flow-filter-line {
	 color: #6a8a6a;
}

.io-flow-filter-line {
	 font-size: 9px;
	 color: #555;
	 line-height: 1.4;
}

/* ============================================
	TUTORIAL
	============================================ */

.tutorial-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	pointer-events: none;
}

.tutorial-spotlight {
	position: fixed;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
	border: 2px solid #666;
	border-radius: 2px;
	pointer-events: none;
	transition: all 0.3s ease;
	z-index: 10001;
}

.tutorial-modal {
	position: fixed;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 25px;
	max-width: 350px;
	width: 90%;
	z-index: 10002;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	pointer-events: auto;
}

.tutorial-title {
	color: #fff;
	font-size: 18px;
	font-weight: 500;
	margin-bottom: 15px;
}

.tutorial-content {
	color: #aaa;
	font-size: 13px;
	line-height: 1.6;
	margin-bottom: 20px;
}

.tutorial-content p {
	margin: 0 0 10px 0;
}

.tutorial-content p:last-child {
	margin-bottom: 0;
}

.tutorial-content b {
	color: #fff;
}

.tutorial-content ul {
	margin: 10px 0;
	padding-left: 20px;
}

.tutorial-content li {
	margin: 5px 0;
}

.tutorial-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 15px;
	border-top: 1px solid #333;
}

.tutorial-progress {
	color: #555;
	font-size: 12px;
}

.tutorial-buttons {
	display: flex;
	gap: 10px;
}

.tutorial-btn-primary,
.tutorial-btn-secondary {
	padding: 8px 16px;
	border: none;
	border-radius: 2px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s;
}

.tutorial-btn-primary {
	background: #ff9500;
	color: #fff;
}

.tutorial-btn-primary:hover {
	background: #ffb340;
}

.tutorial-btn-secondary {
	background: #333;
	color: #aaa;
}

.tutorial-btn-secondary:hover {
	background: #444;
	color: #fff;
}

/* ============================================
   KNOWLEDGE ASSESSMENT
   ============================================ */

.knowledge-assessment-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.knowledge-assessment-overlay.visible {
	opacity: 1;
}

.knowledge-assessment-overlay.hiding {
	opacity: 0;
}

.knowledge-assessment-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(180deg, rgba(15, 15, 15, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
}

.knowledge-assessment-modal {
	position: relative;
	z-index: 1;
	background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
	border: 1px solid #333;
	border-radius: 3px;
	padding: 20px 25px;
	max-width: 500px;
	width: 90%;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.knowledge-assessment-modal.transitioning {
	opacity: 0.7;
	transform: scale(0.98);
}

.knowledge-assessment-options {
	display: flex;
	gap: 12px;
}

.knowledge-assessment-option {
	flex: 1;
	padding: 14px 12px;
	background: linear-gradient(180deg, #2a5a2a 0%, #1e4a1e 100%);
	border: 1px solid #3a6a3a;
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
	color: #adc9ad;
	font-size: 13px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.05),
		0 2px 4px rgba(0, 0, 0, 0.2);
}

.knowledge-assessment-option:hover {
	background: linear-gradient(180deg, #3a6a3a 0%, #2a5a2a 100%);
	border-color: #4a7a4a;
	color: #cec;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.08),
		0 4px 12px rgba(0, 0, 0, 0.3);
}

.knowledge-assessment-option:active {
	transform: scale(0.98);
}

.knowledge-assessment-option.selected {
	background: linear-gradient(180deg, #4a8a4a 0%, #3a7a3a 100%);
	border-color: #5a9a5a;
	color: #fff;
}

/* Microtonal window - blue/teal shade */
.window-microtonal .knowledge-assessment-option {
	background: linear-gradient(180deg, #2a4a5a 0%, #1e3a4a 100%);
	border-color: #3a5a6a;
	color: #adc0c9;
}

.window-microtonal .knowledge-assessment-option:hover {
	background: linear-gradient(180deg, #3a5a6a 0%, #2a4a5a 100%);
	border-color: #4a6a7a;
	color: #cee;
}

.window-microtonal .knowledge-assessment-option.selected {
	background: linear-gradient(180deg, #4a7a8a 0%, #3a6a7a 100%);
	border-color: #5a8a9a;
	color: #fff;
}

.knowledge-assessment-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 15px;
	padding-top: 12px;
	border-top: 1px solid #2a2a2a;
}

.knowledge-assessment-progress {
	color: #555;
	font-size: 12px;
}

.knowledge-assessment-skip {
	padding: 8px 16px;
	background: transparent;
	border: 1px solid #333;
	border-radius: 2px;
	color: #666;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.knowledge-assessment-skip:hover {
	background: #222;
	border-color: #444;
	color: #888;
}

/* ============================================
   TRACK CONTROLS - Compact Layout & Vol/Pan
   ============================================ */

/* Compact track styling - override existing rules */
main .pane .pane-instrument {
	padding: 6px 14px 8px;
}

main .pane .pane-instrument-name {
	font-size: 12px;
	margin-bottom: 6px;
}

main .pane .pane-instrument-spectrum {
	padding: 4px 5px;
	font-size: 12px;
}

main .pane .pane-instrument-close {
	top: 8px;
}

/* Track controls container */
.track-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
	padding-top: 6px;
}

.track-volume-container {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
}

.track-volume-slider-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 50px;
}

.track-volume-slider {
	width: 100%;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: #333;
	border-radius: 2px;
	outline: none !important;
	cursor: pointer;
	border-left: none !important;
	padding: 0 !important;
}

.track-volume-slider::-webkit-slider-runnable-track {
	height: 4px;
	background: #333;
	border-radius: 2px;
}

.track-volume-slider::-moz-range-track {
	height: 4px;
	background: #333;
	border-radius: 2px;
}

.track-volume-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 10px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s;
	margin-top: -3px;
}

.track-volume-slider::-webkit-slider-thumb:hover { background: #aaa; }

.track-volume-slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	border: none;
	transition: background 0.15s;
}

.track-volume-slider::-moz-range-thumb:hover { background: #aaa; }

.track-volume-meter {
	height: 3px;
	background: #1a1a1a;
	border-radius: 1px;
	overflow: hidden;
	margin-left: 2px;
	margin-right: -2px;
}

.track-volume-meter-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(to right, #4a4, #aa4 70%, #a44 90%);
	background-size: 50px 100%;
	transition: width 0.05s ease-out;
	border-radius: 1px;
}

.track-volume-value,
.track-pan-value {
	font-size: 9px;
	color: #666;
	font-family: monospace;
}

.track-volume-value { width: 28px; text-align: right; }
.track-pan-value { min-width: 24px; width: 24px; text-align: center; }

.track-pan-container {
	display: flex;
	align-items: center;
	gap: 4px;
}

.track-pan-slider {
	width: 50px;
	height: 6px;
	-webkit-appearance: none;
	appearance: none;
	background: linear-gradient(to right, #333 0%, #555 50%, #333 100%);
	border-radius: 2px;
	outline: none !important;
	cursor: pointer;
	border-left: none !important;
	padding: 0 !important;
}

.track-pan-slider::-webkit-slider-runnable-track {
	height: 6px;
	background: linear-gradient(to right, #333 0%, #555 50%, #333 100%);
	border-radius: 2px;
}

.track-pan-slider::-moz-range-track {
	height: 6px;
	background: linear-gradient(to right, #333 0%, #555 50%, #333 100%);
	border-radius: 2px;
}

.track-pan-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 10px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s;
	margin-top: -2px;
}

.track-pan-slider::-webkit-slider-thumb:hover { background: #aaa; }

.track-pan-slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	background: #888;
	border-radius: 50%;
	cursor: pointer;
	border: none;
	transition: background 0.15s;
}

.track-pan-slider::-moz-range-thumb:hover { background: #aaa; }

/* ============================================
   TIMBRE EDITOR - Per-Partial Panning
   ============================================ */

/* Side-by-side container for envelope and pan */
.timbre-adsr-pan-row {
	display: flex;
	gap: 12px;
	margin-top: 15px;
}

.timbre-adsr-pan-row > .timbre-envelope-section,
.timbre-adsr-pan-row > .timbre-partial-pan-section {
	flex: 1;
	min-width: 0;
	margin: 0;
	border-top: none;
}

/* Timbre section common styles */
.timbre-envelope-section {
	padding: 12px;
	background: rgba(255,255,255,0.02);
	border-radius: 2px;
}

.timbre-section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.timbre-section-title {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.timbre-section-toggle {
	display: flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	font-size: 10px;
	color: #666;
}

.timbre-envelope-canvas {
	background: #111;
	border-radius: 2px;
	margin-bottom: 10px;
	display: block;
	/* Width/height controlled by JavaScript setupCanvasResize */
}

.timbre-env-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	margin-bottom: 10px;
}

.timbre-env-input {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.timbre-env-input label {
	font-size: 9px;
	color: #555;
	text-transform: uppercase;
}

.timbre-env-input input {
	width: 100%;
	padding: 4px;
	font-size: 10px;
	background: #1a1a1a;
	border: 1px solid #333;
	color: #ccc;
	border-radius: 2px;
}

.timbre-partial-envelopes {
	border-top: 1px solid #222;
	padding-top: 8px;
}

.timbre-env-override-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.timbre-env-override-header span {
	font-size: 10px;
	color: #555;
}

.timbre-env-add-override {
	padding: 2px 6px;
	font-size: 10px;
	background: #222;
	border: 1px solid #333;
	color: #888;
	cursor: pointer;
	border-radius: 2px;
}

.timbre-env-add-override:hover {
	background: #333;
	color: #ccc;
}

.timbre-env-overrides-list {
	max-height: 120px;
	overflow-y: auto;
}

.timbre-env-no-overrides {
	font-size: 10px;
	color: #444;
}

/* Override rows - match ADSR grid structure */
.env-override-row {
	display: grid;
	grid-template-columns: repeat(5, 1fr) 24px;
	gap: 6px;
	align-items: end;
	padding: 6px 0;
	border-bottom: 1px solid #222;
}

.env-override-row .timbre-env-input {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.env-override-row .timbre-env-input label {
	font-size: 9px;
	color: #555;
	text-transform: uppercase;
}

.env-override-row .timbre-env-input input {
	width: 100%;
	padding: 4px;
	font-size: 10px;
	background: #1a1a1a;
	border: 1px solid #333;
	color: #ccc;
	border-radius: 2px;
	box-sizing: border-box;
	height: 24px;
}

.env-override-row .timbre-env-input input:focus {
	border-color: #4a7a9e;
	outline: none;
}

.env-override-row .override-remove {
	width: 24px;
	height: 24px;
	padding: 0 !important;
	margin: 0 !important;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	border: 1px solid #333 !important;
	color: #555;
	cursor: pointer;
	border-radius: 2px;
	box-sizing: border-box;
	position: relative;
	top: -5px;
}

.env-override-row .override-remove:hover {
	background: #2a1515 !important;
	border-color: #553333 !important;
	color: #c66;
}

/* L/R distribution visualization */
.partial-lr-distribution {
	margin-top: 12px;
	padding: 8px;
	background: #111;
	border-radius: 2px;
	position: relative;
}

.partial-lr-bar {
	height: 24px;
	background: #1a1a1a;
	border-radius: 2px;
	position: relative;
}

.partial-lr-bar::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 1px;
	background: #333;
	z-index: 1;
}

.partial-lr-dot {
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	opacity: 0.85;
	border: 1px solid rgba(255,255,255,0.2);
}

.partial-lr-labels {
	display: flex;
	justify-content: space-between;
	font-size: 9px;
	color: #444;
	margin-top: 3px;
	position: relative;
}

.partial-lr-labels span:nth-child(2) {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.partial-pan-curve-labels {
	display: flex;
	justify-content: space-between;
	font-size: 9px;
	color: #555;
	margin-top: 2px;
}

.timbre-partial-pan-section {
	margin-top: 0;
	padding: 12px;
	background: rgba(255,255,255,0.02);
	border-radius: 2px;
}

.timbre-partial-pan-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.timbre-partial-pan-title {
	font-size: 12px;
	color: #888;
}

.timbre-partial-pan-mode {
	display: flex;
	gap: 4px;
}

.timbre-partial-pan-mode button {
	padding: 3px 8px;
	font-size: 10px;
	background: linear-gradient(180deg, #282828 0%, #1e1e1e 100%);
	border: 1px solid #252525;
	color: #888;
	cursor: pointer;
	border-radius: 2px;
}

.timbre-partial-pan-mode button.active {
	background: linear-gradient(180deg, #1090e0 0%, #0b7dda 100%);
	border-color: #0b7dda;
	color: #fff;
}

.timbre-partial-pan-mode button:hover:not(.active) {
	background: #333;
	color: #ccc;
}

.partial-pan-spread-container {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
}

.partial-pan-spread-label {
	display: none;
}

.partial-pan-spread-slider {
	flex: 1;
	height: 4px;
	-webkit-appearance: none;
	background: linear-gradient(to right, #4a4a9e 0%, #333 50%, #9e4a4a 100%) !important;
	border-radius: 2px;
	outline: none !important;
	cursor: pointer;
	border: none !important;
}

.partial-pan-spread-slider:focus,
.partial-pan-spread-slider:hover {
	background: linear-gradient(to right, #4a4a9e 0%, #333 50%, #9e4a4a 100%) !important;
	border: none !important;
	border-left-color: transparent !important;
}

.partial-pan-spread-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px;
	height: 12px;
	background: #fff;
	border-radius: 50%;
	cursor: pointer;
	margin-top: -4px;
}

.partial-pan-spread-slider::-moz-range-thumb {
	width: 12px;
	height: 12px;
	background: #fff;
	border-radius: 50%;
	border: none;
}

.partial-pan-spread-value {
	font-size: 10px;
	color: #888;
	width: 40px;
	text-align: right;
	font-family: monospace;
}

.partial-pan-curve-canvas {
	width: 100%;
	height: 150px;
	background: #1a1a1a;
	border-radius: 2px;
	cursor: crosshair;
	display: block;
}

.partial-pan-rule-btn {
	display: block;
	width: 100%;
	margin-bottom: 4px;
	padding: 6px 10px;
	text-align: left;
	font-size: 11px;
	background: #222;
	border: 1px solid #333;
	color: #888;
	cursor: pointer;
	border-radius: 2px;
}

.partial-pan-rule-btn:hover { background: #2a2a2a; color: #ccc; }
.partial-pan-rule-btn.active {
	background: #2a4a6a;
	border-color: #666;
	color: #fff;
}

/* ============================================
   I/O OUTPUT - Spatial Imager
   ============================================ */

.spatial-imager-section {
	margin: 20px 0;
	padding: 15px;
	background: rgba(255,255,255,0.03);
	border-radius: 2px;
}

.spatial-imager-title {
	margin: 0 0 12px 0;
	color: #aaa;
	font-size: 13px;
}

.spatial-imager-canvas-container {
	position: relative;
	width: 100%;
	height: 180px;
	background: #1a1a1a;
	border-radius: 2px;
	overflow: hidden;
}

.spatial-imager-canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.spatial-imager-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}

.spatial-imager-zones-label {
	font-size: 11px;
	color: #888;
}

.spatial-imager-zones-select {
	padding: 4px 8px;
	font-size: 11px;
	background: #222;
	border: 1px solid #444;
	color: #ccc;
	border-radius: 2px;
}

.spatial-imager-reset-btn {
	padding: 4px 10px;
	font-size: 10px;
	background: #333;
	border: 1px solid #444;
	color: #888;
	cursor: pointer;
	border-radius: 2px;
	margin-left: auto;
}

.spatial-imager-reset-btn:hover { background: #444; color: #ccc; }

.spatial-imager-zone-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px solid #252525;
}

.spatial-imager-zone-row:last-child { border-bottom: none; }

.spatial-imager-zone-color {
	width: 12px;
	height: 12px;
	border-radius: 2px;
}

.spatial-imager-zone-range {
	font-size: 10px;
	color: #666;
	font-family: monospace;
	width: 80px;
}

.spatial-imager-zone-output {
	flex: 1;
	padding: 4px 8px;
	font-size: 11px;
	background: #222;
	border: 1px solid #333;
	color: #ccc;
	border-radius: 2px;
}

/* ============================================
   UTILITY CLASSES
   Extracted from inline styles for cleaner HTML
   ============================================ */

/* Display utilities */
.u-hidden { display: none !important; }
.u-block { display: block; }
.u-inline-block { display: inline-block; }
.u-flex { display: flex; }
.u-flex-center { display: flex; align-items: center; }
.u-flex-gap-8 { display: flex; gap: 8px; }
.u-flex-gap-10 { display: flex; gap: 10px; }

/* Margin utilities */
.u-mt-0 { margin-top: 0; }
.u-mt-8 { margin-top: 8px; }
.u-mt-10 { margin-top: 10px; }
.u-mt-15 { margin-top: 15px; }
.u-mt-20 { margin-top: 20px; }
.u-mb-0 { margin-bottom: 0; }
.u-mb-8 { margin-bottom: 8px; }
.u-mb-10 { margin-bottom: 10px; }
.u-mb-12 { margin-bottom: 12px; }
.u-my-8 { margin-top: 8px; margin-bottom: 8px; }
.u-my-15 { margin-top: 15px; margin-bottom: 15px; }
.u-my-20 { margin-top: 20px; margin-bottom: 20px; }
.u-m-0 { margin: 0; }

/* Padding utilities */
.u-p-10 { padding: 10px; }
.u-p-12 { padding: 12px; }
.u-p-15 { padding: 15px; }
.u-py-5 { padding-top: 5px; padding-bottom: 5px; }
.u-py-8 { padding-top: 8px; padding-bottom: 8px; }

/* Text utilities */
.u-text-muted { color: #666; }
.u-text-subtle { color: #888; }
.u-text-light { color: #aaa; }
.u-text-accent { color: #4a9eff; }
.u-text-warning { color: #fa0; }
.u-text-xs { font-size: 10px; }
.u-text-sm { font-size: 11px; }
.u-text-md { font-size: 12px; }
.u-text-normal { font-weight: normal; }
.u-text-bold { font-weight: bold; }
.u-text-mono { font-family: monospace; }

/* Background utilities */
.u-bg-subtle { background: rgba(255,255,255,0.03); }
.u-bg-darker { background: rgba(0,0,0,0.3); }
.u-bg-info { background: rgba(74, 158, 255, 0.05); }

/* Border utilities */
.u-border-subtle { border: 1px solid rgba(255,255,255,0.1); }
.u-border-info { border: 1px solid rgba(74, 158, 255, 0.2); }
.u-border-top { border-top: 1px solid #444; }
.u-rounded { border-radius: 2px; }

/* Width utilities */
.u-w-full { width: 100%; }
.u-min-w-200 { min-width: 200px; }
.u-min-w-220 { min-width: 220px; }
.u-min-w-250 { min-width: 250px; }

/* Cursor utilities */
.u-cursor-pointer { cursor: pointer; }

/* Common component patterns */
.setup-panel {
	margin: 20px 0;
	padding: 15px;
	background: rgba(255,255,255,0.03);
	border-radius: 2px;
}

.setup-panel-info {
	margin: 20px 0;
	padding: 15px;
	background: rgba(74, 158, 255, 0.05);
	border: 1px solid rgba(74, 158, 255, 0.2);
	border-radius: 2px;
}

.setup-panel-bordered {
	margin: 20px 0;
	padding: 15px;
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 2px;
}

.code-block {
	display: block;
	font-family: monospace;
	font-size: 11px;
	color: #6c6;
	line-height: 1.6;
	white-space: pre;
	overflow-x: auto;
}

.code-inline {
	background: #333;
	padding: 2px 5px;
	border-radius: 2px;
	color: #fa0;
}

.no-items-message {
	color: #666;
	font-size: 12px;
	padding: 8px 0;
}

.activity-indicator {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #333;
	transition: background 0.1s;
}

.export-options-panel {
	display: none;
	margin-top: 15px;
	padding: 10px;
	background: rgba(255,255,255,0.05);
	border-radius: 2px;
}

/* Horizontal rule style */
.hr-subtle {
	border-color: #444;
	margin: 8px 0;
}

/* ===== Spectra Dialog System ===== */
.spectra-dialog-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.15s;
}

.spectra-dialog-overlay.visible {
	opacity: 1;
}

.spectra-dialog {
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 20px;
	min-width: 280px;
	max-width: 400px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.spectra-dialog.prompt {
	min-width: 320px;
}

.spectra-dialog-title {
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 12px;
}

.spectra-dialog-message {
	color: #aaa;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 12px;
	white-space: pre-wrap;
}

.spectra-dialog.confirm .spectra-dialog-message {
	margin-bottom: 20px;
}

.spectra-dialog-input {
	width: 100%;
	padding: 8px 10px;
	background: #111;
	border: 1px solid #444;
	border-radius: 2px;
	color: #fff;
	font-size: 13px;
	margin-bottom: 16px;
	box-sizing: border-box;
	outline: none;
}

.spectra-dialog-input:focus {
	border-color: #0b7dda;
}

.spectra-dialog-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.spectra-dialog-btn {
	padding: 8px 16px;
	border: none;
	border-radius: 2px;
	cursor: pointer;
	font-size: 13px;
	transition: background 0.1s, color 0.1s;
}

.spectra-dialog-btn-secondary {
	background: #333;
	color: #aaa;
}

.spectra-dialog-btn-secondary:hover {
	background: #444;
	color: #fff;
}

.spectra-dialog-btn-primary {
	background: #0b7dda;
	color: #fff;
}

.spectra-dialog-btn-primary:hover {
	background: #0d8def;
}

.spectra-dialog-btn-danger {
	background: #c44;
	color: #fff;
}

.spectra-dialog-btn-danger:hover {
	background: #d55;
}

/* ===== Spectra Status Notifications ===== */
.spectra-status-notification {
	position: fixed;
	bottom: 80px;
	left: 50%;
	transform: translateX(-50%);
	background: #1a1a1a;
	border: 1px solid #333;
	border-left: 3px solid #0b7dda;
	color: #aaa;
	padding: 10px 16px;
	border-radius: 2px;
	font-size: 13px;
	z-index: 10002;
	max-width: 400px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.5);
	opacity: 0;
	transition: opacity 0.15s;
	cursor: pointer;
}

.spectra-status-notification.visible {
	opacity: 1;
}

.spectra-status-notification.not-dismissible {
	cursor: default;
}

.spectra-status-success { border-left-color: #30a456; }
.spectra-status-error { border-left-color: #c44; }
.spectra-status-warning { border-left-color: #b90; }
.spectra-status-info { border-left-color: #0b7dda; }

/* ===== MIDI UI Components ===== */
.midi-help-warning {
	padding: 12px;
	margin: 10px 0;
	background: #432;
	border: 1px solid #854;
	border-radius: 2px;
	color: #fca;
}

.midi-help-info {
	padding: 10px;
	margin: 10px 0;
	background: #442;
	border: 1px solid #664;
	border-radius: 2px;
	color: #ffa;
}

.midi-device-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px;
	background: rgba(0,0,0,0.2);
	border-radius: 2px;
	margin: 4px 0;
}

.midi-device-name {
	font-size: 12px;
	color: #fff;
}

.midi-activity-indicator {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #333;
	margin: 0 8px;
	transition: background 0.1s;
}

.midi-activity-indicator.active { background: #0f0; }

.midi-remove-btn {
	background: transparent;
	border: none;
	color: #f66;
	font-size: 16px;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}

.midi-remove-btn:hover { color: #f88; }

.midi-remove-btn-subtle {
	background: none;
	border: none;
	color: #888;
	font-size: 16px;
	cursor: pointer;
	padding: 0 4px;
}

.midi-remove-btn-subtle:hover { color: #aaa; }

.midi-mapping-label {
	display: flex;
	align-items: center;
	margin: 5px 0;
	cursor: pointer;
}

.midi-color-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 8px;
}

.midi-permission-help { }
.midi-permission-help.error { color: #f96; }
.midi-permission-help.warning { color: #fc6; }

.midi-retry-btn {
	background: #654;
	border: 1px solid #876;
	color: #fed;
	padding: 8px 16px;
	border-radius: 2px;
	cursor: pointer;
	margin-top: 8px;
}

.midi-retry-btn:hover {
	background: #765;
}

/* ===== Setup Export Dialog ===== */
.setup-dialog-title {
	margin: 0 0 8px 0;
	color: #fff;
	font-size: 18px;
}

.setup-dialog-subtitle {
	margin: 0 0 20px 0;
	color: #888;
	font-size: 13px;
}

.export-format-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.export-btn {
	padding: 12px 16px;
	border: 1px solid #444;
	border-radius: 2px;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s;
	background: #2a2a2a;
}

.export-btn:hover {
	background: #3a3a3a;
}

.export-btn.primary {
	background: #0b7dda;
	border: none;
}

.export-btn.primary:hover {
	background: #0d8def;
}

.export-btn-hint {
	color: rgba(255,255,255,0.5);
	margin-left: 8px;
}

.export-btn.primary .export-btn-hint {
	color: rgba(255,255,255,0.7);
}

.export-cancel {
	margin-top: 16px;
	width: 100%;
}

/* ===== Setup Form Elements ===== */
.setup-form-group {
	margin-bottom: 16px;
}

.setup-form-label {
	display: block;
	color: #aaa;
	font-size: 12px;
	margin-bottom: 6px;
}

.setup-form-input {
	width: 100%;
	padding: 8px 12px;
	background: #222;
	border: 1px solid #444;
	border-radius: 2px;
	color: #fff;
	font-size: 14px;
	box-sizing: border-box;
}

.setup-form-input:focus {
	border-color: #0b7dda;
	outline: none;
}

.setup-form-hint {
	display: block;
	color: #666;
	font-size: 11px;
	margin-top: 4px;
}

.setup-btn-row {
	display: flex;
	gap: 10px;
}

.setup-btn-row .btn-flex {
	flex: 1;
}

/* ===== Project List Items ===== */
.project-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	background: rgba(0,0,0,0.2);
	border-radius: 2px;
	margin: 4px 0;
}

.project-item:hover {
	background: rgba(255,255,255,0.05);
}

.project-item-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.project-item-name {
	font-size: 13px;
	color: #fff;
}

.project-item-date {
	font-size: 11px;
	color: #666;
}

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

.project-item-btn {
	padding: 4px 10px;
	border: 1px solid #444;
	border-radius: 2px;
	background: transparent;
	color: #888;
	font-size: 11px;
	cursor: pointer;
}

.project-item-btn:hover {
	background: #333;
	color: #fff;
}

.project-item-btn.project-load {
	border-color: #0b7dda;
	color: #0b7dda;
}

.project-item-btn.project-load:hover {
	background: #0b7dda;
	color: #fff;
}

/* ============================================
   INTERACTIVE TUTORIAL
   ============================================ */

.interactive-tutorial-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 10000;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.interactive-tutorial-overlay.visible {
	opacity: 1;
}

.interactive-tutorial-overlay.hiding {
	opacity: 0;
}

.interactive-tutorial-modal {
	position: fixed;
	top: 50%;
	right: 20px;
	transform: translateY(-50%);
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 20px;
	width: 340px;
	color: #ccc;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	pointer-events: auto;
}

.interactive-tutorial-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.interactive-tutorial-progress {
	font-size: 11px;
	color: #555;
	letter-spacing: 0.5px;
}

.interactive-tutorial-nav-buttons {
	display: flex;
	gap: 6px;
}

.interactive-tutorial-back,
.interactive-tutorial-skip {
	padding: 4px 10px;
	background: #333;
	border: none;
	border-radius: 2px;
	color: #aaa;
	font-size: 10px;
	cursor: pointer;
	transition: all 0.2s;
}

.interactive-tutorial-back:hover,
.interactive-tutorial-skip:hover {
	background: #444;
	color: #fff;
}

.interactive-tutorial-back {
	padding: 4px 8px;
}

.interactive-tutorial-prompt {
	font-family: 'Sulphur Point', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #fff;
	line-height: 1.5;
	margin-bottom: 10px;
	transition: color 0.3s ease;
}

.interactive-tutorial-prompt.completed {
	color: #4a9;
}

.interactive-tutorial-hint {
	font-size: 12px;
	color: #666;
	line-height: 1.5;
	margin-bottom: 16px;
	min-height: 18px;
}

.interactive-tutorial-hint.explanation {
	color: #888;
	font-style: italic;
}

.interactive-tutorial-footer {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid #2a2a2a;
}

.interactive-tutorial-waiting {
	font-size: 11px;
	color: #555;
	font-style: italic;
}

.interactive-tutorial-btn {
	padding: 8px 16px;
	border: none;
	border-radius: 2px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.2s;
}

.interactive-tutorial-btn.primary {
	background: #ff9500;
	color: #fff;
}

.interactive-tutorial-btn.primary:hover {
	background: #ffb340;
}

.interactive-tutorial-btn.secondary {
	background: #333;
	color: #aaa;
}

.interactive-tutorial-btn.secondary:hover {
	background: #444;
	color: #fff;
}

/* Highlight effect for target elements - strong dashed outline */
.interactive-tutorial-highlight {
	position: relative;
	z-index: 100;
}

.interactive-tutorial-highlight::before {
	content: '';
	position: absolute;
	top: -6px;
	left: -6px;
	right: -6px;
	bottom: -6px;
	border: 3px dashed #ff9500;
	border-radius: 6px;
	pointer-events: none;
	animation: interactive-tutorial-dashed-pulse 1.5s ease-in-out infinite;
}

/* SELECT and INPUT elements don't support ::before, use outline instead */
select.interactive-tutorial-highlight,
input.interactive-tutorial-highlight {
	outline: 3px dashed #ff9500 !important;
	outline-offset: 3px;
	animation: interactive-tutorial-outline-pulse 1.5s ease-in-out infinite;
}

@keyframes interactive-tutorial-outline-pulse {
	0%, 100% {
		outline-color: rgba(255, 149, 0, 0.6);
		border-color: rgba(255, 149, 0, 0.6);
	}
	50% {
		outline-color: rgba(255, 149, 0, 1);
		border-color: rgba(255, 149, 0, 1);
	}
}

@keyframes interactive-tutorial-dashed-pulse {
	0%, 100% {
		opacity: 0.4;
		border-color: #ff9500;
	}
	50% {
		opacity: 1;
		border-color: #ffb340;
	}
}

/* Visual guide system for steps 1-5 - Professional, subtle indicators */
.interactive-tutorial-visual-guide {
	position: fixed;
	z-index: 10001;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.interactive-tutorial-visual-guide.visible {
	opacity: 1;
}

/* Shared text label style */
.visual-guide-text {
	padding: 8px 16px;
	background: rgba(20, 20, 20, 0.95);
	border: 1px solid rgba(255, 149, 0, 0.6);
	border-radius: 4px;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.3px;
	white-space: nowrap;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Pointer visual guide - simple ring indicator */
.visual-guide-pointer {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.visual-guide-hand {
	width: 48px;
	height: 48px;
	border: 2px solid rgba(255, 149, 0, 0.8);
	border-radius: 50%;
	position: relative;
	animation: visual-guide-ring-pulse 2s ease-in-out infinite;
}

.visual-guide-hand::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	background: #ff9500;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

.visual-guide-hand::after {
	content: '';
	position: absolute;
	top: -8px;
	left: -8px;
	right: -8px;
	bottom: -8px;
	border: 1px solid rgba(255, 149, 0, 0.3);
	border-radius: 50%;
	animation: visual-guide-ring-expand 2s ease-out infinite;
}

@keyframes visual-guide-ring-pulse {
	0%, 100% { opacity: 0.6; }
	50% { opacity: 1; }
}

@keyframes visual-guide-ring-expand {
	0% {
		transform: scale(1);
		opacity: 0.5;
	}
	100% {
		transform: scale(1.5);
		opacity: 0;
	}
}

.visual-guide-pointer .visual-guide-text {
	margin-top: 16px;
}

/* Key visual guide - clean keycap */
.visual-guide-key {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.visual-guide-keycap {
	width: 52px;
	height: 52px;
	background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
	border: 1px solid #555;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 20px;
	font-weight: 600;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	box-shadow: 0 2px 0 #111, 0 4px 12px rgba(0, 0, 0, 0.4);
	animation: visual-guide-key-glow 2s ease-in-out infinite;
}

@keyframes visual-guide-key-glow {
	0%, 100% {
		box-shadow: 0 2px 0 #111, 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 rgba(255, 149, 0, 0);
	}
	50% {
		box-shadow: 0 2px 0 #111, 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 149, 0, 0.3);
	}
}

.visual-guide-key-text {
	margin-top: 14px;
	padding: 8px 16px;
	background: rgba(20, 20, 20, 0.95);
	border: 1px solid rgba(255, 149, 0, 0.6);
	border-radius: 4px;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.3px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Drag visual guide - simple selection box */
.visual-guide-drag {
	position: relative;
	width: 80px;
	height: 50px;
}

.visual-guide-drag-box {
	width: 80px;
	height: 50px;
	border: 2px dashed rgba(255, 149, 0, 0.7);
	border-radius: 3px;
	background: rgba(255, 149, 0, 0.05);
	animation: visual-guide-box-pulse 2s ease-in-out infinite;
}

.visual-guide-drag .visual-guide-text {
	position: absolute;
	top: 60px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
}

@keyframes visual-guide-box-pulse {
	0%, 100% {
		opacity: 0.5;
		border-color: rgba(255, 149, 0, 0.5);
	}
	50% {
		opacity: 1;
		border-color: rgba(255, 149, 0, 0.9);
	}
}

/* Final completion overlay */
.interactive-tutorial-completion-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10002;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.interactive-tutorial-completion-overlay.visible {
	opacity: 1;
}

.interactive-tutorial-completion-modal {
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 40px 50px;
	text-align: center;
	max-width: 400px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.completion-icon {
	width: 70px;
	height: 70px;
	margin: 0 auto 20px;
	background: linear-gradient(135deg, #4a9 0%, #2a7 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	color: #fff;
}

.interactive-tutorial-completion-modal h2 {
	color: #fff;
	font-size: 22px;
	font-weight: 500;
	margin: 0 0 16px 0;
}

.interactive-tutorial-completion-modal p {
	color: #888;
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 12px 0;
}

.interactive-tutorial-completion-modal .completion-hint {
	color: #666;
	font-size: 13px;
	margin-bottom: 24px;
}

.interactive-tutorial-completion-modal .completion-hint strong {
	color: #aaa;
}

.completion-close {
	padding: 12px 28px;
	font-size: 14px;
}