.mma-pd-wrap {
	--mma-pd-light: #fff;
	--mma-pd-dark: #001114;
	--mma-pd-border: #fff;
	--mma-pd-accent: #D9D482;
	--mma-pd-accent-soft: rgba(217, 212, 130, 0.1);
	--mma-pd-radius: 4px;
}

html[data-theme=light] .mma-pd-wrap {
	--mma-pd-light: #001114;
	--mma-pd-dark: #fff;
	--mma-pd-border: #0D7D6D;
	--mma-pd-accent: #CA1317;
	--mma-pd-accent-soft: rgba(202, 19, 23, 0.1);
}

.mma-pd-header {
	display: none;
}

.mma-pd-title {
	margin: 0 0 0.35rem;
	font-size: 1.5rem;
	line-height: 1.2;
}

.mma-pd-intro {
	margin: 0;
	font-size: 0.95rem;
}

.mma-pd-tree {
	display: grid;
	gap: 0.8rem;
}

.mma-pd-folder {
	border: 1px solid var(--mma-pd-border);
	border-radius: var(--mma-pd-radius);
	overflow: hidden;
	margin-bottom: 0.5rem;
}

.mma-pd-folder-summary {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.9rem 1rem;
	cursor: pointer;
	user-select: none;
	font-weight: 600;
	position: relative;
}

.mma-pd-folder-summary::-webkit-details-marker {
	display: none;
}

.mma-pd-folder-summary:hover {
	background: var(--mma-pd-accent-soft);
}

.mma-pd-folder-summary::after {
	content: "";
	margin-left: auto;
	width: 0.6rem;
	height: 0.6rem;
	border-right: 3px solid var(--mma-pd-light);
	border-bottom: 3px solid var(--mma-pd-light);
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
}

.mma-pd-folder[open] > .mma-pd-folder-summary::after {
	transform: rotate(45deg);
}

.mma-pd-folder-icon {
	width: 1.1rem;
	height: 0.9rem;
	display: inline-block;
	border: 2px solid #c69214;
	border-radius: 3px;
	background: #f3be3e;
	position: relative;
	flex: 0 0 auto;
}

.mma-pd-folder-icon::before {
	content: "";
	position: absolute;
	left: 0.08rem;
	top: -0.34rem;
	width: 0.55rem;
	height: 0.32rem;
	border: 2px solid #c69214;
	border-bottom: none;
	border-radius: 3px 3px 0 0;
	background: #f8cf69;
}

.mma-pd-folder-children {
	padding: 0.5rem 0.5rem 0.5rem 1.5rem;
	border-top: 1px solid var(--mma-pd-border);
}

#main .mma-pd-wrap details.mma-pd-folder ul.mma-pd-file-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

#main .mma-pd-wrap details.mma-pd-folder ul.mma-pd-file-list .mma-pd-file-item {
	margin: 0.5rem 0;
}

.mma-pd-file-link {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--mma-pd-border);
	border-radius: var(--mma-pd-radius);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mma-pd-file-link:hover,
.mma-pd-file-link:focus {
	border-color: var(--mma-pd-accent);
	background: var(--mma-pd-accent-soft);
	box-shadow: 0 8px 24px rgba(34, 113, 177, 0.08);
	transform: translateY(-1px);
	outline: none;
}

.mma-pd-file-icon {
	width: 2.1rem;
	height: 2.1rem;
	flex: 0 0 2.1rem;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.78rem;
	font-weight: 700;
	color: #fff;
	position: relative;
}

.mma-pd-file-icon::before {
	display: block;
}

.mma-pd-file-icon.is-image { background: #2d8f6f; }
.mma-pd-file-icon.is-image::before { content: "IMG"; }

.mma-pd-file-icon.is-video { background: #7c4dff; }
.mma-pd-file-icon.is-video::before { content: "MP4"; }

.mma-pd-file-icon.is-pdf { background: #d63638; }
.mma-pd-file-icon.is-pdf::before { content: "PDF"; }

.mma-pd-file-icon.is-eps { background: #c05c00; }
.mma-pd-file-icon.is-eps::before { content: "EPS"; }

.mma-pd-file-icon.is-zip { background: #3c434a; }
.mma-pd-file-icon.is-zip::before { content: "ZIP"; }

.mma-pd-file-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.18rem;
}

.mma-pd-file-name {
	font-weight: 600;
	word-break: break-word;
}

.mma-pd-file-meta {
	font-size: 0.88rem;
}

.mma-pd-file-action {
	margin-left: auto;
	white-space: nowrap;
	font-size: 0.92rem;
	font-weight: 600;
}

.mma-pd-depth-1,
.mma-pd-depth-2,
.mma-pd-depth-3,
.mma-pd-depth-4,
.mma-pd-depth-5,
.mma-pd-depth-6 {
	margin-top: 0.7rem;
}

@media (max-width: 767px) {
	.mma-pd-wrap {
		padding: 1rem;
	}

	.mma-pd-file-link {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.mma-pd-file-action {
		margin-left: 2.95rem;
	}
}