/*Host app styles. Written for a 390px phone first, widened with min-width queries*/

:root {
	--s1: 4px;
	--s2: 8px;
	--s3: 12px;
	--s4: 16px;
	--s5: 24px;
	--s6: 40px;
	--panel: rgba(20, 29, 49, 0.84);
	--panel-hover: rgba(27, 38, 63, 0.9);
	--wave-off: #5a6684;
	--playhead: #f2907e;
	--dock-h: 76px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--tap: 44px;
}

[hidden] {
	display: none !important;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 500;
	margin: 0;
	line-height: 1.2;
	letter-spacing: -0.005em;
}
h1 {
	font-size: 1.9rem;
}
h2 {
	font-size: 1.35rem;
}
p {
	margin: 0 0 var(--s3);
}

/*Frame*/
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s3);
	max-width: 1180px;
	margin: 0 auto;
	padding: var(--s2) var(--s4);
	padding-top: max(var(--s2), env(safe-area-inset-top, 0px));
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: var(--s2);
	min-height: var(--tap);
	color: var(--text);
	text-decoration: none;
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 500;
}
.brand-clef {
	font-family: "Noto Music", "Segoe UI Symbol", serif;
	color: var(--accent);
	font-size: 1.7rem;
	line-height: 1;
}
.brand-clef.big {
	font-size: 3rem;
}
.main {
	max-width: 1180px;
	margin: 0 auto;
	padding: var(--s2) var(--s4) var(--s6);
}
.main.has-dock {
	padding-bottom: calc(var(--dock-h) + var(--safe-b) + var(--s5));
}

/*Controls*/
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--s2);
	min-height: var(--tap);
	padding: 0 var(--s4);
	border: 1px solid var(--line);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	font: 600 1rem/1 var(--font);
	text-decoration: none;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.08);
	border-color: #3a4768;
}
.btn:active:not(:disabled) {
	background: rgba(255, 255, 255, 0.12);
}
.btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.btn-primary {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-ink);
}
.btn-primary:hover:not(:disabled) {
	background: #f0c577;
	border-color: #f0c577;
}
.btn-primary:active:not(:disabled) {
	background: #d8a64d;
}
.btn-danger {
	color: var(--danger);
	border-color: rgba(229, 122, 110, 0.4);
	background: transparent;
}
.btn-danger:hover:not(:disabled) {
	background: rgba(229, 122, 110, 0.12);
	border-color: var(--danger);
}
.btn-danger-solid {
	background: var(--danger);
	border-color: var(--danger);
	color: #2a0d09;
}
.btn-ghost {
	border-color: transparent;
	background: transparent;
	color: var(--text-muted);
}
.btn-sm {
	padding: 0 var(--s3);
	font-size: 0.95rem;
}
.btn-block {
	width: 100%;
}
.btn-icon {
	width: var(--tap);
	padding: 0;
}
.btn-round {
	width: 56px;
	min-height: 56px;
	padding: 0;
	border-radius: 50%;
}
.btn-split {
	color: var(--accent);
	border-color: rgba(231, 183, 95, 0.55);
	padding: 0 var(--s3);
	min-height: 52px;
}
.ico {
	display: inline-flex;
}

.input,
select.input,
textarea.input {
	width: 100%;
	min-height: var(--tap);
	padding: 10px var(--s3);
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--bg-sunk);
	color: var(--text);
	font: 1rem/1.4 var(--font);
}
textarea.input {
	resize: vertical;
}
.input::placeholder {
	color: #66718c;
}
.input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent);
}
.field {
	display: flex;
	flex-direction: column;
	gap: var(--s2);
	margin-bottom: var(--s4);
}
.field label,
.yt-form label,
fieldset legend {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text);
}
.field-note {
	margin: 0;
	font-size: 0.95rem;
	color: var(--text-muted);
}
.lead {
	font-size: 1.1rem;
	margin-bottom: var(--s2);
	display: flex;
	align-items: center;
	gap: var(--s2);
	overflow-wrap: anywhere;
}
.empty {
	color: var(--text-muted);
	margin: var(--s3) 0;
}
.empty-block {
	padding: var(--s5) 0;
}

