* { box-sizing: border-box; }

:root {
	--bg: #f2f5f9;
	--ink: #1b2838;
	--ink-soft: #41566f;
	--panel: #ffffff;
	--edge: #cdd7e3;
	--edge-dark: #9fb1c7;
	--accent: #1a73e8;
	--accent-soft: #cfe1fc;
	--insect: #2e7d32;
	--arachnid: #8e24aa;
	--myriapod: #ef6c00;
	--crust: #1565c0;
	/* Panel variables for shops */
	--panel-bg-start: #f9fcff;
	--panel-bg-mid: #fef7ff;
	--panel-bg-end: #f5fbff;
	--panel-border: rgba(150,200,255,0.45);
	--panel-accent-a: rgba(170,225,255,0.35);
	--panel-accent-contrast: #073044;
}

.theme-dark {
	--bg: #0f0f0f;
	--ink: #f5f5f5;
	--ink-soft: #b0b0b0;
	--panel: #1f1f1f;
	--edge: #3a3a3a;
	--edge-dark: #2a2a2a;
	--accent: #e0e0e0;
	--accent-soft: #2a2a2a;
	--insect: #4caf50;
	--arachnid: #b366d9;
	--myriapod: #ff9800;
	--crust: #2196f3;
	/* Panel variables for shops */
	--panel-bg-start: #13171b;
	--panel-bg-mid: #171c20;
	--panel-bg-end: #0f1418;
	--panel-border: rgba(255,255,255,0.04);
	--panel-accent-a: rgba(10,30,40,0.16);
	--panel-accent-contrast: #ffffff;
}

.theme-midnight {
	--bg: #0a1428;
	--ink: #e8f0ff;
	--ink-soft: #a8c8e8;
	--panel: #1a2a3a;
	--edge: #2a5a8a;
	--edge-dark: #1a4a6a;
	--accent: #b0d4ff;
	--accent-soft: #1a3a5a;
	--insect: #66bb6a;
	--arachnid: #ce93d8;
	--myriapod: #ffb74d;
	--crust: #64b5f6;
	/* Panel variables for shops */
	--panel-bg-start: #081022;
	--panel-bg-mid: #0b1626;
	--panel-bg-end: #07121b;
	--panel-border: rgba(180,210,240,0.06);
	--panel-accent-a: rgba(10,40,70,0.14);
	--panel-accent-contrast: #d4e6f5;
}

html { height: 100%; }

/* Additional themes copied from main stylesheet to match site-wide palettes */
.theme-sunset {
	--bg: #ffecd1;
	--ink: #3d2817;
	--ink-soft: #5a4027;
	--panel: #fff7ef;
	--edge: #d4a373;
	--edge-dark: #b8885a;
	--accent: #ffb86f;
	--accent-soft: #fff2e6;
	--insect: #7f5a2b;
	--arachnid: #7f4a8a;
	--myriapod: #ff9f5a;
	--crust: #b06a00;
	--panel-bg-start: #fff7ef;
	--panel-bg-mid: #fff2e6;
	--panel-bg-end: #fff0e8;
	--panel-accent-a: rgba(255,200,150,0.22);
	--panel-border: rgba(200,140,90,0.32);
	--panel-accent-contrast: #3d2817;
}

.theme-forest {
	--bg: #d4e8d4;
	--ink: #1f3a1e;
	--ink-soft: #2d4a2c;
	--panel: #f3fbf3;
	--edge: #5a7c59;
	--edge-dark: #486246;
	--accent: #8fb58e;
	--accent-soft: #eef8ee;
	--insect: #2e7d32;
	--arachnid: #6a4a93;
	--myriapod: #a35a00;
	--crust: #2e7d32;
	--panel-bg-start: #f3fbf3;
	--panel-bg-mid: #eef8ee;
	--panel-bg-end: #ecf7ec;
	--panel-accent-a: rgba(160,220,160,0.18);
	--panel-border: rgba(120,180,120,0.18);
	--panel-accent-contrast: #1f3a1e;
}

