*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--bg: #0f0f0f;
	--surface: #1a1a2e;
	--surface-2: #16213e;
	--primary: #e94560;
	--primary-hover: #ff6b81;
	--accent: #0f3460;
	--text: #eee;
	--text-muted: #999;
	--star-empty: #444;
	--star-filled: #f1c40f;
	--green: #2ecc71;
	--yellow: #f39c12;
	--red: #e74c3c;
	--radius: 12px;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	line-height: 1.5;
}

/* --- Concert Countdown Banner --- */

.countdown-banner {
	text-align: center;
	padding: 12px 16px;
	font-weight: 700;
	font-size: 1.1rem;
	letter-spacing: 0.5px;
	border-radius: 10px;
	margin-bottom: 16px;
}

.countdown-banner.green {
	background: var(--green);
	color: #000;
}
.countdown-banner.yellow {
	background: var(--yellow);
	color: #000;
}
.countdown-banner.red {
	background: var(--red);
	color: #fff;
}
.countdown-banner.today {
	background: linear-gradient(135deg, var(--primary), #ff6b81);
	color: #fff;
	font-size: 1.3rem;
}

/* --- Navigation --- */

nav {
	display: flex;
	justify-content: center;
	gap: 4px;
	padding: 12px 16px;
	background: var(--surface);
	border-bottom: 1px solid #333;
	flex-wrap: wrap;
}

nav button {
	background: transparent;
	color: var(--text-muted);
	border: 1px solid #333;
	padding: 8px 18px;
	border-radius: 20px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: all 0.2s;
}

nav button:hover {
	color: var(--text);
	border-color: var(--primary);
}

nav button.active {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

/* --- Container --- */

.container {
	max-width: 640px;
	margin: 0 auto;
	padding: 20px 16px;
}

/* --- Identity Screen --- */

#identity-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 70vh;
	text-align: center;
}

#identity-screen h1 {
	font-size: 2rem;
	margin-bottom: 8px;
}

#identity-screen p {
	color: var(--text-muted);
	margin-bottom: 24px;
}

.identity-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 320px;
}

.identity-form input {
	padding: 12px 16px;
	border-radius: var(--radius);
	border: 1px solid #333;
	background: var(--surface);
	color: var(--text);
	font-size: 1rem;
	outline: none;
}

.identity-form input:focus {
	border-color: var(--primary);
}

/* --- Buttons --- */

.btn {
	padding: 12px 24px;
	border-radius: var(--radius);
	border: none;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-primary {
	background: var(--primary);
	color: #fff;
}

.btn-primary:hover {
	background: var(--primary-hover);
}

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

.btn-secondary {
	background: var(--surface-2);
	color: var(--text);
	border: 1px solid #333;
}

.btn-secondary:hover {
	border-color: var(--primary);
}

/* --- Instrument Picker --- */

.instrument-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 16px 0;
}

.instrument-btn {
	padding: 16px;
	border-radius: var(--radius);
	border: 2px solid #333;
	background: var(--surface);
	color: var(--text);
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.2s;
	text-align: center;
}

.instrument-btn:hover:not(:disabled) {
	border-color: var(--primary);
}

.instrument-btn.selected {
	border-color: var(--primary);
	background: var(--accent);
}

.instrument-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.instrument-btn .emoji {
	font-size: 2rem;
	display: block;
	margin-bottom: 4px;
}

.instrument-btn .taken-by {
	font-size: 0.75rem;
	color: var(--text-muted);
}

/* --- Star Rating --- */

.star-rating {
	display: inline-flex;
	gap: 4px;
	direction: rtl;
}

.star-rating .star {
	font-size: 1.8rem;
	cursor: pointer;
	color: var(--star-empty);
	transition: color 0.15s;
	-webkit-user-select: none;
	user-select: none;
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
	color: var(--star-filled);
}

.star-rating .star.active,
.star-rating .star.active ~ .star {
	color: var(--star-filled);
}

.star-rating-small {
	display: inline-flex;
	gap: 2px;
}

.star-rating-small .star {
	font-size: 1rem;
	color: var(--star-empty);
}