/*Panels*/
.panel {
	margin-bottom: var(--s4);
	padding: var(--s4);
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--panel);
}
.panel-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--s3);
	margin-bottom: var(--s4);
}
.panel-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s2);
}
.subhead {
	font-size: 1.1rem;
	margin: var(--s5) 0 var(--s2);
}
.page-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--s3);
	margin-top: var(--s3);
}
.page-head-actions {
	flex: 1 1 320px;
	display: flex;
	justify-content: flex-start;
}
@media (min-width: 640px) {
	.page-head-actions {
		flex: 0 1 420px;
		justify-content: flex-end;
	}
}
.new-song {
	display: flex;
	gap: var(--s2);
	width: 100%;
}
.new-song .input {
	flex: 1;
	min-width: 0;
}

/*Sign in*/
.login-wrap {
	max-width: 420px;
	margin: 0 auto;
	padding: 14vh var(--s4) var(--s5);
}
.login-brand {
	display: flex;
	align-items: center;
	gap: var(--s3);
}
.brand-word {
	font-family: var(--font-display);
	font-size: 2.2rem;
}
.login-title {
	margin-bottom: var(--s3);
}
.login-card {
	padding: var(--s2) 0;
}

/*Songs*/
.song-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--s3);
}
.song-card {
	display: block;
	padding: var(--s4);
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--panel);
	color: var(--text);
	text-decoration: none;
	transition: background 0.12s, border-color 0.12s;
}
.song-card:hover {
	background: var(--panel-hover);
	border-color: #3d4b70;
}
.song-card p {
	margin: 0;
}
.song-title {
	font-size: 1.3rem;
	margin-bottom: var(--s2);
	overflow-wrap: anywhere;
}
.song-status {
	display: flex;
	align-items: center;
	gap: var(--s2);
	color: var(--text);
}
.song-meta,
.song-date {
	color: var(--text-muted);
	font-size: 0.95rem;
	margin-top: var(--s1) !important;
}
.dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--text-muted);
}
.dot-ok {
	background: var(--ok);
}
.dot-warn {
	background: var(--accent);
}
.dot-bad {
	background: var(--danger);
}

/*Editor*/
.ed-head {
	display: flex;
	flex-direction: column;
	gap: var(--s1);
	margin-top: var(--s2);
}
.back {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap);
	color: var(--text-muted);
	text-decoration: none;
	font-weight: 600;
}
.back:hover {
	color: var(--text);
}
.title-input {
	width: 100%;
	padding: var(--s1) 0;
	border: none;
	border-bottom: 1px solid transparent;
	background: transparent;
	color: var(--text);
	font: 500 1.9rem/1.2 var(--font-display);
	min-height: var(--tap);
}
.title-input:hover {
	border-bottom-color: var(--line);
}
.title-input:focus {
	outline: none;
	border-bottom-color: var(--accent);
}
.danger-zone {
	display: flex;
	justify-content: flex-start;
}

/*Backing*/
.backing-ready {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--s3);
}
.backing-ready p {
	margin: 0;
}
.upload {
	display: grid;
	gap: var(--s4);
	max-width: 640px;
}
.drop {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--s1);
	padding: var(--s5) var(--s4);
	border: 1px dashed #3b486b;
	border-radius: 4px;
	background: rgba(10, 16, 29, 0.5);
	cursor: pointer;
	touch-action: manipulation;
}
.drop:hover,
.drop.is-over {
	border-color: var(--accent);
	background: rgba(231, 183, 95, 0.07);
}
.drop-main {
	font-weight: 600;
	font-size: 1.1rem;
	color: var(--accent);
}
.drop-sub {
	color: var(--text-muted);
	font-size: 0.95rem;
}
.only-fine {
	display: none;
}
.yt-form {
	display: grid;
	gap: var(--s2);
}
.row {
	display: flex;
	gap: var(--s2);
}
.row .input {
	flex: 1;
	min-width: 0;
}
.progress {
	height: 10px;
	background: var(--bg-sunk);
	border: 1px solid var(--line);
	border-radius: 2px;
	overflow: hidden;
	margin: var(--s2) 0;
}
.progress-fill {
	height: 100%;
	background: var(--accent);
	transition: width 0.15s linear;
}
.spinner {
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid var(--line);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.9s linear infinite;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
.notice {
	padding: var(--s3);
	border: 1px solid var(--line);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--text-muted);
}
.notice-bad {
	border-color: rgba(229, 122, 110, 0.5);
	color: var(--text);
}
.notice-bad b {
	color: var(--danger);
}

