
.plan-annotation-dialog {
  width: min(1040px, calc(100vw - 1.25rem));
  max-height: calc(100dvh - 1.25rem);
  padding: clamp(1rem, 2vw, 1.5rem);
  overflow: auto;
}
.annotation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.annotation-header h2 { margin: .15rem 0 .35rem; }
.annotation-intro {
  max-width: 74ch;
  color: var(--ink-muted, #53615c);
  margin: .25rem 0 1rem;
}
.annotation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr);
  gap: 1rem;
  align-items: start;
}
.annotation-workspace,
.annotation-controls {
  border: 1px solid rgba(21, 76, 61, .18);
  border-radius: 14px;
  background: #fffdfa;
  padding: .8rem;
}
.annotation-stage-wrap {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(21, 76, 61, .25);
  border-radius: 10px;
  background: #f8f4ed;
}
.annotation-stage-wrap canvas {
  display: block;
  width: min(100%, 760px);
  max-height: min(66dvh, 760px);
  aspect-ratio: 1;
  touch-action: none;
  cursor: crosshair;
}
.annotation-controls {
  display: grid;
  gap: .65rem;
}
.annotation-controls h3 {
  margin: .3rem 0 -.2rem;
  font-size: .92rem;
}
.annotation-controls label {
  display: grid;
  gap: .3rem;
  font-size: .87rem;
  font-weight: 600;
}
.annotation-controls select,
.annotation-controls input[type="number"] {
  width: 100%;
  min-height: 44px;
}
.annotation-actions,
.annotation-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.annotation-actions button,
.annotation-tool {
  min-height: 44px;
  border: 1px solid rgba(21, 76, 61, .32);
  border-radius: 9px;
  background: #fff;
  color: #173e33;
  padding: .45rem .65rem;
  font: inherit;
}
.annotation-tool.is-selected {
  background: #164c3d;
  border-color: #164c3d;
  color: #fff;
}
.annotation-toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
  font-weight: 500 !important;
}
.annotation-toggle input { min-width: 20px; min-height: 20px; }
.annotation-summary {
  display: grid;
  gap: .25rem;
  padding: .65rem;
  border-radius: 9px;
  background: #eef5f1;
  color: #244a3d;
  font-size: .83rem;
}
.annotation-summary strong { color: #173e33; }
.plan-annotation-saved {
  margin-top: 1rem;
}
.plan-annotation-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  padding: .65rem 0;
  border-top: 1px solid rgba(21, 76, 61, .12);
}
.plan-annotation-card p {
  flex: 1 1 220px;
  margin: 0;
}
.plan-annotation-card small { flex-basis: 100%; color: var(--ink-muted, #53615c); }
.plan-annotation-card .text-action {
  min-height: 40px;
}
@media (max-width: 760px) {
  .plan-annotation-dialog { width: min(100vw, 100%); max-height: 100dvh; border-radius: 0; }
  .annotation-layout { grid-template-columns: minmax(0, 1fr); }
  .annotation-stage-wrap canvas { max-height: 48dvh; }
  .annotation-controls { order: 2; }
  .annotation-actions button,
  .annotation-tool { flex: 1 1 132px; }
}