.star-rating-small .star.active {
	color: var(--star-filled);
}

/* --- Initial Rating Screen --- */

.initial-rating-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 20px 0;
}

.initial-rating-item {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.initial-rating-item .song-info {
	flex: 1;
	min-width: 150px;
}

.initial-rating-item .song-title {
	font-weight: 600;
}

.initial-rating-item .song-artist {
	color: var(--text-muted);
	font-size: 0.85rem;
}

/* --- Daily View --- */

.progress-bar {
	text-align: center;
	color: var(--text-muted);
	font-size: 0.9rem;
	margin-bottom: 16px;
}

.daily-song-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.song-card {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 20px;
	transition: opacity 0.3s;
}

.song-card.completed {
	opacity: 0.5;
}

.daily-card-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.save-btn {
	background: none;
	border: 2px solid var(--text-muted);
	color: var(--text-muted);
	border-radius: 8px;
	padding: 6px 8px;
	cursor: not-allowed;
	opacity: 0.3;
	transition: opacity 0.2s, color 0.2s, border-color 0.2s;
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.save-btn.visible {
	opacity: 1;
	cursor: pointer;
	color: var(--green);
	border-color: var(--green);
}

.save-btn.visible:hover {
	background: var(--green);
	color: var(--bg);
}

.save-btn:disabled,
.save-btn.visible:disabled {
	opacity: 0.3;
	cursor: default;
}

.undo-btn {
	background: none;
	border: 2px solid var(--text-muted);
	color: var(--text-muted);
	border-radius: 8px;
	padding: 6px 10px;
	cursor: not-allowed;
	opacity: 0;
	transition: opacity 0.2s, color 0.2s, border-color 0.2s;
	font-size: 14px;
	font-weight: bold;
	flex-shrink: 0;
	pointer-events: none;
}

.undo-btn.visible {
	opacity: 1;
	cursor: pointer;
	color: var(--red);
	border-color: var(--red);
	pointer-events: auto;
}

.undo-btn.visible:hover {
	background: var(--red);
	color: var(--bg);
}

.song-card h3 {
	margin-bottom: 4px;
}

.song-card .artist {
	color: var(--text-muted);
	font-size: 0.9rem;
	margin-bottom: 16px;
}

.song-card iframe {
	width: 100%;
	border-radius: 12px;
	margin: 12px 0;
}

.song-card .rate-section {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.rated-label {
	color: var(--green);
	font-size: 0.85rem;
	font-weight: 600;
}

.song-info-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.album-art {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.music-link {
	text-decoration: none;
	font-size: 0.8rem;
	white-space: nowrap;
	flex-shrink: 0;
}

.music-link:hover {
	text-decoration: underline;
}

.spotify-link {
	color: #1db954;
}

.apple-music-link {
	color: #fc3c44;
}

.song-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	flex-shrink: 0;
}

.song-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.meta-tag {
	font-size: 0.75rem;
	color: var(--text-muted);
	background: var(--bg);
	padding: 2px 8px;
	border-radius: 10px;
	white-space: nowrap;
}

.resource-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.resource-link {
	font-size: 0.8rem;
	color: var(--primary);
	text-decoration: none;
	padding: 4px 10px;
	border: 1px solid var(--primary);
	border-radius: 14px;
	transition: all 0.2s;
}

.resource-link:hover {
	background: var(--primary);
	color: #fff;
}

/* --- Accordion --- */

.accordion {
	margin-top: 24px;
	border-radius: var(--radius);
	overflow: hidden;
}

.accordion-header {
	cursor: pointer;
	padding: 14px 20px;
	background: var(--surface);
	color: var(--text-muted);
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: var(--radius);
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: background 0.2s;
}

.accordion-header:hover {
	background: var(--surface-2);
	color: var(--text);
}

.accordion-header::before {
	content: "\25B6";
	font-size: 0.7rem;
	transition: transform 0.2s;
}

.accordion[open] > .accordion-header::before {
	transform: rotate(90deg);
}

.accordion-header::-webkit-details-marker {
	display: none;
}

.accordion-body {
	padding-top: 16px;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-6px); }
	75% { transform: translateX(6px); }
}

.shake {
	animation: shake 0.3s ease-in-out;
}

/* --- Done Screen --- */

/* --- Stats --- */

.stats-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.stat-card {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 16px;
}

.stat-card .stat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.stat-card .song-title {
	font-weight: 600;
}

.stat-card .song-artist {
	color: var(--text-muted);
	font-size: 0.85rem;
}

.sparkline {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 30px;
	margin-top: 8px;
}

.sparkline .bar {
	flex: 1;
	max-width: 12px;
	border-radius: 2px 2px 0 0;
	transition: height 0.3s;
}

.sparkline .bar.c1 {
	background: var(--red);
}
.sparkline .bar.c2 {
	background: #e67e22;
}
.sparkline .bar.c3 {
	background: var(--yellow);
}
.sparkline .bar.c4 {
	background: #87ceeb;
}
.sparkline .bar.c5 {
	background: var(--green);
}

/* --- Stat History Accordion --- */

.stat-history {
	margin-top: 4px;
}

.stat-history-toggle {
	cursor: pointer;
	font-size: 0.75rem;
	color: var(--text-muted);
	opacity: 0.6;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 5px;
}

.stat-history-toggle:hover {
	opacity: 1;
}

.stat-history-toggle::-webkit-details-marker {
	display: none;
}

.stat-history-toggle::before {
	content: "\25B6";
	font-size: 0.5rem;
	transition: transform 0.2s;
}

.stat-history[open] > .stat-history-toggle::before {
	transform: rotate(90deg);
}

.stat-history-list {
	margin-top: 6px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 200px;
	overflow-y: auto;
}

.stat-history-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 4px 0;
	border-bottom: 1px solid var(--surface-2);
	font-size: 0.82rem;
}

