/* v384 — stuffing-only exact-selection crop. Never loaded into the normal Photo Report workflow. */
.v384-true-crop-trigger {
  appearance: none;
  border: 1px solid #b5232d;
  background: #fff;
  color: #9c1f28;
  border-radius: 8px;
  min-height: 34px;
  padding: 7px 11px;
  margin: 5px 4px 8px;
  font: 700 12px/1.1 Inter, Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45, 55, 72, .08);
  transition: .16s ease;
}
.v384-true-crop-trigger:hover { background:#9c1f28; color:#fff; transform:translateY(-1px); }
.v384-true-crop-trigger.is-cropped { background:#eaf7ef; border-color:#23864f; color:#176a3c; }

.v384-crop-dialog {
  width: min(1500px, 98vw);
  height: min(930px, 96vh);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  color: #152033;
  background: #fff;
  box-shadow: 0 30px 90px rgba(8, 18, 34, .42);
}
.v384-crop-dialog::backdrop { background: rgba(9, 18, 31, .78); backdrop-filter: blur(4px); }
.v384-crop-shell { display:grid; grid-template-rows:auto 1fr auto; height:100%; min-height:0; }
.v384-crop-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:18px 22px 15px; border-bottom:1px solid #dce3eb; background:#fff; }
.v384-crop-header small { display:block; color:#a51f29; font:800 10px/1.2 Inter,Arial,sans-serif; letter-spacing:.08em; }
.v384-crop-header h2 { margin:4px 0 2px; font:800 24px/1.05 Inter,Arial,sans-serif; color:#101a2a; }
.v384-crop-header p { margin:0; color:#5b6779; font:500 13px/1.4 Inter,Arial,sans-serif; }
.v384-icon-button { width:40px; height:40px; border:0; border-radius:10px; background:#eef2f6; color:#26354b; font-size:27px; cursor:pointer; }
.v384-crop-body { display:grid; grid-template-columns:minmax(0, 1fr) 360px; min-height:0; background:#172232; }
.v384-crop-workspace { display:grid; grid-template-rows:minmax(0,1fr) auto; min-height:0; padding:14px; }
.v384-crop-stage { position:relative; display:flex; align-items:center; justify-content:center; min-height:0; overflow:hidden; border-radius:12px; background:#0e1724; outline:none; touch-action:none; user-select:none; }
.v384-crop-source { display:block; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; pointer-events:none; user-select:none; }
.v384-loading { position:absolute; inset:0; display:grid; place-items:center; color:#dce5ef; font:700 14px Inter,Arial,sans-serif; }
.v384-shade { position:absolute; background:rgba(2, 7, 14, .66); pointer-events:none; }
.v384-selection { position:absolute; box-sizing:border-box; border:3px solid #fff; outline:2px solid #b51f29; box-shadow:0 0 0 1px rgba(255,255,255,.35), 0 4px 28px rgba(0,0,0,.35); cursor:move; touch-action:none; }
.v384-selection:focus { outline:3px solid #e33b45; }
.v384-grid-line { position:absolute; display:block; background:rgba(255,255,255,.7); pointer-events:none; }
.v384-grid-v1,.v384-grid-v2 { top:0; bottom:0; width:1px; }
.v384-grid-v1 { left:33.333%; }.v384-grid-v2 { left:66.666%; }
.v384-grid-h1,.v384-grid-h2 { left:0; right:0; height:1px; }
.v384-grid-h1 { top:33.333%; }.v384-grid-h2 { top:66.666%; }
.v384-handle { position:absolute; width:16px; height:16px; background:#fff; border:3px solid #b51f29; border-radius:50%; box-shadow:0 1px 6px rgba(0,0,0,.35); }
.v384-handle-nw { left:-10px; top:-10px; cursor:nwse-resize; }.v384-handle-n { left:calc(50% - 8px); top:-10px; cursor:ns-resize; }.v384-handle-ne { right:-10px; top:-10px; cursor:nesw-resize; }
.v384-handle-e { right:-10px; top:calc(50% - 8px); cursor:ew-resize; }.v384-handle-se { right:-10px; bottom:-10px; cursor:nwse-resize; }.v384-handle-s { left:calc(50% - 8px); bottom:-10px; cursor:ns-resize; }
.v384-handle-sw { left:-10px; bottom:-10px; cursor:nesw-resize; }.v384-handle-w { left:-10px; top:calc(50% - 8px); cursor:ew-resize; }
.v384-crop-help { padding:10px 8px 0; color:#c6d0dc; font:500 12px/1.35 Inter,Arial,sans-serif; }
.v384-crop-help b { color:#fff; }
.v384-crop-panel { min-height:0; overflow:auto; padding:16px; background:#f5f7fa; border-left:1px solid #d8e0e9; }
.v384-result-card,.v384-tools-card,.v384-warning-card { background:#fff; border:1px solid #d9e1ea; border-radius:12px; padding:13px; margin-bottom:12px; box-shadow:0 3px 12px rgba(29,42,60,.05); }
.v384-section-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.v384-section-title span { font:800 13px Inter,Arial,sans-serif; color:#172235; }
.v384-section-title b { color:#a5222b; font:800 11px Inter,Arial,sans-serif; }
.v384-section-title small { color:#687588; font:600 10px Inter,Arial,sans-serif; text-align:right; }
.v384-crop-preview { display:block; width:100%; aspect-ratio:3/2; height:auto; border-radius:8px; border:1px solid #d7dee7; background:#edf1f5; }
.v384-result-metrics { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:9px; }
.v384-result-metrics span { display:flex; flex-direction:column; gap:3px; padding:8px; border-radius:8px; background:#f3f6f9; color:#687588; font:600 10px Inter,Arial,sans-serif; }
.v384-result-metrics b { color:#172235; font-size:12px; }
.v384-ratio-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.v384-ratio-grid button,.v384-shortcuts button,.v384-history-actions button { border:1px solid #ccd6e1; border-radius:8px; background:#fff; color:#26354a; padding:9px 8px; font:700 11px Inter,Arial,sans-serif; cursor:pointer; }
.v384-ratio-grid button.active { background:#172235; border-color:#172235; color:#fff; }
.v384-ratio-grid button:first-child { grid-column:1/-1; }
.v384-shortcuts { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:10px; }
.v384-shortcuts button:last-child { grid-column:1/-1; color:#a5222b; border-color:#d8a4a8; }
.v384-history-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:10px; }
.v384-history-actions button:disabled { opacity:.4; cursor:not-allowed; }
.v384-warning-card { display:flex; flex-direction:column; gap:5px; border-left:4px solid #2f855a; }
.v384-warning-card b { color:#1e6a45; font:800 12px Inter,Arial,sans-serif; }
.v384-warning-card span { color:#5e6b7b; font:500 11px/1.4 Inter,Arial,sans-serif; }
.v384-crop-footer { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:13px 18px; border-top:1px solid #dce3eb; background:#fff; }
.v384-crop-footer > span { max-width:42%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#536174; font:700 12px Inter,Arial,sans-serif; }
.v384-crop-footer > div { display:flex; gap:8px; }
.v384-crop-footer button { min-height:40px; border-radius:9px; padding:9px 15px; font:800 12px Inter,Arial,sans-serif; cursor:pointer; }
.v384-secondary { border:1px solid #cbd5df; color:#26354a; background:#fff; }
.v384-primary { border:1px solid #a51f29; background:#a51f29; color:#fff; }
.v384-primary-next { background:#172235; border-color:#172235; }
.v384-crop-footer button:disabled { opacity:.55; cursor:wait; }

@media (max-width: 980px) {
  .v384-crop-dialog { width:100vw; height:100dvh; border-radius:0; }
  .v384-crop-body { grid-template-columns:1fr; grid-template-rows:minmax(55vh,1fr) auto; overflow:auto; }
  .v384-crop-panel { border-left:0; border-top:1px solid #d8e0e9; }
  .v384-crop-footer { align-items:flex-start; flex-direction:column; }
  .v384-crop-footer > span { max-width:100%; }
  .v384-crop-footer > div { width:100%; display:grid; grid-template-columns:1fr 1fr; }
  .v384-crop-footer .v384-secondary { grid-column:1/-1; }
}
