/* THE ANNOTATOR AS A LAYOUT EDITOR (Simon, 5 Nov 2026: "make it so you can
   also drag in additional images and mask, resize, change position rotation
   etc"). js/panel/32b-anno-layers.js. The window grows a layers column; the
   canvas gets an overlay above it for the handles, the brush and the lasso.

   THE BACKDROP LETS DRAGS THROUGH. Gallery tiles are the first place a
   picture is dragged in from, and a full-screen backdrop that eats pointer
   events makes the gallery behind it untouchable. The window itself still
   takes every event; the dimmed area around it is only dimmed. */
#annotate { pointer-events: none; }
#annotate .anno-card { pointer-events: auto; }
.anno-card {
  width: min(1180px, 94vw); height: min(860px, 90vh);
}
.anno-head .anno-tool.anno-tw { width: auto; padding: 0 7px; font-size: 11px; }
.anno-field {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 3px;
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
}
.anno-field input[type=range] { width: 84px; margin: 0; accent-color: var(--accent); }
.anno-field b { min-width: 22px; text-align: right; font-size: 11px; color: var(--text); font-variant-numeric: tabular-nums; }
#anno-size { width: 84px; }

.anno-body { flex: 1; min-height: 0; display: flex; gap: 10px; }
.anno-body #anno-canvas-wrap { flex: 1; min-width: 0; position: relative; overflow: hidden;
  background: repeating-conic-gradient(#1b1b1f 0% 25%, #151518 0% 50%) 0 0 / 16px 16px; border-radius: 3px; }
.anno-body #anno-canvas-wrap.al-drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
#anno-stage { position: relative; flex: none; box-shadow: 0 6px 24px rgba(0, 0, 0, .55); }
#anno-stage canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
#anno-stage #anno-canvas { max-width: none; max-height: none; border: 0; border-radius: 0; background: #fff; cursor: default; }
#anno-overlay { touch-action: none; user-select: none; cursor: crosshair; }

.anno-side { width: 220px; flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.anno-side-head { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-dim); }
.anno-side-head span { flex: 1; }
.anno-layers { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px;
  background: var(--card); border: 1px solid var(--border); border-radius: 3px; padding: 4px; }
.al-row { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 3px; cursor: pointer;
  border: 1px solid transparent; font-size: 11.5px; color: var(--text); }
.al-row:hover { background: rgba(255, 255, 255, .04); }
.al-row.on { border-color: var(--accent); background: rgba(229, 10, 78, .10); }
.al-row.off .al-th, .al-row.off .al-nm { opacity: .4; }
.al-eye { width: 22px; height: 22px; flex: none; border: 0; background: none; color: var(--text-dim); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 3px; }
.al-eye:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.al-th { width: 44px; height: 30px; flex: none; border-radius: 2px; border: 1px solid var(--border); }
.al-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-mk { flex: none; font-size: 9px; font-weight: 700; color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 2px; padding: 0 3px; }
.anno-props { display: flex; flex-direction: column; gap: 6px; }
.anno-props .anno-field input[type=range] { flex: 1; width: auto; }
.anno-lbtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.anno-lbtns .btn.small { padding: 0 4px; min-width: 0; }
.anno-lbtns #anno-dup, .anno-lbtns #anno-del { grid-column: span 2; }
.anno-lbtns button:disabled { opacity: .35; cursor: default; }
.anno-foot .anno-hint { flex: 1; min-width: 0; font-size: 11px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anno-foot button:disabled { opacity: .4; cursor: default; }
