/* =========================================================
   Structurator Web -- style.css
   Dark DAW-like theme, mobile-first responsive
   ========================================================= */

/* --- Utility --- */
.hidden {
	display: none !important;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	/* Backgrounds */
	--bg-primary: #121212;
	--bg-secondary: #1e1e1e;
	--bg-tertiary: #2a2a2a;
	--bg-elevated: #333333;
	--bg-waveform: #0d0d0d;

	/* Accent */
	--accent-primary: #e53935;
	--accent-primary-hover: #ff5252;
	--accent-primary-active: #c62828;
	--accent-secondary: #ffffff;
	--accent-danger: #ff1744;
	--accent-warning: #ffd740;

	/* Section colors */
	--section-intro: #7c4dff;
	--section-verse: #00bfa5;
	--section-prechorus: #26c6da;
	--section-chorus: #ff6d00;
	--section-bridge: #448aff;
	--section-instrumental: #ffab40;
	--section-outro: #78909c;
	--section-solo: #e040fb;
	--section-custom: #bdbdbd;

	/* Text */
	--text-primary: #e0e0e0;
	--text-secondary: #9e9e9e;
	--text-disabled: #616161;
	--text-inverse: #121212;

	/* Waveform */
	--waveform-color: #e53935;
	--waveform-unplayed: #3d3d3d;
	--cursor-color: #ffffff;
	--cursor-width: 2px;
	--marker-color: #ffd740;
	--marker-width: 2px;

	/* Borders */
	--border-subtle: #2a2a2a;
	--border-focus: #e53935;
	--border-divider: #333333;

	/* Spacing */
	--space-xs: 4px;
	--space-sm: 8px;
	--space-md: 12px;
	--space-lg: 16px;
	--space-xl: 24px;
	--space-2xl: 32px;
	--space-3xl: 48px;

	/* Radius */
	--radius-sm: 4px;
	--radius-md: 6px;
	--radius-lg: 8px;
	--radius-xl: 12px;
	--radius-full: 50%;

	/* Shadows */
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
	--shadow-accent: 0 2px 8px rgba(124, 77, 255, 0.3);

	/* Typography */
	--font-sans: "Inter", system-ui, -apple-system, sans-serif;
	--font-mono: "JetBrains Mono", "Consolas", "Monaco", monospace;

	/* Transitions */
	--transition-fast: 100ms ease;
	--transition-base: 150ms ease;
	--transition-slow: 300ms ease;
}

html {
	font-size: 14px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-sans);
	background: var(--bg-primary);
	color: var(--text-primary);
	line-height: 1.5;
	height: 100vh;
	overflow: hidden;
}

/* --- Focus visible --- */
:focus-visible {
	outline: 2px solid var(--border-focus);
	outline-offset: 2px;
}

/* --- Container --- */
.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 12px;
	display: flex;
	flex-direction: column;
	height: 100vh;
	overflow: hidden;
	gap: var(--space-sm);
}

/* --- Header --- */
.header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-sm) 0;
	border-bottom: 1px solid var(--border-divider);
	flex-shrink: 0;
}

.header__brand {
	display: flex;
	flex-direction: column;
}

.header__logo {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--text-primary);
}

.header__tagline {
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.01em;
	color: var(--text-secondary);
	display: none;
}

.header__links {
	display: flex;
	gap: var(--space-sm);
}

.header__links a {
	color: var(--text-secondary);
	text-decoration: none;
	font-size: 13px;
	padding: var(--space-xs) var(--space-sm);
	border-radius: var(--radius-sm);
	transition:
		color var(--transition-base),
		background var(--transition-base);
}

.header__links a:hover {
	color: var(--text-primary);
	background: var(--bg-tertiary);
}

/* --- Panel (shared) --- */
.panel {
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: var(--space-lg);
}

/* --- Upload Zone --- */
.upload-zone {
	border: 2px dashed #3d3d3d;
	border-radius: var(--radius-lg);
	background: var(--bg-secondary);
	padding: var(--space-3xl) var(--space-xl);
	min-height: 160px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	cursor: pointer;
	flex-shrink: 0;
	transition:
		border-color var(--transition-base),
		background var(--transition-base);
}

.upload-zone--dragover {
	border-color: var(--accent-primary);
	background: rgba(124, 77, 255, 0.06);
}

