.ba-tool { max-width: 1200px; margin: 0 auto; padding: 12px 0 32px; }
.ba-tool [hidden] { display: none !important; }
.ba-back { display: inline-flex; align-items: center; min-height: 44px; color: #315964; font-weight: 700; text-decoration: none; }
.ba-tool header { margin: 10px 0 24px; }
.ba-tool h2 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); }
.ba-tool header p, .ba-note { color: #526670; line-height: 1.5; }
.ba-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.ba-controls, .ba-result { min-width: 0; }
.ba-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ba-photo-card { border: 1px solid #dbe4e8; background: #fff; border-radius: 16px; padding: 14px; min-width: 0; }
.ba-photo-card h3 { margin: 0 0 12px; font-size: 17px; }
.ba-source { aspect-ratio: 4/3; display: grid; place-items: center; background: #f0f5f5; border-radius: 10px; overflow: hidden; }
.ba-source img { width: 100%; height: 100%; object-fit: contain; }
.ba-source span { padding: 14px; text-align: center; color: #60727a; font-size: 13px; }
.ba-photo-actions { display: grid; gap: 4px; margin-top: 12px; }
.ba-tool button, .ba-tool .button, .ba-tool select { min-height: 44px; }
.ba-photo-actions .button { width: 100%; padding: 10px 8px; white-space: normal; }
.ba-camera, .ba-reset { background: transparent; color: #315964; border: 0; text-decoration: underline; cursor: pointer; }
.ba-options { display: grid; gap: 14px; margin: 20px 0 12px; }
.ba-options label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.ba-options select { width: 100%; min-width: 0; border: 1px solid #cad8de; border-radius: 10px; padding: 10px; background: #fff; color: #183d4e; font: inherit; }
.ba-edit-actions, .ba-save-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ba-note { font-size: 13px; margin: 16px 0 0; }
.ba-result { border: 1px solid #dbe4e8; background: #fff; border-radius: 18px; padding: 18px; }
.ba-preview { min-height: 240px; background: #edf3f3; border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.ba-preview img { width: 100%; height: auto; display: block; }
.ba-preview p { padding: 28px; text-align: center; color: #60727a; }
.ba-status { min-height: 24px; color: #315964; line-height: 1.5; margin: 14px 0; }
.ba-tool :focus-visible { outline: 3px solid #16857c; outline-offset: 3px; }
.ba-tool button:disabled { cursor: default; opacity: .55; }
@media (max-width: 720px) {
  .ba-tool { padding-top: 0; }
  .ba-workspace { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ba-tool header { margin: 4px 0 18px; }
  .ba-photo-card { padding: 10px; }
  .ba-photos { gap: 8px; }
  .ba-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ba-options label:last-child { grid-column: 1 / -1; }
  .ba-preview { min-height: 180px; }
  .ba-save-actions .button { flex: 1 1 150px; }
}
.ba-preview [data-ba-preview] { cursor: zoom-in; }
.ba-preview:has(.ba-edit-canvas) { min-height: 0; }
.ba-edit-canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: grab; }
.ba-edit-canvas:active { cursor: grabbing; }
.ba-framing-controls { margin-top: 16px; display: grid; gap: 12px; }
.ba-framing-controls p { margin: 0; font-size: 13px; color: #526670; }
.ba-layer-buttons { display: flex; gap: 6px; }
.ba-layer-buttons button { flex: 1; border: 1px solid #cad8de; border-radius: 8px; background: #fff; color: #183d4e; font-weight: 700; }
.ba-layer-buttons button[aria-pressed=true] { background: #12394b; color: white; }
.ba-framing-controls label { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 14px; font-weight: 700; }
.ba-framing-controls input { width: 100%; min-width: 0; grid-column: 1 / -1; accent-color: #008e87; }
.ba-framing-controls .ba-edit-actions { justify-content: flex-end; }
@media (max-width: 720px) {
  .ba-options label:last-child { grid-column: auto; }
  .ba-framing-controls .ba-edit-actions .button { flex: 1 1 auto; }
}
