.ombox-image-crop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    min-width: 0;
}
.ombox-image-crop-stage {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    background-color: #17202b;
    background-image: linear-gradient(45deg, #202b38 25%, transparent 25%), linear-gradient(-45deg, #202b38 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #202b38 75%), linear-gradient(-45deg, transparent 75%, #202b38 75%);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
    border-radius: 10px;
}
.ombox-image-crop-stage.is-dragging { cursor: grabbing; }
.ombox-image-crop-stage img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: none;
    max-height: none;
    user-select: none;
    pointer-events: none;
    transform-origin: center;
    will-change: width, height, transform;
}
.ombox-image-crop-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(78%, 620px);
    aspect-ratio: 4 / 3;
    border: 2px solid rgba(255,255,255,.96);
    box-shadow: 0 0 0 9999px rgba(0,0,0,.58);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.ombox-image-crop-frame::before,
.ombox-image-crop-frame::after {
    position: absolute;
    content: "";
    pointer-events: none;
}
.ombox-image-crop-frame::before { inset: 33.333% 0; border-top: 1px solid rgba(255,255,255,.45); border-bottom: 1px solid rgba(255,255,255,.45); }
.ombox-image-crop-frame::after { inset: 0 33.333%; border-left: 1px solid rgba(255,255,255,.45); border-right: 1px solid rgba(255,255,255,.45); }
.ombox-image-crop-controls { display: grid; align-content: start; gap: 16px; }
.ombox-image-crop-controls label { display: grid; gap: 6px; color: var(--text-secondary, #64748b); font-size: 13px; font-weight: 700; }
.ombox-image-crop-controls label > span { display: flex; justify-content: space-between; gap: 8px; }
.ombox-image-crop-presets { min-width: 0; margin: 0; padding: 0; border: 0; }
.ombox-image-crop-presets legend { margin: 0 0 8px; color: var(--text-secondary, #64748b); font-size: 13px; font-weight: 700; }
.ombox-image-crop-preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ombox-image-crop-preset {
    display: grid;
    gap: 2px;
    min-width: 0;
    min-height: 56px;
    padding: 8px 10px;
    color: var(--text-primary, #243244);
    text-align: left;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #d8dee8);
    border-radius: 8px;
}
.ombox-image-crop-preset strong { overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.ombox-image-crop-preset span { color: var(--text-muted, #697586); font-size: 11px; line-height: 1.35; }
.ombox-image-crop-preset:hover { border-color: var(--primary-color, #0d6efd); }
.ombox-image-crop-preset:focus-visible { outline: 3px solid rgba(13, 110, 253, .24); outline-offset: 2px; }
.ombox-image-crop-preset.is-active,
.ombox-image-crop-preset[aria-pressed="true"] { color: var(--primary-color, #0d6efd); background: rgba(13, 110, 253, .08); border-color: var(--primary-color, #0d6efd); box-shadow: 0 0 0 1px var(--primary-color, #0d6efd); }
.ombox-image-crop-size { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ombox-image-crop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ombox-image-crop-result { display: grid; gap: 8px; }
.ombox-image-crop-result[hidden] { display: none; }
.ombox-image-crop-result > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-secondary, #64748b); font-size: 12px; }
.ombox-image-crop-result canvas {
    display: block;
    max-width: 100%;
    max-height: 180px;
    margin: 0 auto;
    background-color: #fff;
    background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%), linear-gradient(-45deg, #e5e7eb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e7eb 75%), linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    border: 1px solid var(--border-color, #d8dee8);
    border-radius: 8px;
}
.ombox-image-crop-help { margin: 0; color: var(--text-muted, #697586); font-size: 12px; line-height: 1.7; }
body.eye-protection .ombox-image-crop-modal .modal-content,
body.eye-protection .ombox-image-crop-controls { background: var(--bg-card, #fbfefb); color: var(--text-primary, #24422f); }
body.eye-protection .ombox-image-crop-help,
body.eye-protection .ombox-image-crop-controls label { color: var(--text-secondary, #52695a); }
body.eye-protection .ombox-image-crop-preset { color: var(--text-primary, #24422f); background: var(--bg-card, #fbfefb); border-color: var(--border-color, #b9cabd); }
body.eye-protection .ombox-image-crop-preset span { color: var(--text-secondary, #52695a); }
body.eye-protection .ombox-image-crop-preset.is-active,
body.eye-protection .ombox-image-crop-preset[aria-pressed="true"] { color: var(--primary-color, #39734b); background: rgba(57, 115, 75, .1); border-color: var(--primary-color, #39734b); }
body.eye-protection .ombox-image-crop-result > div { color: var(--text-secondary, #52695a); }
body.eye-protection .ombox-image-crop-result canvas { border-color: var(--border-color, #b9cabd); }
@media (max-width: 760px) {
    .ombox-image-crop-layout { grid-template-columns: 1fr; }
    .ombox-image-crop-stage { min-height: 340px; }
    .ombox-image-crop-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ombox-image-crop-controls > * { min-width: 0; }
    .ombox-image-crop-presets { grid-column: 1 / -1; }
    .ombox-image-crop-help { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
    .ombox-image-crop-preset-grid { grid-template-columns: 1fr; }
}