.upload-zone--dragover .upload-zone__icon,
.upload-zone--dragover .upload-zone__text {
	color: var(--accent-primary);
}

.upload-zone__icon {
	font-size: 48px;
	color: var(--text-secondary);
	margin-bottom: var(--space-md);
	transition: color var(--transition-base);
}

.upload-zone__text {
	font-size: 16px;
	font-weight: 500;
	color: var(--text-secondary);
	transition: color var(--transition-base);
}

.upload-zone__formats {
	font-size: 12px;
	color: var(--text-disabled);
	margin-top: var(--space-sm);
}

.upload-zone__input {
	display: none;
}

/* --- File Info Bar (post-upload compact) --- */
.file-info {
	display: none;
	align-items: center;
	gap: var(--space-md);
	height: 48px;
	padding: 0 var(--space-lg);
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	font-size: 13px;
	flex-shrink: 0;
}

.file-info--visible {
	display: flex;
}

.file-info__icon {
	color: var(--accent-primary);
	flex-shrink: 0;
}

.file-info__name {
	color: var(--text-primary);
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.file-info__meta {
	color: var(--text-secondary);
	font-family: var(--font-mono);
	font-size: 12px;
	white-space: nowrap;
}

.file-info__remove {
	margin-left: auto;
	background: none;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	padding: var(--space-xs);
	border-radius: var(--radius-sm);
	transition: color var(--transition-base);
	flex-shrink: 0;
}

.file-info__remove:hover {
	color: var(--accent-danger);
}

/* --- Player Bar --- */
.player-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm);
	padding: var(--space-sm) var(--space-lg);
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	min-height: 48px;
	flex-shrink: 0;
}

.player-bar[aria-disabled="true"] {
	opacity: 0.4;
	pointer-events: none;
}

.transport {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.transport__btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	color: var(--text-primary);
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: background var(--transition-base);
	font-size: 18px;
}

.transport__btn:hover {
	background: var(--bg-tertiary);
}

.transport__btn--play {
	width: 40px;
	height: 40px;
	background: var(--accent-primary);
	border-radius: var(--radius-full);
	font-size: 20px;
}

.transport__btn--play:hover {
	background: var(--accent-primary-hover);
}

.timecode {
	font-family: var(--font-mono);
	font-size: 16px;
	font-weight: 500;
	color: var(--text-primary);
	white-space: nowrap;
	padding: 0 var(--space-sm);
}

.player-meta {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	margin-left: auto;
}

.badge {
	background: var(--bg-tertiary);
	padding: var(--space-xs) 10px;
	border-radius: var(--radius-sm);
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--text-secondary);
	white-space: nowrap;
}

.volume-control {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	color: var(--text-secondary);
}

.volume-control__slider {
	width: 80px;
}

/* --- Zoom Bar --- */
.zoom-bar {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	padding: var(--space-sm) var(--space-lg);
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	min-height: 36px;
	flex-shrink: 0;
}

.zoom-bar__btn {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--border-subtle);
	color: var(--text-primary);
	border-radius: var(--radius-md);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition:
		background var(--transition-base),
		border-color var(--transition-base);
}

.zoom-bar__btn:hover {
	background: var(--bg-tertiary);
	border-color: var(--text-secondary);
}

.zoom-bar__level {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-secondary);
	white-space: nowrap;
}

.zoom-bar__separator {
	width: 1px;
	height: 20px;
	background: var(--border-divider);
	flex-shrink: 0;
}

.zoom-bar__toggle {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	font-size: 12px;
	color: var(--text-secondary);
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

.zoom-bar__toggle input {
	accent-color: #ff9800;
}

.zoom-bar__follow {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	font-size: 12px;
	color: var(--text-secondary);
	cursor: pointer;
	user-select: none;
}

.zoom-bar__follow input {
	accent-color: var(--accent-primary);
}

/* --- Sensitivity value badge --- */
.sensitivity-control__value {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-secondary);
	min-width: 18px;
	text-align: center;
}

/* --- TAP Button --- */
.transport__btn--tap {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: #27ae61;
	border: 1px solid #27ae61;
	border-radius: var(--radius-md);
	width: auto;
	padding: 0 10px;
}