.stat-history-row:last-child {
	border-bottom: none;
}

.stat-history-date {
	color: var(--text-muted);
}

/* --- Settings --- */

.settings-form {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 24px;
}

.settings-form label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
}

.settings-form input[type="number"] {
	padding: 10px 14px;
	border-radius: var(--radius);
	border: 1px solid #333;
	background: var(--bg);
	color: var(--text);
	font-size: 1rem;
	width: 80px;
	outline: none;
}

.settings-form input[type="number"]:focus {
	border-color: var(--primary);
}

.settings-form .hint {
	color: var(--text-muted);
	font-size: 0.85rem;
	margin-top: 4px;
}

.settings-form .btn {
	margin-top: 16px;
}

.service-toggle {
	display: flex;
	gap: 0;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid #333;
	margin-top: 8px;
}

.service-btn {
	flex: 1;
	padding: 10px 16px;
	background: var(--bg);
	color: var(--text-muted);
	border: none;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	transition: all 0.2s;
}

.service-btn:first-child {
	border-right: 1px solid #333;
}

.service-btn.active {
	background: var(--primary);
	color: #fff;
}

.service-btn:hover:not(.active) {
	color: var(--text);
}

/* --- Avatar Upload --- */

.avatar-upload-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.avatar-preview {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--accent);
	color: var(--text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.4rem;
	flex-shrink: 0;
	overflow: hidden;
}

.avatar-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.avatar-file-input {
	display: none;
}

.avatar-btn {
	cursor: pointer;
	padding: 8px 16px;
	font-size: 0.85rem;
}

.notif-toggle-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}

.notif-toggle-row input[type="checkbox"] {
	width: 20px;
	height: 20px;
	accent-color: var(--accent);
	cursor: pointer;
	flex-shrink: 0;
}

.avatar-status {
	font-size: 0.85rem;
	color: var(--text-muted);
}

.avatar-status.success {
	color: var(--green);
}

.avatar-status.error {
	color: var(--red);
}

.band-icon-preview {
	width: 56px;
	height: 56px;
	border-radius: var(--radius);
	background: var(--accent);
	flex-shrink: 0;
	overflow: hidden;
}

.band-icon-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --- Band Member Avatar --- */

