/* ==========================================================================
   Media Store Theme — Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
	--mst-bg-base:     #0a0a0c;
	--mst-bg-raised:   #111116;
	--mst-bg-elevated: #1a1a20;
	--mst-bg-hover:    #22222a;
	--mst-accent:      #5c6ef4; /* overridden by Customizer */
	--mst-accent-dim:  rgba(92, 110, 244, 0.18);
	--mst-text-1:      #f0f0f5;
	--mst-text-2:      #8888a0;
	--mst-text-3:      #505065;
	--mst-line:        rgba(255, 255, 255, 0.06);
	--mst-line-hover:  rgba(255, 255, 255, 0.12);
	--mst-radius-sm:   4px;
	--mst-radius:      8px;
	--mst-radius-lg:   14px;
	--mst-radius-xl:   20px;
	--mst-shadow:      0 4px 24px rgba(0, 0, 0, 0.5);
	--mst-shadow-lg:   0 12px 48px rgba(0, 0, 0, 0.7);
	--mst-transition:  150ms ease;
	--mst-container:   1280px;
	--mst-gap:         24px;
	--mst-header-h:    64px;
	--mst-player-h:    72px;
}

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

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	background-color: var(--mst-bg-base);
	color: var(--mst-text-1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.9375rem;
	line-height: 1.6;
	min-height: 100vh;
	padding-bottom: var(--mst-player-h);
}

body.mst-player-open {
	padding-bottom: var(--mst-player-h);
}

a { color: var(--mst-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--mst-accent); outline-offset: 3px; border-radius: var(--mst-radius-sm); }

img, video { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

button {
	cursor: pointer;
	font: inherit;
	border: none;
	background: none;
	color: inherit;
}

/* --------------------------------------------------------------------------
   3. Layout Utilities
   -------------------------------------------------------------------------- */
.mst-container {
	max-width: var(--mst-container);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 48px);
}

.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;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.mst-header {
	position: sticky;
	top: 0;
	z-index: 200;
	height: var(--mst-header-h);
	background: rgba(10, 10, 12, 0.88);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--mst-line);
	display: flex;
	align-items: center;
}

.mst-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	width: 100%;
}

.mst-header__brand {
	flex-shrink: 0;
}

.mst-header__brand a {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--mst-text-1);
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.mst-header__brand a:hover { color: var(--mst-accent); }

.mst-header__brand img { height: 32px; width: auto; }

.mst-header__brand .custom-logo-link { display: flex; }

.mst-nav { flex: 1; }

.mst-nav__list {
	display: flex;
	align-items: center;
	gap: 4px;
}

.mst-nav__list li a {
	display: block;
	padding: 6px 14px;
	border-radius: var(--mst-radius);
	color: var(--mst-text-2);
	font-size: 0.875rem;
	font-weight: 500;
	transition: color var(--mst-transition), background var(--mst-transition);
}

.mst-nav__list li a:hover,
.mst-nav__list li.current-menu-item > a {
	color: var(--mst-text-1);
	background: var(--mst-bg-hover);
	text-decoration: none;
}

.mst-nav__list li.current-menu-item > a {
	color: var(--mst-accent);
}

.mst-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	flex-shrink: 0;
}

.mst-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: var(--mst-radius);
	color: var(--mst-text-2);
	transition: color var(--mst-transition), background var(--mst-transition);
}

.mst-icon-btn:hover {
	color: var(--mst-text-1);
	background: var(--mst-bg-hover);
}

.mst-hamburger { display: none; }

/* Search Overlay */
.mst-search-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 300;
	background: rgba(10, 10, 12, 0.96);
	align-items: flex-start;
	justify-content: center;
	padding-top: 120px;
}

.mst-search-overlay.is-open { display: flex; }

.mst-search-overlay .search-form {
	width: 100%;
	max-width: 640px;
	padding-inline: 24px;
	position: relative;
}

.mst-search-overlay .search-form label { display: none; }

.mst-search-overlay .search-field {
	width: 100%;
	background: var(--mst-bg-elevated);
	border: 1px solid var(--mst-line-hover);
	border-radius: var(--mst-radius-lg);
	padding: 16px 60px 16px 24px;
	color: var(--mst-text-1);
	font-size: 1.25rem;
	outline: none;
	transition: border-color var(--mst-transition);
}