.theme-purple {
	--bg: #f3e5f5;
	--ink: #311b92;
	--ink-soft: #6a4c93;
	--panel: #fbf7fd;
	--edge: #9575cd;
	--edge-dark: #7e57c2;
	--accent: #b39ddb;
	--accent-soft: #f6eefb;
	--insect: #9c27b0;
	--arachnid: #6a1b9a;
	--myriapod: #ffb74d;
	--crust: #7e57c2;
	--panel-bg-start: #fbf7fd;
	--panel-bg-mid: #f6eefb;
	--panel-bg-end: #f3e8fb;
	--panel-accent-a: rgba(200,170,240,0.18);
	--panel-border: rgba(160,120,200,0.18);
	--panel-accent-contrast: #311b92;
}

body {
	height: 100%;
	background: var(--bg);
	color: var(--ink);
	font: 14px/1.5 Verdana, Tahoma, Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.edu-header {
	background: linear-gradient(#e7effa, #d1e2ff);
	border-bottom: 1px solid var(--edge);
	box-shadow: 0 2px 0 #e3ecfb inset, 0 1px 0 #b8c9e1;
	width: 100%;
}

.theme-dark .edu-header {
	background: linear-gradient(#1f1f1f, #1a1a1a);
	border-bottom: 1px solid var(--edge);
	box-shadow: 0 2px 0 #2a2a2a inset, 0 1px 0 #0f0f0f;
}

.theme-midnight .edu-header {
	background: linear-gradient(#1a2a3a, #0f1f2f);
	border-bottom: 1px solid var(--edge);
	box-shadow: 0 2px 0 #1a3a5a inset, 0 1px 0 #050f1a;
}

/* Header styles for additional themes */
.theme-sunset .edu-header {
	background: linear-gradient(#ffd4a3, #ffb86f);
	color: #3d2817;
	border-bottom: 1px solid var(--edge);
	box-shadow: 0 2px 0 #ffe5c0 inset, 0 1px 0 #d4a373;
}

.theme-forest .edu-header {
	background: linear-gradient(#a8c9a7, #8fb58e);
	color: #1f3a1e;
	border-bottom: 1px solid var(--edge);
	box-shadow: 0 2px 0 #c2d9c1 inset, 0 1px 0 #5a7c59;
}

.theme-purple .edu-header {
	background: linear-gradient(#d1c4e9, #b39ddb);
	color: #311b92;
	border-bottom: 1px solid var(--edge);
	box-shadow: 0 2px 0 #e1d7f5 inset, 0 1px 0 #9575cd;
}
.edu-header .inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.site-title { display: flex; align-items: center; gap: 12px; }
.site-title h1 { font-size: 20px; margin: 0; }
.site-title p { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; }
.logo {
	width: 40px; height: 40px; border-radius: 6px; object-fit: cover;
	border: 1px solid var(--edge);
	background: #fff;
}

.edu-nav .btn-link {
	

	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid var(--edge);
	border-bottom-color: var(--edge-dark);
	border-radius: 6px;
	box-shadow: 0 2px 0 #c9d6e8;
	font-weight: 600;
	line-height: 1.2;
	font: inherit;
	color: var(--ink); 

	text-decoration: none;
	cursor: pointer;
}
.edu-nav .btn-link:hover {
	background: var(--accent-soft);
	border-color: #b3ccf8;
}

.theme-dark .edu-nav .btn-link {
	background: #2a2a2a;
	border: 1px solid var(--edge);
	border-bottom-color: var(--edge-dark);
	box-shadow: 0 2px 0 #1a1a1a;
}

.theme-dark .edu-nav .btn-link:hover {
	background: #3a3a3a;
	border-color: #4a4a4a;
}

.theme-midnight .edu-nav .btn-link {
	background: #1a3a5a;
	border: 1px solid var(--edge);
	border-bottom-color: var(--edge-dark);
	box-shadow: 0 2px 0 #0f2840;
}

.theme-midnight .edu-nav .btn-link:hover {
	background: #2a5a8a;
	border-color: #3a7aaa;
}

.edu-layout {
	max-width: 1200px;
	margin: 16px auto;
	padding: 0 16px 24px;
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 16px;
}

/* Sidebar */
.edu-sidebar .panel {
	background: var(--panel);
	border: 1px solid var(--edge);
	border-bottom-color: var(--edge-dark);
	border-radius: 8px;
	box-shadow: 0 2px 0 #c9d6e8;
	margin-bottom: 12px;
	padding: 12px;
}
.panel-title {
	margin: 0 0 8px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--ink-soft);
}
#search-input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--edge);
	border-radius: 6px;
	background: #f8fbff;
}

.theme-dark #search-input {
	background: #2a2a2a;
	border: 1px solid var(--edge);
	color: #e8e8e8;
}

.theme-midnight #search-input {
	background: #0f1f2a;
	border: 1px solid var(--edge);
	color: #d4e8ff;
}
.search-actions { margin-top: 8px; display: flex; }
.btn-random {
	flex: 1;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid var(--edge);
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	text-align: center;
	box-shadow: 0 2px 0 #c9d6e8;
}
.btn-random:hover {
	background: var(--accent-soft);
	border-color: #b3ccf8;
}

.theme-dark .btn-random {
	background: #2a2a2a;
	border: 1px solid var(--edge);
	box-shadow: 0 2px 0 #1a1a1a;
	color: #e8e8e8;
}

.theme-dark .btn-random:hover {
	background: #3a3a3a;
	border-color: #4a4a4a;
}

.theme-midnight .btn-random {
	background: #1a3a5a;
	border: 1px solid var(--edge);
	box-shadow: 0 2px 0 #0f2840;
	color: #d4e8ff;
}

.theme-midnight .btn-random:hover {
	background: #2a5a8a;
	border-color: #3a7aaa;
}
.categories label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0;
	cursor: pointer;
}
.species-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 50vh;
	overflow: auto;
	border: 1px solid var(--edge);
	border-radius: 6px;
	background: #fff;
}
.species-list li {
	border-bottom: 1px solid #eef2f7;
}
.species-list li:last-child { border-bottom: 0; }

.theme-dark .species-list {
	background: #2a2a2a;
}

.theme-dark .species-list li {
	border-bottom: 1px solid #3a3a3a;
}

.theme-midnight .species-list {
	background: #0f1f2a;
}

.theme-midnight .species-list li {
	border-bottom: 1px solid #1a3a5a;
}
.species-list li.empty {
	padding: 10px; color: var(--ink-soft); font-style: italic;
}
.species-link {
	all: unset;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 10px;
	width: 100%;
}
.species-link:hover { background: #f4f7fc; }

.theme-dark .species-link:hover { 
	background: #3a3a3a; 
}

.theme-midnight .species-link:hover { 
	background: #1a3a5a; 
}
.species-link .text strong { display: block; }
.species-link .text em { font-style: normal; color: var(--ink-soft); font-size: 12px; }
.dot {
	width: 10px; height: 10px; border-radius: 50%;
	border: 1px solid #b7c8df;
}
.dot.insect { background: var(--insect); }
.dot.arachnid { background: var(--arachnid); }
.dot.myriapod { background: var(--myriapod); }
.dot.crustacean { background: var(--crust); }

.did-you-know p { margin: 0; color: var(--ink-soft); }

/* Content */
.edu-content .card {
	background: var(--panel);
	border: 1px solid var(--edge);
	border-bottom-color: var(--edge-dark);
	border-radius: 10px;
	box-shadow: 0 3px 0 #c9d6e8;
	padding: 16px;
}
.edu-content h2 { margin-top: 0; }
.bullet { padding-left: 18px; }

/* Species detail */
.species-detail .detail-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #e9eef6;
	padding-bottom: 8px;
	margin-bottom: 12px;
}
.species-detail .subtitle {
	color: var(--ink-soft);
	font-size: 13px;
	margin-top: 4px;
}
.detail-body { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.media { display: grid; grid-template-rows: auto auto; gap: 12px; }
.photo {
	

	width: 100%;
	max-width: 320px; 

	height: auto;     

	display: block;   /* remove inline gap */
	object-fit: contain; /* don't crop; show entire image */
	border: 1px solid var(--edge);
	border-radius: 6px;
	background: #eef4fb;
	align-self: start; 

}
.photo.placeholder {
	background: repeating-linear-gradient(45deg, #e8f0fb, #e8f0fb 10px, #f4f8ff 10px, #f4f8ff 20px);
	border: 1px dashed #aac0de;
}

.theme-dark .photo {
	background: #3a3a3a;
}

.theme-dark .photo.placeholder {
	background: repeating-linear-gradient(45deg, #2a2a2a, #2a2a2a 10px, #3a3a3a 10px, #3a3a3a 20px);
	border: 1px dashed #4a4a4a;
}

.theme-midnight .photo {
	background: #1a3a5a;
}

.theme-midnight .photo.placeholder {
	background: repeating-linear-gradient(45deg, #0f1f2a, #0f1f2a 10px, #1a3a5a 10px, #1a3a5a 20px);
	border: 1px dashed #2a5a8a;
}
.meta {
	background: #f7fbff;
	border: 1px solid var(--edge);
	border-radius: 6px;
	padding: 10px;
	font-size: 13px;
}

.theme-dark .meta {
	background: #2a2a2a;
	border: 1px solid var(--edge);
	color: #e8e8e8;
}

.theme-midnight .meta {
	background: #0f1f2a;
	border: 1px solid var(--edge);
	color: #d4e8ff;
}
.summary p { margin: 0; }
.facts h3 { margin: 0 0 8px; }

/* Footer */
.edu-footer {
	border-top: 1px solid var(--edge);
	background: #f0f6ff;
	margin-top: 24px;
}

.theme-dark .edu-footer {
	background: #1a1a1a;
}

.theme-midnight .edu-footer {
	background: #0f1f2a;
}
.edu-footer .inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 16px;
	color: var(--ink-soft);
	font-size: 12px;
}

/* Responsive */
@media (max-width: 980px) {
	.edu-layout {
		grid-template-columns: 1fr;
	}
	.species-list { max-height: 50vh; overflow: auto; }
	.detail-body { grid-template-columns: 1fr; }
}

.edu-footer .inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 16px;
	color: var(--ink-soft);
	font-size: 12px;
}

/* Responsive */
@media (max-width: 980px) {
	.edu-layout {
		grid-template-columns: 1fr;
	}
	.species-list { max-height: 50vh; overflow: auto; }
	.detail-body { grid-template-columns: 1fr; }
}

/* Music modal styles */
.modal {
	display: none;
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 2000;
}

.modal .modal-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #ffffff;
	padding: 20px;
	width: 90%;
	max-width: 800px;
	max-height: 80vh;
	overflow-y: auto;
	border-radius: 10px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.theme-dark .modal .modal-content {
	background: #1f1f1f;
	color: #f5f5f5;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.theme-midnight .modal .modal-content {
	background: #1a2a3a;
	color: #e8f0ff;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.modal .close-button {
	position: absolute;
	right: 16px;
	top: 12px;
	font-size: 24px;
	cursor: pointer;
	color: #666;
}

.modal .close-button:hover {
	color: #000;
}

.theme-dark .modal .close-button {
	color: #aaa;
}

.theme-dark .modal .close-button:hover {
	color: #fff;
}

.theme-midnight .modal .close-button {
	color: #7a9dc8;
}

.theme-midnight .modal .close-button:hover {
	color: #d4e8ff;
}

/* ===== MUSIC SHOP STYLING ===== */
.music-modal-shell {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 12px;
}

.music-now {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--edge);
	border-radius: 12px;
	background: linear-gradient(135deg, #f5f8ff, #eef3fb);
}

.theme-dark .music-now {
	background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
	border: 1px solid var(--edge);
}

.theme-midnight .music-now {
	background: linear-gradient(135deg, #1a3a5a, #0f2840);
	border: 1px solid var(--edge);
}

.music-art {
	width: 64px;
	height: 64px;
	border-radius: 14px;
	background: #1d2a44;
	color: #f2f7ff;
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 22px;
	box-shadow: 0 6px 18px rgba(29, 42, 68, 0.25);
}

.theme-dark .music-art {
	background: #3a4a6a;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.theme-midnight .music-art {
	background: #2a5a8a;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.music-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.music-title {
	font-weight: 700;
	font-size: 1.05rem;
	color: #0f172a;
}

.theme-dark .music-title {
	color: #e8e8e8;
}

.theme-midnight .music-title {
	color: #d4e8ff;
}

.music-desc {
	font-size: 0.9rem;
	color: #4b5563;
}

.theme-dark .music-desc {
	color: #a0a0a0;
}

.theme-midnight .music-desc {
	color: #8a9aaa;
}

.music-status {
	font-size: 0.85rem;
	color: #2563eb;
	font-weight: 600;
}

.theme-dark .music-status {
	color: #60a5fa;
}

.theme-midnight .music-status {
	color: #64b5f6;
}

.music-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.music-controls button {
	flex: 1 1 90px;
	padding: 10px 12px;
	border: 1px solid #c6d4ee;
	border-radius: 10px;
	background: #f3f6fd;
	color: #0f172a;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.theme-dark .music-controls button {
	border: 1px solid #4a4a4a;
	background: #2a2a2a;
	color: #e8e8e8;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-midnight .music-controls button {
	border: 1px solid #2a5a8a;
	background: #1a3a5a;
	color: #d4e8ff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.music-controls button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
	background: #e7edfb;
}

.theme-dark .music-controls button:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	background: #3a3a3a;
}

.theme-midnight .music-controls button:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	background: #2a5a8a;
}

.music-controls button.active {
	border-color: #2563eb;
	background: #dbeafe;
	color: #0f172a;
}

.theme-dark .music-controls button.active {
	border-color: #60a5fa;
	background: #1a3a5a;
	color: #e8e8e8;
}

.theme-midnight .music-controls button.active {
	border-color: #64b5f6;
	background: #0f2840;
	color: #d4e8ff;
}

.music-progress {
	display: flex;
	align-items: center;
	gap: 10px;
}

.music-progress-bar {
	position: relative;
	flex: 1;
	height: 8px;
	border-radius: 999px;
	background: #e6edf5;
	overflow: hidden;
	cursor: pointer;
	padding: 6px 0;
	background-clip: content-box;
}

.theme-dark .music-progress-bar {
	background: #3a3a3a;
}

.theme-midnight .music-progress-bar {
	background: #1a3a5a;
}

.music-progress-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #60a5fa, #2563eb);
	transition: width 0.2s ease;
	pointer-events: none;
}

.theme-dark .music-progress-fill {
	background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.theme-midnight .music-progress-fill {
	background: linear-gradient(90deg, #64b5f6, #42a5f5);
}

/* ===== THEME SHOP STYLING ===== */
.theme-shop-item {
	border: 1px solid var(--panel-border);
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 10px;
	background: linear-gradient(180deg, var(--panel-bg-start), var(--panel-bg-mid));
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: relative;
	color: inherit;
}

.theme-shop-item.active {
	border: 2px solid var(--panel-accent-a);
	background: linear-gradient(180deg, var(--panel-bg-mid), var(--panel-bg-end));
}

.theme-shop-item .active-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	padding: 4px 8px;
	background: var(--panel-accent-a);
	color: var(--panel-accent-contrast);
	font-size: 0.75em;
	font-weight: 700;
	border-radius: 4px;
	border: 1px solid rgba(0,0,0,0.04);
}

.theme-shop-item .price-row {
	font-size: 0.9em;
	font-weight: 600;
}

.theme-shop-item .price-free,
.theme-shop-item .price-owned {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--panel-accent-a);
	color: var(--panel-accent-contrast);
	border: 1px solid var(--panel-border);
}

.theme-shop-item .action-btn {
	padding: 10px;
	margin-top: 8px;
	border: 2px solid var(--panel-border);
	border-radius: 6px;
	font-size: 0.95em;
	font-weight: 600;
	transition: opacity 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease;
	background: linear-gradient(180deg, var(--panel-bg-mid), var(--panel-bg-end));
	color: inherit;
	cursor: pointer;
}

.theme-shop-item .action-btn:hover:not(:disabled) {
	opacity: 0.9;
	transform: translateY(-1px);
}

.theme-shop-item .action-btn.active,
.theme-shop-item .action-btn.active:disabled {
	background: var(--panel-accent-a);
	color: var(--panel-accent-contrast);
	cursor: default;
}

.theme-shop-item .action-btn.owned {
	background: transparent;
	color: var(--panel-accent-contrast);
	border-color: var(--panel-border);
}

.modal-header {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.modal-header h2 {
	margin: 0;
	font-size: 1.4rem;
}

.balance {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
}

.coin-icon {
	width: 20px;
	height: 20px;
}

.music-time {
	font-size: 0.85rem;
	color: #475569;
	min-width: 42px;
	text-align: center;
}

.theme-dark .music-time {
	color: #a0a0a0;
}

.theme-midnight .music-time {
	color: #7a9aaa;
}

.music-track {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 12px;
	margin-bottom: 10px;
	border-radius: 12px;
	border: 1px solid #e5edf7;
	background: #f8fafc;
	flex-wrap: nowrap;
}

.theme-dark .music-track {
	border: 1px solid var(--edge);
	background: #2a2a2a;
}

.theme-midnight .music-track {
	border: 1px solid var(--edge);
	background: #0f1f2a;
}

.music-track-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 auto;
	min-width: 0;
}

.music-track-title {
	font-weight: 700;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.theme-dark .music-track-title {
	color: #e8e8e8;
}

.theme-midnight .music-track-title {
	color: #d4e8ff;
}

.music-track-desc {
	font-size: 0.9rem;
	color: #4b5563;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.theme-dark .music-track-desc {
	color: #a0a0a0;
}

.theme-midnight .music-track-desc {
	color: #8a9aaa;
}

.music-track-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 300px;
}

.music-track-price {
	font-weight: 700;
	color: #0f172a;
}

.theme-dark .music-track-price {
	color: #e8e8e8;
}

.theme-midnight .music-track-price {
	color: #d4e8ff;
}

.music-track-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9rem;
	color: #334155;
}