.band-member-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.band-member-avatar {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.band-member-initial {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--accent);
	color: var(--text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7rem;
	font-weight: 700;
}

.band-member-instrument {
	position: absolute;
	bottom: -3px;
	right: -5px;
	font-size: 0.6rem;
	line-height: 1;
	background: var(--surface);
	border-radius: 50%;
	padding: 1px;
}

/* --- Admin --- */

.admin-song-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 24px;
}

.admin-song-item {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.admin-song-item.inactive {
	opacity: 0.4;
}

.admin-song-item .song-info {
	flex: 1;
	min-width: 0;
}

.admin-song-item .song-title {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.admin-song-item .song-artist {
	color: var(--text-muted);
	font-size: 0.85rem;
}

.admin-song-item .actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.btn-icon {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	border: 1px solid #333;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	font-size: 1rem;
	transition: all 0.2s;
}

.btn-icon:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.btn-icon.danger:hover {
	border-color: var(--red);
	color: var(--red);
}

/* --- Modal --- */

.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 16px;
}

.modal {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 24px;
	width: 100%;
	max-width: 420px;
}

.modal h3 {
	margin-bottom: 16px;
}

.modal .form-group {
	margin-bottom: 12px;
}

.modal label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.modal input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #333;
	background: var(--bg);
	color: var(--text);
	font-size: 1rem;
	outline: none;
}

.modal input:focus {
	border-color: var(--primary);
}

.modal .modal-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 20px;
}

/* --- Messages --- */

.message {
	padding: 12px 16px;
	border-radius: var(--radius);
	margin-bottom: 16px;
	font-size: 0.9rem;
}

.message.success {
	background: rgba(46, 204, 113, 0.15);
	border: 1px solid var(--green);
	color: var(--green);
}

.message.error {
	background: rgba(231, 76, 60, 0.15);
	border: 1px solid var(--red);
	color: var(--red);
}

/* --- Logout --- */

.logout-link {
	display: block;
	text-align: center;
	margin-top: 32px;
	color: var(--text-muted);
	font-size: 0.85rem;
	cursor: pointer;
	text-decoration: underline;
}

.logout-link:hover {
	color: var(--primary);
}

/* --- Search & Repertoire --- */

.repertoire-top-row {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
	align-items: center;
}

.repertoire-top-row .search-input {
	flex: 1;
	margin-bottom: 0;
}

.search-input {
	width: 100%;
	padding: 10px 14px;
	border-radius: var(--radius);
	border: 1px solid #333;
	background: var(--surface);
	color: var(--text);
	font-size: 1rem;
	outline: none;
	margin-bottom: 16px;
}

.search-input:focus {
	border-color: var(--primary);
}

.reassess-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 16px;
	position: sticky;
	bottom: 16px;
}

.reassess-actions .btn {
	flex: 1;
	max-width: 200px;
}

/* --- Album Art Placeholder --- */

.album-art-placeholder {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	background: var(--accent);
	color: var(--text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.2rem;
	flex-shrink: 0;
}

/* --- Band Stats --- */

.band-avg {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.band-members-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.band-member-chip {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--bg);
	padding: 4px 10px;
	border-radius: 10px;
}

.band-member-name {
	font-size: 0.8rem;
	color: var(--text-muted);
	font-weight: 600;
}

/* --- Admin Modal Extras --- */

.modal-field-group {
	display: flex;
	flex-direction: column;
}

.form-group-half {
	display: inline-flex;
	flex-direction: column;
	width: calc(50% - 6px);
	margin-right: 12px;
	vertical-align: top;
}

.form-group-half:nth-child(even) {
	margin-right: 0;
}

.modal-details {
	margin-top: 8px;
	margin-bottom: 4px;
}

.modal-details summary {
	cursor: pointer;
	color: var(--text-muted);
	font-size: 0.85rem;
	margin-bottom: 8px;
}

.modal-details[open] summary {
	margin-bottom: 12px;
}

/* --- Sessions --- */

.session-banner {
	background: var(--accent);
	border-radius: var(--radius);
	padding: 14px 16px;
	margin-bottom: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	transition: background 0.2s;
}

.session-banner:hover {
	background: var(--surface-2);
}

.session-banner-status {
	color: var(--text-muted);
	font-size: 0.85rem;
}

.session-banner-action {
	color: var(--primary);
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
}

.session-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.session-list-item {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 12px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	transition: background 0.2s;
}

.session-list-item:hover {
	background: var(--surface-2);
}

.session-date {
	font-weight: 600;
}

.session-meta {
	font-size: 0.8rem;
	color: var(--text-muted);
}

.session-rated {
	font-size: 0.85rem;
	color: var(--yellow);
	font-weight: 600;
}

.session-rated.done {
	color: var(--green);
}

.session-date-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 16px 0;
}