.transport__btn--tap:hover {
	background: rgba(39, 174, 97, 0.15);
}

.transport__btn--tap:active {
	background: rgba(39, 174, 97, 0.3);
}

/* --- Beat 1 marker region label override --- */
.beat1-marker-label {
	position: absolute;
	top: 0;
	left: -8px;
	width: 18px;
	height: 18px;
	background: rgba(39, 174, 96, 0.9);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0 0 4px 4px;
	pointer-events: none;
	z-index: 5;
}

/* --- Transients Canvas Overlay --- */
.transients-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 4;
}

/* --- Waveform --- */
.waveform-container {
	background: var(--bg-waveform);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow-x: auto;
	overflow-y: hidden;
	height: 250px;
	min-height: 200px;
	max-height: 250px;
	position: relative;
	flex-shrink: 0;
}

.waveform-container__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	color: var(--text-disabled);
	font-size: 14px;
}

#minimap {
	height: 48px;
	border-bottom: 1px solid var(--border-divider);
}

#waveform {
	min-height: 200px;
}

/* --- Analyse Bar --- */
.analyse-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-lg);
	padding: var(--space-sm) var(--space-lg);
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	flex-shrink: 0;
}

.btn-analyze {
	width: 280px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	background: var(--accent-primary);
	color: #ffffff;
	border: none;
	border-radius: var(--radius-md);
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	box-shadow: var(--shadow-accent);
	transition:
		background var(--transition-base),
		box-shadow var(--transition-base);
}

.btn-analyze:hover:not(:disabled) {
	background: var(--accent-primary-hover);
	box-shadow: 0 4px 16px rgba(124, 77, 255, 0.4);
}

.btn-analyze:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-analyze--loading {
	background: var(--bg-tertiary);
	border: 1px solid var(--accent-primary);
	cursor: not-allowed;
	pointer-events: none;
}

.btn-analyze--done {
	background: var(--accent-secondary);
}

.spinner {
	width: 16px;
	height: 16px;
	border: 2px solid transparent;
	border-top-color: currentColor;
	border-radius: var(--radius-full);
	animation: spin 0.8s linear infinite;
}

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

.sensitivity-control {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.sensitivity-control__label {
	font-size: 12px;
	color: var(--text-secondary);
	white-space: nowrap;
}

.sensitivity-control__slider {
	width: 160px;
}

/* --- Progress Bar --- */
.progress-bar {
	display: none;
	flex-direction: column;
	gap: var(--space-xs);
	padding: var(--space-md) var(--space-lg);
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	flex-shrink: 0;
}

.progress-bar--visible {
	display: flex;
}

.progress-bar__track {
	width: 100%;
	height: 4px;
	background: var(--bg-tertiary);
	border-radius: 2px;
	overflow: hidden;
}

.progress-bar__fill {
	height: 100%;
	background: var(--accent-primary);
	border-radius: 2px;
	transition: width 0.3s ease;
	width: 0%;
}

.progress-bar__text {
	font-size: 12px;
	font-style: italic;
	color: var(--text-secondary);
}

/* --- Sections Table --- */
.sections-panel {
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow: hidden;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.sections-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-sm) var(--space-lg);
	border-bottom: 1px solid var(--border-divider);
	flex-shrink: 0;
}