/*Timeline*/
.tl-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--s2) var(--s3);
	margin-bottom: var(--s3);
}
.tl-hint {
	flex: 1 1 220px;
	font-size: 0.95rem;
	color: var(--text-muted);
}
.tl-zoom {
	display: flex;
	align-items: center;
	gap: var(--s1);
}
.tl-zoomlabel {
	min-width: 3.2em;
	text-align: center;
	font: 600 0.95rem var(--font-mono);
	color: var(--text-muted);
}
.tl-video {
	display: block;
	width: 100%;
	max-width: 360px;
	max-height: 220px;
	margin-bottom: var(--s3);
	background: #000;
	border: 1px solid var(--line);
}
.tl-frame {
	position: relative;
	border: 1px solid var(--line);
	background: var(--bg-sunk);
}
.tl-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-muted);
	pointer-events: none;
}
.tl-scroll {
	overflow-x: auto;
	overflow-y: hidden;
	touch-action: pan-x pan-y;
	-webkit-overflow-scrolling: touch;
	scrollbar-color: #36456a transparent;
}
.tl-inner {
	position: relative;
	min-width: 100%;
	user-select: none;
	-webkit-user-select: none;
}
.tl-ruler {
	position: relative;
	height: 34px;
	border-bottom: 1px solid var(--line);
	cursor: pointer;
	overflow: hidden;
}
.tl-tick {
	position: absolute;
	top: 0;
	bottom: 0;
	border-left: 1px solid #3a4768;
}
.tl-tick i {
	position: absolute;
	top: 8px;
	left: 6px;
	font: normal 0.8125rem var(--font-mono);
	color: var(--text-muted);
	white-space: nowrap;
}
.tl-wave {
	position: relative;
	height: 150px;
	cursor: crosshair;
}
.tl-wave::before {
	/*Five stave lines behind the waveform*/
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: calc(50% - 24px);
	height: 49px;
	background: repeating-linear-gradient(to bottom, rgba(120, 138, 180, 0.28) 0 1px, transparent 1px 12px);
	pointer-events: none;
}
.tl-canvas {
	position: absolute;
	left: 0;
	top: 0;
	display: block;
}
.tl-slices,
.tl-cuts,
.tl-handles {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.tl-slice {
	position: absolute;
	top: 0;
	bottom: 0;
	overflow: hidden;
	border-right: 1px solid rgba(235, 230, 218, 0.3);
}
.tl-slice.tl-off {
	background: rgba(10, 16, 29, 0.42);
}
.tl-slice.tl-free {
	background: rgba(231, 183, 95, 0.08);
}
.tl-slice.tl-held {
	background: rgba(159, 180, 232, 0.12);
}
.tl-slice.is-selected {
	background: rgba(235, 230, 218, 0.14);
	box-shadow: inset 0 0 0 2px var(--text);
}
.tl-top {
	position: absolute;
	top: 6px;
	left: 6px;
	max-width: calc(100% - 10px);
	padding: 1px 6px;
	background: rgba(10, 16, 29, 0.78);
	display: flex;
	gap: 6px;
	font-size: 0.8125rem;
	white-space: nowrap;
	overflow: hidden;
}
.tl-top b {
	color: var(--accent);
	font-family: var(--font-mono);
}
.tl-label {
	overflow: hidden;
	text-overflow: ellipsis;
}
.tl-state {
	position: absolute;
	left: 6px;
	max-width: calc(100% - 10px);
	padding: 1px 6px;
	background: rgba(10, 16, 29, 0.78);
	bottom: 6px;
	font-size: 0.8125rem;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tl-cut {
	position: absolute;
	bottom: 0;
	height: 22px;
	border-left: 1px dashed rgba(235, 230, 218, 0.4);
}
.tl-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--tap);
	margin-left: calc(var(--tap) / -2);
	display: flex;
	justify-content: center;
	pointer-events: auto;
	touch-action: none;
	cursor: ew-resize;
	z-index: 2;
}
.tl-handle:focus {
	outline: none;
}
.tl-grip {
	position: relative;
	width: 2px;
	height: 100%;
	background: var(--text);
	opacity: 0.85;
}
.tl-grip::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 20px;
	height: 40px;
	margin: -20px 0 0 -10px;
	border-radius: 3px;
	background: var(--text) repeating-linear-gradient(to right, transparent 0 6px, rgba(13, 20, 36, 0.55) 6px 8px);
	background-clip: padding-box;
}
.tl-handle:hover .tl-grip,
.tl-handle.is-dragging .tl-grip,
.tl-handle:focus-visible .tl-grip {
	opacity: 1;
	background: var(--accent);
}
.tl-handle:hover .tl-grip::after,
.tl-handle.is-dragging .tl-grip::after,
.tl-handle:focus-visible .tl-grip::after {
	background-color: var(--accent);
}
.tl-handle-tip {
	position: absolute;
	top: -32px;
	left: 50%;
	transform: translateX(-50%);
	padding: 3px 8px;
	border: 1px solid var(--line);
	background: var(--bg-raised);
	font: 0.8125rem var(--font-mono);
	white-space: nowrap;
	display: none;
	pointer-events: none;
}
.tl-handle.is-dragging .tl-handle-tip,
.tl-handle:focus-visible .tl-handle-tip {
	display: block;
}
.tl-playhead {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -1px;
	width: 2px;
	background: var(--playhead);
	pointer-events: none;
	z-index: 3;
	will-change: transform;
}
.tl-playhead-cap {
	position: absolute;
	top: 0;
	left: -6px;
	width: 14px;
	height: 12px;
	background: var(--playhead);
	clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/*Transport dock*/
.dock {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 50;
	padding: var(--s2) var(--s4);
	padding-bottom: calc(var(--s2) + var(--safe-b));
	background: rgba(10, 16, 29, 0.95);
	border-top: 1px solid var(--line);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.transport {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s2);
	max-width: 1148px;
	margin: 0 auto;
}
.tr-buttons {
	display: flex;
	align-items: center;
	gap: var(--s2);
}
.tr-time {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 4.6em;
	line-height: 1.25;
}
.tr-now {
	font: 600 1.15rem var(--font-mono);
}
.tr-total {
	font: 0.875rem var(--font-mono);
	color: var(--text-muted);
}

/*Slices*/
.slices-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--s4);
}
.slice-list {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	max-height: 420px;
	overflow-y: auto;
	background: rgba(10, 16, 29, 0.45);
}
.slice-item {
	display: grid;
	grid-template-columns: 2.2em 1fr auto;
	align-items: center;
	gap: var(--s3);
	min-height: 56px;
	padding: var(--s2) var(--s3);
	border: none;
	border-bottom: 1px solid var(--line-soft);
	background: transparent;
	color: var(--text);
	text-align: left;
	font: inherit;
	cursor: pointer;
	touch-action: manipulation;
}
.slice-item:last-child {
	border-bottom: none;
}
.slice-item:hover {
	background: rgba(255, 255, 255, 0.05);
}
.slice-item.is-selected {
	background: rgba(235, 230, 218, 0.12);
	outline: 1px solid var(--text);
	outline-offset: -1px;
}
.si-n {
	font: 600 1.05rem var(--font-mono);
	color: var(--accent);
}
.si-main {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.si-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.si-state {
	font-size: 0.9rem;
	color: var(--text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.slice-item.is-held .si-state {
	color: var(--blue);
}
.slice-item.is-free .si-state {
	color: var(--accent);
}
.si-time {
	font: 0.9rem var(--font-mono);
	color: var(--text-muted);
}

/*Selected slice: a bottom sheet on phones, a plain panel on wide screens*/
.sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: calc(var(--dock-h) + var(--safe-b));
	z-index: 40;
	max-height: 62vh;
	overflow-y: auto;
	padding: var(--s3) var(--s4) var(--s4);
	border-top: 1px solid #3a4768;
	background: #111a2d;
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
	transform: translateY(calc(100% + var(--dock-h) + 40px));
	visibility: hidden;
	transition: transform 0.22s ease, visibility 0s linear 0.22s;
}
.sheet.is-open {
	transform: none;
	visibility: visible;
	transition: transform 0.22s ease;
}
.sheet-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--s3);
	margin-bottom: var(--s3);
}
.sheet-title {
	font-size: 1.2rem;
}
.sheet-head p {
	margin: 0;
}
.sheet-close {
	font-size: 1.6rem;
}
.sheet-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--s2);
}
.sheet-body .field {
	margin-bottom: var(--s3);
}
.holders {
	margin: var(--s3) 0;
	color: var(--blue);
	font-size: 0.95rem;
	overflow-wrap: anywhere;
}
.holders:empty {
	display: none;
}
.main:has(.sheet.is-open) {
	padding-bottom: calc(var(--dock-h) + var(--safe-b) + 330px);
}
.switch {
	display: flex;
	align-items: center;
	gap: var(--s3);
	min-height: var(--tap);
}
.switch label {
	font-weight: 600;
	cursor: pointer;
}
.switch-input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	position: relative;
	width: 48px;
	height: 28px;
	margin: 0;
	border: 1px solid #44527a;
	border-radius: 14px;
	background: var(--bg-sunk);
	cursor: pointer;
	transition: background 0.15s;
}
.switch-input::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--text-muted);
	transition: transform 0.15s, background 0.15s;
}
.switch-input:checked {
	background: rgba(231, 183, 95, 0.25);
	border-color: var(--accent);
}
.switch-input:checked::after {
	transform: translateX(20px);
	background: var(--accent);
}