.session-date-row label {
	font-weight: 600;
}

.session-song-item {
	cursor: pointer;
}

.session-select-row {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-bottom: 12px;
}

.attendance-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-bottom: 8px;
}

.attendance-chip {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 20px;
	background: var(--surface);
	border: 1px solid #333;
	cursor: pointer;
	font-size: 0.9rem;
	transition: all 0.2s;
	opacity: 0.4;
}

.attendance-chip.active {
	opacity: 1;
	border-color: var(--primary);
	background: var(--accent);
}

.attendance-chip input[type="checkbox"] {
	display: none;
}

/* --- Responsive --- */

@media (max-width: 480px) {
	.instrument-grid {
		grid-template-columns: 1fr;
	}

	.daily-card-header {
		flex-wrap: wrap;
	}

	.stat-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.song-right {
		align-items: flex-start;
	}

	nav {
		gap: 3px;
		padding: 8px 12px;
	}

	nav button {
		padding: 6px 12px;
		font-size: 0.8rem;
	}

	.container {
		padding: 16px 12px;
	}

	.album-art {
		width: 40px;
		height: 40px;
	}
}

/* Snackbar */
.snackbar {
	position: fixed;
	bottom: 80px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--green);
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 0.9rem;
	opacity: 0;
	transition: opacity 0.3s, transform 0.3s;
	pointer-events: none;
	z-index: 1000;
	white-space: nowrap;
}

.snackbar.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* Safe area for notched phones */
body {
	padding-top: env(safe-area-inset-top);
	padding-bottom: env(safe-area-inset-bottom);
}

/* --- Set list --- */

.setlist-print-header {
	display: none;
}

.setlist-actions {
	flex-wrap: wrap;
	gap: 8px;
}

.setlist-title {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 140px;
}

.setlist-title h2 {
	margin: 0;
}

.setlist-action-btn {
	padding: 8px 14px;
	font-size: 0.85rem;
}