.mst-search-overlay .search-field:focus {
	border-color: var(--mst-accent);
}

.mst-search-overlay .search-submit {
	position: absolute;
	right: 32px;
	top: 50%;
	transform: translateY(-50%);
	background: var(--mst-accent);
	border-radius: var(--mst-radius);
	padding: 8px 16px;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity var(--mst-transition);
}

.mst-search-overlay .search-submit:hover { opacity: 0.85; }

.mst-search-overlay__close {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: var(--mst-text-2);
	font-size: 1.5rem;
	transition: color var(--mst-transition);
}

.mst-search-overlay__close:hover { color: var(--mst-text-1); }

/* Mobile Nav */
.mst-mobile-nav {
	display: none;
	position: fixed;
	inset: var(--mst-header-h) 0 0 0;
	z-index: 190;
	background: var(--mst-bg-raised);
	overflow-y: auto;
	padding: 16px;
}

.mst-mobile-nav.is-open { display: block; }

.mst-mobile-nav .mst-nav__list {
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
}

.mst-mobile-nav .mst-nav__list li a {
	padding: 12px 16px;
	font-size: 1rem;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.mst-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 10px 22px;
	border-radius: var(--mst-radius);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	transition: opacity var(--mst-transition), background var(--mst-transition), transform var(--mst-transition);
	cursor: pointer;
	text-decoration: none !important;
	white-space: nowrap;
}

.mst-btn:active { transform: scale(0.97); }

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

.mst-btn--primary:hover { opacity: 0.88; color: #fff; }

.mst-btn--ghost {
	background: rgba(255, 255, 255, 0.08);
	color: var(--mst-text-1);
	border: 1px solid var(--mst-line-hover);
}

.mst-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.14);
	color: var(--mst-text-1);
}

.mst-btn--sm {
	padding: 6px 14px;
	font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   6. Badges
   -------------------------------------------------------------------------- */
.mst-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.mst-badge--music_track { background: rgba(99, 210, 172, 0.18); color: #63d2ac; }
.mst-badge--music_album { background: rgba(92, 110, 244, 0.18); color: #8a9cf7; }
.mst-badge--video       { background: rgba(240, 100, 80, 0.18); color: #f07060; }
.mst-badge--book        { background: rgba(240, 180, 60, 0.18); color: #f0b43c; }

/* --------------------------------------------------------------------------
   7. Hero (Homepage)
   -------------------------------------------------------------------------- */
.mst-hero {
	position: relative;
	min-height: 520px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	padding-bottom: 56px;
}

.mst-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.mst-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(32px) saturate(1.4);
	transform: scale(1.08);
}

.mst-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to right,
		rgba(10, 10, 12, 0.95) 0%,
		rgba(10, 10, 12, 0.75) 50%,
		rgba(10, 10, 12, 0.35) 100%
	);
}

.mst-hero__content {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 40px;
}

.mst-hero__cover-wrap {
	flex-shrink: 0;
}

.mst-hero__cover {
	width: 200px;
	height: 200px;
	object-fit: cover;
	border-radius: var(--mst-radius-lg);
	box-shadow: var(--mst-shadow-lg);
}

.mst-hero__meta { flex: 1; max-width: 520px; }

.mst-hero__title {
	font-size: clamp(1.75rem, 3.5vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.15;
	margin-bottom: 6px;
	color: var(--mst-text-1);
}

.mst-hero__creator {
	font-size: 1rem;
	color: var(--mst-text-2);
	margin-bottom: 12px;
}

.mst-hero__tagline {
	font-size: 0.9375rem;
	color: var(--mst-text-2);
	margin-bottom: 20px;
}

.mst-hero__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.mst-hero__price {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--mst-text-1);
}

/* --------------------------------------------------------------------------
   8. Homepage Sections
   -------------------------------------------------------------------------- */
.mst-homepage { padding-block: 8px 48px; }

.mst-section {
	padding-block: 40px;
	border-top: 1px solid var(--mst-line);
}

.mst-section:first-child { border-top: none; }

/* Section Header */
.mst-section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 24px;
	gap: 16px;
}

.mst-section-header__title {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--mst-text-1);
}

.mst-section-header__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--mst-text-2);
	white-space: nowrap;
	transition: color var(--mst-transition);
}