.theme-dark .music-track-toggle {
	color: #a0a0a0;
}

.theme-midnight .music-track-toggle {
	color: #8a9aaa;
}

.music-inline-btn {
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid #c6d4ee;
	background: white;
	color: #0f172a;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.12s ease;
}

.theme-dark .music-inline-btn {
	border: 1px solid var(--edge);
	background: #1f1f1f;
	color: #e8e8e8;
}

.theme-midnight .music-inline-btn {
	border: 1px solid var(--edge);
	background: #0a1428;
	color: #d4e8ff;
}

.music-inline-btn:hover:enabled {
	background: #e7edfb;
	transform: translateY(-1px);
}

.theme-dark .music-inline-btn:hover:enabled {
	background: #3a3a3a;
	transform: translateY(-1px);
}

.theme-midnight .music-inline-btn:hover:enabled {
	background: #1a3a5a;
	transform: translateY(-1px);
}

.music-inline-btn.secondary {
	background: #0f172a;
	color: #f8fafc;
	border-color: #0f172a;
}

.theme-dark .music-inline-btn.secondary {
	background: #f0f0f0;
	color: #0f0f0f;
	border-color: #f0f0f0;
}

.theme-midnight .music-inline-btn.secondary {
	background: #e8f0ff;
	color: #0a1428;
	border-color: #e8f0ff;
}

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

@media (max-width: 640px) {
	.music-track {
		flex-direction: column;
		align-items: flex-start;
	}

	.music-track-actions {
		flex-basis: 100%;
	}
}

/* Mobile header/nav tweaks: keep shop buttons side-by-side and allow horizontal scrolling */
@media (max-width: 640px) {
	.edu-header .inner {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.edu-nav {
		display: flex;
		gap: 8px;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.edu-nav .btn-link {
		flex: 0 0 auto;
		white-space: nowrap;
	}
}