.sections-panel__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.sections-table-wrap {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.sections-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.sections-table thead {
	position: sticky;
	top: 0;
	z-index: 1;
}

.sections-table th {
	background: var(--bg-tertiary);
	color: var(--text-secondary);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: var(--space-sm) var(--space-md);
	text-align: left;
	white-space: nowrap;
}

.sections-table th.col-num,
.sections-table td.col-num {
	width: 40px;
	text-align: center;
	font-family: var(--font-mono);
	font-size: 12px;
}

.sections-table th.col-time,
.sections-table td.col-time {
	width: 80px;
	text-align: right;
	font-family: var(--font-mono);
	font-size: 13px;
}

.sections-table th.col-section-name,
.sections-table td.col-section-name {
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sections-table th.col-measures,
.sections-table td.col-measures {
	width: 60px;
	text-align: center;
	font-family: var(--font-mono);
	font-size: 13px;
}

.sections-table th.col-actions,
.sections-table td.col-actions {
	width: 80px;
	text-align: center;
}

.sections-table td {
	padding: var(--space-sm) var(--space-md);
	border-bottom: 1px solid var(--border-divider);
	height: 40px;
	vertical-align: middle;
}

.sections-table tbody tr {
	cursor: pointer;
	transition: background var(--transition-fast);
}

.sections-table tbody tr:hover {
	background: var(--bg-tertiary);
}

.sections-table tbody tr.selected {
	background: rgba(124, 77, 255, 0.12);
	border-left: 3px solid var(--accent-primary);
}

.section-name-cell {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.section-color-dot {
	width: 10px;
	height: 10px;
	border-radius: var(--radius-full);
	flex-shrink: 0;
}

.section-name-text {
	cursor: text;
}

.section-name-input {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-focus);
	color: var(--text-primary);
	font-family: var(--font-sans);
	font-size: 13px;
	padding: 2px 6px;
	border-radius: var(--radius-sm);
	width: 120px;
}

.row-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	opacity: 0.4;
	transition: opacity var(--transition-fast);
}

.sections-table tbody tr:hover .row-actions {
	opacity: 1;
}

.row-actions__btn {
	background: none;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	padding: var(--space-xs);
	border-radius: var(--radius-sm);
	font-size: 14px;
	transition: color var(--transition-base);
}

.row-actions__btn:hover {
	color: var(--text-primary);
}

.row-actions__btn--delete:hover {
	color: var(--accent-danger);
}

.btn-add-section {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	margin: var(--space-xs) var(--space-lg);
	padding: var(--space-xs) var(--space-md);
	flex-shrink: 0;
	background: none;
	border: 1px dashed var(--border-subtle);
	color: var(--text-secondary);
	font-size: 13px;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition:
		border-color var(--transition-base),
		color var(--transition-base);
}

.btn-add-section:hover {
	border-color: var(--accent-secondary);
	border-style: solid;
	color: var(--accent-secondary);
}

.sections-empty {
	padding: var(--space-2xl);
	text-align: center;
	color: var(--text-disabled);
	font-size: 14px;
}

/* --- Export Bar --- */
.export-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-md);
	padding: var(--space-sm) var(--space-lg);
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	flex-shrink: 0;
}

.export-bar[aria-disabled="true"] {
	opacity: 0.4;
	pointer-events: none;
}

.btn-export {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	padding: var(--space-md) var(--space-xl);
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 500;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition:
		background var(--transition-base),
		border-color var(--transition-base),
		box-shadow var(--transition-base);
	white-space: nowrap;
}

.btn-export--primary {
	background: var(--accent-primary);
	color: #ffffff;
	border: none;
	font-weight: 600;
	box-shadow: var(--shadow-accent);
}

.btn-export--primary:hover {
	background: var(--accent-primary-hover);
	box-shadow: 0 4px 16px rgba(124, 77, 255, 0.4);
}

.btn-export--secondary {
	background: transparent;
	color: var(--text-primary);
	border: 1px solid var(--border-subtle);
}

.btn-export--secondary:hover {
	border-color: var(--text-secondary);
	background: var(--bg-tertiary);
}

.btn-export:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* --- Toast Notifications --- */
.toast-container {
	position: fixed;
	bottom: var(--space-xl);
	right: var(--space-xl);
	display: flex;
	flex-direction: column-reverse;
	gap: var(--space-sm);
	z-index: 1000;
	pointer-events: none;
}

.toast {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	background: var(--bg-elevated);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	font-size: 13px;
	color: var(--text-primary);
	pointer-events: auto;
	animation: toast-in 0.3s ease;
	max-width: 360px;
}

.toast--success {
	border-left: 3px solid var(--accent-secondary);
}
.toast--error {
	border-left: 3px solid var(--accent-danger);
}
.toast--info {
	border-left: 3px solid #448aff;
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.toast--out {
	animation: toast-out 0.2s ease forwards;
}

@keyframes toast-out {
	to {
		opacity: 0;
		transform: translateY(16px);
	}
}

/* --- Footer --- */
.footer {
	text-align: center;
	padding: var(--space-xs) 0;
	font-size: 12px;
	color: var(--text-disabled);
	border-top: 1px solid var(--border-divider);
	flex-shrink: 0;
}

/* --- Custom Range Inputs --- */
input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	cursor: pointer;
	height: 20px;
}