/*Invites*/
.inv-form {
	max-width: 640px;
}
.choices {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--s2);
	margin: 0 0 var(--s4);
	padding: 0;
	border: none;
	min-width: 0;
}
.choices legend {
	padding: 0;
	margin-bottom: var(--s2);
}
.choice {
	display: flex;
	align-items: flex-start;
	gap: var(--s3);
	min-height: var(--tap);
	padding: var(--s3);
	border: 1px solid var(--line);
	border-radius: 4px;
	cursor: pointer;
}
.choice input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--accent);
}
.choice-text {
	display: flex;
	flex-direction: column;
}
.choice-text span {
	color: var(--text-muted);
	font-size: 0.95rem;
}
.choice:has(input:checked) {
	border-color: var(--accent);
	background: rgba(231, 183, 95, 0.08);
}
.form-actions {
	margin-bottom: var(--s2);
}
.form-actions .btn {
	width: 100%;
}
.inv-list {
	border-top: 1px solid var(--line);
}
.inv-row {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "email email" "kind status" "slice slice" "sent sent" "actions actions";
	gap: var(--s1) var(--s3);
	align-items: center;
	padding: var(--s3) 0;
	border-bottom: 1px solid var(--line-soft);
}
.inv-row.is-revoked {
	opacity: 0.55;
}
.inv-email {
	grid-area: email;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.inv-kind {
	grid-area: kind;
}
.inv-status {
	grid-area: status;
	justify-self: end;
}
.inv-slice {
	grid-area: slice;
}
.inv-slice.is-muted,
.inv-sent {
	color: var(--text-muted);
}
.inv-sent {
	grid-area: sent;
	font-size: 0.95rem;
}
.inv-actions {
	grid-area: actions;
	display: flex;
	flex-wrap: wrap;
	gap: var(--s2);
	margin-top: var(--s2);
}
.inv-actions .btn {
	flex: 1 1 0;
}
.inv-actions:empty {
	display: none;
}
.tag {
	display: inline-block;
	padding: 2px 8px;
	border: 1px solid var(--line);
	border-radius: 2px;
	font-size: 0.875rem;
	font-weight: 600;
}
.tag-open {
	color: var(--accent);
}
.tag-fixed {
	color: var(--blue);
}
.status {
	font-size: 0.95rem;
	font-weight: 600;
}
.status-ok {
	color: var(--ok);
}
.status-bad {
	color: var(--danger);
}

/*Lyrics*/
.lyrics {
	min-height: 180px;
	font-size: 1.05rem;
	line-height: 1.6;
}

/*Dialog and toasts*/
.dialog {
	width: min(92vw, 440px);
	padding: var(--s5);
	border: 1px solid #3a4768;
	border-radius: 4px;
	background: var(--bg-raised);
	color: var(--text);
}
.dialog::backdrop {
	background: rgba(5, 8, 16, 0.7);
}
.dialog-title {
	font-size: 1.3rem;
	margin-bottom: var(--s3);
}
.dialog-actions {
	display: flex;
	justify-content: flex-end;
	gap: var(--s2);
}
.toasts {
	position: fixed;
	top: max(var(--s3), env(safe-area-inset-top, 0px));
	left: var(--s4);
	right: var(--s4);
	z-index: 100;
	display: flex;
	flex-direction: column;
	gap: var(--s2);
	pointer-events: none;
}
.toast {
	max-width: 520px;
	padding: var(--s3) var(--s4);
	border: 1px solid #3a4768;
	border-radius: 4px;
	background: var(--bg-raised);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
	animation: toast-in 0.18s ease;
}
.toast-error {
	border-color: var(--danger);
}
@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

/*Wider screens*/
@media (min-width: 640px) {
	.song-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	}
	.choices {
		grid-template-columns: 1fr 1fr;
	}
	.form-actions .btn {
		width: auto;
	}
	.inv-actions .btn {
		flex: none;
	}
	.title-input {
		font-size: 2.3rem;
	}
	h1 {
		font-size: 2.3rem;
	}
}
@media (min-width: 900px) {
	.main {
		padding-left: var(--s5);
		padding-right: var(--s5);
	}
	.topbar {
		padding-left: var(--s5);
		padding-right: var(--s5);
	}
	.panel {
		padding: var(--s5);
	}
	.tl-wave {
		height: 190px;
	}
	.slices-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: start;
	}
	.slice-side {
		border: 1px solid var(--line);
		padding: var(--s4);
		background: rgba(10, 16, 29, 0.45);
	}
	.sheet {
		position: static;
		z-index: auto;
		max-height: none;
		padding: 0;
		border: none;
		background: transparent;
		box-shadow: none;
		transform: none;
		visibility: visible;
		transition: none;
	}
	.sheet:not(.is-open) {
		display: none;
	}
	.sheet-close {
		display: none;
	}
	.main:has(.sheet.is-open) {
		padding-bottom: calc(var(--dock-h) + var(--safe-b) + var(--s5));
	}
	.dock {
		padding-left: var(--s5);
		padding-right: var(--s5);
	}
	.transport {
		justify-content: flex-start;
		gap: var(--s5);
	}
	.inv-row {
		grid-template-columns: minmax(0, 1.5fr) 70px minmax(0, 1.1fr) 110px 80px auto;
		grid-template-areas: "email kind slice sent status actions";
		gap: var(--s3);
	}
	.inv-status {
		justify-self: start;
	}
	.inv-actions {
		margin-top: 0;
		justify-content: flex-end;
	}
}
@media (min-width: 900px) and (pointer: fine) {
	.btn {
		min-height: 38px;
	}
	.btn-icon {
		width: 38px;
	}
	.btn-round {
		min-height: 52px;
		width: 52px;
	}
	.input,
	select.input,
	textarea.input {
		min-height: 38px;
	}
}
@media (pointer: fine) {
	.only-fine {
		display: inline;
	}
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
