.pcm-wrap {
	box-sizing: border-box;
	color: inherit;
	font-family: inherit;
	margin: 1.5rem 0;
}

.pcm-wrap *,
.pcm-wrap *::before,
.pcm-wrap *::after {
	box-sizing: border-box;
}

.pcm-form {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
}

.pcm-field {
	display: grid;
	gap: 0.35rem;
}

.pcm-field label {
	font-weight: 600;
}

.pcm-field input[type="text"],
.pcm-field input[type="email"],
.pcm-field input[type="tel"],
.pcm-field input[type="file"] {
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font: inherit;
	padding: 0.7rem 0.8rem;
	width: 100%;
}

.pcm-field input:focus,
.pcm-button:focus,
.pcm-image-button:focus,
.pcm-star:focus,
.pcm-modal-close:focus {
	outline: 3px solid color-mix(in srgb, var(--pcm-primary, #1d4ed8) 35%, white);
	outline-offset: 2px;
}

.pcm-field-wide {
	grid-column: 1 / -1;
}

.pcm-help {
	color: #475569;
	font-size: 0.94rem;
	margin: 0;
}

.pcm-privacy label {
	align-items: flex-start;
	display: flex;
	gap: 0.55rem;
}

.pcm-privacy input {
	margin-top: 0.25rem;
}

.pcm-button {
	background: var(--pcm-button, var(--pcm-primary, #1d4ed8));
	border: 0;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	line-height: 1.2;
	padding: 0.75rem 1rem;
	text-decoration: none;
	transition: filter 160ms ease, transform 160ms ease;
}

.pcm-button:hover {
	filter: brightness(0.94);
}

.pcm-button:active {
	transform: translateY(1px);
}

.pcm-button[disabled] {
	cursor: not-allowed;
	opacity: 0.65;
}

.pcm-upload-status {
	display: inline-block;
	margin-left: 0.75rem;
}

.pcm-hp,
.pcm-vote-hp {
	left: -10000px;
	position: absolute;
	top: auto;
}

.pcm-notice {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	margin: 1rem 0;
	padding: 0.85rem 1rem;
}

.pcm-notice p {
	margin: 0.25rem 0;
}

.pcm-notice-success {
	background: #ecfdf5;
	border-color: #86efac;
}

.pcm-notice-error {
	background: #fef2f2;
	border-color: #fca5a5;
}

.pcm-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(var(--pcm-cols-mobile, 1), minmax(0, 1fr));
}

.pcm-card {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
}

.pcm-card img {
	aspect-ratio: 4 / 3;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.pcm-image-button {
	background: transparent;
	border: 0;
	cursor: zoom-in;
	display: block;
	padding: 0;
	width: 100%;
}

.pcm-card-body {
	display: grid;
	gap: 0.5rem;
	padding: 0.85rem;
}

.pcm-card-title {
	font-size: 1rem;
	line-height: 1.25;
	margin: 0;
}

.pcm-vote-count,
.pcm-winner-position {
	color: #475569;
	font-size: 0.94rem;
	margin: 0;
}

.pcm-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 1.25rem;
}

.pcm-modal {
	align-items: center;
	display: none;
	inset: 0;
	justify-content: center;
	padding: 1rem;
	position: fixed;
	z-index: 99999;
}

.pcm-modal.is-open {
	display: flex;
}

.pcm-modal-backdrop {
	background: rgba(15, 23, 42, 0.72);
	inset: 0;
	position: absolute;
}

.pcm-modal-panel {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
	max-height: calc(100vh - 2rem);
	max-width: 560px;
	overflow: auto;
	padding: 1rem;
	position: relative;
	width: min(100%, 560px);
	z-index: 1;
}

.pcm-lightbox-panel {
	max-width: 960px;
	width: min(100%, 960px);
}

.pcm-modal-close {
	align-items: center;
	background: #0f172a;
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-size: 1.5rem;
	height: 2.2rem;
	justify-content: center;
	position: absolute;
	right: 0.6rem;
	top: 0.6rem;
	width: 2.2rem;
}

.pcm-lightbox-image {
	border-radius: 6px;
	display: block;
	height: auto;
	max-height: 78vh;
	object-fit: contain;
	width: 100%;
}

.pcm-lightbox-caption {
	font-weight: 700;
	margin: 0.75rem 0 0;
}

.pcm-vote-summary {
	align-items: center;
	display: flex;
	gap: 0.8rem;
	padding-right: 2.5rem;
}

.pcm-vote-summary img {
	border-radius: 6px;
	height: 72px;
	object-fit: cover;
	width: 96px;
}

.pcm-vote-summary h3 {
	font-size: 1.1rem;
	margin: 0;
}

.pcm-stars {
	display: flex;
	gap: 0.25rem;
	margin: 1rem 0;
}

.pcm-star {
	background: transparent;
	border: 0;
	color: #94a3b8;
	cursor: pointer;
	font-size: 2rem;
	line-height: 1;
	padding: 0.2rem;
}

.pcm-star.is-selected {
	color: #f59e0b;
}

.pcm-vote-message {
	margin: 0.8rem 0 0;
}

.pcm-countdown-grid {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pcm-countdown-grid div,
.pcm-countdown-open {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 1rem;
	text-align: center;
}

.pcm-countdown-grid strong {
	color: var(--pcm-primary, #1d4ed8);
	display: block;
	font-size: 2rem;
	line-height: 1;
}

.pcm-countdown-grid span {
	color: #475569;
	display: block;
	font-size: 0.9rem;
	margin-top: 0.35rem;
}

@media (min-width: 640px) {
	.pcm-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pcm-grid {
		grid-template-columns: repeat(var(--pcm-cols-tablet, 3), minmax(0, 1fr));
	}

	.pcm-countdown-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.pcm-grid {
		grid-template-columns: repeat(var(--pcm-cols-desktop, 4), minmax(0, 1fr));
	}
}