.mst-section-header__link:hover { color: var(--mst-accent); text-decoration: none; }

.mst-section-header__link svg { transition: transform var(--mst-transition); }
.mst-section-header__link:hover svg { transform: translateX(3px); }

/* Horizontal Scroll Rows */
.mst-row {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 12px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var(--mst-line-hover) transparent;
}

.mst-row::-webkit-scrollbar { height: 4px; }
.mst-row::-webkit-scrollbar-track { background: transparent; }
.mst-row::-webkit-scrollbar-thumb { background: var(--mst-line-hover); border-radius: 2px; }

.mst-row > * { scroll-snap-align: start; flex-shrink: 0; }

.mst-row--tracks  > * { width: 200px; }
.mst-row--albums  > * { width: 200px; }
.mst-row--videos  > * { width: 280px; }
.mst-row--books   > * { width: 155px; }

/* --------------------------------------------------------------------------
   9. Cards — Base
   -------------------------------------------------------------------------- */
.mst-card {
	background: transparent;
	border-radius: var(--mst-radius-lg);
	overflow: hidden;
	transition: transform var(--mst-transition);
}

.mst-card:hover { transform: translateY(-3px); }

.mst-card__cover-link {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: var(--mst-radius-lg);
	margin-bottom: 10px;
}

.mst-card__cover {
	background: var(--mst-bg-elevated);
	overflow: hidden;
	border-radius: var(--mst-radius-lg);
}

.mst-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 250ms ease;
}

.mst-card:hover .mst-card__cover img { transform: scale(1.05); }

.mst-card__cover--square  { aspect-ratio: 1 / 1; }
.mst-card__cover--wide    { aspect-ratio: 16 / 9; }
.mst-card__cover--portrait { aspect-ratio: 2 / 3; }

.mst-card__cover-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--mst-bg-elevated);
}

