.pcd-launcher { margin: 0 0 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; }
.pcd-thumb { height: 72px; width: auto; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.2); }
.pcd-open { cursor: pointer; }

body.pcd-lock { overflow: hidden; }

.pcd-modal[hidden] { display: none; }
.pcd-modal {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(0,0,0,.6);
	display: flex; align-items: center; justify-content: center;
	padding: 12px;
}
.pcd-dialog {
	position: relative; background: #fff; color: #222;
	border-radius: 16px; width: 100%; max-width: 960px; max-height: 96vh;
	overflow: auto; display: flex; gap: 0;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.pcd-close {
	position: absolute; top: 8px; right: 12px; z-index: 2;
	background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: #555;
}
.pcd-stage {
	flex: 1 1 55%; min-width: 0; background: #ececec;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 16px 8px; position: relative;
}
.pcd-stage canvas { touch-action: none; cursor: grab; max-width: 100%; }
.pcd-stage canvas:active { cursor: grabbing; }
.pcd-hint { margin: 8px 0 0; font-size: 12px; color: #777; text-align: center; }

.pcd-panel { flex: 1 1 45%; padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.pcd-panel h3 { margin: 0 24px 2px 0; font-size: 20px; }
.pcd-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pcd-field > span { font-weight: 600; }
.pcd-field select { width: 100%; padding: 9px; border-radius: 8px; border: 1px solid #ccc; }
.pcd-row { display: flex; gap: 8px; }

.pcd-btn {
	display: inline-block; text-align: center; cursor: pointer;
	padding: 10px 14px; border-radius: 8px; border: 1px solid #bbb;
	background: #f6f6f6; color: #222; font-size: 14px; line-height: 1.2;
}
.pcd-btn:hover:not(:disabled) { background: #eee; }
.pcd-btn:disabled { opacity: .45; cursor: not-allowed; }
.pcd-row .pcd-btn { flex: 1; }
.pcd-primary { background: #111; color: #fff; border-color: #111; font-weight: 600; margin-top: auto; padding: 13px 14px; }
.pcd-primary:hover:not(:disabled) { background: #333; }
.pcd-warn { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fff4e5; color: #8a4b00; font-size: 13px; }

@media (max-width: 720px) {
	.pcd-modal { padding: 0; align-items: stretch; }
	.pcd-dialog { flex-direction: column; border-radius: 0; max-height: none; height: 100%; }
	.pcd-stage { flex: 0 0 auto; padding: 12px 8px 4px; }
	.pcd-panel { padding: 16px; }
	.pcd-primary { margin-top: 4px; position: sticky; bottom: 8px; }
}
