.once-ours-leave__photo-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.once-ours-leave__photo-preview img {
	display: block;
	width: 96px;
	height: 96px;
	object-fit: cover;
}

.once-ours-leave__photo-item {
	position: relative;
	width: 96px;
	height: 96px;
}

.once-ours-leave__photo-select {
	position: absolute;
	top: 4px;
	right: 4px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgb(0 0 0 / 0.72);
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.once-ours-leave__photo-crop {
	position: absolute;
	bottom: 4px;
	left: 4px;
	min-width: 38px;
	height: 26px;
	padding: 2px 6px;
	border: 1px solid #fff;
	border-radius: 4px;
	background: rgb(0 0 0 / 0.72);
	color: #fff;
	font: inherit;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

.once-ours-leave__photo-crop.is-confirmed {
	background: #165c3a;
}

.once-ours-leave__photo-framing-indicator {
	position: absolute;
	right: 4px;
	bottom: 4px;
	padding: 2px 4px;
	border-radius: 3px;
	background: #fff;
	color: #165c3a;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}

.once-ours-leave__crop-editor[hidden] {
	display: none;
}

.once-ours-leave__crop-editor {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	width: 100%;
	max-width: 100vw;
	padding: 16px;
	overflow: auto;
	background: rgb(0 0 0 / 0.76);
}

.once-ours-leave__crop-dialog {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: min(100%, 760px);
	max-height: calc(100dvh - 32px);
	padding: 16px;
	overflow: auto;
	background: #fff;
	color: #111;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgb(0 0 0 / 0.28);
}

.once-ours-leave__crop-header,
.once-ours-leave__crop-footer,
.once-ours-leave__crop-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}

.once-ours-leave__crop-header {
	justify-content: space-between;
	margin-bottom: 12px;
}

.once-ours-leave__crop-header h2 {
	margin: 0;
	font-size: 1.2rem;
}

.once-ours-leave__crop-header button {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.once-ours-leave__crop-controls {
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.once-ours-leave__crop-controls button,
.once-ours-leave__crop-footer button {
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid #777;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font: inherit;
	cursor: pointer;
}

.once-ours-leave__crop-footer {
	justify-content: flex-end;
	margin-top: 12px;
}

.once-ours-leave__crop-footer [data-crop-action="confirm"] {
	border-color: #165c3a;
	background: #165c3a;
	color: #fff;
}

.once-ours-leave__crop-workspace {
	position: relative;
	flex: 0 0 auto;
	width: 180px;
	height: 180px;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	background: #111;
	touch-action: none;
	user-select: none;
}

.once-ours-leave__crop-workspace > img {
	display: block;
	width: 100%;
	height: 100%;
	user-select: none;
	-webkit-user-drag: none;
}

.once-ours-leave__crop-box {
	position: absolute;
	box-sizing: border-box;
	border: 2px solid #fff;
	box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.5);
	touch-action: none;
	cursor: move;
}

.once-ours-leave__crop-handle {
	position: absolute;
	width: 18px;
	height: 18px;
	box-sizing: border-box;
	padding: 0;
	border: 2px solid #165c3a;
	border-radius: 2px;
	background: #fff;
	touch-action: none;
	cursor: nwse-resize;
}

.once-ours-leave__crop-handle--nw { top: -9px; left: -9px; cursor: nwse-resize; }
.once-ours-leave__crop-handle--ne { top: -9px; right: -9px; cursor: nesw-resize; }
.once-ours-leave__crop-handle--sw { bottom: -9px; left: -9px; cursor: nesw-resize; }
.once-ours-leave__crop-handle--se { right: -9px; bottom: -9px; cursor: nwse-resize; }

.once-ours-leave__crop-status {
	min-height: 1.4em;
	margin: 10px 0 0;
	color: #333;
	font-size: 0.9rem;
	text-align: center;
}

@media (max-width: 480px) {
	.once-ours-leave__crop-editor {
		place-items: start center;
		padding: 8px;
	}

	.once-ours-leave__crop-dialog {
		width: 100%;
		max-height: calc(100dvh - 16px);
		padding: 12px;
	}

	.once-ours-leave__crop-controls,
	.once-ours-leave__crop-footer {
		gap: 6px;
	}

	.once-ours-leave__crop-controls button,
	.once-ours-leave__crop-footer button {
		flex: 1 1 auto;
		padding-right: 10px;
		padding-left: 10px;
	}
}

/* V1 visual surface: preserve the existing crop geometry and pointer model. */
.once-ours-leave__crop-editor {
	place-items: stretch;
	padding: 0;
	background: #050505;
	color: #fff;
}

.once-ours-leave__crop-dialog {
	width: 100%;
	max-width: none;
	max-height: none;
	min-height: 100%;
	padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
	background: #050505;
	border-radius: 0;
	box-shadow: none;
}

.once-ours-leave__crop-header {
	margin-bottom: 16px;
}

.once-ours-leave__crop-header h2 {
	font-size: clamp(1.05rem, 2.5vw, 1.35rem);
	letter-spacing: 0.02em;
}

.once-ours-leave__crop-header button {
	width: 44px;
	height: 44px;
	border: 1px solid rgb(255 255 255 / 0.55);
	border-radius: 50%;
	background: rgb(255 255 255 / 0.08);
	color: #fff;
}

.once-ours-leave__crop-controls {
	justify-content: center;
	margin-bottom: 16px;
}

.once-ours-leave__crop-controls button,
.once-ours-leave__crop-footer button {
	min-height: 44px;
	padding: 9px 16px;
	border: 1px solid rgb(255 255 255 / 0.55);
	border-radius: 999px;
	background: rgb(255 255 255 / 0.08);
	color: #fff;
	font-size: 0.95rem;
	line-height: 1.15;
}

.once-ours-leave__crop-controls button.is-active {
	border-color: #fff;
	background: #fff;
	color: #050505;
	font-weight: 700;
}

.once-ours-leave__crop-controls button[data-crop-action="reset"] {
	background: transparent;
	color: rgb(255 255 255 / 0.78);
}

.once-ours-leave__crop-controls button:focus-visible,
.once-ours-leave__crop-footer button:focus-visible,
.once-ours-leave__crop-header button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.once-ours-leave__crop-workspace {
	box-shadow: 0 0 0 1px rgb(255 255 255 / 0.28), 0 18px 48px rgb(0 0 0 / 0.45);
}

.once-ours-leave__crop-box {
	z-index: 1;
	border: 1px solid #fff;
	box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.58), inset 0 0 0 1px rgb(0 0 0 / 0.3);
}

.once-ours-leave__crop-box::before {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent 33.15%, rgb(255 255 255 / 0.28) 33.2%, transparent 33.35%, transparent 66.55%, rgb(255 255 255 / 0.28) 66.6%, transparent 66.75%), linear-gradient(0deg, transparent 33.15%, rgb(255 255 255 / 0.28) 33.2%, transparent 33.35%, transparent 66.55%, rgb(255 255 255 / 0.28) 66.6%, transparent 66.75%);
	content: '';
	pointer-events: none;
}

.once-ours-leave__crop-handle {
	width: 44px;
	height: 44px;
	margin: -22px;
	border: 0;
	border-radius: 0;
	background: transparent;
	z-index: 2;
}

.once-ours-leave__crop-handle::after {
	position: absolute;
	inset: 13px;
	border-color: #fff;
	border-style: solid;
	filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.85));
	content: '';
	pointer-events: none;
}