.mst-card__cover-placeholder--track  { background: linear-gradient(135deg, #1a2040, #0e1530); }
.mst-card__cover-placeholder--album  { background: linear-gradient(135deg, #1a1a40, #0e0e30); }
.mst-card__cover-placeholder--video  { background: linear-gradient(135deg, #401818, #300e0e); }
.mst-card__cover-placeholder--book   { background: linear-gradient(135deg, #302010, #201408); }

.mst-card__body { padding: 0 4px; }

.mst-card__title-link {
	display: block;
	color: var(--mst-text-1);
	font-size: 0.875rem;
	font-weight: 600;
	transition: color var(--mst-transition);
	text-decoration: none !important;
}

.mst-card__title-link:hover { color: var(--mst-accent); }

.mst-card__title {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin-bottom: 3px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.mst-card__artist {
	font-size: 0.8125rem;
	color: var(--mst-text-2);
	margin-bottom: 6px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.mst-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.mst-card__duration,
.mst-card__year,
.mst-card__format {
	font-size: 0.75rem;
	color: var(--mst-text-3);
}

.mst-card__price {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--mst-accent);
}

/* Play Button Overlay on Cards */
.mst-card__play-overlay {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	background: var(--mst-accent);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 200ms ease, transform 200ms ease;
	box-shadow: 0 4px 16px rgba(0,0,0,0.5);
	z-index: 2;
}

.mst-card:hover .mst-card__play-overlay {
	opacity: 1;
	transform: translateY(0);
}

/* Runtime badge on video cards */
.mst-card__runtime-badge {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba(0,0,0,0.75);
	color: var(--mst-text-1);
	font-size: 0.6875rem;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: var(--mst-radius-sm);
	backdrop-filter: blur(4px);
}

/* --------------------------------------------------------------------------
   10. Archive Grid
   -------------------------------------------------------------------------- */
.mst-archive {
	padding-block: 40px;
	min-height: calc(100vh - var(--mst-header-h));
}

.mst-archive__header {
	margin-bottom: 40px;
}

.mst-archive__title {
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	margin-bottom: 20px;
}

/* Filter Nav */
.mst-filter-nav {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.mst-filter-nav__item {
	padding: 7px 18px;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--mst-text-2);
	background: var(--mst-bg-elevated);
	border: 1px solid transparent;
	transition: color var(--mst-transition), background var(--mst-transition), border-color var(--mst-transition);
	text-decoration: none !important;
}

.mst-filter-nav__item:hover {
	color: var(--mst-text-1);
	background: var(--mst-bg-hover);
}

.mst-filter-nav__item--active {
	color: var(--mst-accent);
	background: var(--mst-accent-dim);
	border-color: rgba(92, 110, 244, 0.3);
}

/* Archive Grid */
.mst-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 24px;
}

/* Pagination */
.mst-pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
}

.mst-pagination .nav-links {
	display: flex;
	align-items: center;
	gap: 6px;
}

.mst-pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding-inline: 12px;
	border-radius: var(--mst-radius);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--mst-text-2);
	background: var(--mst-bg-elevated);
	transition: color var(--mst-transition), background var(--mst-transition);
	text-decoration: none !important;
}

.mst-pagination .page-numbers:hover {
	color: var(--mst-text-1);
	background: var(--mst-bg-hover);
}

.mst-pagination .page-numbers.current {
	color: var(--mst-accent);
	background: var(--mst-accent-dim);
}

.mst-pagination .page-numbers.dots {
	background: none;
	cursor: default;
}

/* Empty State */
.mst-empty {
	padding-block: 80px;
	text-align: center;
}

.mst-empty p {
	color: var(--mst-text-3);
	font-size: 1rem;
}

/* --------------------------------------------------------------------------
   11. Single Item Page
   -------------------------------------------------------------------------- */
.mst-single__hero {
	position: relative;
	overflow: hidden;
	padding-block: 56px 48px;
}

.mst-single__hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.mst-single__hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(48px) saturate(1.2);
	transform: scale(1.1);
}

.mst-single__hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to bottom,
		rgba(10, 10, 12, 0.6) 0%,
		rgba(10, 10, 12, 0.85) 60%,
		rgba(10, 10, 12, 0.98) 100%
	);
}

.mst-single__hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	gap: 40px;
	align-items: flex-end;
}

.mst-single__cover-wrap { flex-shrink: 0; }

.mst-single__cover {
	width: 220px;
	height: 220px;
	object-fit: cover;
	border-radius: var(--mst-radius-lg);
	box-shadow: var(--mst-shadow-lg);
}

.mst-single__info { flex: 1; }

.mst-single__title {
	font-size: clamp(1.75rem, 4vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
	margin-bottom: 8px;
}

.mst-single__creator {
	font-size: 1.0625rem;
	color: var(--mst-text-2);
	margin-bottom: 16px;
}

/* Details Strip (dl) */
.mst-single__details-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin-bottom: 24px;
}

.mst-single__details-strip dt {
	font-size: 0.75rem;
	color: var(--mst-text-3);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.mst-single__details-strip dd {
	font-size: 0.875rem;
	color: var(--mst-text-2);
	margin-bottom: 4px;
}

.mst-single__details-strip dt,
.mst-single__details-strip dd {
	display: inline;
}

/* each dt/dd pair sits together */
.mst-single__details-strip dt::after { content: ": "; }

.mst-single__details-strip dt { float: left; clear: left; }

/* Actions */
.mst-single__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.mst-single__price {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--mst-text-1);
}

/* Single Body */
.mst-single__body {
	padding-block: 48px;
	display: grid;
	gap: 40px;
}

.mst-single__description-title {
	font-size: 1.125rem;
	font-weight: 700;
	margin-bottom: 16px;
	color: var(--mst-text-1);
}

.mst-entry-content {
	color: var(--mst-text-2);
	font-size: 0.9375rem;
	line-height: 1.8;
	max-width: 72ch;
}

.mst-entry-content p { margin-bottom: 1em; }
.mst-entry-content p:last-child { margin-bottom: 0; }
.mst-entry-content a { color: var(--mst-accent); }
.mst-entry-content h2, .mst-entry-content h3 { color: var(--mst-text-1); margin-block: 1.5em 0.5em; }

/* Track List */
.mst-tracklist {
	counter-reset: track;
}

.mst-tracklist__item {
	counter-increment: track;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px solid var(--mst-line);
	font-size: 0.9rem;
	color: var(--mst-text-2);
	transition: color var(--mst-transition);
}

.mst-tracklist__item:first-child { border-top: 1px solid var(--mst-line); }

.mst-tracklist__item::before {
	content: counter(track);
	min-width: 24px;
	text-align: right;
	font-size: 0.8125rem;
	color: var(--mst-text-3);
	font-variant-numeric: tabular-nums;
}

.mst-tracklist__item:hover { color: var(--mst-text-1); }

/* Video Player embed */
.mst-single__video-player { }

.mst-video-wrap {
	border-radius: var(--mst-radius-lg);
	overflow: hidden;
	background: #000;
	aspect-ratio: 16 / 9;
	max-width: 860px;
}

.mst-video {
	width: 100%;
	height: 100%;
}

/* --------------------------------------------------------------------------
   12. Persistent Audio Player
   -------------------------------------------------------------------------- */
#mst-player {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 400;
	height: var(--mst-player-h);
	background: rgba(17, 17, 22, 0.97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-top: 1px solid var(--mst-line);
	display: none;
	align-items: center;
	padding-inline: 16px;
	gap: 16px;
}

#mst-player.is-visible { display: flex; }

.mst-player__track {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 260px;
	min-width: 0;
}

#mst-player-artwork {
	width: 46px;
	height: 46px;
	object-fit: cover;
	border-radius: var(--mst-radius-sm);
	flex-shrink: 0;
	background: var(--mst-bg-elevated);
}

