.photo-annotation-editor { display: grid; gap: 1rem; max-width: 1080px; margin-inline: auto; padding: clamp(1rem, 3vw, 2rem); background: #fff; border: 1px solid #d8e2eb; border-radius: 20px; }
.photo-annotation-editor h2, .photo-annotation-editor h3, .photo-annotation-editor p { margin: 0; }
.photo-annotation-help { color: #526176; line-height: 1.55; font-size: .95rem; }
.photo-annotation-toolbar, .photo-annotation-footer, .photo-annotation-shape-list { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.photo-annotation-editor .button { min-height: 46px; }
.photo-annotation-editor button[aria-pressed="true"] { outline: 3px solid #0e7d8d; outline-offset: 2px; background: #e9f6f8; color: #142437; }
.photo-annotation-editor button:focus-visible, .photo-annotation-editor input:focus-visible, .photo-annotation-canvas:focus-visible { outline: 3px solid #0284c7; outline-offset: 3px; }
.photo-annotation-color-red::before, .photo-annotation-color-dark::before, .photo-annotation-color-green::before { content: ''; width: 1rem; height: 1rem; border-radius: 50%; display: inline-block; margin-right: .5rem; vertical-align: -.12rem; }
.photo-annotation-color-red::before { background: #dc2626; }
.photo-annotation-color-dark::before { background: #172033; }
.photo-annotation-color-green::before { background: #15803d; }
.photo-annotation-text-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .75rem; align-items: center; }
.photo-annotation-text-field label, .photo-annotation-text-field p { grid-column: 1 / -1; }
.photo-annotation-text-field input { min-width: 0; width: 100%; }
.photo-annotation-stage { display: flex; justify-content: center; align-items: center; min-width: 0; padding: .5rem; border: 1px solid #a8b8c8; border-radius: 12px; background: #e9eef3; overflow: hidden; }
.photo-annotation-canvas { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; touch-action: none; cursor: crosshair; }
.photo-annotation-status { min-height: 1.6em; line-height: 1.5; color: #17384c; }
.photo-annotation-shape-list .button { max-width: 100%; overflow-wrap: anywhere; text-align: left; white-space: normal; }
.photo-annotation-footer { justify-content: flex-end; padding-top: 1rem; border-top: 1px solid #d8e2eb; }
.photo-annotation-saved-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.photo-annotation-saved-actions select { max-width: 100%; min-height: 44px; font-size: 1rem; }
.photo-annotation-editor[hidden], .photo-annotation-editor [hidden], .photo-annotation-saved-actions[hidden] { display: none; }
@media (max-width: 600px) {
  .photo-annotation-text-field { grid-template-columns: minmax(0, 1fr); }
  .photo-annotation-text-field .button { justify-self: start; }
  .photo-annotation-toolbar .button { flex: 1 1 auto; padding-inline: .8rem; }
  .photo-annotation-footer { flex-direction: column-reverse; align-items: stretch; }
  .photo-annotation-canvas { max-height: 52vh; }
}
