
.bpo {
	--bpo-border: #d9e1ec;
	--bpo-text: #21324a;
	--bpo-muted: #66758a;
	--bpo-soft: #f7f9fc;
	--bpo-primary: #4f7fd8;
	--bpo-good: #2f8f5b;
	--bpo-warn: #b67819;
	--bpo-low: #b34444;
	margin: 28px 0 20px;
	padding: 22px;
	border: 1px solid var(--bpo-border);
	border-radius: 18px;
	background: #fff;
	color: var(--bpo-text);
	box-shadow: 0 12px 32px rgba(31, 54, 88, .06);
}
.bpo *, .bpo *::before, .bpo *::after { box-sizing: border-box; }
.bpo-heading h3 { margin: 4px 0 8px; font-size: clamp(20px, 2vw, 28px); color: var(--bpo-text); }
.bpo-heading p { margin: 0; color: var(--bpo-muted); line-height: 1.55; }
.bpo-kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bpo-primary); }
.bpo-quality-guide {
	display: grid;
	gap: 3px;
	margin-top: 14px;
	padding: 12px 14px;
	border: 1px solid #dce6f5;
	border-radius: 12px;
	background: #f5f8ff;
}
.bpo-quality-guide strong { font-size: 12px; color: var(--bpo-primary); }
.bpo-quality-guide span { font-size: 14px; font-weight: 800; color: var(--bpo-text); }
.bpo-quality-guide small { color: var(--bpo-muted); }
.bpo-counter {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin: 18px 0;
}
.bpo-counter > div {
	padding: 12px 14px;
	border: 1px solid var(--bpo-border);
	border-radius: 12px;
	background: var(--bpo-soft);
}
.bpo-counter span { display: block; font-size: 12px; color: var(--bpo-muted); margin-bottom: 4px; }
.bpo-counter strong { display: block; font-size: 16px; color: var(--bpo-text); }
.bpo-dropzone {
	display: flex;
	min-height: 150px;
	padding: 22px;
	border: 2px dashed #b8c6d9;
	border-radius: 16px;
	background: #fbfcff;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 6px;
	cursor: pointer;
	text-align: center;
	transition: .2s ease;
}
.bpo-dropzone:hover, .bpo-dropzone.is-dragover { border-color: var(--bpo-primary); background: #f3f7ff; }
.bpo-dropzone.is-disabled { opacity: .55; cursor: not-allowed; }
.bpo-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bpo-drop-icon {
	display: inline-grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 50%;
	background: #eaf1ff;
	color: var(--bpo-primary);
	font-size: 25px;
	font-weight: 300;
}
.bpo-dropzone strong { color: var(--bpo-text); font-size: 16px; }
.bpo-dropzone small { color: var(--bpo-muted); }
.bpo-status {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--bpo-soft);
	color: var(--bpo-muted);
	font-size: 13px;
}
.bpo-status.is-error { background: #fff0f0; color: #a43c3c; }
.bpo-status.is-ok { background: #eff9f3; color: #26734b; }
.bpo-status.is-busy { background: #eef4ff; color: #365f9f; }
.bpo-upgrade {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 10px;
	padding: 14px;
	border: 1px solid #d8e3f4;
	border-radius: 12px;
	background: #f7faff;
}
.bpo-upgrade[hidden] { display: none !important; }
.bpo-upgrade > div { display: grid; gap: 3px; }
.bpo-upgrade strong { color: var(--bpo-text); }
.bpo-upgrade span { color: var(--bpo-muted); font-size: 13px; line-height: 1.45; }
.bpo-upgrade .button { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.bpo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 14px;
	margin-top: 16px;
}
.bpo-card {
	overflow: hidden;
	border: 1px solid var(--bpo-border);
	border-radius: 14px;
	background: #fff;
}
.bpo-thumb-wrap { position: relative; aspect-ratio: 1 / .78; background: #edf1f6; }
.bpo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.bpo-quality {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 5px 8px;
	border-radius: 999px;
	background: rgba(255,255,255,.93);
	box-shadow: 0 2px 8px rgba(0,0,0,.08);
	font-size: 11px;
	font-weight: 800;
}
.bpo-quality.is-good { color: var(--bpo-good); }
.bpo-quality.is-medium { color: var(--bpo-warn); }
.bpo-quality.is-low { color: var(--bpo-low); }
.bpo-card-body { padding: 12px; }
.bpo-file-name {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 13px;
}
.bpo-card-body small { display: block; margin-top: 3px; color: var(--bpo-muted); font-size: 11px; line-height: 1.35; }
.bpo-copy-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 12px;
	font-size: 12px;
	font-weight: 700;
}
.bpo-stepper { display: grid; grid-template-columns: 32px 48px 32px; align-items: center; }
.bpo-stepper button, .bpo-stepper input {
	height: 34px;
	border: 1px solid var(--bpo-border);
	background: #fff;
	text-align: center;
	border-radius: 0;
	margin: 0;
	padding: 0;
}
.bpo-stepper button:first-child { border-radius: 8px 0 0 8px; }
.bpo-stepper button:last-child { border-radius: 0 8px 8px 0; }
.bpo-stepper input { border-left: 0; border-right: 0; width: 48px; appearance: textfield; -moz-appearance: textfield; }
.bpo-stepper input::-webkit-outer-spin-button, .bpo-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bpo-step { cursor: pointer; font-size: 17px; color: var(--bpo-text); }
.bpo-delete {
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #a43c3c;
	font-size: 12px;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.bpo-footnote { margin-top: 16px; font-size: 12px; line-height: 1.55; color: var(--bpo-muted); }
.bpo-review[hidden] { display: none !important; }
.bpo-review { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; padding: 18px; }
.bpo-review-backdrop { position: absolute; inset: 0; background: rgba(18, 29, 45, .66); backdrop-filter: blur(3px); }
.bpo-review-card {
	position: relative;
	z-index: 2;
	width: min(980px, 100%);
	max-height: min(88vh, 900px);
	overflow: auto;
	padding: 24px;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 25px 80px rgba(0,0,0,.28);
}
.bpo-review-card h3 { margin: 5px 0 12px; color: var(--bpo-text); }
.bpo-review-close {
	position: absolute;
	top: 12px;
	right: 14px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: var(--bpo-muted);
}
.bpo-review-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bpo-review-summary > * {
	padding: 7px 10px;
	border-radius: 999px;
	background: var(--bpo-soft);
	color: var(--bpo-text);
	font-size: 12px;
}
.bpo-review-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
	gap: 10px;
	max-height: 48vh;
	overflow: auto;
	padding: 4px;
}
.bpo-review-item {
	position: relative;
	border: 1px solid var(--bpo-border);
	border-radius: 11px;
	overflow: hidden;
	background: #fff;
}
.bpo-review-item img { display: block; width: 100%; aspect-ratio: 1 / .85; object-fit: cover; background: #edf1f6; }
.bpo-review-item strong { position: absolute; top: 6px; left: 6px; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.94); font-size: 11px; }
.bpo-review-item small { display: block; padding: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--bpo-muted); font-size: 10px; }
.bpo-unused-warning { margin-top: 14px; padding: 11px 12px; border-radius: 10px; background: #fff6df; color: #7e5b17; font-size: 13px; }
.bpo-confirm { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0; font-weight: 700; color: var(--bpo-text); }
.bpo-confirm input { margin-top: 4px; }
.bpo-review-actions { display: flex; justify-content: flex-end; gap: 10px; }
.bpo-modal-open { overflow: hidden; }
@media (max-width: 720px) {
	.bpo { padding: 16px; margin: 20px 0; border-radius: 14px; }
	.bpo-counter { grid-template-columns: repeat(2, 1fr); }
	.bpo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.bpo-card-body { padding: 10px; }
	.bpo-copy-row { display: block; }
	.bpo-stepper { margin-top: 6px; width: 112px; }
	.bpo-review-card { padding: 18px; }
	.bpo-review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bpo-upgrade { align-items: stretch; flex-direction: column; }
	.bpo-upgrade .button { width: 100%; }
	.bpo-review-actions { flex-direction: column-reverse; }
	.bpo-review-actions .button { width: 100%; text-align: center; justify-content: center; }
}
@media (max-width: 460px) {
	.bpo-grid { grid-template-columns: 1fr; }
	.bpo-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


.bpo-cart-preview { margin-top: 8px; }
.bpo-cart-preview summary {
	cursor: pointer;
	color: #315f9f;
	font-size: 12px;
	font-weight: 700;
}
.bpo-cart-preview-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 8px;
	margin-top: 10px;
	max-width: 430px;
}
.bpo-cart-preview figure {
	margin: 0;
	overflow: hidden;
	border: 1px solid #dce4ee;
	border-radius: 9px;
	background: #fff;
}
.bpo-cart-preview img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / .85;
	object-fit: cover;
}
.bpo-cart-preview figcaption {
	padding: 5px 6px;
	font-size: 10px;
	line-height: 1.25;
}
.bpo-cart-preview figcaption strong,
.bpo-cart-preview figcaption span { display: block; }
.bpo-cart-preview figcaption span {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: #66758a;
}
.bpo-cart-preview-summary {
	margin: 7px 0 0;
	font-size: 11px;
	color: #66758a;
}