.once-ours-leave__crop-handle--nw { top: 0; left: 0; }
.once-ours-leave__crop-handle--nw::after { border-width: 3px 0 0 3px; }
.once-ours-leave__crop-handle--ne { top: 0; right: 0; }
.once-ours-leave__crop-handle--ne::after { border-width: 3px 3px 0 0; }
.once-ours-leave__crop-handle--sw { bottom: 0; left: 0; }
.once-ours-leave__crop-handle--sw::after { border-width: 0 0 3px 3px; }
.once-ours-leave__crop-handle--se { right: 0; bottom: 0; }
.once-ours-leave__crop-handle--se::after { border-width: 0 3px 3px 0; }

.once-ours-leave__crop-status {
	margin-top: 14px;
	color: rgb(255 255 255 / 0.8);
	font-size: 0.9rem;
}

.once-ours-leave__crop-footer {
	justify-content: space-between;
	margin-top: auto;
	padding-top: 24px;
}

.once-ours-leave__crop-footer [data-crop-action="cancel"] {
	border-color: rgb(255 255 255 / 0.55);
	background: transparent;
	color: #fff;
}

.once-ours-leave__crop-footer [data-crop-action="confirm"] {
	border-color: #fff;
	background: #fff;
	color: #050505;
	font-weight: 700;
}

@media (max-width: 480px) {
	.once-ours-leave__crop-dialog {
		padding-top: max(12px, env(safe-area-inset-top));
		padding-right: max(12px, env(safe-area-inset-right));
		padding-bottom: max(16px, env(safe-area-inset-bottom));
		padding-left: max(12px, env(safe-area-inset-left));
	}

	.once-ours-leave__crop-controls {
		justify-content: stretch;
	}

	.once-ours-leave__crop-controls button {
		flex: 1 1 auto;
		padding-right: 12px;
		padding-left: 12px;
	}

	.once-ours-leave__crop-footer {
		padding-top: 20px;
	}
}
