/* "Generalize to different models & harnesses" (user 12-01/02): three 2:1 photo tiles, then a 2x4 grid of synced
   views (one canvas behind eight framed cells) */
.ag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2.4vw, 22px);
  max-width: 760px; margin: 0.4rem auto 1.2rem; padding: 6px; container-type: inline-size; }
.ag-card { position: relative; aspect-ratio: 2 / 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden;
  cursor: pointer; background: #fff; font-family: inherit;
  box-shadow: 0 0 14px 2px rgba(60, 90, 150, 0.24), 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s, box-shadow 0.15s; }
.ag-card:hover { transform: translateY(-2px); box-shadow: 0 0 16px 3px rgba(60, 80, 120, 0.24), 0 0 0 1px rgba(0, 0, 0, 0.08); }
.ag-card.is-on { box-shadow: 0 0 0 2px #363636, 0 0 18px 4px rgba(54, 54, 54, 0.32); }

.ag-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: flex-end;
  margin-bottom: 0.6rem; }
.ag-stage { position: relative; width: 100%; user-select: none; cursor: grab; touch-action: pan-y; }
.ag-stage:active { cursor: grabbing; }
.ag-canvas { position: absolute; inset: 0; }
.ag-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.ag-cells { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ag-cell { position: relative; aspect-ratio: 1 / 1; border: 1px solid #e6e6e6; border-radius: 8px; }
.ag-tag { position: absolute; top: 6px; right: 6px; max-width: 75%; text-align: right; font-size: 0.72rem;
  line-height: 1.2; color: #666; background: rgba(255, 255, 255, 0.72); border-radius: 5px; padding: 3px 7px;
  pointer-events: none; }
.ag-tag b { display: block; font-weight: 600; color: #222; }
.ag-tag em { display: block; font-style: normal; color: #b06a00; }
.ag-tag em:empty { display: none; }
.ag-missing { display: none; position: absolute; inset: 0; align-items: center; justify-content: center;
  padding: 1rem; text-align: center; font-size: 0.78rem; color: #b06a00; }
.ag-cell.is-missing .ag-missing { display: flex; }
.ag-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.6); color: #555; font-size: 0.95rem; z-index: 3; }
.ag-loading.is-hidden { display: none; }
@media (max-width: 700px) {
  .ag-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