.mst-player__info { min-width: 0; }

#mst-player-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--mst-text-1);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#mst-player-artist {
	font-size: 0.75rem;
	color: var(--mst-text-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mst-player__center {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.mst-player__controls {
	display: flex;
	align-items: center;
	gap: 16px;
}

#mst-player-play {
	width: 38px;
	height: 38px;
	background: var(--mst-accent);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	transition: opacity var(--mst-transition), transform var(--mst-transition);
}

#mst-player-play:hover { opacity: 0.85; }
#mst-player-play:active { transform: scale(0.93); }

#mst-player-play .icon-pause { display: none; }
#mst-player-play.is-playing .icon-play  { display: none; }
#mst-player-play.is-playing .icon-pause { display: block; }

.mst-player__time-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	max-width: 480px;
}

.mst-player__time {
	font-size: 0.6875rem;
	color: var(--mst-text-3);
	font-variant-numeric: tabular-nums;
	width: 34px;
	flex-shrink: 0;
}

.mst-player__time--duration { text-align: right; }

.mst-player__progress {
	flex: 1;
	height: 4px;
	background: var(--mst-bg-hover);
	border-radius: 2px;
	position: relative;
	cursor: pointer;
}

.mst-player__fill {
	height: 100%;
	background: var(--mst-accent);
	border-radius: 2px;
	width: 0%;
	pointer-events: none;
	transition: width 200ms linear;
}

.mst-player__thumb {
	position: absolute;
	top: 50%;
	left: 0%;
	transform: translate(-50%, -50%);
	width: 12px;
	height: 12px;
	background: #fff;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--mst-transition);
}

.mst-player__progress:hover .mst-player__thumb,
.mst-player__progress.is-seeking .mst-player__thumb { opacity: 1; }

.mst-player__right {
	flex: 0 0 200px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.mst-player__volume-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mst-player__volume-wrap svg { flex-shrink: 0; color: var(--mst-text-3); }

#mst-player-volume {
	-webkit-appearance: none;
	appearance: none;
	width: 80px;
	height: 4px;
	background: var(--mst-bg-hover);
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}

#mst-player-volume::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px;
	height: 12px;
	background: var(--mst-text-2);
	border-radius: 50%;
}

#mst-player-volume::-moz-range-thumb {
	width: 12px;
	height: 12px;
	background: var(--mst-text-2);
	border-radius: 50%;
	border: none;
}

#mst-player-close {
	color: var(--mst-text-3);
	transition: color var(--mst-transition);
	flex-shrink: 0;
}

#mst-player-close:hover { color: var(--mst-text-1); }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.mst-footer {
	border-top: 1px solid var(--mst-line);
	background: var(--mst-bg-raised);
	padding-block: 40px 24px;
}

.mst-footer__inner {
	display: grid;
	grid-template-columns: 1fr 2fr 1fr;
	gap: 40px;
	margin-bottom: 32px;
}

.mst-footer__brand a {
	font-size: 1rem;
	font-weight: 700;
	color: var(--mst-text-1);
	text-decoration: none;
}