.setlist {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.setlist-row {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 10px 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.setlist-row-song {
	flex-wrap: wrap;
}

.drag-handle {
	cursor: grab;
	color: var(--text-muted);
	font-size: 1.1rem;
	letter-spacing: -3px;
	padding: 4px 6px;
	user-select: none;
	-webkit-user-select: none;
	flex-shrink: 0;
	touch-action: none;
}

.drag-handle:active {
	cursor: grabbing;
}

.setlist-num {
	color: var(--text-muted);
	font-size: 0.85rem;
	font-weight: 700;
	min-width: 24px;
	text-align: right;
	flex-shrink: 0;
}

.setlist-art {
	width: 36px;
	height: 36px;
	font-size: 1rem;
}

.setlist-main {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.setlist-info {
	min-width: 0;
	overflow: hidden;
}

.setlist-info .song-title {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.setlist-info .song-artist {
	font-size: 0.8rem;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.setlist-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	flex-shrink: 0;
}

.setlist-delete {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	font-size: 1rem;
}

.setlist-row-break {
	background: transparent;
	border-top: 1px dashed #444;
	border-bottom: 1px dashed #444;
	border-radius: 0;
	padding: 6px 12px;
}

.setlist-break-main {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
}

.setlist-break-line {
	flex: 1;
	height: 1px;
	background: #444;
}

.setlist-break-time {
	font-size: 0.75rem;
	color: var(--text-muted);
	font-weight: 600;
	letter-spacing: 0.5px;
	flex-shrink: 0;
	min-width: 36px;
	text-align: center;
}

.break-label {
	background: transparent;
	border: none;
	color: var(--text);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-align: center;
	outline: none;
	padding: 4px 8px;
	border-radius: 4px;
	min-width: 80px;
	max-width: 200px;
}

.break-label:focus {
	background: var(--surface);
}

.setlist-empty {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 32px 20px;
	text-align: center;
	color: var(--text-muted);
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.setlist-ghost {
	opacity: 0.4;
}

.setlist-picker-list {
	max-height: 50vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}

.setlist-picker-row {
	background: var(--bg);
	border-radius: 8px;
	padding: 8px 10px;
	cursor: pointer;
	transition: background 0.15s;
}

.setlist-picker-row:hover {
	background: var(--accent);
}

.setlist-picker-empty {
	color: var(--text-muted);
	text-align: center;
	padding: 16px;
}

@media (max-width: 480px) {
	.setlist-row-song {
		row-gap: 6px;
	}
	.setlist-meta {
		width: 100%;
		justify-content: flex-end;
	}
}

/* --- Print view (A4) --- */

@media print {
	@page {
		size: A4;
		margin: 1.5cm;
	}

	html, body {
		background: #fff !important;
		color: #000 !important;
	}

	#main-nav,
	.countdown-banner,
	.setlist-actions,
	.setlist-empty,
	.modal-overlay,
	.snackbar,
	.drag-handle,
	.setlist-delete,
	.setlist-art,
	.album-art-placeholder.setlist-art,
	.star-rating-small {
		display: none !important;
	}

	.container {
		max-width: none;
		padding: 0;
	}

	.setlist-print-header {
		display: block;
		text-align: center;
		margin-bottom: 14px;
		border-bottom: 1px solid #000;
		padding-bottom: 8px;
	}

	.setlist-print-title {
		font-size: 16pt;
		font-weight: 700;
	}

	.setlist-print-meta {
		font-size: 10pt;
		color: #444;
		margin-top: 2px;
	}

	.setlist {
		display: block;
		gap: 0;
	}

	.setlist-row {
		background: transparent !important;
		border: none;
		border-radius: 0;
		padding: 4px 0;
		page-break-inside: avoid;
		break-inside: avoid;
		display: flex;
		align-items: baseline;
		gap: 8px;
		font-size: 11pt;
	}

	.setlist-row-song {
		border-bottom: 1px dotted #ccc;
	}

	.setlist-num {
		color: #000 !important;
		font-weight: 700;
		min-width: 22px;
	}

	.setlist-main {
		flex: 1;
		display: flex;
		align-items: baseline;
		gap: 6px;
	}

	.setlist-info {
		display: flex;
		align-items: baseline;
		gap: 6px;
	}

	.setlist-info .song-title {
		color: #000 !important;
		font-weight: 700;
		white-space: normal;
		overflow: visible;
	}

	.setlist-info .song-artist {
		color: #555 !important;
		font-size: 10pt;
		font-style: italic;
		white-space: normal;
		overflow: visible;
	}

	.setlist-info .song-artist::before {
		content: "— ";
	}

	.setlist-meta {
		font-size: 9.5pt;
		color: #444;
	}

	.setlist-meta .meta-tag {
		background: transparent !important;
		color: #444 !important;
		padding: 0;
		border: none;
	}

	.setlist-meta .meta-tag + .meta-tag::before {
		content: " · ";
	}

	.setlist-row-break {
		border-top: none;
		border-bottom: none;
		padding: 8px 0;
		justify-content: center;
		page-break-after: always;
		break-after: page;
	}

	.setlist-row-break:last-child {
		page-break-after: auto;
		break-after: auto;
	}

	.setlist-break-main {
		justify-content: center;
		gap: 8px;
	}

	.setlist-break-line {
		background: #000;
		max-width: 25%;
	}

	.setlist-break-time {
		color: #000 !important;
		font-size: 9.5pt;
		font-weight: 700;
		letter-spacing: 0;
	}

	.break-label {
		color: #000 !important;
		background: transparent !important;
		font-style: italic;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 1px;
		min-width: 0;
	}
}