input[type="range"]::-webkit-slider-runnable-track {
	height: 4px;
	background: var(--bg-tertiary);
	border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	background: var(--accent-primary);
	border-radius: var(--radius-full);
	border: none;
	margin-top: -6px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-moz-range-track {
	height: 4px;
	background: var(--bg-tertiary);
	border-radius: 2px;
	border: none;
}

input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: var(--accent-primary);
	border-radius: var(--radius-full);
	border: none;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* --- Mobile cards for sections --- */
.section-cards {
	display: none;
}

.section-card {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	border-bottom: 1px solid var(--border-divider);
	cursor: pointer;
	transition: background var(--transition-fast);
}

.section-card:hover {
	background: var(--bg-tertiary);
}

.section-card__color {
	width: 10px;
	height: 10px;
	border-radius: var(--radius-full);
	flex-shrink: 0;
}

.section-card__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.section-card__name {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
}

.section-card__times {
	font-size: 12px;
	font-family: var(--font-mono);
	color: var(--text-secondary);
}

/* =============================================
   Responsive: Tablet (768px+)
   ============================================= */
@media (min-width: 768px) {
	.container {
		padding: 0 16px;
		gap: var(--space-sm);
	}

	.header__tagline {
		display: block;
	}
}

/* =============================================
   Responsive: Desktop (1200px+)
   ============================================= */
@media (min-width: 1200px) {
	.container {
		padding: 0 24px;
		gap: var(--space-sm);
	}

	.volume-control__slider {
		width: 100px;
	}
}

/* =============================================
   Responsive: Mobile (<768px) overrides
   ============================================= */
@media (max-width: 767px) {
	.header__tagline {
		display: none;
	}

	.upload-zone {
		padding: var(--space-xl) var(--space-lg);
		min-height: 120px;
	}

	.player-bar {
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-sm);
	}

	.transport {
		justify-content: center;
	}

	.transport__btn {
		width: 44px;
		height: 44px;
	}

	.transport__btn--play {
		width: 48px;
		height: 48px;
	}

	.timecode {
		text-align: center;
	}

	.player-meta {
		margin-left: 0;
		justify-content: center;
	}

	.volume-control {
		display: none;
	}

	#minimap {
		display: none;
	}

	.zoom-bar__follow span {
		display: none;
	}

	.zoom-bar__toggle span {
		display: none;
	}

	.zoom-bar__separator {
		display: none;
	}

	.zoom-bar {
		flex-wrap: wrap;
	}

	.sensitivity-control__slider {
		width: 80px;
	}

	.btn-analyze {
		width: 100%;
	}

	/* Hide table, show cards */
	.sections-table-wrap {
		display: none;
	}

	.section-cards {
		display: block;
	}

	.col-measures {
		display: none;
	}

	.export-bar {
		flex-direction: column;
	}

	.btn-export {
		width: 100%;
		justify-content: center;
	}
}

/* Hide measures column on tablet */
@media (max-width: 1199px) {
	.col-measures {
		display: none;
	}
}

/* --- Utility --- */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Swap labels button --- */
.sections-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.btn-swap {
	font-size: 12px;
	padding: 4px 12px;
	background: var(--bg-tertiary);
	color: var(--text-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	cursor: pointer;
}

.btn-swap:hover {
	background: var(--bg-elevated);
	color: var(--text-primary);
}

/* --- AbleSet export button --- */
.btn-export--ableset {
	background: #e67e22 !important;
	color: #fff !important;
	border-color: #e67e22 !important;
	font-weight: 700;
}

.btn-export--ableset:hover {
	background: #d35400 !important;
}

/* --- Measures input --- */
.measures-input {
	width: 50px;
	background: transparent;
	border: 1px solid transparent;
	color: var(--text-primary);
	font-family: var(--font-mono);
	font-size: 13px;
	text-align: center;
	padding: 2px 4px;
	border-radius: var(--radius-sm);
}

.measures-input:hover {
	border-color: var(--border-subtle);
}

.measures-input:focus {
	outline: none;
	border-color: var(--accent-primary);
	background: var(--bg-tertiary);
}

/* Hide spin buttons */
.measures-input::-webkit-inner-spin-button,
.measures-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