.mst-footer__brand p {
	margin-top: 8px;
	font-size: 0.8125rem;
	color: var(--mst-text-3);
	line-height: 1.5;
}

.mst-footer__widgets .widget { margin-bottom: 16px; }

.mst-footer__bottom {
	padding-top: 20px;
	border-top: 1px solid var(--mst-line);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.mst-footer__copyright {
	font-size: 0.8125rem;
	color: var(--mst-text-3);
}

.mst-footer-nav .nav-links,
.mst-footer-nav .menu {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 16px;
}

.mst-footer-nav a {
	font-size: 0.8125rem;
	color: var(--mst-text-3);
	transition: color var(--mst-transition);
}

.mst-footer-nav a:hover { color: var(--mst-text-2); text-decoration: none; }

/* --------------------------------------------------------------------------
   14. Search Results — legacy rules kept under a non-conflicting name.
   The old generic search.php used .mst-search as a page-wrapper class.
   That template is now replaced by search.php which uses .mst-search-page.
   .mst-search now belongs exclusively to the topbar search form (app-shell.css).
   -------------------------------------------------------------------------- */
/* (legacy .mst-search page-wrapper rule removed — was overriding the header search form) */

/* --------------------------------------------------------------------------
   15. Standard Pages & Posts
   -------------------------------------------------------------------------- */
.mst-page,
.mst-single-post {
	padding-block: 48px;
	min-height: calc(100vh - var(--mst-header-h));
}

.mst-page__title,
.mst-single-post__title {
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	margin-bottom: 32px;
}

/* --------------------------------------------------------------------------
   16. 404
   -------------------------------------------------------------------------- */
.mst-404 {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - var(--mst-header-h) - var(--mst-player-h));
	text-align: center;
	padding: 40px 24px;
}

.mst-404__number {
	font-size: clamp(5rem, 14vw, 12rem);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.05em;
	color: var(--mst-bg-elevated);
}

.mst-404__title {
	font-size: clamp(1.25rem, 3vw, 2rem);
	font-weight: 700;
	margin-bottom: 12px;
	color: var(--mst-text-1);
}

.mst-404__text {
	color: var(--mst-text-2);
	margin-bottom: 32px;
	max-width: 38ch;
}

/* --------------------------------------------------------------------------
   17. Widgets (footer)
   -------------------------------------------------------------------------- */
.widget-area .widget {
	margin-bottom: 24px;
}

.widget-area .widget-title {
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--mst-text-3);
	margin-bottom: 12px;
}

.widget-area ul { display: flex; flex-direction: column; gap: 6px; }

.widget-area a {
	font-size: 0.875rem;
	color: var(--mst-text-2);
	transition: color var(--mst-transition);
}

.widget-area a:hover { color: var(--mst-text-1); text-decoration: none; }

/* --------------------------------------------------------------------------
   18. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.mst-footer__inner {
		grid-template-columns: 1fr 1fr;
	}

	.mst-footer__inner > :last-child {
		grid-column: 1 / -1;
	}

	.mst-player__track { flex: 0 0 200px; }
	.mst-player__right { flex: 0 0 140px; }
}

@media (max-width: 768px) {
	.mst-nav { display: none; }
	.mst-hamburger { display: flex; }

	.mst-hero { min-height: 400px; align-items: center; }

	.mst-hero__content {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.mst-hero__cover { width: 160px; height: 160px; }

	.mst-hero__actions { justify-content: center; }

	.mst-single__hero-content {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.mst-single__cover { width: 180px; height: 180px; }

	.mst-single__actions { justify-content: center; }

	.mst-single__details-strip { justify-content: center; }

	.mst-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 16px;
	}

	.mst-footer__inner {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.mst-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Simplified player on mobile */
	.mst-player__track { flex: 1; min-width: 0; }
	.mst-player__right { display: none; }
	.mst-player__center { flex: 0; }

	.mst-player__time-wrap { display: none; }

	#mst-player {
		gap: 10px;
		padding-inline: 12px;
	}
}

@media (max-width: 480px) {
	.mst-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.mst-row--tracks > *, .mst-row--albums > * { width: 160px; }
	.mst-row--videos > * { width: 240px; }
	.mst-row--books > *  { width: 130px; }
}
