.pmv-wrap {
	max-width: 1100px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1c1c1e;
}

.pmv-locked {
	padding: 24px;
	background: #f5f5f7;
	border-radius: 12px;
	text-align: center;
}

.pmv-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.pmv-album-controls,
.pmv-type-controls {
	display: flex;
	gap: 8px;
	align-items: center;
}

.pmv-wrap select,
.pmv-wrap button,
.pmv-wrap input[type="text"] {
	font-family: inherit;
	font-size: 14px;
}

.pmv-wrap select {
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid #d7d7db;
	background: #fff;
}

#pmv-new-album-btn,
.pmv-type-btn {
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid #d7d7db;
	background: #fff;
	cursor: pointer;
	transition: background 0.15s ease;
}

#pmv-new-album-btn:hover,
.pmv-type-btn:hover {
	background: #f0f0f2;
}

.pmv-type-btn.active {
	background: #1c1c1e;
	color: #fff;
	border-color: #1c1c1e;
}

.pmv-dropzone {
	border: 2px dashed #c7c7cc;
	border-radius: 14px;
	padding: 36px 16px;
	text-align: center;
	color: #6e6e73;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	margin-bottom: 16px;
}

.pmv-dropzone.pmv-dragover {
	border-color: #0071e3;
	background: #f0f7ff;
	color: #0071e3;
}

.pmv-upload-queue {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.pmv-upload-row {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	background: #f5f5f7;
	border-radius: 8px;
	padding: 8px 12px;
}

.pmv-upload-row .pmv-bar {
	flex: 1;
	height: 6px;
	background: #e2e2e6;
	border-radius: 4px;
	overflow: hidden;
}

.pmv-upload-row .pmv-bar-fill {
	height: 100%;
	background: #0071e3;
	width: 0%;
	transition: width 0.2s ease;
}

.pmv-upload-row.pmv-done .pmv-bar-fill {
	background: #34c759;
}

.pmv-upload-row.pmv-error .pmv-bar-fill {
	background: #ff3b30;
}

.pmv-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
}

.pmv-loading {
	grid-column: 1 / -1;
	text-align: center;
	color: #6e6e73;
	padding: 40px 0;
}

.pmv-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: #6e6e73;
	padding: 40px 0;
}

.pmv-card {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: #f5f5f7;
	aspect-ratio: 1 / 1;
	cursor: pointer;
	group: card;
}

.pmv-card img,
.pmv-card video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pmv-card .pmv-video-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 11px;
	padding: 3px 7px;
	border-radius: 5px;
}

.pmv-card .pmv-delete-btn {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.pmv-card:hover .pmv-delete-btn {
	opacity: 1;
}

.pmv-card .pmv-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
	color: #fff;
	font-size: 12px;
	padding: 16px 8px 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Lightbox */
.pmv-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pmv-lightbox-content img,
.pmv-lightbox-content video {
	max-width: 92vw;
	max-height: 92vh;
	border-radius: 8px;
}

.pmv-lightbox-close {
	position: absolute;
	top: 20px;
	right: 28px;
	background: none;
	border: none;
	color: #fff;
	font-size: 34px;
	cursor: pointer;
	line-height: 1;
}

/* Modal */
.pmv-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pmv-modal-box {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	width: 320px;
}

.pmv-modal-box h3 {
	margin-top: 0;
}

.pmv-modal-box input[type="text"] {
	width: 100%;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid #d7d7db;
	box-sizing: border-box;
	margin-bottom: 16px;
}

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

.pmv-modal-actions button {
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid #d7d7db;
	background: #fff;
	cursor: pointer;
}

#pmv-album-save {
	background: #1c1c1e;
	color: #fff;
	border-color: #1c1c1e;
}
